@vue/devtools-kit 7.0.14 → 7.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2138 -2066
- package/dist/index.d.cts +413 -432
- package/dist/index.d.ts +413 -432
- package/dist/index.js +2124 -2041
- package/global.d.ts +21 -0
- package/package.json +9 -4
- package/types.d.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -18,18 +18,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
}
|
|
19
19
|
return to;
|
|
20
20
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode,
|
|
21
|
+
var __toESM = (mod, isNodeMode, target9) => (target9 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
22
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
23
|
// file that has been converted to a CommonJS file using a Babel-
|
|
24
24
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
25
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target9, "default", { value: mod, enumerable: true }) : target9,
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.0.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.0.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -1575,49 +1575,57 @@ var require_speakingurl2 = __commonJS({
|
|
|
1575
1575
|
// src/index.ts
|
|
1576
1576
|
init_esm_shims();
|
|
1577
1577
|
|
|
1578
|
-
// src/core/
|
|
1578
|
+
// src/core/index.ts
|
|
1579
1579
|
init_esm_shims();
|
|
1580
|
-
import { target as
|
|
1581
|
-
import { DevToolsHooks as DevToolsHooks3 } from "@vue/devtools-schema";
|
|
1580
|
+
import { target as target8 } from "@vue/devtools-shared";
|
|
1582
1581
|
|
|
1583
|
-
// src/
|
|
1582
|
+
// src/hook/index.ts
|
|
1584
1583
|
init_esm_shims();
|
|
1584
|
+
import { target } from "@vue/devtools-shared";
|
|
1585
|
+
import { createHooks } from "hookable";
|
|
1585
1586
|
|
|
1586
|
-
// src/
|
|
1587
|
+
// src/types/index.ts
|
|
1587
1588
|
init_esm_shims();
|
|
1588
|
-
import { deepClone as deepClone2, target as global2 } from "@vue/devtools-shared";
|
|
1589
|
-
import { debounce as debounce2 } from "perfect-debounce";
|
|
1590
1589
|
|
|
1591
|
-
// src/
|
|
1590
|
+
// src/types/app.ts
|
|
1592
1591
|
init_esm_shims();
|
|
1593
|
-
import { deepClone, target as global } from "@vue/devtools-shared";
|
|
1594
|
-
import { debounce } from "perfect-debounce";
|
|
1595
1592
|
|
|
1596
|
-
// src/
|
|
1593
|
+
// src/types/hook.ts
|
|
1597
1594
|
init_esm_shims();
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1595
|
+
|
|
1596
|
+
// src/types/state.ts
|
|
1597
|
+
init_esm_shims();
|
|
1598
|
+
|
|
1599
|
+
// src/types/context.ts
|
|
1600
|
+
init_esm_shims();
|
|
1601
|
+
|
|
1602
|
+
// src/types/router.ts
|
|
1603
|
+
init_esm_shims();
|
|
1604
|
+
|
|
1605
|
+
// src/types/env.ts
|
|
1606
|
+
init_esm_shims();
|
|
1607
|
+
|
|
1608
|
+
// src/hook/index.ts
|
|
1601
1609
|
var _a, _b;
|
|
1602
1610
|
var devtoolsHooks = (_b = (_a = target).__VUE_DEVTOOLS_HOOK) != null ? _b : _a.__VUE_DEVTOOLS_HOOK = createHooks();
|
|
1603
1611
|
var on = {
|
|
1604
1612
|
vueAppInit(fn) {
|
|
1605
|
-
devtoolsHooks.hook(
|
|
1613
|
+
devtoolsHooks.hook("app:init" /* APP_INIT */, fn);
|
|
1606
1614
|
},
|
|
1607
1615
|
vueAppConnected(fn) {
|
|
1608
|
-
devtoolsHooks.hook(
|
|
1616
|
+
devtoolsHooks.hook("app:connected" /* APP_CONNECTED */, fn);
|
|
1609
1617
|
},
|
|
1610
1618
|
componentAdded(fn) {
|
|
1611
|
-
return devtoolsHooks.hook(
|
|
1619
|
+
return devtoolsHooks.hook("component:added" /* COMPONENT_ADDED */, fn);
|
|
1612
1620
|
},
|
|
1613
1621
|
componentUpdated(fn) {
|
|
1614
|
-
return devtoolsHooks.hook(
|
|
1622
|
+
return devtoolsHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
|
|
1615
1623
|
},
|
|
1616
1624
|
componentRemoved(fn) {
|
|
1617
|
-
return devtoolsHooks.hook(
|
|
1625
|
+
return devtoolsHooks.hook("component:removed" /* COMPONENT_REMOVED */, fn);
|
|
1618
1626
|
},
|
|
1619
1627
|
setupDevtoolsPlugin(fn) {
|
|
1620
|
-
devtoolsHooks.hook(
|
|
1628
|
+
devtoolsHooks.hook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, fn);
|
|
1621
1629
|
}
|
|
1622
1630
|
};
|
|
1623
1631
|
function createDevToolsHook() {
|
|
@@ -1628,10 +1636,10 @@ function createDevToolsHook() {
|
|
|
1628
1636
|
apps: {},
|
|
1629
1637
|
events: /* @__PURE__ */ new Map(),
|
|
1630
1638
|
on(event, fn) {
|
|
1631
|
-
var
|
|
1639
|
+
var _a10;
|
|
1632
1640
|
if (!this.events.has(event))
|
|
1633
1641
|
this.events.set(event, []);
|
|
1634
|
-
(
|
|
1642
|
+
(_a10 = this.events.get(event)) == null ? void 0 : _a10.push(fn);
|
|
1635
1643
|
return () => this.off(event, fn);
|
|
1636
1644
|
},
|
|
1637
1645
|
once(event, fn) {
|
|
@@ -1658,295 +1666,200 @@ function createDevToolsHook() {
|
|
|
1658
1666
|
}
|
|
1659
1667
|
function subscribeDevToolsHook() {
|
|
1660
1668
|
const hook2 = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1661
|
-
hook2.on(
|
|
1662
|
-
var
|
|
1663
|
-
if ((_c = (
|
|
1669
|
+
hook2.on("app:init" /* APP_INIT */, (app, version) => {
|
|
1670
|
+
var _a10, _b10, _c;
|
|
1671
|
+
if ((_c = (_b10 = (_a10 = app == null ? void 0 : app._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
|
|
1664
1672
|
return;
|
|
1665
|
-
devtoolsHooks.callHook(
|
|
1673
|
+
devtoolsHooks.callHook("app:init" /* APP_INIT */, app, version);
|
|
1666
1674
|
});
|
|
1667
|
-
hook2.on(
|
|
1668
|
-
var
|
|
1669
|
-
if ((_c = (
|
|
1675
|
+
hook2.on("component:added" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {
|
|
1676
|
+
var _a10, _b10, _c;
|
|
1677
|
+
if ((_c = (_b10 = (_a10 = app == null ? void 0 : app._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
|
|
1670
1678
|
return;
|
|
1671
1679
|
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1672
1680
|
return;
|
|
1673
|
-
devtoolsHooks.callHook(
|
|
1681
|
+
devtoolsHooks.callHook("component:added" /* COMPONENT_ADDED */, app, uid, parentUid, component);
|
|
1674
1682
|
});
|
|
1675
|
-
hook2.on(
|
|
1683
|
+
hook2.on("component:updated" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {
|
|
1676
1684
|
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1677
1685
|
return;
|
|
1678
|
-
devtoolsHooks.callHook(
|
|
1686
|
+
devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, app, uid, parentUid, component);
|
|
1679
1687
|
});
|
|
1680
|
-
hook2.on(
|
|
1688
|
+
hook2.on("component:removed" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {
|
|
1681
1689
|
if (!app || typeof uid !== "number" && !uid || !component)
|
|
1682
1690
|
return;
|
|
1683
|
-
devtoolsHooks.callHook(
|
|
1691
|
+
devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
|
|
1684
1692
|
});
|
|
1685
|
-
hook2.on(
|
|
1686
|
-
devtoolsHooks.callHook(
|
|
1693
|
+
hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn) => {
|
|
1694
|
+
devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1687
1695
|
});
|
|
1688
1696
|
}
|
|
1689
1697
|
var hook = {
|
|
1690
|
-
on
|
|
1698
|
+
on,
|
|
1699
|
+
setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1700
|
+
return devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
|
|
1701
|
+
}
|
|
1691
1702
|
};
|
|
1692
1703
|
|
|
1704
|
+
// src/state/index.ts
|
|
1705
|
+
init_esm_shims();
|
|
1706
|
+
|
|
1707
|
+
// src/state/state.ts
|
|
1708
|
+
init_esm_shims();
|
|
1709
|
+
import { target as global2 } from "@vue/devtools-shared";
|
|
1710
|
+
import { debounce as debounce3 } from "perfect-debounce";
|
|
1711
|
+
|
|
1712
|
+
// src/api/index.ts
|
|
1713
|
+
init_esm_shims();
|
|
1714
|
+
|
|
1715
|
+
// src/api/api.ts
|
|
1716
|
+
init_esm_shims();
|
|
1717
|
+
|
|
1718
|
+
// src/core/timeline/index.ts
|
|
1719
|
+
init_esm_shims();
|
|
1720
|
+
function addTimelineLayer(payload) {
|
|
1721
|
+
devtoolsContext.timelineLayer.push(payload);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
// src/core/inspector/index.ts
|
|
1725
|
+
init_esm_shims();
|
|
1726
|
+
function addInspector(payload) {
|
|
1727
|
+
devtoolsContext.inspector.push(payload);
|
|
1728
|
+
}
|
|
1729
|
+
function getInspector(inspectorId) {
|
|
1730
|
+
return devtoolsContext.inspector.find((inspector) => inspector.id === inspectorId);
|
|
1731
|
+
}
|
|
1732
|
+
function updateInspector(inspectorId, payload) {
|
|
1733
|
+
const inspector = getInspector(inspectorId);
|
|
1734
|
+
inspector && Object.assign(inspector, payload);
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
// src/core/app-record/index.ts
|
|
1738
|
+
init_esm_shims();
|
|
1739
|
+
var import_speakingurl = __toESM(require_speakingurl2(), 1);
|
|
1740
|
+
|
|
1741
|
+
// src/api/plugin.ts
|
|
1742
|
+
init_esm_shims();
|
|
1743
|
+
|
|
1693
1744
|
// src/core/router/index.ts
|
|
1694
|
-
|
|
1695
|
-
|
|
1745
|
+
init_esm_shims();
|
|
1746
|
+
import { deepClone, target as global } from "@vue/devtools-shared";
|
|
1747
|
+
import { debounce } from "perfect-debounce";
|
|
1748
|
+
|
|
1749
|
+
// src/api/hook.ts
|
|
1750
|
+
init_esm_shims();
|
|
1751
|
+
import { target as target2 } from "@vue/devtools-shared";
|
|
1752
|
+
import { createHooks as createHooks2 } from "hookable";
|
|
1696
1753
|
var _a2, _b2;
|
|
1697
|
-
(_b2 = (_a2 =
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1754
|
+
var apiHooks = (_b2 = (_a2 = target2).__VUE_DEVTOOLS_API_HOOK) != null ? _b2 : _a2.__VUE_DEVTOOLS_API_HOOK = createHooks2();
|
|
1755
|
+
|
|
1756
|
+
// src/core/router/index.ts
|
|
1757
|
+
function getRoutes(router) {
|
|
1758
|
+
const routesMap = /* @__PURE__ */ new Map();
|
|
1759
|
+
return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
|
|
1760
|
+
}
|
|
1761
|
+
function filterRoutes(routes) {
|
|
1762
|
+
return routes.map((item) => {
|
|
1763
|
+
let { path, name, children } = item;
|
|
1764
|
+
if (children == null ? void 0 : children.length)
|
|
1765
|
+
children = filterRoutes(children);
|
|
1766
|
+
return {
|
|
1767
|
+
path,
|
|
1768
|
+
name,
|
|
1769
|
+
children
|
|
1770
|
+
};
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
function filterCurrentRoute(route) {
|
|
1774
|
+
if (route) {
|
|
1775
|
+
const { fullPath, hash, href, path, name, matched, params, query } = route;
|
|
1776
|
+
return {
|
|
1777
|
+
fullPath,
|
|
1778
|
+
hash,
|
|
1779
|
+
href,
|
|
1780
|
+
path,
|
|
1781
|
+
name,
|
|
1782
|
+
params,
|
|
1783
|
+
query,
|
|
1784
|
+
matched: filterRoutes(matched)
|
|
1785
|
+
};
|
|
1707
1786
|
}
|
|
1708
|
-
|
|
1787
|
+
return route;
|
|
1788
|
+
}
|
|
1709
1789
|
function normalizeRouterInfo(appRecord) {
|
|
1710
|
-
const getRoutes = (router) => {
|
|
1711
|
-
const routesMap = /* @__PURE__ */ new Map();
|
|
1712
|
-
return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
|
|
1713
|
-
};
|
|
1714
|
-
function filterRoutes(routes) {
|
|
1715
|
-
return routes.map((item) => {
|
|
1716
|
-
let { path, name, children } = item;
|
|
1717
|
-
if (children == null ? void 0 : children.length)
|
|
1718
|
-
children = filterRoutes(children);
|
|
1719
|
-
return {
|
|
1720
|
-
path,
|
|
1721
|
-
name,
|
|
1722
|
-
children
|
|
1723
|
-
};
|
|
1724
|
-
});
|
|
1725
|
-
}
|
|
1726
|
-
function filterCurrentRoute(route) {
|
|
1727
|
-
if (route) {
|
|
1728
|
-
const { fullPath, hash, href, path, name, matched, params, query } = route;
|
|
1729
|
-
return {
|
|
1730
|
-
fullPath,
|
|
1731
|
-
hash,
|
|
1732
|
-
href,
|
|
1733
|
-
path,
|
|
1734
|
-
name,
|
|
1735
|
-
params,
|
|
1736
|
-
query,
|
|
1737
|
-
matched: filterRoutes(matched)
|
|
1738
|
-
};
|
|
1739
|
-
}
|
|
1740
|
-
return route;
|
|
1741
|
-
}
|
|
1742
1790
|
function init() {
|
|
1743
|
-
var
|
|
1744
|
-
const router = (
|
|
1791
|
+
var _a10;
|
|
1792
|
+
const router = (_a10 = appRecord.app) == null ? void 0 : _a10.config.globalProperties.$router;
|
|
1745
1793
|
const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
|
|
1746
1794
|
const routes = filterRoutes(getRoutes(router));
|
|
1747
1795
|
const c = console.warn;
|
|
1748
1796
|
console.warn = () => {
|
|
1749
1797
|
};
|
|
1750
|
-
global[
|
|
1798
|
+
global[ROUTER_INFO_KEY] = {
|
|
1751
1799
|
currentRoute: currentRoute ? deepClone(currentRoute) : {},
|
|
1752
1800
|
routes: deepClone(routes)
|
|
1753
1801
|
};
|
|
1754
|
-
global[
|
|
1802
|
+
global[ROUTER_KEY] = router;
|
|
1755
1803
|
console.warn = c;
|
|
1756
1804
|
}
|
|
1757
1805
|
init();
|
|
1758
1806
|
hook.on.componentUpdated(debounce(() => {
|
|
1759
1807
|
init();
|
|
1760
|
-
apiHooks.callHook("router-info:updated" /* ROUTER_INFO_UPDATED */, global[
|
|
1808
|
+
apiHooks.callHook("router-info:updated" /* ROUTER_INFO_UPDATED */, global[ROUTER_INFO_KEY]);
|
|
1761
1809
|
}, 200));
|
|
1762
1810
|
}
|
|
1763
1811
|
function getRouterDevToolsId(id) {
|
|
1764
1812
|
return id.replace(/\D/g, "") || "0";
|
|
1765
1813
|
}
|
|
1766
1814
|
|
|
1767
|
-
// src/
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
};
|
|
1780
|
-
var _a4, _b4;
|
|
1781
|
-
(_b4 = (_a4 = global2)[StateKey]) != null ? _b4 : _a4[StateKey] = {
|
|
1782
|
-
connected: false,
|
|
1783
|
-
clientConnected: false,
|
|
1784
|
-
appRecords: [],
|
|
1785
|
-
activeAppRecord: null,
|
|
1786
|
-
selectedComponentId: null,
|
|
1787
|
-
pluginBuffer: [],
|
|
1788
|
-
tabs: [],
|
|
1789
|
-
commands: [],
|
|
1790
|
-
vitePluginDetected: false,
|
|
1791
|
-
activeAppRecordId: null
|
|
1792
|
-
};
|
|
1793
|
-
var _a5, _b5;
|
|
1794
|
-
(_b5 = (_a5 = global2)[ContextKey]) != null ? _b5 : _a5[ContextKey] = deepClone2(DefaultContext);
|
|
1795
|
-
var callStateUpdatedHook = debounce2((state, oldState) => {
|
|
1796
|
-
apiHooks.callHook("devtools:state-updated" /* DEVTOOLS_STATE_UPDATED */, state, oldState);
|
|
1797
|
-
}, 80);
|
|
1798
|
-
var callConnectedUpdatedHook = debounce2((state, oldState) => {
|
|
1799
|
-
apiHooks.callHook("devtools:connected-updated" /* DEVTOOLS_CONNECTED_UPDATED */, state, oldState);
|
|
1800
|
-
}, 80);
|
|
1801
|
-
var devtoolsState = new Proxy(global2[StateKey], {
|
|
1802
|
-
get(target8, property) {
|
|
1803
|
-
return global2[StateKey][property];
|
|
1804
|
-
},
|
|
1805
|
-
set(target8, property, value) {
|
|
1806
|
-
var _a9;
|
|
1807
|
-
const oldState = { ...global2[StateKey] };
|
|
1808
|
-
target8[property] = value;
|
|
1809
|
-
global2[StateKey][property] = value;
|
|
1810
|
-
if (property === "activeAppRecord") {
|
|
1811
|
-
global2[ContextKey].appRecord = value;
|
|
1812
|
-
global2[ContextKey].api = value.api;
|
|
1813
|
-
global2[ContextKey].inspector = (_a9 = value.inspector) != null ? _a9 : [];
|
|
1814
|
-
normalizeRouterInfo(value);
|
|
1815
|
-
global2[ContextKey].routerInfo = devtoolsRouterInfo;
|
|
1815
|
+
// src/api/plugin.ts
|
|
1816
|
+
function collectDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1817
|
+
devtoolsState.pluginBuffer.push([pluginDescriptor, setupFn]);
|
|
1818
|
+
}
|
|
1819
|
+
function setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1820
|
+
return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
|
|
1821
|
+
}
|
|
1822
|
+
function registerPlugin(app, api) {
|
|
1823
|
+
const plugins = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.app === app);
|
|
1824
|
+
plugins.forEach(async ([plugin, setupFn]) => {
|
|
1825
|
+
if (plugin.packageName === "vue-query") {
|
|
1826
|
+
return;
|
|
1816
1827
|
}
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
}
|
|
1826
|
-
});
|
|
1827
|
-
Object.defineProperty(devtoolsState.tabs, "push", {
|
|
1828
|
-
configurable: true,
|
|
1829
|
-
value(...items) {
|
|
1830
|
-
const result = Array.prototype.push.apply(this, items);
|
|
1831
|
-
devtoolsState.tabs = this;
|
|
1832
|
-
apiHooks.callHook("custom-tabs:updated" /* CUSTOM_TABS_UPDATED */, this);
|
|
1833
|
-
return result;
|
|
1834
|
-
}
|
|
1835
|
-
});
|
|
1836
|
-
["push", "splice"].forEach((method) => {
|
|
1837
|
-
Object.defineProperty(devtoolsState.commands, method, {
|
|
1838
|
-
configurable: true,
|
|
1839
|
-
value(...args) {
|
|
1840
|
-
const result = Array.prototype[method].apply(this, args);
|
|
1841
|
-
devtoolsState.commands = this;
|
|
1842
|
-
apiHooks.callHook("custom-commands:updated" /* CUSTOM_COMMANDS_UPDATED */, this);
|
|
1843
|
-
return result;
|
|
1828
|
+
if (plugin.packageName === "vue-router") {
|
|
1829
|
+
const id = getRouterDevToolsId(`${plugin.id}`);
|
|
1830
|
+
if (plugin.app === app) {
|
|
1831
|
+
devtoolsAppRecords.value = devtoolsAppRecords.value.map((item) => ({
|
|
1832
|
+
...item,
|
|
1833
|
+
routerId: id
|
|
1834
|
+
}));
|
|
1835
|
+
}
|
|
1844
1836
|
}
|
|
1837
|
+
setupFn(api);
|
|
1838
|
+
});
|
|
1839
|
+
devtoolsAppRecords.value = devtoolsAppRecords.value.map((record) => {
|
|
1840
|
+
var _a10, _b10;
|
|
1841
|
+
const globalProperties = (_b10 = (_a10 = record.app) == null ? void 0 : _a10.config) == null ? void 0 : _b10.globalProperties;
|
|
1842
|
+
if (!globalProperties)
|
|
1843
|
+
return record;
|
|
1844
|
+
return {
|
|
1845
|
+
...record,
|
|
1846
|
+
moduleDetectives: {
|
|
1847
|
+
vueRouter: !!globalProperties.$router,
|
|
1848
|
+
pinia: !!globalProperties.$pinia,
|
|
1849
|
+
vueI18n: !!globalProperties.$i18n
|
|
1850
|
+
}
|
|
1851
|
+
};
|
|
1845
1852
|
});
|
|
1846
|
-
});
|
|
1847
|
-
var devtoolsContext = new Proxy(global2[ContextKey], {
|
|
1848
|
-
get(target8, property) {
|
|
1849
|
-
if (property === "router")
|
|
1850
|
-
return global2[RouterKey];
|
|
1851
|
-
else if (property === "clear")
|
|
1852
|
-
return clearDevToolsContext;
|
|
1853
|
-
return global2[ContextKey][property];
|
|
1854
|
-
},
|
|
1855
|
-
set(target8, property, value) {
|
|
1856
|
-
if (property === "componentPluginHookBuffer")
|
|
1857
|
-
global2[ContextKey][property] = value;
|
|
1858
|
-
return true;
|
|
1859
|
-
}
|
|
1860
|
-
});
|
|
1861
|
-
function clearDevToolsContext() {
|
|
1862
|
-
global2[ContextKey] = deepClone2(DefaultContext);
|
|
1863
1853
|
}
|
|
1864
1854
|
|
|
1865
|
-
// src/
|
|
1866
|
-
init_esm_shims();
|
|
1867
|
-
|
|
1868
|
-
// src/shared/util.ts
|
|
1869
|
-
init_esm_shims();
|
|
1870
|
-
|
|
1871
|
-
// src/core/component/state/replacer.ts
|
|
1872
|
-
init_esm_shims();
|
|
1873
|
-
|
|
1874
|
-
// src/core/component/state/constants.ts
|
|
1855
|
+
// src/plugins/index.ts
|
|
1875
1856
|
init_esm_shims();
|
|
1876
|
-
var vueBuiltins = /* @__PURE__ */ new Set([
|
|
1877
|
-
"nextTick",
|
|
1878
|
-
"defineComponent",
|
|
1879
|
-
"defineAsyncComponent",
|
|
1880
|
-
"defineCustomElement",
|
|
1881
|
-
"ref",
|
|
1882
|
-
"computed",
|
|
1883
|
-
"reactive",
|
|
1884
|
-
"readonly",
|
|
1885
|
-
"watchEffect",
|
|
1886
|
-
"watchPostEffect",
|
|
1887
|
-
"watchSyncEffect",
|
|
1888
|
-
"watch",
|
|
1889
|
-
"isRef",
|
|
1890
|
-
"unref",
|
|
1891
|
-
"toRef",
|
|
1892
|
-
"toRefs",
|
|
1893
|
-
"isProxy",
|
|
1894
|
-
"isReactive",
|
|
1895
|
-
"isReadonly",
|
|
1896
|
-
"shallowRef",
|
|
1897
|
-
"triggerRef",
|
|
1898
|
-
"customRef",
|
|
1899
|
-
"shallowReactive",
|
|
1900
|
-
"shallowReadonly",
|
|
1901
|
-
"toRaw",
|
|
1902
|
-
"markRaw",
|
|
1903
|
-
"effectScope",
|
|
1904
|
-
"getCurrentScope",
|
|
1905
|
-
"onScopeDispose",
|
|
1906
|
-
"onMounted",
|
|
1907
|
-
"onUpdated",
|
|
1908
|
-
"onUnmounted",
|
|
1909
|
-
"onBeforeMount",
|
|
1910
|
-
"onBeforeUpdate",
|
|
1911
|
-
"onBeforeUnmount",
|
|
1912
|
-
"onErrorCaptured",
|
|
1913
|
-
"onRenderTracked",
|
|
1914
|
-
"onRenderTriggered",
|
|
1915
|
-
"onActivated",
|
|
1916
|
-
"onDeactivated",
|
|
1917
|
-
"onServerPrefetch",
|
|
1918
|
-
"provide",
|
|
1919
|
-
"inject",
|
|
1920
|
-
"h",
|
|
1921
|
-
"mergeProps",
|
|
1922
|
-
"cloneVNode",
|
|
1923
|
-
"isVNode",
|
|
1924
|
-
"resolveComponent",
|
|
1925
|
-
"resolveDirective",
|
|
1926
|
-
"withDirectives",
|
|
1927
|
-
"withModifiers"
|
|
1928
|
-
]);
|
|
1929
|
-
var symbolRE = /^\[native Symbol Symbol\((.*)\)\]$/;
|
|
1930
|
-
var rawTypeRE = /^\[object (\w+)]$/;
|
|
1931
|
-
var specialTypeRE = /^\[native (\w+) (.*?)(<>((.|\s)*))?\]$/;
|
|
1932
|
-
var fnTypeRE = /^(?:function|class) (\w+)/;
|
|
1933
|
-
var MAX_STRING_SIZE = 1e4;
|
|
1934
|
-
var MAX_ARRAY_SIZE = 5e3;
|
|
1935
|
-
var UNDEFINED = "__vue_devtool_undefined__";
|
|
1936
|
-
var INFINITY = "__vue_devtool_infinity__";
|
|
1937
|
-
var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
|
|
1938
|
-
var NAN = "__vue_devtool_nan__";
|
|
1939
|
-
var ESC = {
|
|
1940
|
-
"<": "<",
|
|
1941
|
-
">": ">",
|
|
1942
|
-
'"': """,
|
|
1943
|
-
"&": "&"
|
|
1944
|
-
};
|
|
1945
1857
|
|
|
1946
|
-
// src/
|
|
1858
|
+
// src/plugins/component.ts
|
|
1947
1859
|
init_esm_shims();
|
|
1860
|
+
import { debounce as debounce2 } from "perfect-debounce";
|
|
1948
1861
|
|
|
1949
|
-
// src/core/component/
|
|
1862
|
+
// src/core/component/utils/index.ts
|
|
1950
1863
|
init_esm_shims();
|
|
1951
1864
|
import { basename, classify } from "@vue/devtools-shared";
|
|
1952
1865
|
import { Fragment } from "vue";
|
|
@@ -1988,21 +1901,21 @@ async function getComponentId(options) {
|
|
|
1988
1901
|
}
|
|
1989
1902
|
}
|
|
1990
1903
|
function isFragment(instance) {
|
|
1991
|
-
var
|
|
1992
|
-
const subTreeType = (
|
|
1904
|
+
var _a10;
|
|
1905
|
+
const subTreeType = (_a10 = instance.subTree) == null ? void 0 : _a10.type;
|
|
1993
1906
|
return subTreeType === Fragment;
|
|
1994
1907
|
}
|
|
1995
1908
|
function isBeingDestroyed(instance) {
|
|
1996
1909
|
return instance._isBeingDestroyed || instance.isUnmounted;
|
|
1997
1910
|
}
|
|
1998
1911
|
function getInstanceName(instance) {
|
|
1999
|
-
var
|
|
1912
|
+
var _a10, _b10, _c;
|
|
2000
1913
|
const name = getComponentTypeName(instance.type || {});
|
|
2001
1914
|
if (name)
|
|
2002
1915
|
return name;
|
|
2003
1916
|
if (instance.root === instance)
|
|
2004
1917
|
return "Root";
|
|
2005
|
-
for (const key in (
|
|
1918
|
+
for (const key in (_b10 = (_a10 = instance.parent) == null ? void 0 : _a10.type) == null ? void 0 : _b10.components) {
|
|
2006
1919
|
if (instance.parent.type.components[key] === instance.type)
|
|
2007
1920
|
return saveComponentGussedName(instance, key);
|
|
2008
1921
|
}
|
|
@@ -2016,8 +1929,8 @@ function getInstanceName(instance) {
|
|
|
2016
1929
|
return "Anonymous Component";
|
|
2017
1930
|
}
|
|
2018
1931
|
function getUniqueComponentId(instance) {
|
|
2019
|
-
var
|
|
2020
|
-
const appId = (_c = (
|
|
1932
|
+
var _a10, _b10, _c;
|
|
1933
|
+
const appId = (_c = (_b10 = (_a10 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a10.app) == null ? void 0 : _b10.__VUE_DEVTOOLS_APP_RECORD_ID__) != null ? _c : 0;
|
|
2021
1934
|
const instanceId = instance === instance.root ? "root" : instance.uid;
|
|
2022
1935
|
return `${appId}:${instanceId}`;
|
|
2023
1936
|
}
|
|
@@ -2046,1332 +1959,852 @@ function getComponentInstance(appRecord, instanceId) {
|
|
|
2046
1959
|
return instance || appRecord.instanceMap.get(":root");
|
|
2047
1960
|
}
|
|
2048
1961
|
|
|
2049
|
-
// src/core/component/state/
|
|
2050
|
-
init_esm_shims();
|
|
2051
|
-
import { camelize } from "@vue/devtools-shared";
|
|
2052
|
-
|
|
2053
|
-
// src/core/component/state/util.ts
|
|
2054
|
-
init_esm_shims();
|
|
2055
|
-
|
|
2056
|
-
// src/core/component/state/is.ts
|
|
1962
|
+
// src/core/component/state/bounding-rect.ts
|
|
2057
1963
|
init_esm_shims();
|
|
2058
|
-
function
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
return
|
|
1964
|
+
function createRect() {
|
|
1965
|
+
const rect = {
|
|
1966
|
+
top: 0,
|
|
1967
|
+
bottom: 0,
|
|
1968
|
+
left: 0,
|
|
1969
|
+
right: 0,
|
|
1970
|
+
get width() {
|
|
1971
|
+
return rect.right - rect.left;
|
|
1972
|
+
},
|
|
1973
|
+
get height() {
|
|
1974
|
+
return rect.bottom - rect.top;
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
return rect;
|
|
2072
1978
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
1979
|
+
var range;
|
|
1980
|
+
function getTextRect(node) {
|
|
1981
|
+
if (!range)
|
|
1982
|
+
range = document.createRange();
|
|
1983
|
+
range.selectNode(node);
|
|
1984
|
+
return range.getBoundingClientRect();
|
|
2075
1985
|
}
|
|
2076
|
-
function
|
|
2077
|
-
|
|
1986
|
+
function getFragmentRect(vnode) {
|
|
1987
|
+
const rect = createRect();
|
|
1988
|
+
if (!vnode.children)
|
|
1989
|
+
return rect;
|
|
1990
|
+
for (let i = 0, l = vnode.children.length; i < l; i++) {
|
|
1991
|
+
const childVnode = vnode.children[i];
|
|
1992
|
+
let childRect;
|
|
1993
|
+
if (childVnode.component) {
|
|
1994
|
+
childRect = getComponentBoundingRect(childVnode.component);
|
|
1995
|
+
} else if (childVnode.el) {
|
|
1996
|
+
const el = childVnode.el;
|
|
1997
|
+
if (el.nodeType === 1 || el.getBoundingClientRect)
|
|
1998
|
+
childRect = el.getBoundingClientRect();
|
|
1999
|
+
else if (el.nodeType === 3 && el.data.trim())
|
|
2000
|
+
childRect = getTextRect(el);
|
|
2001
|
+
}
|
|
2002
|
+
if (childRect)
|
|
2003
|
+
mergeRects(rect, childRect);
|
|
2004
|
+
}
|
|
2005
|
+
return rect;
|
|
2078
2006
|
}
|
|
2079
|
-
function
|
|
2080
|
-
|
|
2007
|
+
function mergeRects(a, b) {
|
|
2008
|
+
if (!a.top || b.top < a.top)
|
|
2009
|
+
a.top = b.top;
|
|
2010
|
+
if (!a.bottom || b.bottom > a.bottom)
|
|
2011
|
+
a.bottom = b.bottom;
|
|
2012
|
+
if (!a.left || b.left < a.left)
|
|
2013
|
+
a.left = b.left;
|
|
2014
|
+
if (!a.right || b.right > a.right)
|
|
2015
|
+
a.right = b.right;
|
|
2016
|
+
return a;
|
|
2081
2017
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2018
|
+
var DEFAULT_RECT = {
|
|
2019
|
+
top: 0,
|
|
2020
|
+
left: 0,
|
|
2021
|
+
right: 0,
|
|
2022
|
+
bottom: 0,
|
|
2023
|
+
width: 0,
|
|
2024
|
+
height: 0
|
|
2089
2025
|
};
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
function internalStateTokenToString(value) {
|
|
2095
|
-
if (value === null)
|
|
2096
|
-
return "null";
|
|
2097
|
-
return typeof value === "string" && tokenMap[value] || false;
|
|
2098
|
-
}
|
|
2099
|
-
function replaceTokenToString(value) {
|
|
2100
|
-
const replaceRegex = new RegExp(`"(${Object.keys(tokenMap).join("|")})"`, "g");
|
|
2101
|
-
return value.replace(replaceRegex, (_, g1) => tokenMap[g1]);
|
|
2102
|
-
}
|
|
2103
|
-
function replaceStringToToken(value) {
|
|
2104
|
-
const literalValue = reversedTokenMap[value.trim()];
|
|
2105
|
-
if (literalValue)
|
|
2106
|
-
return `"${literalValue}"`;
|
|
2107
|
-
const replaceRegex = new RegExp(`:\\s*(${Object.keys(reversedTokenMap).join("|")})`, "g");
|
|
2108
|
-
return value.replace(replaceRegex, (_, g1) => `:"${reversedTokenMap[g1]}"`);
|
|
2109
|
-
}
|
|
2110
|
-
function getPropType(type) {
|
|
2111
|
-
if (Array.isArray(type))
|
|
2112
|
-
return type.map((t) => getPropType(t)).join(" or ");
|
|
2113
|
-
if (type == null)
|
|
2114
|
-
return "null";
|
|
2115
|
-
const match = type.toString().match(fnTypeRE);
|
|
2116
|
-
return typeof type === "function" ? match && match[1] || "any" : "any";
|
|
2117
|
-
}
|
|
2118
|
-
function sanitize(data) {
|
|
2119
|
-
if (!isPrimitive(data) && !Array.isArray(data) && !isPlainObject(data)) {
|
|
2120
|
-
return Object.prototype.toString.call(data);
|
|
2121
|
-
} else {
|
|
2122
|
-
return data;
|
|
2026
|
+
function getComponentBoundingRect(instance) {
|
|
2027
|
+
const el = instance.subTree.el;
|
|
2028
|
+
if (typeof window === "undefined") {
|
|
2029
|
+
return DEFAULT_RECT;
|
|
2123
2030
|
}
|
|
2031
|
+
if (isFragment(instance))
|
|
2032
|
+
return getFragmentRect(instance.subTree);
|
|
2033
|
+
else if ((el == null ? void 0 : el.nodeType) === 1)
|
|
2034
|
+
return el == null ? void 0 : el.getBoundingClientRect();
|
|
2035
|
+
else if (instance.subTree.component)
|
|
2036
|
+
return getComponentBoundingRect(instance.subTree.component);
|
|
2037
|
+
else
|
|
2038
|
+
return DEFAULT_RECT;
|
|
2124
2039
|
}
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
if (
|
|
2135
|
-
return
|
|
2136
|
-
return
|
|
2040
|
+
|
|
2041
|
+
// src/core/component/tree/walker.ts
|
|
2042
|
+
init_esm_shims();
|
|
2043
|
+
|
|
2044
|
+
// src/core/component/tree/el.ts
|
|
2045
|
+
init_esm_shims();
|
|
2046
|
+
function getRootElementsFromComponentInstance(instance) {
|
|
2047
|
+
if (isFragment(instance))
|
|
2048
|
+
return getFragmentRootElements(instance.subTree);
|
|
2049
|
+
if (!instance.subTree)
|
|
2050
|
+
return [];
|
|
2051
|
+
return [instance.subTree.el];
|
|
2137
2052
|
}
|
|
2138
|
-
function
|
|
2139
|
-
|
|
2140
|
-
return
|
|
2053
|
+
function getFragmentRootElements(vnode) {
|
|
2054
|
+
if (!vnode.children)
|
|
2055
|
+
return [];
|
|
2056
|
+
const list = [];
|
|
2057
|
+
vnode.children.forEach((childVnode) => {
|
|
2058
|
+
if (childVnode.component)
|
|
2059
|
+
list.push(...getRootElementsFromComponentInstance(childVnode.component));
|
|
2060
|
+
else if (childVnode == null ? void 0 : childVnode.el)
|
|
2061
|
+
list.push(childVnode.el);
|
|
2141
2062
|
});
|
|
2063
|
+
return list;
|
|
2142
2064
|
}
|
|
2143
2065
|
|
|
2144
|
-
// src/core/component/
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
const { mixins, extends: extendsOptions } = from;
|
|
2151
|
-
extendsOptions && mergeOptions(to, extendsOptions, instance);
|
|
2152
|
-
mixins && mixins.forEach(
|
|
2153
|
-
(m) => mergeOptions(to, m, instance)
|
|
2154
|
-
);
|
|
2155
|
-
for (const key of ["computed", "inject"]) {
|
|
2156
|
-
if (Object.prototype.hasOwnProperty.call(from, key)) {
|
|
2157
|
-
if (!to[key])
|
|
2158
|
-
to[key] = from[key];
|
|
2159
|
-
else
|
|
2160
|
-
Object.assign(to[key], from[key]);
|
|
2161
|
-
}
|
|
2066
|
+
// src/core/component/tree/filter.ts
|
|
2067
|
+
init_esm_shims();
|
|
2068
|
+
import { classify as classify2, kebabize } from "@vue/devtools-shared";
|
|
2069
|
+
var ComponentFilter = class {
|
|
2070
|
+
constructor(filter) {
|
|
2071
|
+
this.filter = filter || "";
|
|
2162
2072
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
globalMixins.forEach((m) => mergeOptions(options, m, instance));
|
|
2173
|
-
mergeOptions(options, raw, instance);
|
|
2174
|
-
return options;
|
|
2175
|
-
}
|
|
2176
|
-
function processProps(instance) {
|
|
2177
|
-
const props = [];
|
|
2178
|
-
const propDefinitions = instance.type.props;
|
|
2179
|
-
for (const key in instance.props) {
|
|
2180
|
-
const propDefinition = propDefinitions ? propDefinitions[key] : null;
|
|
2181
|
-
const camelizeKey = camelize(key);
|
|
2182
|
-
props.push({
|
|
2183
|
-
type: "props",
|
|
2184
|
-
key: camelizeKey,
|
|
2185
|
-
value: returnError(() => instance.props[key]),
|
|
2186
|
-
meta: propDefinition ? {
|
|
2187
|
-
type: propDefinition.type ? getPropType(propDefinition.type) : "any",
|
|
2188
|
-
required: !!propDefinition.required,
|
|
2189
|
-
...propDefinition.default ? {
|
|
2190
|
-
default: propDefinition.default.toString()
|
|
2191
|
-
} : {}
|
|
2192
|
-
} : { type: "invalid" }
|
|
2193
|
-
});
|
|
2073
|
+
/**
|
|
2074
|
+
* Check if an instance is qualified.
|
|
2075
|
+
*
|
|
2076
|
+
* @param {Vue|Vnode} instance
|
|
2077
|
+
* @return {boolean}
|
|
2078
|
+
*/
|
|
2079
|
+
isQualified(instance) {
|
|
2080
|
+
const name = getInstanceName(instance);
|
|
2081
|
+
return classify2(name).toLowerCase().includes(this.filter) || kebabize(name).toLowerCase().includes(this.filter);
|
|
2194
2082
|
}
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
const type = instance.type;
|
|
2199
|
-
const props = type.props;
|
|
2200
|
-
const getters = type.vuex && type.vuex.getters;
|
|
2201
|
-
const computedDefs = type.computed;
|
|
2202
|
-
const data = {
|
|
2203
|
-
...instance.data,
|
|
2204
|
-
...instance.renderContext
|
|
2205
|
-
};
|
|
2206
|
-
return Object.keys(data).filter((key) => !(props && key in props) && !(getters && key in getters) && !(computedDefs && key in computedDefs)).map((key) => ({
|
|
2207
|
-
key,
|
|
2208
|
-
type: "data",
|
|
2209
|
-
value: returnError(() => data[key]),
|
|
2210
|
-
editable: true
|
|
2211
|
-
}));
|
|
2212
|
-
}
|
|
2213
|
-
function getStateTypeAndName(info) {
|
|
2214
|
-
const stateType = info.computed ? "computed" : info.ref ? "ref" : info.reactive ? "reactive" : null;
|
|
2215
|
-
const stateTypeName = stateType ? `${stateType.charAt(0).toUpperCase()}${stateType.slice(1)}` : null;
|
|
2216
|
-
return {
|
|
2217
|
-
stateType,
|
|
2218
|
-
stateTypeName
|
|
2219
|
-
};
|
|
2083
|
+
};
|
|
2084
|
+
function createComponentFilter(filterText) {
|
|
2085
|
+
return new ComponentFilter(filterText);
|
|
2220
2086
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
const { stateType, stateTypeName } = getStateTypeAndName(info);
|
|
2232
|
-
const isState = info.ref || info.computed || info.reactive;
|
|
2233
|
-
const raw2 = ((_b9 = (_a9 = rawData.effect) == null ? void 0 : _a9.raw) == null ? void 0 : _b9.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
2234
|
-
if (stateType)
|
|
2235
|
-
isOtherType = false;
|
|
2236
|
-
result = {
|
|
2237
|
-
...stateType ? { stateType, stateTypeName } : {},
|
|
2238
|
-
...raw2 ? { raw: raw2 } : {},
|
|
2239
|
-
editable: isState && !info.readonly
|
|
2240
|
-
};
|
|
2241
|
-
}
|
|
2242
|
-
const type = isOtherType ? "setup (other)" : "setup";
|
|
2243
|
-
return {
|
|
2244
|
-
key,
|
|
2245
|
-
value,
|
|
2246
|
-
type,
|
|
2247
|
-
// @ts-expect-error ignore
|
|
2248
|
-
...result
|
|
2249
|
-
};
|
|
2250
|
-
});
|
|
2251
|
-
}
|
|
2252
|
-
function processComputed(instance, mergedType) {
|
|
2253
|
-
const type = mergedType;
|
|
2254
|
-
const computed = [];
|
|
2255
|
-
const defs = type.computed || {};
|
|
2256
|
-
for (const key in defs) {
|
|
2257
|
-
const def = defs[key];
|
|
2258
|
-
const type2 = typeof def === "function" && def.vuex ? "vuex bindings" : "computed";
|
|
2259
|
-
computed.push({
|
|
2260
|
-
type: type2,
|
|
2261
|
-
key,
|
|
2262
|
-
value: returnError(() => {
|
|
2263
|
-
var _a9;
|
|
2264
|
-
return (_a9 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a9[key];
|
|
2265
|
-
}),
|
|
2266
|
-
editable: typeof def.set === "function"
|
|
2267
|
-
});
|
|
2087
|
+
|
|
2088
|
+
// src/core/component/tree/walker.ts
|
|
2089
|
+
var ComponentWalker = class {
|
|
2090
|
+
constructor(options) {
|
|
2091
|
+
// Dedupe instances (Some instances may be both on a component and on a child abstract/functional component)
|
|
2092
|
+
this.captureIds = /* @__PURE__ */ new Map();
|
|
2093
|
+
const { filterText = "", maxDepth, recursively } = options;
|
|
2094
|
+
this.componentFilter = createComponentFilter(filterText);
|
|
2095
|
+
this.maxDepth = maxDepth;
|
|
2096
|
+
this.recursively = recursively;
|
|
2268
2097
|
}
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
return Object.keys(instance.attrs).map((key) => ({
|
|
2273
|
-
type: "attrs",
|
|
2274
|
-
key,
|
|
2275
|
-
value: returnError(() => instance.attrs[key])
|
|
2276
|
-
}));
|
|
2277
|
-
}
|
|
2278
|
-
function processProvide(instance) {
|
|
2279
|
-
return Reflect.ownKeys(instance.provides).map((key) => ({
|
|
2280
|
-
type: "provided",
|
|
2281
|
-
key: key.toString(),
|
|
2282
|
-
value: returnError(() => instance.provides[key])
|
|
2283
|
-
}));
|
|
2284
|
-
}
|
|
2285
|
-
function processInject(instance, mergedType) {
|
|
2286
|
-
if (!(mergedType == null ? void 0 : mergedType.inject))
|
|
2287
|
-
return [];
|
|
2288
|
-
let keys = [];
|
|
2289
|
-
let defaultValue;
|
|
2290
|
-
if (Array.isArray(mergedType.inject)) {
|
|
2291
|
-
keys = mergedType.inject.map((key) => ({
|
|
2292
|
-
key,
|
|
2293
|
-
originalKey: key
|
|
2294
|
-
}));
|
|
2295
|
-
} else {
|
|
2296
|
-
keys = Reflect.ownKeys(mergedType.inject).map((key) => {
|
|
2297
|
-
const value = mergedType.inject[key];
|
|
2298
|
-
let originalKey;
|
|
2299
|
-
if (typeof value === "string" || typeof value === "symbol") {
|
|
2300
|
-
originalKey = value;
|
|
2301
|
-
} else {
|
|
2302
|
-
originalKey = value.from;
|
|
2303
|
-
defaultValue = value.default;
|
|
2304
|
-
}
|
|
2305
|
-
return {
|
|
2306
|
-
key,
|
|
2307
|
-
originalKey
|
|
2308
|
-
};
|
|
2309
|
-
});
|
|
2098
|
+
getComponentTree(instance) {
|
|
2099
|
+
this.captureIds = /* @__PURE__ */ new Map();
|
|
2100
|
+
return this.findQualifiedChildren(instance, 0);
|
|
2310
2101
|
}
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
return Object.keys(instance.refs).map((key) => ({
|
|
2320
|
-
type: "refs",
|
|
2321
|
-
key,
|
|
2322
|
-
value: returnError(() => instance.refs[key])
|
|
2323
|
-
}));
|
|
2324
|
-
}
|
|
2325
|
-
function processEventListeners(instance) {
|
|
2326
|
-
var _a9;
|
|
2327
|
-
const emitsDefinition = instance.type.emits;
|
|
2328
|
-
const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
|
|
2329
|
-
const keys = Object.keys((_a9 = instance.vnode.props) != null ? _a9 : {});
|
|
2330
|
-
const result = [];
|
|
2331
|
-
for (const key of keys) {
|
|
2332
|
-
const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
|
|
2333
|
-
if (prefix === "on") {
|
|
2334
|
-
const eventName = eventNameParts.join("-").toLowerCase();
|
|
2335
|
-
const isDeclared = declaredEmits.includes(eventName);
|
|
2336
|
-
result.push({
|
|
2337
|
-
type: "event listeners",
|
|
2338
|
-
key: eventName,
|
|
2339
|
-
value: {
|
|
2340
|
-
_custom: {
|
|
2341
|
-
displayText: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2342
|
-
key: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2343
|
-
value: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2344
|
-
tooltipText: !isDeclared ? `The event <code>${eventName}</code> is not declared in the <code>emits</code> option. It will leak into the component's attributes (<code>$attrs</code>).` : null
|
|
2345
|
-
}
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2102
|
+
getComponentParents(instance) {
|
|
2103
|
+
this.captureIds = /* @__PURE__ */ new Map();
|
|
2104
|
+
const parents = [];
|
|
2105
|
+
this.captureId(instance);
|
|
2106
|
+
let parent = instance;
|
|
2107
|
+
while (parent = parent.parent) {
|
|
2108
|
+
this.captureId(parent);
|
|
2109
|
+
parents.push(parent);
|
|
2348
2110
|
}
|
|
2111
|
+
return parents;
|
|
2349
2112
|
}
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
processRefs(instance),
|
|
2362
|
-
processEventListeners(instance)
|
|
2363
|
-
);
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
// src/core/component/state/custom.ts
|
|
2367
|
-
function getFunctionDetails(func) {
|
|
2368
|
-
let string = "";
|
|
2369
|
-
let matches = null;
|
|
2370
|
-
try {
|
|
2371
|
-
string = Function.prototype.toString.call(func);
|
|
2372
|
-
matches = String.prototype.match.call(string, /\([\s\S]*?\)/);
|
|
2373
|
-
} catch (e) {
|
|
2113
|
+
captureId(instance) {
|
|
2114
|
+
if (!instance)
|
|
2115
|
+
return null;
|
|
2116
|
+
const id = instance.__VUE_DEVTOOLS_UID__ != null ? instance.__VUE_DEVTOOLS_UID__ : getUniqueComponentId(instance);
|
|
2117
|
+
instance.__VUE_DEVTOOLS_UID__ = id;
|
|
2118
|
+
if (this.captureIds.has(id))
|
|
2119
|
+
return null;
|
|
2120
|
+
else
|
|
2121
|
+
this.captureIds.set(id, void 0);
|
|
2122
|
+
this.mark(instance);
|
|
2123
|
+
return id;
|
|
2374
2124
|
}
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2125
|
+
/**
|
|
2126
|
+
* Capture the meta information of an instance. (recursive)
|
|
2127
|
+
*
|
|
2128
|
+
* @param {Vue} instance
|
|
2129
|
+
* @return {object}
|
|
2130
|
+
*/
|
|
2131
|
+
async capture(instance, depth) {
|
|
2132
|
+
var _a10;
|
|
2133
|
+
if (!instance)
|
|
2134
|
+
return null;
|
|
2135
|
+
const id = this.captureId(instance);
|
|
2136
|
+
const name = getInstanceName(instance);
|
|
2137
|
+
const children = this.getInternalInstanceChildren(instance.subTree).filter((child) => !isBeingDestroyed(child));
|
|
2138
|
+
const parents = this.getComponentParents(instance) || [];
|
|
2139
|
+
const inactive = !!instance.isDeactivated || parents.some((parent) => parent.isDeactivated);
|
|
2140
|
+
const treeNode = {
|
|
2141
|
+
uid: instance.uid,
|
|
2142
|
+
id,
|
|
2143
|
+
name,
|
|
2144
|
+
renderKey: getRenderKey(instance.vnode ? instance.vnode.key : null),
|
|
2145
|
+
inactive,
|
|
2146
|
+
children: [],
|
|
2147
|
+
isFragment: isFragment(instance),
|
|
2148
|
+
tags: typeof instance.type !== "function" ? [] : [
|
|
2149
|
+
{
|
|
2150
|
+
label: "functional",
|
|
2151
|
+
textColor: 5592405,
|
|
2152
|
+
backgroundColor: 15658734
|
|
2153
|
+
}
|
|
2154
|
+
],
|
|
2155
|
+
autoOpen: this.recursively,
|
|
2156
|
+
file: instance.type.__file || ""
|
|
2157
|
+
};
|
|
2158
|
+
if (depth < this.maxDepth || instance.type.__isKeepAlive || parents.some((parent) => parent.type.__isKeepAlive)) {
|
|
2159
|
+
treeNode.children = await Promise.all(children.map((child) => this.capture(child, depth + 1)).filter(Boolean));
|
|
2393
2160
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
);
|
|
2404
|
-
return {
|
|
2405
|
-
_custom: {
|
|
2406
|
-
type: "map",
|
|
2407
|
-
displayText: "Map",
|
|
2408
|
-
value: list,
|
|
2409
|
-
readOnly: true,
|
|
2410
|
-
fields: {
|
|
2411
|
-
abstract: true
|
|
2161
|
+
if (this.isKeepAlive(instance)) {
|
|
2162
|
+
const cachedComponents = this.getKeepAliveCachedInstances(instance);
|
|
2163
|
+
const childrenIds = children.map((child) => child.__VUE_DEVTOOLS_UID__);
|
|
2164
|
+
for (const cachedChild of cachedComponents) {
|
|
2165
|
+
if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_UID__)) {
|
|
2166
|
+
const node = await this.capture({ ...cachedChild, isDeactivated: true }, depth + 1);
|
|
2167
|
+
if (node)
|
|
2168
|
+
treeNode.children.push(node);
|
|
2169
|
+
}
|
|
2412
2170
|
}
|
|
2413
2171
|
}
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2172
|
+
const rootElements = getRootElementsFromComponentInstance(instance);
|
|
2173
|
+
const firstElement = rootElements[0];
|
|
2174
|
+
if (firstElement == null ? void 0 : firstElement.parentElement) {
|
|
2175
|
+
const parentInstance = instance.parent;
|
|
2176
|
+
const parentRootElements = parentInstance ? getRootElementsFromComponentInstance(parentInstance) : [];
|
|
2177
|
+
let el = firstElement;
|
|
2178
|
+
const indexList = [];
|
|
2179
|
+
do {
|
|
2180
|
+
indexList.push(Array.from(el.parentElement.childNodes).indexOf(el));
|
|
2181
|
+
el = el.parentElement;
|
|
2182
|
+
} while (el.parentElement && parentRootElements.length && !parentRootElements.includes(el));
|
|
2183
|
+
treeNode.domOrder = indexList.reverse();
|
|
2184
|
+
} else {
|
|
2185
|
+
treeNode.domOrder = [-1];
|
|
2186
|
+
}
|
|
2187
|
+
if ((_a10 = instance.suspense) == null ? void 0 : _a10.suspenseKey) {
|
|
2188
|
+
treeNode.tags.push({
|
|
2189
|
+
label: instance.suspense.suspenseKey,
|
|
2190
|
+
backgroundColor: 14979812,
|
|
2191
|
+
textColor: 16777215
|
|
2192
|
+
});
|
|
2193
|
+
this.mark(instance, true);
|
|
2194
|
+
}
|
|
2195
|
+
devtoolsContext.api.visitComponentTree({
|
|
2196
|
+
treeNode,
|
|
2197
|
+
componentInstance: instance,
|
|
2198
|
+
app: instance.appContext.app,
|
|
2199
|
+
filter: this.componentFilter.filter
|
|
2442
2200
|
});
|
|
2201
|
+
return treeNode;
|
|
2443
2202
|
}
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
result[node.name] = node.value;
|
|
2462
|
-
}
|
|
2463
|
-
return result;
|
|
2464
|
-
}
|
|
2465
|
-
function getStoreDetails(store) {
|
|
2466
|
-
return {
|
|
2467
|
-
_custom: {
|
|
2468
|
-
type: "store",
|
|
2469
|
-
displayText: "Store",
|
|
2470
|
-
value: {
|
|
2471
|
-
state: store.state,
|
|
2472
|
-
getters: getCatchedGetters(store)
|
|
2473
|
-
},
|
|
2474
|
-
fields: {
|
|
2475
|
-
abstract: true
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
};
|
|
2479
|
-
}
|
|
2480
|
-
function getRouterDetails(router) {
|
|
2481
|
-
return {
|
|
2482
|
-
_custom: {
|
|
2483
|
-
type: "router",
|
|
2484
|
-
displayText: "VueRouter",
|
|
2485
|
-
value: {
|
|
2486
|
-
options: router.options,
|
|
2487
|
-
currentRoute: router.currentRoute
|
|
2488
|
-
},
|
|
2489
|
-
fields: {
|
|
2490
|
-
abstract: true
|
|
2491
|
-
}
|
|
2203
|
+
/**
|
|
2204
|
+
* Find qualified children from a single instance.
|
|
2205
|
+
* If the instance itself is qualified, just return itself.
|
|
2206
|
+
* This is ok because [].concat works in both cases.
|
|
2207
|
+
*
|
|
2208
|
+
* @param {Vue|Vnode} instance
|
|
2209
|
+
* @return {Vue|Array}
|
|
2210
|
+
*/
|
|
2211
|
+
async findQualifiedChildren(instance, depth) {
|
|
2212
|
+
var _a10;
|
|
2213
|
+
if (this.componentFilter.isQualified(instance) && !((_a10 = instance.type.devtools) == null ? void 0 : _a10.hide)) {
|
|
2214
|
+
return [await this.capture(instance, depth)];
|
|
2215
|
+
} else if (instance.subTree) {
|
|
2216
|
+
const list = this.isKeepAlive(instance) ? this.getKeepAliveCachedInstances(instance) : this.getInternalInstanceChildren(instance.subTree);
|
|
2217
|
+
return this.findQualifiedChildrenFromList(list, depth);
|
|
2218
|
+
} else {
|
|
2219
|
+
return [];
|
|
2492
2220
|
}
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2221
|
+
}
|
|
2222
|
+
/**
|
|
2223
|
+
* Iterate through an array of instances and flatten it into
|
|
2224
|
+
* an array of qualified instances. This is a depth-first
|
|
2225
|
+
* traversal - e.g. if an instance is not matched, we will
|
|
2226
|
+
* recursively go deeper until a qualified child is found.
|
|
2227
|
+
*
|
|
2228
|
+
* @param {Array} instances
|
|
2229
|
+
* @return {Array}
|
|
2230
|
+
*/
|
|
2231
|
+
async findQualifiedChildrenFromList(instances, depth) {
|
|
2232
|
+
instances = instances.filter((child) => {
|
|
2233
|
+
var _a10;
|
|
2234
|
+
return !isBeingDestroyed(child) && !((_a10 = child.type.devtools) == null ? void 0 : _a10.hide);
|
|
2235
|
+
});
|
|
2236
|
+
if (!this.componentFilter.filter)
|
|
2237
|
+
return Promise.all(instances.map((child) => this.capture(child, depth)));
|
|
2238
|
+
else
|
|
2239
|
+
return Array.prototype.concat.apply([], await Promise.all(instances.map((i) => this.findQualifiedChildren(i, depth))));
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* Get children from a component instance.
|
|
2243
|
+
*/
|
|
2244
|
+
getInternalInstanceChildren(subTree, suspense = null) {
|
|
2245
|
+
const list = [];
|
|
2246
|
+
if (subTree) {
|
|
2247
|
+
if (subTree.component) {
|
|
2248
|
+
!suspense ? list.push(subTree.component) : list.push({ ...subTree.component, suspense });
|
|
2249
|
+
} else if (subTree.suspense) {
|
|
2250
|
+
const suspenseKey = !subTree.suspense.isInFallback ? "suspense default" : "suspense fallback";
|
|
2251
|
+
list.push(...this.getInternalInstanceChildren(subTree.suspense.activeBranch, { ...subTree.suspense, suspenseKey }));
|
|
2252
|
+
} else if (Array.isArray(subTree.children)) {
|
|
2253
|
+
subTree.children.forEach((childSubTree) => {
|
|
2254
|
+
if (childSubTree.component)
|
|
2255
|
+
!suspense ? list.push(childSubTree.component) : list.push({ ...childSubTree.component, suspense });
|
|
2256
|
+
else
|
|
2257
|
+
list.push(...this.getInternalInstanceChildren(childSubTree, suspense));
|
|
2258
|
+
});
|
|
2508
2259
|
}
|
|
2509
2260
|
}
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
if (display) {
|
|
2515
|
-
if (definition.name && definition.__file)
|
|
2516
|
-
display += ` <span>(${definition.__file})</span>`;
|
|
2517
|
-
} else {
|
|
2518
|
-
display = "<i>Unknown Component</i>";
|
|
2261
|
+
return list.filter((child) => {
|
|
2262
|
+
var _a10;
|
|
2263
|
+
return !isBeingDestroyed(child) && !((_a10 = child.type.devtools) == null ? void 0 : _a10.hide);
|
|
2264
|
+
});
|
|
2519
2265
|
}
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
function getHTMLElementDetails(value) {
|
|
2532
|
-
try {
|
|
2533
|
-
return {
|
|
2534
|
-
_custom: {
|
|
2535
|
-
type: "HTMLElement",
|
|
2536
|
-
displayText: `<span class="opacity-30"><</span><span class="text-blue-500">${value.tagName.toLowerCase()}</span><span class="opacity-30">></span>`,
|
|
2537
|
-
value: namedNodeMapToObject(value.attributes)
|
|
2538
|
-
}
|
|
2539
|
-
};
|
|
2540
|
-
} catch (e) {
|
|
2541
|
-
return {
|
|
2542
|
-
_custom: {
|
|
2543
|
-
type: "HTMLElement",
|
|
2544
|
-
displayText: `<span class="text-blue-500">${String(value)}</span>`
|
|
2545
|
-
}
|
|
2546
|
-
};
|
|
2266
|
+
/**
|
|
2267
|
+
* Mark an instance as captured and store it in the instance map.
|
|
2268
|
+
*
|
|
2269
|
+
* @param {Vue} instance
|
|
2270
|
+
*/
|
|
2271
|
+
mark(instance, force = false) {
|
|
2272
|
+
const instanceMap = getAppRecord(instance).instanceMap;
|
|
2273
|
+
if (force || !instanceMap.has(instance.__VUE_DEVTOOLS_UID__))
|
|
2274
|
+
instanceMap.set(instance.__VUE_DEVTOOLS_UID__, instance);
|
|
2547
2275
|
}
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
var _a9, _b9, _c, _d;
|
|
2551
|
-
const info = getSetupStateType(object);
|
|
2552
|
-
const isState = info.ref || info.computed || info.reactive;
|
|
2553
|
-
if (isState) {
|
|
2554
|
-
const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
2555
|
-
const value = toRaw(info.reactive ? object : object._value);
|
|
2556
|
-
const raw = ((_b9 = (_a9 = object.effect) == null ? void 0 : _a9.raw) == null ? void 0 : _b9.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
2557
|
-
return {
|
|
2558
|
-
_custom: {
|
|
2559
|
-
type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
|
|
2560
|
-
stateTypeName,
|
|
2561
|
-
value,
|
|
2562
|
-
...raw ? { tooltipText: `<span class="font-mono">${raw}</span>` } : {}
|
|
2563
|
-
}
|
|
2564
|
-
};
|
|
2276
|
+
isKeepAlive(instance) {
|
|
2277
|
+
return instance.type.__isKeepAlive && instance.__v_cache;
|
|
2565
2278
|
}
|
|
2566
|
-
|
|
2567
|
-
return
|
|
2568
|
-
_custom: {
|
|
2569
|
-
type: "component-definition",
|
|
2570
|
-
display: "Async component definition"
|
|
2571
|
-
}
|
|
2572
|
-
};
|
|
2279
|
+
getKeepAliveCachedInstances(instance) {
|
|
2280
|
+
return Array.from(instance.__v_cache.values()).map((vnode) => vnode.component).filter(Boolean);
|
|
2573
2281
|
}
|
|
2574
|
-
}
|
|
2282
|
+
};
|
|
2575
2283
|
|
|
2576
|
-
// src/core/component/state/
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
const
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2284
|
+
// src/core/component/state/editor.ts
|
|
2285
|
+
init_esm_shims();
|
|
2286
|
+
import { isReactive, isRef, toRaw } from "vue";
|
|
2287
|
+
var StateEditor = class {
|
|
2288
|
+
constructor() {
|
|
2289
|
+
this.refEditor = new RefStateEditor();
|
|
2290
|
+
}
|
|
2291
|
+
set(object, path, value, cb) {
|
|
2292
|
+
const sections = Array.isArray(path) ? path : path.split(".");
|
|
2293
|
+
const markRef = false;
|
|
2294
|
+
while (sections.length > 1) {
|
|
2295
|
+
const section = sections.shift();
|
|
2296
|
+
if (object instanceof Map)
|
|
2297
|
+
object = object.get(section);
|
|
2298
|
+
else
|
|
2299
|
+
object = object[section];
|
|
2300
|
+
if (this.refEditor.isRef(object))
|
|
2301
|
+
object = this.refEditor.get(object);
|
|
2591
2302
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
if (
|
|
2595
|
-
|
|
2596
|
-
else
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
return NEGATIVE_INFINITY;
|
|
2604
|
-
} else if (typeof val === "function") {
|
|
2605
|
-
return getFunctionDetails(val);
|
|
2606
|
-
} else if (type === "symbol") {
|
|
2607
|
-
return `[native Symbol ${Symbol.prototype.toString.call(val)}]`;
|
|
2608
|
-
} else if (typeof val === "bigint") {
|
|
2609
|
-
return getBigIntDetails(val);
|
|
2610
|
-
} else if (val !== null && typeof val === "object") {
|
|
2611
|
-
const proto = Object.prototype.toString.call(val);
|
|
2612
|
-
if (proto === "[object Map]") {
|
|
2613
|
-
return getMapDetails(val);
|
|
2614
|
-
} else if (proto === "[object Set]") {
|
|
2615
|
-
return getSetDetails(val);
|
|
2616
|
-
} else if (proto === "[object RegExp]") {
|
|
2617
|
-
return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;
|
|
2618
|
-
} else if (proto === "[object Date]") {
|
|
2619
|
-
return `[native Date ${Date.prototype.toString.call(val)}]`;
|
|
2620
|
-
} else if (proto === "[object Error]") {
|
|
2621
|
-
return `[native Error ${val.message}<>${val.stack}]`;
|
|
2622
|
-
} else if (val.state && val._vm) {
|
|
2623
|
-
return getStoreDetails(val);
|
|
2624
|
-
} else if (val.constructor && val.constructor.name === "VueRouter") {
|
|
2625
|
-
return getRouterDetails(val);
|
|
2626
|
-
} else if (isVueInstance(val)) {
|
|
2627
|
-
return getInstanceDetails(val);
|
|
2628
|
-
} else if (typeof val.render === "function") {
|
|
2629
|
-
return getComponentDefinitionDetails(val);
|
|
2630
|
-
} else if (val.constructor && val.constructor.name === "VNode") {
|
|
2631
|
-
return `[native VNode <${val.tag}>]`;
|
|
2632
|
-
} else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
|
|
2633
|
-
return getHTMLElementDetails(val);
|
|
2634
|
-
} else if (((_a9 = val.constructor) == null ? void 0 : _a9.name) === "Store" && val._wrappedGetters) {
|
|
2635
|
-
return "[object Store]";
|
|
2636
|
-
} else if (val.currentRoute) {
|
|
2637
|
-
return "[object Router]";
|
|
2303
|
+
const field = sections[0];
|
|
2304
|
+
const item = this.refEditor.get(object)[field];
|
|
2305
|
+
if (cb) {
|
|
2306
|
+
cb(object, field, value);
|
|
2307
|
+
} else {
|
|
2308
|
+
if (this.refEditor.isRef(item))
|
|
2309
|
+
this.refEditor.set(item, value);
|
|
2310
|
+
else if (markRef)
|
|
2311
|
+
object[field] = value;
|
|
2312
|
+
else
|
|
2313
|
+
object[field] = value;
|
|
2638
2314
|
}
|
|
2639
|
-
const customDetails = getObjectDetails(val);
|
|
2640
|
-
if (customDetails != null)
|
|
2641
|
-
return customDetails;
|
|
2642
|
-
} else if (Number.isNaN(val)) {
|
|
2643
|
-
return NAN;
|
|
2644
|
-
}
|
|
2645
|
-
return sanitize(val);
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
// src/core/component/state/reviver.ts
|
|
2649
|
-
init_esm_shims();
|
|
2650
|
-
import { target as target2 } from "@vue/devtools-shared";
|
|
2651
|
-
function reviveSet(val) {
|
|
2652
|
-
const result = /* @__PURE__ */ new Set();
|
|
2653
|
-
const list = val._custom.value;
|
|
2654
|
-
for (let i = 0; i < list.length; i++) {
|
|
2655
|
-
const value = list[i];
|
|
2656
|
-
result.add(revive(value));
|
|
2657
|
-
}
|
|
2658
|
-
return result;
|
|
2659
|
-
}
|
|
2660
|
-
function reviveMap(val) {
|
|
2661
|
-
const result = /* @__PURE__ */ new Map();
|
|
2662
|
-
const list = val._custom.value;
|
|
2663
|
-
for (let i = 0; i < list.length; i++) {
|
|
2664
|
-
const { key, value } = list[i];
|
|
2665
|
-
result.set(key, revive(value));
|
|
2666
|
-
}
|
|
2667
|
-
return result;
|
|
2668
|
-
}
|
|
2669
|
-
function revive(val) {
|
|
2670
|
-
var _a9;
|
|
2671
|
-
if (val === UNDEFINED) {
|
|
2672
|
-
return void 0;
|
|
2673
|
-
} else if (val === INFINITY) {
|
|
2674
|
-
return Number.POSITIVE_INFINITY;
|
|
2675
|
-
} else if (val === NEGATIVE_INFINITY) {
|
|
2676
|
-
return Number.NEGATIVE_INFINITY;
|
|
2677
|
-
} else if (val === NAN) {
|
|
2678
|
-
return Number.NaN;
|
|
2679
|
-
} else if (val && val._custom) {
|
|
2680
|
-
const { _custom: custom } = val;
|
|
2681
|
-
if (custom.type === "component")
|
|
2682
|
-
return (_a9 = devtoolsContext.appRecord) == null ? void 0 : _a9.instanceMap.get(custom.id);
|
|
2683
|
-
else if (custom.type === "map")
|
|
2684
|
-
return reviveMap(val);
|
|
2685
|
-
else if (custom.type === "set")
|
|
2686
|
-
return reviveSet(val);
|
|
2687
|
-
else if (custom.type === "bigint")
|
|
2688
|
-
return BigInt(custom.value);
|
|
2689
|
-
else
|
|
2690
|
-
return revive(custom.value);
|
|
2691
|
-
} else if (symbolRE.test(val)) {
|
|
2692
|
-
const [, string] = symbolRE.exec(val);
|
|
2693
|
-
return Symbol.for(string);
|
|
2694
|
-
} else if (specialTypeRE.test(val)) {
|
|
2695
|
-
const [, type, string, , details] = specialTypeRE.exec(val);
|
|
2696
|
-
const result = new target2[type](string);
|
|
2697
|
-
if (type === "Error" && details)
|
|
2698
|
-
result.stack = details;
|
|
2699
|
-
return result;
|
|
2700
|
-
} else {
|
|
2701
|
-
return val;
|
|
2702
2315
|
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
if (seenIndex != null)
|
|
2715
|
-
return seenIndex;
|
|
2716
|
-
const index = list.length;
|
|
2717
|
-
const proto = Object.prototype.toString.call(data);
|
|
2718
|
-
if (proto === "[object Object]") {
|
|
2719
|
-
stored = {};
|
|
2720
|
-
seen.set(data, index);
|
|
2721
|
-
list.push(stored);
|
|
2722
|
-
const keys = Object.keys(data);
|
|
2723
|
-
for (i = 0, l = keys.length; i < l; i++) {
|
|
2724
|
-
key = keys[i];
|
|
2725
|
-
try {
|
|
2726
|
-
if (key === "compilerOptions")
|
|
2727
|
-
return;
|
|
2728
|
-
value = data[key];
|
|
2729
|
-
if (replacer)
|
|
2730
|
-
value = replacer.call(data, key, value);
|
|
2731
|
-
} catch (e) {
|
|
2732
|
-
value = e;
|
|
2733
|
-
}
|
|
2734
|
-
stored[key] = encode(value, replacer, list, seen);
|
|
2316
|
+
get(object, path) {
|
|
2317
|
+
const sections = Array.isArray(path) ? path : path.split(".");
|
|
2318
|
+
for (let i = 0; i < sections.length; i++) {
|
|
2319
|
+
if (object instanceof Map)
|
|
2320
|
+
object = object.get(sections[i]);
|
|
2321
|
+
else
|
|
2322
|
+
object = object[sections[i]];
|
|
2323
|
+
if (this.refEditor.isRef(object))
|
|
2324
|
+
object = this.refEditor.get(object);
|
|
2325
|
+
if (!object)
|
|
2326
|
+
return void 0;
|
|
2735
2327
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
stored[i] = encode(value, replacer, list, seen);
|
|
2328
|
+
return object;
|
|
2329
|
+
}
|
|
2330
|
+
has(object, path, parent = false) {
|
|
2331
|
+
if (typeof object === "undefined")
|
|
2332
|
+
return false;
|
|
2333
|
+
const sections = Array.isArray(path) ? path.slice() : path.split(".");
|
|
2334
|
+
const size = !parent ? 1 : 2;
|
|
2335
|
+
while (object && sections.length > size) {
|
|
2336
|
+
const section = sections.shift();
|
|
2337
|
+
object = object[section];
|
|
2338
|
+
if (this.refEditor.isRef(object))
|
|
2339
|
+
object = this.refEditor.get(object);
|
|
2749
2340
|
}
|
|
2750
|
-
|
|
2751
|
-
list.push(data);
|
|
2341
|
+
return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
|
|
2752
2342
|
}
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
key = keys[j];
|
|
2765
|
-
value = list[data[key]];
|
|
2766
|
-
if (reviver2)
|
|
2767
|
-
value = reviver2.call(data, key, value);
|
|
2768
|
-
data[key] = value;
|
|
2343
|
+
createDefaultSetCallback(state) {
|
|
2344
|
+
return (object, field, value) => {
|
|
2345
|
+
if (state.remove || state.newKey) {
|
|
2346
|
+
if (Array.isArray(object))
|
|
2347
|
+
object.splice(field, 1);
|
|
2348
|
+
else if (toRaw(object) instanceof Map)
|
|
2349
|
+
object.delete(field);
|
|
2350
|
+
else if (toRaw(object) instanceof Set)
|
|
2351
|
+
object.delete(value);
|
|
2352
|
+
else
|
|
2353
|
+
Reflect.deleteProperty(object, field);
|
|
2769
2354
|
}
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2355
|
+
if (!state.remove) {
|
|
2356
|
+
const target9 = object[state.newKey || field];
|
|
2357
|
+
if (this.refEditor.isRef(target9))
|
|
2358
|
+
this.refEditor.set(target9, value);
|
|
2359
|
+
else if (toRaw(object) instanceof Map)
|
|
2360
|
+
object.set(state.newKey || field, value);
|
|
2361
|
+
else
|
|
2362
|
+
object[state.newKey || field] = value;
|
|
2776
2363
|
}
|
|
2364
|
+
};
|
|
2365
|
+
}
|
|
2366
|
+
};
|
|
2367
|
+
var RefStateEditor = class {
|
|
2368
|
+
set(ref, value) {
|
|
2369
|
+
if (isRef(ref)) {
|
|
2370
|
+
ref.value = value;
|
|
2371
|
+
} else {
|
|
2372
|
+
const previousKeysSet = new Set(Object.keys(ref));
|
|
2373
|
+
const currentKeys = Object.keys(value);
|
|
2374
|
+
currentKeys.forEach((key) => {
|
|
2375
|
+
Reflect.set(ref, key, Reflect.get(value, key));
|
|
2376
|
+
previousKeysSet.delete(key);
|
|
2377
|
+
});
|
|
2378
|
+
previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
|
|
2777
2379
|
}
|
|
2778
2380
|
}
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
let result;
|
|
2782
|
-
try {
|
|
2783
|
-
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, replacer, space);
|
|
2784
|
-
} catch (e) {
|
|
2785
|
-
result = stringifyStrictCircularAutoChunks(data, replacer, space);
|
|
2381
|
+
get(ref) {
|
|
2382
|
+
return isRef(ref) ? ref.value : ref;
|
|
2786
2383
|
}
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2384
|
+
isRef(ref) {
|
|
2385
|
+
return isRef(ref) || isReactive(ref);
|
|
2386
|
+
}
|
|
2387
|
+
};
|
|
2388
|
+
async function editComponentState(payload, stateEditor2) {
|
|
2389
|
+
const { path, nodeId, state, type } = payload;
|
|
2390
|
+
const instance = getComponentInstance(devtoolsContext.appRecord, nodeId);
|
|
2391
|
+
if (!instance)
|
|
2392
|
+
return;
|
|
2393
|
+
const targetPath = path.slice();
|
|
2394
|
+
let target9;
|
|
2395
|
+
if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
|
|
2396
|
+
target9 = instance.devtoolsRawSetupState;
|
|
2397
|
+
}
|
|
2398
|
+
if (target9 && targetPath) {
|
|
2399
|
+
if (state.type === "object" && type === "reactive") {
|
|
2400
|
+
}
|
|
2401
|
+
stateEditor2.set(target9, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
|
|
2793
2402
|
}
|
|
2794
|
-
return result;
|
|
2795
2403
|
}
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
return space ? ` ${JSON.stringify(list, null, space)}` : ` ${JSON.stringify(list)}`;
|
|
2800
|
-
}
|
|
2801
|
-
function parseCircularAutoChunks(data, reviver2 = null) {
|
|
2802
|
-
if (Array.isArray(data))
|
|
2803
|
-
data = data.join("");
|
|
2804
|
-
const hasCircular = /^\s/.test(data);
|
|
2805
|
-
if (!hasCircular) {
|
|
2806
|
-
return arguments.length === 1 ? JSON.parse(data) : JSON.parse(data, reviver2);
|
|
2807
|
-
} else {
|
|
2808
|
-
const list = JSON.parse(data);
|
|
2809
|
-
decode(list, reviver2);
|
|
2810
|
-
return list[0];
|
|
2811
|
-
}
|
|
2404
|
+
var stateEditor = new StateEditor();
|
|
2405
|
+
async function editState(payload) {
|
|
2406
|
+
editComponentState(payload, stateEditor);
|
|
2812
2407
|
}
|
|
2813
2408
|
|
|
2814
|
-
// src/core/component/state/
|
|
2409
|
+
// src/core/component/state/index.ts
|
|
2815
2410
|
init_esm_shims();
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2411
|
+
|
|
2412
|
+
// src/core/component/state/process.ts
|
|
2413
|
+
init_esm_shims();
|
|
2414
|
+
import { camelize } from "@vue/devtools-shared";
|
|
2415
|
+
|
|
2416
|
+
// src/core/component/state/constants.ts
|
|
2417
|
+
init_esm_shims();
|
|
2418
|
+
var vueBuiltins = /* @__PURE__ */ new Set([
|
|
2419
|
+
"nextTick",
|
|
2420
|
+
"defineComponent",
|
|
2421
|
+
"defineAsyncComponent",
|
|
2422
|
+
"defineCustomElement",
|
|
2423
|
+
"ref",
|
|
2424
|
+
"computed",
|
|
2425
|
+
"reactive",
|
|
2426
|
+
"readonly",
|
|
2427
|
+
"watchEffect",
|
|
2428
|
+
"watchPostEffect",
|
|
2429
|
+
"watchSyncEffect",
|
|
2430
|
+
"watch",
|
|
2431
|
+
"isRef",
|
|
2432
|
+
"unref",
|
|
2433
|
+
"toRef",
|
|
2434
|
+
"toRefs",
|
|
2435
|
+
"isProxy",
|
|
2436
|
+
"isReactive",
|
|
2437
|
+
"isReadonly",
|
|
2438
|
+
"shallowRef",
|
|
2439
|
+
"triggerRef",
|
|
2440
|
+
"customRef",
|
|
2441
|
+
"shallowReactive",
|
|
2442
|
+
"shallowReadonly",
|
|
2443
|
+
"toRaw",
|
|
2444
|
+
"markRaw",
|
|
2445
|
+
"effectScope",
|
|
2446
|
+
"getCurrentScope",
|
|
2447
|
+
"onScopeDispose",
|
|
2448
|
+
"onMounted",
|
|
2449
|
+
"onUpdated",
|
|
2450
|
+
"onUnmounted",
|
|
2451
|
+
"onBeforeMount",
|
|
2452
|
+
"onBeforeUpdate",
|
|
2453
|
+
"onBeforeUnmount",
|
|
2454
|
+
"onErrorCaptured",
|
|
2455
|
+
"onRenderTracked",
|
|
2456
|
+
"onRenderTriggered",
|
|
2457
|
+
"onActivated",
|
|
2458
|
+
"onDeactivated",
|
|
2459
|
+
"onServerPrefetch",
|
|
2460
|
+
"provide",
|
|
2461
|
+
"inject",
|
|
2462
|
+
"h",
|
|
2463
|
+
"mergeProps",
|
|
2464
|
+
"cloneVNode",
|
|
2465
|
+
"isVNode",
|
|
2466
|
+
"resolveComponent",
|
|
2467
|
+
"resolveDirective",
|
|
2468
|
+
"withDirectives",
|
|
2469
|
+
"withModifiers"
|
|
2470
|
+
]);
|
|
2471
|
+
var symbolRE = /^\[native Symbol Symbol\((.*)\)\]$/;
|
|
2472
|
+
var rawTypeRE = /^\[object (\w+)]$/;
|
|
2473
|
+
var specialTypeRE = /^\[native (\w+) (.*?)(<>((.|\s)*))?\]$/;
|
|
2474
|
+
var fnTypeRE = /^(?:function|class) (\w+)/;
|
|
2475
|
+
var MAX_STRING_SIZE = 1e4;
|
|
2476
|
+
var MAX_ARRAY_SIZE = 5e3;
|
|
2477
|
+
var UNDEFINED = "__vue_devtool_undefined__";
|
|
2478
|
+
var INFINITY = "__vue_devtool_infinity__";
|
|
2479
|
+
var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
|
|
2480
|
+
var NAN = "__vue_devtool_nan__";
|
|
2481
|
+
var ESC = {
|
|
2482
|
+
"<": "<",
|
|
2483
|
+
">": ">",
|
|
2484
|
+
'"': """,
|
|
2485
|
+
"&": "&"
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
// src/core/component/state/util.ts
|
|
2489
|
+
init_esm_shims();
|
|
2490
|
+
|
|
2491
|
+
// src/core/component/state/is.ts
|
|
2492
|
+
init_esm_shims();
|
|
2493
|
+
function isVueInstance(value) {
|
|
2494
|
+
return value._ && Object.keys(value._).includes("vnode");
|
|
2842
2495
|
}
|
|
2843
|
-
function
|
|
2844
|
-
|
|
2845
|
-
let result;
|
|
2846
|
-
const type = getInspectorStateValueType(value, false);
|
|
2847
|
-
if (type !== "custom" && (value == null ? void 0 : value._custom))
|
|
2848
|
-
value = value._custom.value;
|
|
2849
|
-
if (result = internalStateTokenToString(value)) {
|
|
2850
|
-
return result;
|
|
2851
|
-
} else if (type === "custom") {
|
|
2852
|
-
const nestedName = ((_a9 = value._custom.value) == null ? void 0 : _a9._custom) && formatInspectorStateValue(value._custom.value);
|
|
2853
|
-
return nestedName || value._custom.displayText || value._custom.display;
|
|
2854
|
-
} else if (type === "array") {
|
|
2855
|
-
return `Array[${value.length}]`;
|
|
2856
|
-
} else if (type === "plain-object") {
|
|
2857
|
-
return `Object${Object.keys(value).length ? "" : " (empty)"}`;
|
|
2858
|
-
} else if (type == null ? void 0 : type.includes("native")) {
|
|
2859
|
-
return escape((_b9 = specialTypeRE.exec(value)) == null ? void 0 : _b9[2]);
|
|
2860
|
-
} else if (typeof value === "string") {
|
|
2861
|
-
const typeMatch = value.match(rawTypeRE);
|
|
2862
|
-
if (typeMatch)
|
|
2863
|
-
value = escape(typeMatch[1]);
|
|
2864
|
-
else if (quotes)
|
|
2865
|
-
value = `<span>"</span>${escape(value)}<span>"</span>`;
|
|
2866
|
-
else
|
|
2867
|
-
value = escape(value);
|
|
2868
|
-
value = value.replace(/ /g, " ").replace(/\n/g, "<span>\\n</span>");
|
|
2869
|
-
}
|
|
2870
|
-
return value;
|
|
2496
|
+
function isPlainObject(obj) {
|
|
2497
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2871
2498
|
}
|
|
2872
|
-
function
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
const data = value;
|
|
2878
|
-
const customValue = (_a9 = data._custom) == null ? void 0 : _a9.value;
|
|
2879
|
-
const nestedCustom = typeof customValue === "object" && customValue !== null && "_custom" in customValue ? getRawValue(customValue) : { inherit: void 0, value: void 0 };
|
|
2880
|
-
inherit = nestedCustom.inherit || ((_b9 = data._custom) == null ? void 0 : _b9.fields) || {};
|
|
2881
|
-
value = nestedCustom.value || customValue;
|
|
2882
|
-
}
|
|
2883
|
-
if (value && value._isArray)
|
|
2884
|
-
value = value.items;
|
|
2885
|
-
return { value, inherit };
|
|
2499
|
+
function isPrimitive(data) {
|
|
2500
|
+
if (data == null)
|
|
2501
|
+
return true;
|
|
2502
|
+
const type = typeof data;
|
|
2503
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
2886
2504
|
}
|
|
2887
|
-
function
|
|
2888
|
-
return
|
|
2505
|
+
function isRef2(raw) {
|
|
2506
|
+
return !!raw.__v_isRef;
|
|
2889
2507
|
}
|
|
2890
|
-
function
|
|
2891
|
-
return
|
|
2508
|
+
function isComputed(raw) {
|
|
2509
|
+
return isRef2(raw) && !!raw.effect;
|
|
2892
2510
|
}
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
function stringify(data) {
|
|
2896
|
-
return stringifyCircularAutoChunks(data, stringifyReplacer);
|
|
2511
|
+
function isReactive2(raw) {
|
|
2512
|
+
return !!raw.__v_isReactive;
|
|
2897
2513
|
}
|
|
2898
|
-
function
|
|
2899
|
-
|
|
2900
|
-
return {};
|
|
2901
|
-
return revive2 ? parseCircularAutoChunks(data, reviver) : parseCircularAutoChunks(data);
|
|
2514
|
+
function isReadOnly(raw) {
|
|
2515
|
+
return !!raw.__v_isReadonly;
|
|
2902
2516
|
}
|
|
2903
2517
|
|
|
2904
|
-
// src/
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2518
|
+
// src/core/component/state/util.ts
|
|
2519
|
+
var tokenMap = {
|
|
2520
|
+
[UNDEFINED]: "undefined",
|
|
2521
|
+
[NAN]: "NaN",
|
|
2522
|
+
[INFINITY]: "Infinity",
|
|
2523
|
+
[NEGATIVE_INFINITY]: "-Infinity"
|
|
2524
|
+
};
|
|
2525
|
+
var reversedTokenMap = Object.entries(tokenMap).reduce((acc, [key, value]) => {
|
|
2526
|
+
acc[value] = key;
|
|
2527
|
+
return acc;
|
|
2528
|
+
}, {});
|
|
2529
|
+
function internalStateTokenToString(value) {
|
|
2530
|
+
if (value === null)
|
|
2531
|
+
return "null";
|
|
2532
|
+
return typeof value === "string" && tokenMap[value] || false;
|
|
2908
2533
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
// src/core/general/inspector.ts
|
|
2914
|
-
init_esm_shims();
|
|
2915
|
-
function addInspector(payload) {
|
|
2916
|
-
devtoolsContext.inspector.push(payload);
|
|
2534
|
+
function replaceTokenToString(value) {
|
|
2535
|
+
const replaceRegex = new RegExp(`"(${Object.keys(tokenMap).join("|")})"`, "g");
|
|
2536
|
+
return value.replace(replaceRegex, (_, g1) => tokenMap[g1]);
|
|
2917
2537
|
}
|
|
2918
|
-
function
|
|
2919
|
-
|
|
2538
|
+
function replaceStringToToken(value) {
|
|
2539
|
+
const literalValue = reversedTokenMap[value.trim()];
|
|
2540
|
+
if (literalValue)
|
|
2541
|
+
return `"${literalValue}"`;
|
|
2542
|
+
const replaceRegex = new RegExp(`:\\s*(${Object.keys(reversedTokenMap).join("|")})`, "g");
|
|
2543
|
+
return value.replace(replaceRegex, (_, g1) => `:"${reversedTokenMap[g1]}"`);
|
|
2920
2544
|
}
|
|
2921
|
-
function
|
|
2922
|
-
|
|
2923
|
-
|
|
2545
|
+
function getPropType(type) {
|
|
2546
|
+
if (Array.isArray(type))
|
|
2547
|
+
return type.map((t) => getPropType(t)).join(" or ");
|
|
2548
|
+
if (type == null)
|
|
2549
|
+
return "null";
|
|
2550
|
+
const match = type.toString().match(fnTypeRE);
|
|
2551
|
+
return typeof type === "function" ? match && match[1] || "any" : "any";
|
|
2924
2552
|
}
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2553
|
+
function sanitize(data) {
|
|
2554
|
+
if (!isPrimitive(data) && !Array.isArray(data) && !isPlainObject(data)) {
|
|
2555
|
+
return Object.prototype.toString.call(data);
|
|
2556
|
+
} else {
|
|
2557
|
+
return data;
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
function getSetupStateType(raw) {
|
|
2561
|
+
return {
|
|
2562
|
+
ref: isRef2(raw),
|
|
2563
|
+
computed: isComputed(raw),
|
|
2564
|
+
reactive: isReactive2(raw),
|
|
2565
|
+
readonly: isReadOnly(raw)
|
|
2566
|
+
};
|
|
2567
|
+
}
|
|
2568
|
+
function toRaw2(value) {
|
|
2569
|
+
if (value == null ? void 0 : value.__v_raw)
|
|
2570
|
+
return value.__v_raw;
|
|
2571
|
+
return value;
|
|
2572
|
+
}
|
|
2573
|
+
function escape(s) {
|
|
2574
|
+
return s.replace(/[<>"&]/g, (s2) => {
|
|
2575
|
+
return ESC[s2] || s2;
|
|
2576
|
+
});
|
|
2930
2577
|
}
|
|
2931
2578
|
|
|
2932
|
-
// src/core/component/state/
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
while (sections.length > 1) {
|
|
2948
|
-
const section = sections.shift();
|
|
2949
|
-
object = object[section];
|
|
2950
|
-
if (this.refEditor.isRef(object))
|
|
2951
|
-
object = this.refEditor.get(object);
|
|
2952
|
-
}
|
|
2953
|
-
const field = sections[0];
|
|
2954
|
-
const item = this.refEditor.get(object)[field];
|
|
2955
|
-
if (cb) {
|
|
2956
|
-
cb(object, field, value);
|
|
2957
|
-
} else {
|
|
2958
|
-
if (this.refEditor.isRef(item))
|
|
2959
|
-
this.refEditor.set(item, value);
|
|
2960
|
-
else if (markRef)
|
|
2961
|
-
object[field] = value;
|
|
2579
|
+
// src/core/component/state/process.ts
|
|
2580
|
+
function mergeOptions(to, from, instance) {
|
|
2581
|
+
if (typeof from === "function")
|
|
2582
|
+
from = from.options;
|
|
2583
|
+
if (!from)
|
|
2584
|
+
return to;
|
|
2585
|
+
const { mixins, extends: extendsOptions } = from;
|
|
2586
|
+
extendsOptions && mergeOptions(to, extendsOptions, instance);
|
|
2587
|
+
mixins && mixins.forEach(
|
|
2588
|
+
(m) => mergeOptions(to, m, instance)
|
|
2589
|
+
);
|
|
2590
|
+
for (const key of ["computed", "inject"]) {
|
|
2591
|
+
if (Object.prototype.hasOwnProperty.call(from, key)) {
|
|
2592
|
+
if (!to[key])
|
|
2593
|
+
to[key] = from[key];
|
|
2962
2594
|
else
|
|
2963
|
-
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
get(object, path) {
|
|
2967
|
-
const sections = Array.isArray(path) ? path : path.split(".");
|
|
2968
|
-
for (let i = 0; i < sections.length; i++) {
|
|
2969
|
-
object = object[sections[i]];
|
|
2970
|
-
if (this.refEditor.isRef(object))
|
|
2971
|
-
object = this.refEditor.get(object);
|
|
2972
|
-
if (!object)
|
|
2973
|
-
return void 0;
|
|
2974
|
-
}
|
|
2975
|
-
return object;
|
|
2976
|
-
}
|
|
2977
|
-
has(object, path, parent = false) {
|
|
2978
|
-
if (typeof object === "undefined")
|
|
2979
|
-
return false;
|
|
2980
|
-
const sections = Array.isArray(path) ? path.slice() : path.split(".");
|
|
2981
|
-
const size = !parent ? 1 : 2;
|
|
2982
|
-
while (object && sections.length > size) {
|
|
2983
|
-
const section = sections.shift();
|
|
2984
|
-
object = object[section];
|
|
2985
|
-
if (this.refEditor.isRef(object))
|
|
2986
|
-
object = this.refEditor.get(object);
|
|
2987
|
-
}
|
|
2988
|
-
return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
|
|
2989
|
-
}
|
|
2990
|
-
createDefaultSetCallback(state) {
|
|
2991
|
-
return (object, field, value) => {
|
|
2992
|
-
if (state.remove || state.newKey) {
|
|
2993
|
-
if (Array.isArray(object))
|
|
2994
|
-
object.splice(field, 1);
|
|
2995
|
-
else if (toRaw2(object) instanceof Map && typeof value === "object" && value && "key" in value)
|
|
2996
|
-
object.delete(value.key);
|
|
2997
|
-
else if (toRaw2(object) instanceof Set)
|
|
2998
|
-
object.delete(value);
|
|
2999
|
-
else
|
|
3000
|
-
Reflect.deleteProperty(object, field);
|
|
3001
|
-
}
|
|
3002
|
-
if (!state.remove) {
|
|
3003
|
-
const target8 = object[state.newKey || field];
|
|
3004
|
-
if (this.refEditor.isRef(target8))
|
|
3005
|
-
this.refEditor.set(target8, value);
|
|
3006
|
-
else
|
|
3007
|
-
object[state.newKey || field] = value;
|
|
3008
|
-
}
|
|
3009
|
-
};
|
|
3010
|
-
}
|
|
3011
|
-
};
|
|
3012
|
-
var RefStateEditor = class {
|
|
3013
|
-
set(ref, value) {
|
|
3014
|
-
if (isRef2(ref)) {
|
|
3015
|
-
ref.value = value;
|
|
3016
|
-
} else {
|
|
3017
|
-
const previousKeys = Object.keys(ref);
|
|
3018
|
-
const currentKeys = Object.keys(value);
|
|
3019
|
-
if (previousKeys.length > currentKeys.length) {
|
|
3020
|
-
const diffKeys = previousKeys.filter((key) => !currentKeys.includes(key));
|
|
3021
|
-
diffKeys.forEach((key) => Reflect.deleteProperty(ref, key));
|
|
3022
|
-
}
|
|
3023
|
-
currentKeys.forEach((key) => {
|
|
3024
|
-
Reflect.set(ref, key, Reflect.get(value, key));
|
|
3025
|
-
});
|
|
3026
|
-
}
|
|
3027
|
-
}
|
|
3028
|
-
get(ref) {
|
|
3029
|
-
return isRef2(ref) ? ref.value : ref;
|
|
3030
|
-
}
|
|
3031
|
-
isRef(ref) {
|
|
3032
|
-
return isRef2(ref) || isReactive2(ref);
|
|
3033
|
-
}
|
|
3034
|
-
};
|
|
3035
|
-
async function editComponentState(payload, stateEditor2) {
|
|
3036
|
-
const { path, nodeId, state, type } = payload;
|
|
3037
|
-
const instance = getComponentInstance(devtoolsContext.appRecord, nodeId);
|
|
3038
|
-
if (!instance)
|
|
3039
|
-
return;
|
|
3040
|
-
const targetPath = path.slice();
|
|
3041
|
-
let target8;
|
|
3042
|
-
if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0])) {
|
|
3043
|
-
target8 = instance.devtoolsRawSetupState;
|
|
3044
|
-
}
|
|
3045
|
-
if (target8 && targetPath) {
|
|
3046
|
-
if (state.type === "object" && type === "reactive") {
|
|
2595
|
+
Object.assign(to[key], from[key]);
|
|
3047
2596
|
}
|
|
3048
|
-
stateEditor2.set(target8, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
|
|
3049
2597
|
}
|
|
2598
|
+
return to;
|
|
3050
2599
|
}
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
2600
|
+
function resolveMergedOptions(instance) {
|
|
2601
|
+
const raw = instance.type;
|
|
2602
|
+
const { mixins, extends: extendsOptions } = raw;
|
|
2603
|
+
const globalMixins = instance.appContext.mixins;
|
|
2604
|
+
if (!globalMixins.length && !mixins && !extendsOptions)
|
|
2605
|
+
return raw;
|
|
2606
|
+
const options = {};
|
|
2607
|
+
globalMixins.forEach((m) => mergeOptions(options, m, instance));
|
|
2608
|
+
mergeOptions(options, raw, instance);
|
|
2609
|
+
return options;
|
|
3054
2610
|
}
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
2611
|
+
function processProps(instance) {
|
|
2612
|
+
const props = [];
|
|
2613
|
+
const propDefinitions = instance.type.props;
|
|
2614
|
+
for (const key in instance.props) {
|
|
2615
|
+
const propDefinition = propDefinitions ? propDefinitions[key] : null;
|
|
2616
|
+
const camelizeKey = camelize(key);
|
|
2617
|
+
props.push({
|
|
2618
|
+
type: "props",
|
|
2619
|
+
key: camelizeKey,
|
|
2620
|
+
value: returnError(() => instance.props[key]),
|
|
2621
|
+
meta: propDefinition ? {
|
|
2622
|
+
type: propDefinition.type ? getPropType(propDefinition.type) : "any",
|
|
2623
|
+
required: !!propDefinition.required,
|
|
2624
|
+
...propDefinition.default ? {
|
|
2625
|
+
default: propDefinition.default.toString()
|
|
2626
|
+
} : {}
|
|
2627
|
+
} : { type: "invalid" }
|
|
2628
|
+
});
|
|
3067
2629
|
}
|
|
2630
|
+
return props;
|
|
3068
2631
|
}
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
devtoolsState.pluginBuffer.push([pluginDescriptor, setupFn]);
|
|
2632
|
+
function processState(instance) {
|
|
2633
|
+
const type = instance.type;
|
|
2634
|
+
const props = type.props;
|
|
2635
|
+
const getters = type.vuex && type.vuex.getters;
|
|
2636
|
+
const computedDefs = type.computed;
|
|
2637
|
+
const data = {
|
|
2638
|
+
...instance.data,
|
|
2639
|
+
...instance.renderContext
|
|
2640
|
+
};
|
|
2641
|
+
return Object.keys(data).filter((key) => !(props && key in props) && !(getters && key in getters) && !(computedDefs && key in computedDefs)).map((key) => ({
|
|
2642
|
+
key,
|
|
2643
|
+
type: "data",
|
|
2644
|
+
value: returnError(() => data[key]),
|
|
2645
|
+
editable: true
|
|
2646
|
+
}));
|
|
3085
2647
|
}
|
|
3086
|
-
|
|
3087
|
-
const
|
|
3088
|
-
const
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
2648
|
+
function getStateTypeAndName(info) {
|
|
2649
|
+
const stateType = info.computed ? "computed" : info.ref ? "ref" : info.reactive ? "reactive" : null;
|
|
2650
|
+
const stateTypeName = stateType ? `${stateType.charAt(0).toUpperCase()}${stateType.slice(1)}` : null;
|
|
2651
|
+
return {
|
|
2652
|
+
stateType,
|
|
2653
|
+
stateTypeName
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
function processSetupState(instance) {
|
|
2657
|
+
const raw = instance.devtoolsRawSetupState || {};
|
|
2658
|
+
return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
|
|
2659
|
+
var _a10, _b10, _c, _d;
|
|
2660
|
+
const value = returnError(() => toRaw2(instance.setupState[key]));
|
|
2661
|
+
const rawData = raw[key];
|
|
2662
|
+
let result;
|
|
2663
|
+
let isOtherType = typeof value === "function" || typeof (value == null ? void 0 : value.render) === "function" || typeof (value == null ? void 0 : value.__asyncLoader) === "function";
|
|
2664
|
+
if (rawData) {
|
|
2665
|
+
const info = getSetupStateType(rawData);
|
|
2666
|
+
const { stateType, stateTypeName } = getStateTypeAndName(info);
|
|
2667
|
+
const isState = info.ref || info.computed || info.reactive;
|
|
2668
|
+
const raw2 = ((_b10 = (_a10 = rawData.effect) == null ? void 0 : _a10.raw) == null ? void 0 : _b10.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
2669
|
+
if (stateType)
|
|
2670
|
+
isOtherType = false;
|
|
2671
|
+
result = {
|
|
2672
|
+
...stateType ? { stateType, stateTypeName } : {},
|
|
2673
|
+
...raw2 ? { raw: raw2 } : {},
|
|
2674
|
+
editable: isState && !info.readonly
|
|
2675
|
+
};
|
|
3102
2676
|
}
|
|
3103
|
-
|
|
3104
|
-
});
|
|
3105
|
-
devtoolsState.appRecords = devtoolsState.appRecords.map((record) => {
|
|
3106
|
-
var _a9, _b9;
|
|
3107
|
-
const globalProperties = (_b9 = (_a9 = record.app) == null ? void 0 : _a9.config) == null ? void 0 : _b9.globalProperties;
|
|
3108
|
-
if (!globalProperties)
|
|
3109
|
-
return record;
|
|
2677
|
+
const type = isOtherType ? "setup (other)" : "setup";
|
|
3110
2678
|
return {
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
}
|
|
2679
|
+
key,
|
|
2680
|
+
value,
|
|
2681
|
+
type,
|
|
2682
|
+
// @ts-expect-error ignore
|
|
2683
|
+
...result
|
|
3117
2684
|
};
|
|
3118
2685
|
});
|
|
3119
2686
|
}
|
|
3120
|
-
function
|
|
3121
|
-
|
|
2687
|
+
function processComputed(instance, mergedType) {
|
|
2688
|
+
const type = mergedType;
|
|
2689
|
+
const computed = [];
|
|
2690
|
+
const defs = type.computed || {};
|
|
2691
|
+
for (const key in defs) {
|
|
2692
|
+
const def = defs[key];
|
|
2693
|
+
const type2 = typeof def === "function" && def.vuex ? "vuex bindings" : "computed";
|
|
2694
|
+
computed.push({
|
|
2695
|
+
type: type2,
|
|
2696
|
+
key,
|
|
2697
|
+
value: returnError(() => {
|
|
2698
|
+
var _a10;
|
|
2699
|
+
return (_a10 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a10[key];
|
|
2700
|
+
}),
|
|
2701
|
+
editable: typeof def.set === "function"
|
|
2702
|
+
});
|
|
2703
|
+
}
|
|
2704
|
+
return computed;
|
|
3122
2705
|
}
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
function getRootElementsFromComponentInstance(instance) {
|
|
3130
|
-
if (isFragment(instance))
|
|
3131
|
-
return getFragmentRootElements(instance.subTree);
|
|
3132
|
-
if (!instance.subTree)
|
|
3133
|
-
return [];
|
|
3134
|
-
return [instance.subTree.el];
|
|
2706
|
+
function processAttrs(instance) {
|
|
2707
|
+
return Object.keys(instance.attrs).map((key) => ({
|
|
2708
|
+
type: "attrs",
|
|
2709
|
+
key,
|
|
2710
|
+
value: returnError(() => instance.attrs[key])
|
|
2711
|
+
}));
|
|
3135
2712
|
}
|
|
3136
|
-
function
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
list.push(...getRootElementsFromComponentInstance(childVnode.component));
|
|
3143
|
-
else if (childVnode == null ? void 0 : childVnode.el)
|
|
3144
|
-
list.push(childVnode.el);
|
|
3145
|
-
});
|
|
3146
|
-
return list;
|
|
2713
|
+
function processProvide(instance) {
|
|
2714
|
+
return Reflect.ownKeys(instance.provides).map((key) => ({
|
|
2715
|
+
type: "provided",
|
|
2716
|
+
key: key.toString(),
|
|
2717
|
+
value: returnError(() => instance.provides[key])
|
|
2718
|
+
}));
|
|
3147
2719
|
}
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
2720
|
+
function processInject(instance, mergedType) {
|
|
2721
|
+
if (!(mergedType == null ? void 0 : mergedType.inject))
|
|
2722
|
+
return [];
|
|
2723
|
+
let keys = [];
|
|
2724
|
+
let defaultValue;
|
|
2725
|
+
if (Array.isArray(mergedType.inject)) {
|
|
2726
|
+
keys = mergedType.inject.map((key) => ({
|
|
2727
|
+
key,
|
|
2728
|
+
originalKey: key
|
|
2729
|
+
}));
|
|
2730
|
+
} else {
|
|
2731
|
+
keys = Reflect.ownKeys(mergedType.inject).map((key) => {
|
|
2732
|
+
const value = mergedType.inject[key];
|
|
2733
|
+
let originalKey;
|
|
2734
|
+
if (typeof value === "string" || typeof value === "symbol") {
|
|
2735
|
+
originalKey = value;
|
|
2736
|
+
} else {
|
|
2737
|
+
originalKey = value.from;
|
|
2738
|
+
defaultValue = value.default;
|
|
2739
|
+
}
|
|
2740
|
+
return {
|
|
2741
|
+
key,
|
|
2742
|
+
originalKey
|
|
2743
|
+
};
|
|
2744
|
+
});
|
|
3165
2745
|
}
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
|
|
2746
|
+
return keys.map(({ key, originalKey }) => ({
|
|
2747
|
+
type: "injected",
|
|
2748
|
+
key: originalKey && key !== originalKey ? `${originalKey.toString()} \u279E ${key.toString()}` : key.toString(),
|
|
2749
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
2750
|
+
value: returnError(() => instance.ctx.hasOwnProperty(key) ? instance.ctx[key] : instance.provides.hasOwnProperty(originalKey) ? instance.provides[originalKey] : defaultValue)
|
|
2751
|
+
}));
|
|
3169
2752
|
}
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
}
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
return null;
|
|
3199
|
-
const id = instance.__VUE_DEVTOOLS_UID__ != null ? instance.__VUE_DEVTOOLS_UID__ : getUniqueComponentId(instance);
|
|
3200
|
-
instance.__VUE_DEVTOOLS_UID__ = id;
|
|
3201
|
-
if (this.captureIds.has(id))
|
|
3202
|
-
return null;
|
|
3203
|
-
else
|
|
3204
|
-
this.captureIds.set(id, void 0);
|
|
3205
|
-
this.mark(instance);
|
|
3206
|
-
return id;
|
|
3207
|
-
}
|
|
3208
|
-
/**
|
|
3209
|
-
* Capture the meta information of an instance. (recursive)
|
|
3210
|
-
*
|
|
3211
|
-
* @param {Vue} instance
|
|
3212
|
-
* @return {object}
|
|
3213
|
-
*/
|
|
3214
|
-
async capture(instance, depth) {
|
|
3215
|
-
var _a9;
|
|
3216
|
-
if (!instance)
|
|
3217
|
-
return null;
|
|
3218
|
-
const id = this.captureId(instance);
|
|
3219
|
-
const name = getInstanceName(instance);
|
|
3220
|
-
const children = this.getInternalInstanceChildren(instance.subTree).filter((child) => !isBeingDestroyed(child));
|
|
3221
|
-
const parents = this.getComponentParents(instance) || [];
|
|
3222
|
-
const inactive = !!instance.isDeactivated || parents.some((parent) => parent.isDeactivated);
|
|
3223
|
-
const treeNode = {
|
|
3224
|
-
uid: instance.uid,
|
|
3225
|
-
id,
|
|
3226
|
-
name,
|
|
3227
|
-
renderKey: getRenderKey(instance.vnode ? instance.vnode.key : null),
|
|
3228
|
-
inactive,
|
|
3229
|
-
children: [],
|
|
3230
|
-
isFragment: isFragment(instance),
|
|
3231
|
-
tags: typeof instance.type !== "function" ? [] : [
|
|
3232
|
-
{
|
|
3233
|
-
label: "functional",
|
|
3234
|
-
textColor: 5592405,
|
|
3235
|
-
backgroundColor: 15658734
|
|
3236
|
-
}
|
|
3237
|
-
],
|
|
3238
|
-
autoOpen: this.recursively,
|
|
3239
|
-
file: instance.type.__file || ""
|
|
3240
|
-
};
|
|
3241
|
-
if (depth < this.maxDepth || instance.type.__isKeepAlive || parents.some((parent) => parent.type.__isKeepAlive)) {
|
|
3242
|
-
treeNode.children = await Promise.all(children.map((child) => this.capture(child, depth + 1)).filter(Boolean));
|
|
3243
|
-
}
|
|
3244
|
-
if (this.isKeepAlive(instance)) {
|
|
3245
|
-
const cachedComponents = this.getKeepAliveCachedInstances(instance);
|
|
3246
|
-
const childrenIds = children.map((child) => child.__VUE_DEVTOOLS_UID__);
|
|
3247
|
-
for (const cachedChild of cachedComponents) {
|
|
3248
|
-
if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_UID__)) {
|
|
3249
|
-
const node = await this.capture({ ...cachedChild, isDeactivated: true }, depth + 1);
|
|
3250
|
-
if (node)
|
|
3251
|
-
treeNode.children.push(node);
|
|
2753
|
+
function processRefs(instance) {
|
|
2754
|
+
return Object.keys(instance.refs).map((key) => ({
|
|
2755
|
+
type: "refs",
|
|
2756
|
+
key,
|
|
2757
|
+
value: returnError(() => instance.refs[key])
|
|
2758
|
+
}));
|
|
2759
|
+
}
|
|
2760
|
+
function processEventListeners(instance) {
|
|
2761
|
+
var _a10;
|
|
2762
|
+
const emitsDefinition = instance.type.emits;
|
|
2763
|
+
const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
|
|
2764
|
+
const keys = Object.keys((_a10 = instance.vnode.props) != null ? _a10 : {});
|
|
2765
|
+
const result = [];
|
|
2766
|
+
for (const key of keys) {
|
|
2767
|
+
const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
|
|
2768
|
+
if (prefix === "on") {
|
|
2769
|
+
const eventName = eventNameParts.join("-").toLowerCase();
|
|
2770
|
+
const isDeclared = declaredEmits.includes(eventName);
|
|
2771
|
+
result.push({
|
|
2772
|
+
type: "event listeners",
|
|
2773
|
+
key: eventName,
|
|
2774
|
+
value: {
|
|
2775
|
+
_custom: {
|
|
2776
|
+
displayText: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2777
|
+
key: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2778
|
+
value: isDeclared ? "\u2705 Declared" : "\u26A0\uFE0F Not declared",
|
|
2779
|
+
tooltipText: !isDeclared ? `The event <code>${eventName}</code> is not declared in the <code>emits</code> option. It will leak into the component's attributes (<code>$attrs</code>).` : null
|
|
2780
|
+
}
|
|
3252
2781
|
}
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
const rootElements = getRootElementsFromComponentInstance(instance);
|
|
3256
|
-
const firstElement = rootElements[0];
|
|
3257
|
-
if (firstElement == null ? void 0 : firstElement.parentElement) {
|
|
3258
|
-
const parentInstance = instance.parent;
|
|
3259
|
-
const parentRootElements = parentInstance ? getRootElementsFromComponentInstance(parentInstance) : [];
|
|
3260
|
-
let el = firstElement;
|
|
3261
|
-
const indexList = [];
|
|
3262
|
-
do {
|
|
3263
|
-
indexList.push(Array.from(el.parentElement.childNodes).indexOf(el));
|
|
3264
|
-
el = el.parentElement;
|
|
3265
|
-
} while (el.parentElement && parentRootElements.length && !parentRootElements.includes(el));
|
|
3266
|
-
treeNode.domOrder = indexList.reverse();
|
|
3267
|
-
} else {
|
|
3268
|
-
treeNode.domOrder = [-1];
|
|
3269
|
-
}
|
|
3270
|
-
if ((_a9 = instance.suspense) == null ? void 0 : _a9.suspenseKey) {
|
|
3271
|
-
treeNode.tags.push({
|
|
3272
|
-
label: instance.suspense.suspenseKey,
|
|
3273
|
-
backgroundColor: 14979812,
|
|
3274
|
-
textColor: 16777215
|
|
3275
2782
|
});
|
|
3276
|
-
this.mark(instance, true);
|
|
3277
|
-
}
|
|
3278
|
-
devtoolsContext.api.visitComponentTree({
|
|
3279
|
-
treeNode,
|
|
3280
|
-
componentInstance: instance,
|
|
3281
|
-
app: instance.appContext.app,
|
|
3282
|
-
filter: this.componentFilter.filter
|
|
3283
|
-
});
|
|
3284
|
-
return treeNode;
|
|
3285
|
-
}
|
|
3286
|
-
/**
|
|
3287
|
-
* Find qualified children from a single instance.
|
|
3288
|
-
* If the instance itself is qualified, just return itself.
|
|
3289
|
-
* This is ok because [].concat works in both cases.
|
|
3290
|
-
*
|
|
3291
|
-
* @param {Vue|Vnode} instance
|
|
3292
|
-
* @return {Vue|Array}
|
|
3293
|
-
*/
|
|
3294
|
-
async findQualifiedChildren(instance, depth) {
|
|
3295
|
-
var _a9;
|
|
3296
|
-
if (this.componentFilter.isQualified(instance) && !((_a9 = instance.type.devtools) == null ? void 0 : _a9.hide)) {
|
|
3297
|
-
return [await this.capture(instance, depth)];
|
|
3298
|
-
} else if (instance.subTree) {
|
|
3299
|
-
const list = this.isKeepAlive(instance) ? this.getKeepAliveCachedInstances(instance) : this.getInternalInstanceChildren(instance.subTree);
|
|
3300
|
-
return this.findQualifiedChildrenFromList(list, depth);
|
|
3301
|
-
} else {
|
|
3302
|
-
return [];
|
|
3303
2783
|
}
|
|
3304
2784
|
}
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
return Promise.all(instances.map((child) => this.capture(child, depth)));
|
|
3321
|
-
else
|
|
3322
|
-
return Array.prototype.concat.apply([], await Promise.all(instances.map((i) => this.findQualifiedChildren(i, depth))));
|
|
3323
|
-
}
|
|
3324
|
-
/**
|
|
3325
|
-
* Get children from a component instance.
|
|
3326
|
-
*/
|
|
3327
|
-
getInternalInstanceChildren(subTree, suspense = null) {
|
|
3328
|
-
const list = [];
|
|
3329
|
-
if (subTree) {
|
|
3330
|
-
if (subTree.component) {
|
|
3331
|
-
!suspense ? list.push(subTree.component) : list.push({ ...subTree.component, suspense });
|
|
3332
|
-
} else if (subTree.suspense) {
|
|
3333
|
-
const suspenseKey = !subTree.suspense.isInFallback ? "suspense default" : "suspense fallback";
|
|
3334
|
-
list.push(...this.getInternalInstanceChildren(subTree.suspense.activeBranch, { ...subTree.suspense, suspenseKey }));
|
|
3335
|
-
} else if (Array.isArray(subTree.children)) {
|
|
3336
|
-
subTree.children.forEach((childSubTree) => {
|
|
3337
|
-
if (childSubTree.component)
|
|
3338
|
-
!suspense ? list.push(childSubTree.component) : list.push({ ...childSubTree.component, suspense });
|
|
3339
|
-
else
|
|
3340
|
-
list.push(...this.getInternalInstanceChildren(childSubTree, suspense));
|
|
3341
|
-
});
|
|
3342
|
-
}
|
|
3343
|
-
}
|
|
3344
|
-
return list.filter((child) => {
|
|
3345
|
-
var _a9;
|
|
3346
|
-
return !isBeingDestroyed(child) && !((_a9 = child.type.devtools) == null ? void 0 : _a9.hide);
|
|
3347
|
-
});
|
|
3348
|
-
}
|
|
3349
|
-
/**
|
|
3350
|
-
* Mark an instance as captured and store it in the instance map.
|
|
3351
|
-
*
|
|
3352
|
-
* @param {Vue} instance
|
|
3353
|
-
*/
|
|
3354
|
-
mark(instance, force = false) {
|
|
3355
|
-
const instanceMap = getAppRecord(instance).instanceMap;
|
|
3356
|
-
if (force || !instanceMap.has(instance.__VUE_DEVTOOLS_UID__))
|
|
3357
|
-
instanceMap.set(instance.__VUE_DEVTOOLS_UID__, instance);
|
|
3358
|
-
}
|
|
3359
|
-
isKeepAlive(instance) {
|
|
3360
|
-
return instance.type.__isKeepAlive && instance.__v_cache;
|
|
3361
|
-
}
|
|
3362
|
-
getKeepAliveCachedInstances(instance) {
|
|
3363
|
-
return Array.from(instance.__v_cache.values()).map((vnode) => vnode.component).filter(Boolean);
|
|
3364
|
-
}
|
|
3365
|
-
};
|
|
2785
|
+
return result;
|
|
2786
|
+
}
|
|
2787
|
+
function processInstanceState(instance) {
|
|
2788
|
+
const mergedType = resolveMergedOptions(instance);
|
|
2789
|
+
return processProps(instance).concat(
|
|
2790
|
+
processState(instance),
|
|
2791
|
+
processSetupState(instance),
|
|
2792
|
+
processComputed(instance, mergedType),
|
|
2793
|
+
processAttrs(instance),
|
|
2794
|
+
processProvide(instance),
|
|
2795
|
+
processInject(instance, mergedType),
|
|
2796
|
+
processRefs(instance),
|
|
2797
|
+
processEventListeners(instance)
|
|
2798
|
+
);
|
|
2799
|
+
}
|
|
3366
2800
|
|
|
3367
2801
|
// src/core/component/state/index.ts
|
|
3368
|
-
init_esm_shims();
|
|
3369
2802
|
function getInstanceState(params) {
|
|
3370
|
-
var
|
|
2803
|
+
var _a10;
|
|
3371
2804
|
const instance = getComponentInstance(devtoolsContext.appRecord, params.instanceId);
|
|
3372
2805
|
const id = getUniqueComponentId(instance);
|
|
3373
2806
|
const name = getInstanceName(instance);
|
|
3374
|
-
const file = (
|
|
2807
|
+
const file = (_a10 = instance == null ? void 0 : instance.type) == null ? void 0 : _a10.__file;
|
|
3375
2808
|
const state = processInstanceState(instance);
|
|
3376
2809
|
return {
|
|
3377
2810
|
id,
|
|
@@ -3382,140 +2815,9 @@ function getInstanceState(params) {
|
|
|
3382
2815
|
};
|
|
3383
2816
|
}
|
|
3384
2817
|
|
|
3385
|
-
// src/
|
|
3386
|
-
init_esm_shims();
|
|
3387
|
-
function createRect() {
|
|
3388
|
-
const rect = {
|
|
3389
|
-
top: 0,
|
|
3390
|
-
bottom: 0,
|
|
3391
|
-
left: 0,
|
|
3392
|
-
right: 0,
|
|
3393
|
-
get width() {
|
|
3394
|
-
return rect.right - rect.left;
|
|
3395
|
-
},
|
|
3396
|
-
get height() {
|
|
3397
|
-
return rect.bottom - rect.top;
|
|
3398
|
-
}
|
|
3399
|
-
};
|
|
3400
|
-
return rect;
|
|
3401
|
-
}
|
|
3402
|
-
var range;
|
|
3403
|
-
function getTextRect(node) {
|
|
3404
|
-
if (!range)
|
|
3405
|
-
range = document.createRange();
|
|
3406
|
-
range.selectNode(node);
|
|
3407
|
-
return range.getBoundingClientRect();
|
|
3408
|
-
}
|
|
3409
|
-
function getFragmentRect(vnode) {
|
|
3410
|
-
const rect = createRect();
|
|
3411
|
-
if (!vnode.children)
|
|
3412
|
-
return rect;
|
|
3413
|
-
for (let i = 0, l = vnode.children.length; i < l; i++) {
|
|
3414
|
-
const childVnode = vnode.children[i];
|
|
3415
|
-
let childRect;
|
|
3416
|
-
if (childVnode.component) {
|
|
3417
|
-
childRect = getComponentBoundingRect(childVnode.component);
|
|
3418
|
-
} else if (childVnode.el) {
|
|
3419
|
-
const el = childVnode.el;
|
|
3420
|
-
if (el.nodeType === 1 || el.getBoundingClientRect)
|
|
3421
|
-
childRect = el.getBoundingClientRect();
|
|
3422
|
-
else if (el.nodeType === 3 && el.data.trim())
|
|
3423
|
-
childRect = getTextRect(el);
|
|
3424
|
-
}
|
|
3425
|
-
if (childRect)
|
|
3426
|
-
mergeRects(rect, childRect);
|
|
3427
|
-
}
|
|
3428
|
-
return rect;
|
|
3429
|
-
}
|
|
3430
|
-
function mergeRects(a, b) {
|
|
3431
|
-
if (!a.top || b.top < a.top)
|
|
3432
|
-
a.top = b.top;
|
|
3433
|
-
if (!a.bottom || b.bottom > a.bottom)
|
|
3434
|
-
a.bottom = b.bottom;
|
|
3435
|
-
if (!a.left || b.left < a.left)
|
|
3436
|
-
a.left = b.left;
|
|
3437
|
-
if (!a.right || b.right > a.right)
|
|
3438
|
-
a.right = b.right;
|
|
3439
|
-
return a;
|
|
3440
|
-
}
|
|
3441
|
-
var DEFAULT_RECT = {
|
|
3442
|
-
top: 0,
|
|
3443
|
-
left: 0,
|
|
3444
|
-
right: 0,
|
|
3445
|
-
bottom: 0,
|
|
3446
|
-
width: 0,
|
|
3447
|
-
height: 0
|
|
3448
|
-
};
|
|
3449
|
-
function getComponentBoundingRect(instance) {
|
|
3450
|
-
const el = instance.subTree.el;
|
|
3451
|
-
if (typeof window === "undefined") {
|
|
3452
|
-
return DEFAULT_RECT;
|
|
3453
|
-
}
|
|
3454
|
-
if (isFragment(instance))
|
|
3455
|
-
return getFragmentRect(instance.subTree);
|
|
3456
|
-
else if ((el == null ? void 0 : el.nodeType) === 1)
|
|
3457
|
-
return el == null ? void 0 : el.getBoundingClientRect();
|
|
3458
|
-
else if (instance.subTree.component)
|
|
3459
|
-
return getComponentBoundingRect(instance.subTree.component);
|
|
3460
|
-
else
|
|
3461
|
-
return DEFAULT_RECT;
|
|
3462
|
-
}
|
|
3463
|
-
|
|
3464
|
-
// src/api/on.ts
|
|
3465
|
-
init_esm_shims();
|
|
3466
|
-
import { target as target4 } from "@vue/devtools-shared";
|
|
3467
|
-
import { createHooks as createHooks2 } from "hookable";
|
|
3468
|
-
var _a6, _b6;
|
|
3469
|
-
var apiHooks = (_b6 = (_a6 = target4).__VUE_DEVTOOLS_API_HOOK) != null ? _b6 : _a6.__VUE_DEVTOOLS_API_HOOK = createHooks2();
|
|
3470
|
-
var on2 = {
|
|
3471
|
-
devtoolsStateUpdated(fn) {
|
|
3472
|
-
apiHooks.hook("devtools:state-updated" /* DEVTOOLS_STATE_UPDATED */, fn);
|
|
3473
|
-
},
|
|
3474
|
-
routerInfoUpdated(fn) {
|
|
3475
|
-
apiHooks.hook("router-info:updated" /* ROUTER_INFO_UPDATED */, fn);
|
|
3476
|
-
},
|
|
3477
|
-
getComponentBoundingRect(fn) {
|
|
3478
|
-
apiHooks.hook("component-bounding-rect:get" /* GET_COMPONENT_BOUNDING_RECT */, fn);
|
|
3479
|
-
},
|
|
3480
|
-
// compatible
|
|
3481
|
-
inspectComponent(fn) {
|
|
3482
|
-
apiHooks.hook("component-state:inspect" /* COMPONENT_STATE_INSPECT */, fn);
|
|
3483
|
-
},
|
|
3484
|
-
visitComponentTree(fn) {
|
|
3485
|
-
apiHooks.hook("component-tree:visit" /* VISIT_COMPONENT_TREE */, fn);
|
|
3486
|
-
},
|
|
3487
|
-
getInspectorTree(fn) {
|
|
3488
|
-
apiHooks.hook("inspector-tree:get" /* GET_INSPECTOR_TREE */, fn);
|
|
3489
|
-
},
|
|
3490
|
-
getInspectorState(fn) {
|
|
3491
|
-
apiHooks.hook("inspector-state:get" /* GET_INSPECTOR_STATE */, fn);
|
|
3492
|
-
},
|
|
3493
|
-
// private
|
|
3494
|
-
sendInspectorTree(fn) {
|
|
3495
|
-
apiHooks.hook("inspector-tree:send" /* SEND_INSPECTOR_TREE */, fn);
|
|
3496
|
-
},
|
|
3497
|
-
sendInspectorState(fn) {
|
|
3498
|
-
apiHooks.hook("inspector-state:send" /* SEND_INSPECTOR_STATE */, fn);
|
|
3499
|
-
},
|
|
3500
|
-
addTimelineEvent(fn) {
|
|
3501
|
-
apiHooks.hook("timeline:add-event" /* ADD_TIMELINE_EVENT */, fn);
|
|
3502
|
-
},
|
|
3503
|
-
editInspectorState(fn) {
|
|
3504
|
-
apiHooks.hook("inspector-state:edit" /* EDIT_INSPECTOR_STATE */, fn);
|
|
3505
|
-
},
|
|
3506
|
-
editComponentState() {
|
|
3507
|
-
},
|
|
3508
|
-
customTabsUpdated(fn) {
|
|
3509
|
-
apiHooks.hook("custom-tabs:updated" /* CUSTOM_TABS_UPDATED */, fn);
|
|
3510
|
-
},
|
|
3511
|
-
customCommandsUpdated(fn) {
|
|
3512
|
-
apiHooks.hook("custom-commands:updated" /* CUSTOM_COMMANDS_UPDATED */, fn);
|
|
3513
|
-
}
|
|
3514
|
-
};
|
|
3515
|
-
|
|
3516
|
-
// src/core/plugins/components.ts
|
|
2818
|
+
// src/plugins/component.ts
|
|
3517
2819
|
var INSPECTOR_ID = "components";
|
|
3518
|
-
function
|
|
2820
|
+
function registerComponentDevToolsPlugin(app) {
|
|
3519
2821
|
setupDevToolsPlugin({
|
|
3520
2822
|
id: INSPECTOR_ID,
|
|
3521
2823
|
label: "Components",
|
|
@@ -3561,13 +2863,13 @@ function registerComponentsDevTools(app) {
|
|
|
3561
2863
|
}
|
|
3562
2864
|
});
|
|
3563
2865
|
api.on.getInspectorState(async (payload) => {
|
|
3564
|
-
var
|
|
2866
|
+
var _a10;
|
|
3565
2867
|
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
3566
2868
|
const result = getInstanceState({
|
|
3567
2869
|
instanceId: payload.nodeId
|
|
3568
2870
|
});
|
|
3569
2871
|
const componentInstance = result.instance;
|
|
3570
|
-
const app2 = (
|
|
2872
|
+
const app2 = (_a10 = result.instance) == null ? void 0 : _a10.appContext.app;
|
|
3571
2873
|
const _payload = {
|
|
3572
2874
|
componentInstance,
|
|
3573
2875
|
app: app2,
|
|
@@ -3585,15 +2887,15 @@ function registerComponentsDevTools(app) {
|
|
|
3585
2887
|
await api.sendInspectorState("components");
|
|
3586
2888
|
}
|
|
3587
2889
|
});
|
|
3588
|
-
const debounceSendInspectorTree =
|
|
2890
|
+
const debounceSendInspectorTree = debounce2(() => {
|
|
3589
2891
|
api.sendInspectorTree(INSPECTOR_ID);
|
|
3590
2892
|
}, 120);
|
|
3591
|
-
const debounceSendInspectorState =
|
|
2893
|
+
const debounceSendInspectorState = debounce2(() => {
|
|
3592
2894
|
api.sendInspectorState(INSPECTOR_ID);
|
|
3593
2895
|
}, 120);
|
|
3594
2896
|
const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
|
|
3595
|
-
var
|
|
3596
|
-
if ((_c = (
|
|
2897
|
+
var _a10, _b10, _c;
|
|
2898
|
+
if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
|
|
3597
2899
|
return;
|
|
3598
2900
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3599
2901
|
return;
|
|
@@ -3614,8 +2916,8 @@ function registerComponentsDevTools(app) {
|
|
|
3614
2916
|
debounceSendInspectorTree();
|
|
3615
2917
|
});
|
|
3616
2918
|
const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {
|
|
3617
|
-
var
|
|
3618
|
-
if ((_c = (
|
|
2919
|
+
var _a10, _b10, _c;
|
|
2920
|
+
if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
|
|
3619
2921
|
return;
|
|
3620
2922
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3621
2923
|
return;
|
|
@@ -3637,8 +2939,8 @@ function registerComponentsDevTools(app) {
|
|
|
3637
2939
|
debounceSendInspectorState();
|
|
3638
2940
|
});
|
|
3639
2941
|
const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {
|
|
3640
|
-
var
|
|
3641
|
-
if ((_c = (
|
|
2942
|
+
var _a10, _b10, _c;
|
|
2943
|
+
if ((_c = (_b10 = (_a10 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a10.type) == null ? void 0 : _b10.devtools) == null ? void 0 : _c.hide)
|
|
3642
2944
|
return;
|
|
3643
2945
|
if (!app2 || typeof uid !== "number" && !uid || !component)
|
|
3644
2946
|
return;
|
|
@@ -3661,33 +2963,850 @@ function registerComponentsDevTools(app) {
|
|
|
3661
2963
|
});
|
|
3662
2964
|
}
|
|
3663
2965
|
|
|
3664
|
-
// src/core/
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
2966
|
+
// src/core/app-record/index.ts
|
|
2967
|
+
function getAppRecordName(app, fallbackName) {
|
|
2968
|
+
var _a10;
|
|
2969
|
+
return ((_a10 = app == null ? void 0 : app._component) == null ? void 0 : _a10.name) || `App ${fallbackName}`;
|
|
2970
|
+
}
|
|
2971
|
+
function getAppRootInstance(app) {
|
|
2972
|
+
var _a10, _b10, _c, _d;
|
|
2973
|
+
if (app._instance)
|
|
2974
|
+
return app._instance;
|
|
2975
|
+
else if ((_b10 = (_a10 = app._container) == null ? void 0 : _a10._vnode) == null ? void 0 : _b10.component)
|
|
2976
|
+
return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;
|
|
2977
|
+
}
|
|
2978
|
+
function getAppRecordId(app, defaultId) {
|
|
2979
|
+
if (app.__VUE_DEVTOOLS_APP_RECORD_ID__ != null)
|
|
2980
|
+
return app.__VUE_DEVTOOLS_APP_RECORD_ID__;
|
|
2981
|
+
let id = defaultId != null ? defaultId : (appRecordInfo.id++).toString();
|
|
2982
|
+
if (defaultId && appRecordInfo.appIds.has(id)) {
|
|
2983
|
+
let count = 1;
|
|
2984
|
+
while (appRecordInfo.appIds.has(`${defaultId}_${count}`))
|
|
2985
|
+
count++;
|
|
2986
|
+
id = `${defaultId}_${count}`;
|
|
2987
|
+
}
|
|
2988
|
+
appRecordInfo.appIds.add(id);
|
|
2989
|
+
app.__VUE_DEVTOOLS_APP_RECORD_ID__ = id;
|
|
2990
|
+
return id;
|
|
2991
|
+
}
|
|
2992
|
+
function createAppRecord(app) {
|
|
2993
|
+
const rootInstance = getAppRootInstance(app);
|
|
2994
|
+
if (rootInstance) {
|
|
2995
|
+
appRecordInfo.id++;
|
|
2996
|
+
const name = getAppRecordName(app, appRecordInfo.id.toString());
|
|
2997
|
+
const id = getAppRecordId(app, (0, import_speakingurl.default)(name));
|
|
2998
|
+
const record = {
|
|
2999
|
+
id,
|
|
3000
|
+
name,
|
|
3001
|
+
instanceMap: /* @__PURE__ */ new Map(),
|
|
3002
|
+
rootInstance
|
|
3003
|
+
};
|
|
3004
|
+
app.__VUE_DEVTOOLS_APP_RECORD__ = record;
|
|
3005
|
+
const rootId = `${record.id}:root`;
|
|
3006
|
+
record.instanceMap.set(rootId, record.rootInstance);
|
|
3007
|
+
record.rootInstance.__VUE_DEVTOOLS_UID__ = rootId;
|
|
3008
|
+
return record;
|
|
3009
|
+
} else {
|
|
3010
|
+
return {};
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
async function setActiveAppRecord(appRecord) {
|
|
3014
|
+
await registerComponentDevToolsPlugin(appRecord == null ? void 0 : appRecord.app);
|
|
3015
|
+
devtoolsAppRecords.active = appRecord;
|
|
3016
|
+
devtoolsAppRecords.activeId = `${appRecord.id}`;
|
|
3017
|
+
registerPlugin(appRecord.app, appRecord.api);
|
|
3018
|
+
}
|
|
3019
|
+
async function toggleActiveAppRecord(id) {
|
|
3020
|
+
devtoolsContext.componentPluginHookBuffer.forEach((cleanup) => cleanup());
|
|
3021
|
+
devtoolsContext.api.clear();
|
|
3022
|
+
devtoolsContext.clear();
|
|
3023
|
+
const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
|
|
3024
|
+
if (appRecord) {
|
|
3025
|
+
devtoolsState.pluginBuffer = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.id !== "components");
|
|
3026
|
+
const api = new DevToolsPluginApi();
|
|
3027
|
+
appRecord.api = api;
|
|
3028
|
+
setActiveAppRecord(appRecord);
|
|
3029
|
+
window.postMessage({
|
|
3030
|
+
event: "toggle-app-record",
|
|
3031
|
+
target: "vue-devtools"
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
// src/core/component-highlighter/index.ts
|
|
3037
|
+
init_esm_shims();
|
|
3038
|
+
var CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
|
|
3039
|
+
var CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
|
|
3040
|
+
var COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
|
|
3041
|
+
var INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
|
|
3042
|
+
var containerStyles = {
|
|
3043
|
+
display: "block",
|
|
3044
|
+
zIndex: 2147483640,
|
|
3045
|
+
position: "fixed",
|
|
3046
|
+
backgroundColor: "#42b88325",
|
|
3047
|
+
border: "1px solid #42b88350",
|
|
3048
|
+
borderRadius: "5px",
|
|
3049
|
+
transition: "all 0.1s ease-in",
|
|
3050
|
+
pointerEvents: "none"
|
|
3051
|
+
};
|
|
3052
|
+
var cardStyles = {
|
|
3053
|
+
fontFamily: "Arial, Helvetica, sans-serif",
|
|
3054
|
+
padding: "5px 8px",
|
|
3055
|
+
borderRadius: "4px",
|
|
3056
|
+
textAlign: "left",
|
|
3057
|
+
position: "absolute",
|
|
3058
|
+
left: 0,
|
|
3059
|
+
color: "#e9e9e9",
|
|
3060
|
+
fontSize: "14px",
|
|
3061
|
+
fontWeight: 600,
|
|
3062
|
+
lineHeight: "24px",
|
|
3063
|
+
backgroundColor: "#42b883",
|
|
3064
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
|
|
3065
|
+
};
|
|
3066
|
+
var indicatorStyles = {
|
|
3067
|
+
display: "inline-block",
|
|
3068
|
+
fontWeight: 400,
|
|
3069
|
+
fontStyle: "normal",
|
|
3070
|
+
fontSize: "12px",
|
|
3071
|
+
opacity: 0.7
|
|
3072
|
+
};
|
|
3073
|
+
function getContainerElement() {
|
|
3074
|
+
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
3075
|
+
}
|
|
3076
|
+
function getCardElement() {
|
|
3077
|
+
return document.getElementById(CARD_ELEMENT_ID);
|
|
3078
|
+
}
|
|
3079
|
+
function getIndicatorElement() {
|
|
3080
|
+
return document.getElementById(INDICATOR_ELEMENT_ID);
|
|
3081
|
+
}
|
|
3082
|
+
function getNameElement() {
|
|
3083
|
+
return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
|
|
3084
|
+
}
|
|
3085
|
+
function getStyles(bounds) {
|
|
3086
|
+
return {
|
|
3087
|
+
left: `${Math.round(bounds.left * 100) / 100}px`,
|
|
3088
|
+
top: `${Math.round(bounds.top * 100) / 100}px`,
|
|
3089
|
+
width: `${Math.round(bounds.width * 100) / 100}px`,
|
|
3090
|
+
height: `${Math.round(bounds.height * 100) / 100}px`
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
function create(options) {
|
|
3094
|
+
var _a10;
|
|
3095
|
+
const containerEl = document.createElement("div");
|
|
3096
|
+
containerEl.id = (_a10 = options.elementId) != null ? _a10 : CONTAINER_ELEMENT_ID;
|
|
3097
|
+
Object.assign(containerEl.style, {
|
|
3098
|
+
...containerStyles,
|
|
3099
|
+
...getStyles(options.bounds),
|
|
3100
|
+
...options.style
|
|
3101
|
+
});
|
|
3102
|
+
const cardEl = document.createElement("span");
|
|
3103
|
+
cardEl.id = CARD_ELEMENT_ID;
|
|
3104
|
+
Object.assign(cardEl.style, {
|
|
3105
|
+
...cardStyles,
|
|
3106
|
+
top: options.bounds.top < 35 ? 0 : "-35px"
|
|
3107
|
+
});
|
|
3108
|
+
const nameEl = document.createElement("span");
|
|
3109
|
+
nameEl.id = COMPONENT_NAME_ELEMENT_ID;
|
|
3110
|
+
nameEl.innerHTML = `<${options.name}> `;
|
|
3111
|
+
const indicatorEl = document.createElement("i");
|
|
3112
|
+
indicatorEl.id = INDICATOR_ELEMENT_ID;
|
|
3113
|
+
indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
|
|
3114
|
+
Object.assign(indicatorEl.style, indicatorStyles);
|
|
3115
|
+
cardEl.appendChild(nameEl);
|
|
3116
|
+
cardEl.appendChild(indicatorEl);
|
|
3117
|
+
containerEl.appendChild(cardEl);
|
|
3118
|
+
document.body.appendChild(containerEl);
|
|
3119
|
+
return containerEl;
|
|
3120
|
+
}
|
|
3121
|
+
function update(options) {
|
|
3122
|
+
const containerEl = getContainerElement();
|
|
3123
|
+
const cardEl = getCardElement();
|
|
3124
|
+
const nameEl = getNameElement();
|
|
3125
|
+
const indicatorEl = getIndicatorElement();
|
|
3126
|
+
if (containerEl) {
|
|
3127
|
+
Object.assign(containerEl.style, {
|
|
3128
|
+
...containerStyles,
|
|
3129
|
+
...getStyles(options.bounds)
|
|
3130
|
+
});
|
|
3131
|
+
Object.assign(cardEl.style, {
|
|
3132
|
+
top: options.bounds.top < 35 ? 0 : "-35px"
|
|
3133
|
+
});
|
|
3134
|
+
nameEl.innerHTML = `<${options.name}> `;
|
|
3135
|
+
indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
function toggleComponentHighLighter(options) {
|
|
3139
|
+
if (options.visible) {
|
|
3140
|
+
const instance = getComponentInstance(devtoolsContext.appRecord, options.id);
|
|
3141
|
+
if (instance && (options.bounds.width || options.bounds.height)) {
|
|
3142
|
+
const name = getInstanceName(instance);
|
|
3143
|
+
const el = getContainerElement();
|
|
3144
|
+
el ? update({ ...options, name }) : create({ ...options, name });
|
|
3145
|
+
}
|
|
3146
|
+
} else {
|
|
3147
|
+
const el = getContainerElement();
|
|
3148
|
+
if (el)
|
|
3149
|
+
el.style.display = "none";
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
function highlight(instance) {
|
|
3153
|
+
const bounds = getComponentBoundingRect(instance);
|
|
3154
|
+
const name = getInstanceName(instance);
|
|
3155
|
+
const container = getContainerElement();
|
|
3156
|
+
container ? update({ bounds, name }) : create({ bounds, name });
|
|
3157
|
+
}
|
|
3158
|
+
function unhighlight() {
|
|
3159
|
+
const el = getContainerElement();
|
|
3160
|
+
if (el)
|
|
3161
|
+
el.style.display = "none";
|
|
3162
|
+
}
|
|
3163
|
+
var inspectInstance = null;
|
|
3164
|
+
function inspectFn(e) {
|
|
3165
|
+
const target9 = e.target;
|
|
3166
|
+
if (target9) {
|
|
3167
|
+
const instance = target9.__vueParentComponent;
|
|
3168
|
+
if (instance) {
|
|
3169
|
+
inspectInstance = instance;
|
|
3170
|
+
const el = instance.vnode.el;
|
|
3171
|
+
if (el) {
|
|
3172
|
+
const bounds = getComponentBoundingRect(instance);
|
|
3173
|
+
const name = getInstanceName(instance);
|
|
3174
|
+
const container = getContainerElement();
|
|
3175
|
+
container ? update({ bounds, name }) : create({ bounds, name });
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
function selectComponentFn(e, cb) {
|
|
3181
|
+
var _a10;
|
|
3182
|
+
e.preventDefault();
|
|
3183
|
+
e.stopPropagation();
|
|
3184
|
+
if (inspectInstance) {
|
|
3185
|
+
const app = (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.app;
|
|
3186
|
+
getComponentId({
|
|
3187
|
+
app,
|
|
3188
|
+
uid: app.uid,
|
|
3189
|
+
instance: inspectInstance
|
|
3190
|
+
}).then((id) => {
|
|
3191
|
+
cb(id);
|
|
3192
|
+
});
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
function inspectComponentHighLighter() {
|
|
3196
|
+
window.addEventListener("mouseover", inspectFn);
|
|
3197
|
+
return new Promise((resolve) => {
|
|
3198
|
+
function onSelect(e) {
|
|
3199
|
+
e.preventDefault();
|
|
3200
|
+
e.stopPropagation();
|
|
3201
|
+
selectComponentFn(e, (id) => {
|
|
3202
|
+
window.removeEventListener("click", onSelect);
|
|
3203
|
+
window.removeEventListener("mouseover", inspectFn);
|
|
3204
|
+
const el = getContainerElement();
|
|
3205
|
+
if (el)
|
|
3206
|
+
el.style.display = "none";
|
|
3207
|
+
resolve(JSON.stringify({ id }));
|
|
3208
|
+
});
|
|
3209
|
+
}
|
|
3210
|
+
window.addEventListener("click", onSelect);
|
|
3211
|
+
});
|
|
3212
|
+
}
|
|
3213
|
+
function scrollToComponent(options) {
|
|
3214
|
+
const instance = getComponentInstance(devtoolsContext.appRecord, options.id);
|
|
3215
|
+
if (instance) {
|
|
3216
|
+
const [el] = getRootElementsFromComponentInstance(instance);
|
|
3217
|
+
if (typeof el.scrollIntoView === "function") {
|
|
3218
|
+
el.scrollIntoView({
|
|
3219
|
+
behavior: "smooth"
|
|
3220
|
+
});
|
|
3221
|
+
} else {
|
|
3222
|
+
const bounds = getComponentBoundingRect(instance);
|
|
3223
|
+
const scrollTarget = document.createElement("div");
|
|
3224
|
+
const styles = {
|
|
3225
|
+
...getStyles(bounds),
|
|
3226
|
+
position: "absolute"
|
|
3227
|
+
};
|
|
3228
|
+
Object.assign(scrollTarget.style, styles);
|
|
3229
|
+
document.body.appendChild(scrollTarget);
|
|
3230
|
+
scrollTarget.scrollIntoView({
|
|
3231
|
+
behavior: "smooth"
|
|
3232
|
+
});
|
|
3233
|
+
setTimeout(() => {
|
|
3234
|
+
document.body.removeChild(scrollTarget);
|
|
3235
|
+
}, 2e3);
|
|
3236
|
+
}
|
|
3237
|
+
setTimeout(() => {
|
|
3238
|
+
const bounds = getComponentBoundingRect(instance);
|
|
3239
|
+
if (bounds.width || bounds.height) {
|
|
3240
|
+
const name = getInstanceName(instance);
|
|
3241
|
+
const el2 = getContainerElement();
|
|
3242
|
+
el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });
|
|
3243
|
+
setTimeout(() => {
|
|
3244
|
+
if (el2)
|
|
3245
|
+
el2.style.display = "none";
|
|
3246
|
+
}, 1500);
|
|
3247
|
+
}
|
|
3248
|
+
}, 1200);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
// src/shared/index.ts
|
|
3253
|
+
init_esm_shims();
|
|
3254
|
+
|
|
3255
|
+
// src/shared/util.ts
|
|
3256
|
+
init_esm_shims();
|
|
3257
|
+
|
|
3258
|
+
// src/core/component/state/replacer.ts
|
|
3259
|
+
init_esm_shims();
|
|
3260
|
+
|
|
3261
|
+
// src/core/component/state/custom.ts
|
|
3262
|
+
init_esm_shims();
|
|
3263
|
+
function getFunctionDetails(func) {
|
|
3264
|
+
let string = "";
|
|
3265
|
+
let matches = null;
|
|
3266
|
+
try {
|
|
3267
|
+
string = Function.prototype.toString.call(func);
|
|
3268
|
+
matches = String.prototype.match.call(string, /\([\s\S]*?\)/);
|
|
3269
|
+
} catch (e) {
|
|
3270
|
+
}
|
|
3271
|
+
const match = matches && matches[0];
|
|
3272
|
+
const args = typeof match === "string" ? match : "(?)";
|
|
3273
|
+
const name = typeof func.name === "string" ? func.name : "";
|
|
3274
|
+
return {
|
|
3275
|
+
_custom: {
|
|
3276
|
+
type: "function",
|
|
3277
|
+
displayText: `<span style="opacity:.5;">function</span> ${escape(name)}${args}`,
|
|
3278
|
+
tooltipText: string.trim() ? `<pre>${string}</pre>` : null
|
|
3279
|
+
}
|
|
3280
|
+
};
|
|
3281
|
+
}
|
|
3282
|
+
function getBigIntDetails(val) {
|
|
3283
|
+
const stringifiedBigInt = BigInt.prototype.toString.call(val);
|
|
3284
|
+
return {
|
|
3285
|
+
_custom: {
|
|
3286
|
+
type: "bigint",
|
|
3287
|
+
displayText: `BigInt(${stringifiedBigInt})`,
|
|
3288
|
+
value: stringifiedBigInt
|
|
3289
|
+
}
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3292
|
+
function getMapDetails(val) {
|
|
3293
|
+
const list = Object.fromEntries(val);
|
|
3294
|
+
return {
|
|
3295
|
+
_custom: {
|
|
3296
|
+
type: "map",
|
|
3297
|
+
displayText: "Map",
|
|
3298
|
+
value: list,
|
|
3299
|
+
readOnly: true,
|
|
3300
|
+
fields: {
|
|
3301
|
+
abstract: true
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
};
|
|
3305
|
+
}
|
|
3306
|
+
function getSetDetails(val) {
|
|
3307
|
+
const list = Array.from(val);
|
|
3308
|
+
return {
|
|
3309
|
+
_custom: {
|
|
3310
|
+
type: "set",
|
|
3311
|
+
displayText: `Set[${list.length}]`,
|
|
3312
|
+
value: list,
|
|
3313
|
+
readOnly: true
|
|
3314
|
+
}
|
|
3315
|
+
};
|
|
3316
|
+
}
|
|
3317
|
+
function getCatchedGetters(store) {
|
|
3318
|
+
const getters = {};
|
|
3319
|
+
const origGetters = store.getters || {};
|
|
3320
|
+
const keys = Object.keys(origGetters);
|
|
3321
|
+
for (let i = 0; i < keys.length; i++) {
|
|
3322
|
+
const key = keys[i];
|
|
3323
|
+
Object.defineProperty(getters, key, {
|
|
3324
|
+
enumerable: true,
|
|
3325
|
+
get: () => {
|
|
3326
|
+
try {
|
|
3327
|
+
return origGetters[key];
|
|
3328
|
+
} catch (e) {
|
|
3329
|
+
return e;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
3334
|
+
return getters;
|
|
3335
|
+
}
|
|
3336
|
+
function reduceStateList(list) {
|
|
3337
|
+
if (!list.length)
|
|
3338
|
+
return void 0;
|
|
3339
|
+
return list.reduce((map, item) => {
|
|
3340
|
+
const key = item.type || "data";
|
|
3341
|
+
const obj = map[key] = map[key] || {};
|
|
3342
|
+
obj[item.key] = item.value;
|
|
3343
|
+
return map;
|
|
3344
|
+
}, {});
|
|
3345
|
+
}
|
|
3346
|
+
function namedNodeMapToObject(map) {
|
|
3347
|
+
const result = {};
|
|
3348
|
+
const l = map.length;
|
|
3349
|
+
for (let i = 0; i < l; i++) {
|
|
3350
|
+
const node = map.item(i);
|
|
3351
|
+
result[node.name] = node.value;
|
|
3352
|
+
}
|
|
3353
|
+
return result;
|
|
3354
|
+
}
|
|
3355
|
+
function getStoreDetails(store) {
|
|
3356
|
+
return {
|
|
3357
|
+
_custom: {
|
|
3358
|
+
type: "store",
|
|
3359
|
+
displayText: "Store",
|
|
3360
|
+
value: {
|
|
3361
|
+
state: store.state,
|
|
3362
|
+
getters: getCatchedGetters(store)
|
|
3363
|
+
},
|
|
3364
|
+
fields: {
|
|
3365
|
+
abstract: true
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
};
|
|
3369
|
+
}
|
|
3370
|
+
function getRouterDetails(router) {
|
|
3371
|
+
return {
|
|
3372
|
+
_custom: {
|
|
3373
|
+
type: "router",
|
|
3374
|
+
displayText: "VueRouter",
|
|
3375
|
+
value: {
|
|
3376
|
+
options: router.options,
|
|
3377
|
+
currentRoute: router.currentRoute
|
|
3378
|
+
},
|
|
3379
|
+
fields: {
|
|
3380
|
+
abstract: true
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
};
|
|
3384
|
+
}
|
|
3385
|
+
function getInstanceDetails(instance) {
|
|
3386
|
+
if (instance._)
|
|
3387
|
+
instance = instance._;
|
|
3388
|
+
const state = processInstanceState(instance);
|
|
3389
|
+
return {
|
|
3390
|
+
_custom: {
|
|
3391
|
+
type: "component",
|
|
3392
|
+
id: instance.__VUE_DEVTOOLS_UID__,
|
|
3393
|
+
displayText: getInstanceName(instance),
|
|
3394
|
+
tooltipText: "Component instance",
|
|
3395
|
+
value: reduceStateList(state),
|
|
3396
|
+
fields: {
|
|
3397
|
+
abstract: true
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
};
|
|
3401
|
+
}
|
|
3402
|
+
function getComponentDefinitionDetails(definition) {
|
|
3403
|
+
let display = getComponentName(definition);
|
|
3404
|
+
if (display) {
|
|
3405
|
+
if (definition.name && definition.__file)
|
|
3406
|
+
display += ` <span>(${definition.__file})</span>`;
|
|
3407
|
+
} else {
|
|
3408
|
+
display = "<i>Unknown Component</i>";
|
|
3409
|
+
}
|
|
3410
|
+
return {
|
|
3411
|
+
_custom: {
|
|
3412
|
+
type: "component-definition",
|
|
3413
|
+
displayText: display,
|
|
3414
|
+
tooltipText: "Component definition",
|
|
3415
|
+
...definition.__file ? {
|
|
3416
|
+
file: definition.__file
|
|
3417
|
+
} : {}
|
|
3418
|
+
}
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
function getHTMLElementDetails(value) {
|
|
3422
|
+
try {
|
|
3423
|
+
return {
|
|
3424
|
+
_custom: {
|
|
3425
|
+
type: "HTMLElement",
|
|
3426
|
+
displayText: `<span class="opacity-30"><</span><span class="text-blue-500">${value.tagName.toLowerCase()}</span><span class="opacity-30">></span>`,
|
|
3427
|
+
value: namedNodeMapToObject(value.attributes)
|
|
3428
|
+
}
|
|
3429
|
+
};
|
|
3430
|
+
} catch (e) {
|
|
3431
|
+
return {
|
|
3432
|
+
_custom: {
|
|
3433
|
+
type: "HTMLElement",
|
|
3434
|
+
displayText: `<span class="text-blue-500">${String(value)}</span>`
|
|
3435
|
+
}
|
|
3436
|
+
};
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
function getObjectDetails(object) {
|
|
3440
|
+
var _a10, _b10, _c, _d;
|
|
3441
|
+
const info = getSetupStateType(object);
|
|
3442
|
+
const isState = info.ref || info.computed || info.reactive;
|
|
3443
|
+
if (isState) {
|
|
3444
|
+
const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
3445
|
+
const value = toRaw2(info.reactive ? object : object._value);
|
|
3446
|
+
const raw = ((_b10 = (_a10 = object.effect) == null ? void 0 : _a10.raw) == null ? void 0 : _b10.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
3447
|
+
return {
|
|
3448
|
+
_custom: {
|
|
3449
|
+
type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
|
|
3450
|
+
stateTypeName,
|
|
3451
|
+
value,
|
|
3452
|
+
...raw ? { tooltipText: `<span class="font-mono">${raw}</span>` } : {}
|
|
3453
|
+
}
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
if (typeof object.__asyncLoader === "function") {
|
|
3457
|
+
return {
|
|
3458
|
+
_custom: {
|
|
3459
|
+
type: "component-definition",
|
|
3460
|
+
display: "Async component definition"
|
|
3461
|
+
}
|
|
3462
|
+
};
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
// src/core/component/state/replacer.ts
|
|
3467
|
+
function stringifyReplacer(key) {
|
|
3468
|
+
var _a10;
|
|
3469
|
+
if (key === "compilerOptions")
|
|
3470
|
+
return;
|
|
3471
|
+
const val = this[key];
|
|
3472
|
+
const type = typeof val;
|
|
3473
|
+
if (Array.isArray(val)) {
|
|
3474
|
+
const l = val.length;
|
|
3475
|
+
if (l > MAX_ARRAY_SIZE) {
|
|
3476
|
+
return {
|
|
3477
|
+
_isArray: true,
|
|
3478
|
+
length: l,
|
|
3479
|
+
items: val.slice(0, MAX_ARRAY_SIZE)
|
|
3480
|
+
};
|
|
3481
|
+
}
|
|
3482
|
+
return val;
|
|
3483
|
+
} else if (typeof val === "string") {
|
|
3484
|
+
if (val.length > MAX_STRING_SIZE)
|
|
3485
|
+
return `${val.substring(0, MAX_STRING_SIZE)}... (${val.length} total length)`;
|
|
3486
|
+
else
|
|
3487
|
+
return val;
|
|
3488
|
+
} else if (type === "undefined") {
|
|
3489
|
+
return UNDEFINED;
|
|
3490
|
+
} else if (val === Number.POSITIVE_INFINITY) {
|
|
3491
|
+
return INFINITY;
|
|
3492
|
+
} else if (val === Number.NEGATIVE_INFINITY) {
|
|
3493
|
+
return NEGATIVE_INFINITY;
|
|
3494
|
+
} else if (typeof val === "function") {
|
|
3495
|
+
return getFunctionDetails(val);
|
|
3496
|
+
} else if (type === "symbol") {
|
|
3497
|
+
return `[native Symbol ${Symbol.prototype.toString.call(val)}]`;
|
|
3498
|
+
} else if (typeof val === "bigint") {
|
|
3499
|
+
return getBigIntDetails(val);
|
|
3500
|
+
} else if (val !== null && typeof val === "object") {
|
|
3501
|
+
const proto = Object.prototype.toString.call(val);
|
|
3502
|
+
if (proto === "[object Map]") {
|
|
3503
|
+
return getMapDetails(val);
|
|
3504
|
+
} else if (proto === "[object Set]") {
|
|
3505
|
+
return getSetDetails(val);
|
|
3506
|
+
} else if (proto === "[object RegExp]") {
|
|
3507
|
+
return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;
|
|
3508
|
+
} else if (proto === "[object Date]") {
|
|
3509
|
+
return `[native Date ${Date.prototype.toString.call(val)}]`;
|
|
3510
|
+
} else if (proto === "[object Error]") {
|
|
3511
|
+
return `[native Error ${val.message}<>${val.stack}]`;
|
|
3512
|
+
} else if (val.state && val._vm) {
|
|
3513
|
+
return getStoreDetails(val);
|
|
3514
|
+
} else if (val.constructor && val.constructor.name === "VueRouter") {
|
|
3515
|
+
return getRouterDetails(val);
|
|
3516
|
+
} else if (isVueInstance(val)) {
|
|
3517
|
+
return getInstanceDetails(val);
|
|
3518
|
+
} else if (typeof val.render === "function") {
|
|
3519
|
+
return getComponentDefinitionDetails(val);
|
|
3520
|
+
} else if (val.constructor && val.constructor.name === "VNode") {
|
|
3521
|
+
return `[native VNode <${val.tag}>]`;
|
|
3522
|
+
} else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
|
|
3523
|
+
return getHTMLElementDetails(val);
|
|
3524
|
+
} else if (((_a10 = val.constructor) == null ? void 0 : _a10.name) === "Store" && val._wrappedGetters) {
|
|
3525
|
+
return "[object Store]";
|
|
3526
|
+
} else if (val.currentRoute) {
|
|
3527
|
+
return "[object Router]";
|
|
3528
|
+
}
|
|
3529
|
+
const customDetails = getObjectDetails(val);
|
|
3530
|
+
if (customDetails != null)
|
|
3531
|
+
return customDetails;
|
|
3532
|
+
} else if (Number.isNaN(val)) {
|
|
3533
|
+
return NAN;
|
|
3534
|
+
}
|
|
3535
|
+
return sanitize(val);
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3538
|
+
// src/core/component/state/reviver.ts
|
|
3539
|
+
init_esm_shims();
|
|
3540
|
+
import { target as target3 } from "@vue/devtools-shared";
|
|
3541
|
+
function reviveSet(val) {
|
|
3542
|
+
const result = /* @__PURE__ */ new Set();
|
|
3543
|
+
const list = val._custom.value;
|
|
3544
|
+
for (let i = 0; i < list.length; i++) {
|
|
3545
|
+
const value = list[i];
|
|
3546
|
+
result.add(revive(value));
|
|
3547
|
+
}
|
|
3548
|
+
return result;
|
|
3549
|
+
}
|
|
3550
|
+
function reviveMap(val) {
|
|
3551
|
+
const result = /* @__PURE__ */ new Map();
|
|
3552
|
+
const list = val._custom.value;
|
|
3553
|
+
for (let i = 0; i < list.length; i++) {
|
|
3554
|
+
const { key, value } = list[i];
|
|
3555
|
+
result.set(key, revive(value));
|
|
3556
|
+
}
|
|
3557
|
+
return result;
|
|
3558
|
+
}
|
|
3559
|
+
function revive(val) {
|
|
3560
|
+
var _a10;
|
|
3561
|
+
if (val === UNDEFINED) {
|
|
3562
|
+
return void 0;
|
|
3563
|
+
} else if (val === INFINITY) {
|
|
3564
|
+
return Number.POSITIVE_INFINITY;
|
|
3565
|
+
} else if (val === NEGATIVE_INFINITY) {
|
|
3566
|
+
return Number.NEGATIVE_INFINITY;
|
|
3567
|
+
} else if (val === NAN) {
|
|
3568
|
+
return Number.NaN;
|
|
3569
|
+
} else if (val && val._custom) {
|
|
3570
|
+
const { _custom: custom } = val;
|
|
3571
|
+
if (custom.type === "component")
|
|
3572
|
+
return (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.instanceMap.get(custom.id);
|
|
3573
|
+
else if (custom.type === "map")
|
|
3574
|
+
return reviveMap(val);
|
|
3575
|
+
else if (custom.type === "set")
|
|
3576
|
+
return reviveSet(val);
|
|
3577
|
+
else if (custom.type === "bigint")
|
|
3578
|
+
return BigInt(custom.value);
|
|
3579
|
+
else
|
|
3580
|
+
return revive(custom.value);
|
|
3581
|
+
} else if (symbolRE.test(val)) {
|
|
3582
|
+
const [, string] = symbolRE.exec(val);
|
|
3583
|
+
return Symbol.for(string);
|
|
3584
|
+
} else if (specialTypeRE.test(val)) {
|
|
3585
|
+
const [, type, string, , details] = specialTypeRE.exec(val);
|
|
3586
|
+
const result = new target3[type](string);
|
|
3587
|
+
if (type === "Error" && details)
|
|
3588
|
+
result.stack = details;
|
|
3589
|
+
return result;
|
|
3590
|
+
} else {
|
|
3591
|
+
return val;
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
function reviver(key, value) {
|
|
3595
|
+
return revive(value);
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
// src/shared/transfer.ts
|
|
3599
|
+
init_esm_shims();
|
|
3600
|
+
var MAX_SERIALIZED_SIZE = 512 * 1024;
|
|
3601
|
+
function encode(data, replacer, list, seen) {
|
|
3602
|
+
let stored, key, value, i, l;
|
|
3603
|
+
const seenIndex = seen.get(data);
|
|
3604
|
+
if (seenIndex != null)
|
|
3605
|
+
return seenIndex;
|
|
3606
|
+
const index = list.length;
|
|
3607
|
+
const proto = Object.prototype.toString.call(data);
|
|
3608
|
+
if (proto === "[object Object]") {
|
|
3609
|
+
stored = {};
|
|
3610
|
+
seen.set(data, index);
|
|
3611
|
+
list.push(stored);
|
|
3612
|
+
const keys = Object.keys(data);
|
|
3613
|
+
for (i = 0, l = keys.length; i < l; i++) {
|
|
3614
|
+
key = keys[i];
|
|
3615
|
+
try {
|
|
3616
|
+
if (key === "compilerOptions")
|
|
3617
|
+
return;
|
|
3618
|
+
value = data[key];
|
|
3619
|
+
if (replacer)
|
|
3620
|
+
value = replacer.call(data, key, value);
|
|
3621
|
+
} catch (e) {
|
|
3622
|
+
value = e;
|
|
3623
|
+
}
|
|
3624
|
+
stored[key] = encode(value, replacer, list, seen);
|
|
3625
|
+
}
|
|
3626
|
+
} else if (proto === "[object Array]") {
|
|
3627
|
+
stored = [];
|
|
3628
|
+
seen.set(data, index);
|
|
3629
|
+
list.push(stored);
|
|
3630
|
+
for (i = 0, l = data.length; i < l; i++) {
|
|
3631
|
+
try {
|
|
3632
|
+
value = data[i];
|
|
3633
|
+
if (replacer)
|
|
3634
|
+
value = replacer.call(data, i, value);
|
|
3635
|
+
} catch (e) {
|
|
3636
|
+
value = e;
|
|
3637
|
+
}
|
|
3638
|
+
stored[i] = encode(value, replacer, list, seen);
|
|
3639
|
+
}
|
|
3640
|
+
} else {
|
|
3641
|
+
list.push(data);
|
|
3642
|
+
}
|
|
3643
|
+
return index;
|
|
3644
|
+
}
|
|
3645
|
+
function decode(list, reviver2 = null) {
|
|
3646
|
+
let i = list.length;
|
|
3647
|
+
let j, k, data, key, value, proto;
|
|
3648
|
+
while (i--) {
|
|
3649
|
+
data = list[i];
|
|
3650
|
+
proto = Object.prototype.toString.call(data);
|
|
3651
|
+
if (proto === "[object Object]") {
|
|
3652
|
+
const keys = Object.keys(data);
|
|
3653
|
+
for (j = 0, k = keys.length; j < k; j++) {
|
|
3654
|
+
key = keys[j];
|
|
3655
|
+
value = list[data[key]];
|
|
3656
|
+
if (reviver2)
|
|
3657
|
+
value = reviver2.call(data, key, value);
|
|
3658
|
+
data[key] = value;
|
|
3659
|
+
}
|
|
3660
|
+
} else if (proto === "[object Array]") {
|
|
3661
|
+
for (j = 0, k = data.length; j < k; j++) {
|
|
3662
|
+
value = list[data[j]];
|
|
3663
|
+
if (reviver2)
|
|
3664
|
+
value = reviver2.call(data, j, value);
|
|
3665
|
+
data[j] = value;
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
function stringifyCircularAutoChunks(data, replacer = null, space = null) {
|
|
3671
|
+
let result;
|
|
3672
|
+
try {
|
|
3673
|
+
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, replacer, space);
|
|
3674
|
+
} catch (e) {
|
|
3675
|
+
result = stringifyStrictCircularAutoChunks(data, replacer, space);
|
|
3676
|
+
}
|
|
3677
|
+
if (result.length > MAX_SERIALIZED_SIZE) {
|
|
3678
|
+
const chunkCount = Math.ceil(result.length / MAX_SERIALIZED_SIZE);
|
|
3679
|
+
const chunks = [];
|
|
3680
|
+
for (let i = 0; i < chunkCount; i++)
|
|
3681
|
+
chunks.push(result.slice(i * MAX_SERIALIZED_SIZE, (i + 1) * MAX_SERIALIZED_SIZE));
|
|
3682
|
+
return chunks;
|
|
3683
|
+
}
|
|
3684
|
+
return result;
|
|
3685
|
+
}
|
|
3686
|
+
function stringifyStrictCircularAutoChunks(data, replacer = null, space = null) {
|
|
3687
|
+
const list = [];
|
|
3688
|
+
encode(data, replacer, list, /* @__PURE__ */ new Map());
|
|
3689
|
+
return space ? ` ${JSON.stringify(list, null, space)}` : ` ${JSON.stringify(list)}`;
|
|
3690
|
+
}
|
|
3691
|
+
function parseCircularAutoChunks(data, reviver2 = null) {
|
|
3692
|
+
if (Array.isArray(data))
|
|
3693
|
+
data = data.join("");
|
|
3694
|
+
const hasCircular = /^\s/.test(data);
|
|
3695
|
+
if (!hasCircular) {
|
|
3696
|
+
return arguments.length === 1 ? JSON.parse(data) : JSON.parse(data, reviver2);
|
|
3697
|
+
} else {
|
|
3698
|
+
const list = JSON.parse(data);
|
|
3699
|
+
decode(list, reviver2);
|
|
3700
|
+
return list[0];
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
|
|
3704
|
+
// src/core/component/state/format.ts
|
|
3705
|
+
init_esm_shims();
|
|
3706
|
+
function getInspectorStateValueType(value, raw = true) {
|
|
3707
|
+
const type = typeof value;
|
|
3708
|
+
if (value == null || value === UNDEFINED) {
|
|
3709
|
+
return "null";
|
|
3710
|
+
} else if (type === "boolean" || type === "number" || value === INFINITY || value === NEGATIVE_INFINITY || value === NAN) {
|
|
3711
|
+
return "literal";
|
|
3712
|
+
} else if (value == null ? void 0 : value._custom) {
|
|
3713
|
+
if (raw || value._custom.display != null || value._custom.displayText != null)
|
|
3714
|
+
return "custom";
|
|
3715
|
+
else
|
|
3716
|
+
return getInspectorStateValueType(value._custom.value);
|
|
3717
|
+
} else if (typeof value === "string") {
|
|
3718
|
+
const typeMatch = specialTypeRE.exec(value);
|
|
3719
|
+
if (typeMatch) {
|
|
3720
|
+
const [, type2] = typeMatch;
|
|
3721
|
+
return `native ${type2}`;
|
|
3722
|
+
} else {
|
|
3723
|
+
return "string";
|
|
3724
|
+
}
|
|
3725
|
+
} else if (Array.isArray(value) || (value == null ? void 0 : value._isArray)) {
|
|
3726
|
+
return "array";
|
|
3727
|
+
} else if (isPlainObject(value)) {
|
|
3728
|
+
return "plain-object";
|
|
3729
|
+
} else {
|
|
3730
|
+
return "unknown";
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
function formatInspectorStateValue(value, quotes = false) {
|
|
3734
|
+
var _a10, _b10;
|
|
3735
|
+
let result;
|
|
3736
|
+
const type = getInspectorStateValueType(value, false);
|
|
3737
|
+
if (type !== "custom" && (value == null ? void 0 : value._custom))
|
|
3738
|
+
value = value._custom.value;
|
|
3739
|
+
if (result = internalStateTokenToString(value)) {
|
|
3740
|
+
return result;
|
|
3741
|
+
} else if (type === "custom") {
|
|
3742
|
+
const nestedName = ((_a10 = value._custom.value) == null ? void 0 : _a10._custom) && formatInspectorStateValue(value._custom.value);
|
|
3743
|
+
return nestedName || value._custom.displayText || value._custom.display;
|
|
3744
|
+
} else if (type === "array") {
|
|
3745
|
+
return `Array[${value.length}]`;
|
|
3746
|
+
} else if (type === "plain-object") {
|
|
3747
|
+
return `Object${Object.keys(value).length ? "" : " (empty)"}`;
|
|
3748
|
+
} else if (type == null ? void 0 : type.includes("native")) {
|
|
3749
|
+
return escape((_b10 = specialTypeRE.exec(value)) == null ? void 0 : _b10[2]);
|
|
3750
|
+
} else if (typeof value === "string") {
|
|
3751
|
+
const typeMatch = value.match(rawTypeRE);
|
|
3752
|
+
if (typeMatch)
|
|
3753
|
+
value = escape(typeMatch[1]);
|
|
3754
|
+
else if (quotes)
|
|
3755
|
+
value = `<span>"</span>${escape(value)}<span>"</span>`;
|
|
3756
|
+
else
|
|
3757
|
+
value = escape(value);
|
|
3758
|
+
value = value.replace(/ /g, " ").replace(/\n/g, "<span>\\n</span>");
|
|
3759
|
+
}
|
|
3760
|
+
return value;
|
|
3761
|
+
}
|
|
3762
|
+
function getRaw(value) {
|
|
3763
|
+
var _a10, _b10, _c;
|
|
3764
|
+
let customType;
|
|
3765
|
+
const isCustom = getInspectorStateValueType(value) === "custom";
|
|
3766
|
+
let inherit = {};
|
|
3767
|
+
if (isCustom) {
|
|
3768
|
+
const data = value;
|
|
3769
|
+
const customValue = (_a10 = data._custom) == null ? void 0 : _a10.value;
|
|
3770
|
+
const currentCustomType = (_b10 = data._custom) == null ? void 0 : _b10.type;
|
|
3771
|
+
const nestedCustom = typeof customValue === "object" && customValue !== null && "_custom" in customValue ? getRaw(customValue) : { inherit: void 0, value: void 0, customType: void 0 };
|
|
3772
|
+
inherit = nestedCustom.inherit || ((_c = data._custom) == null ? void 0 : _c.fields) || {};
|
|
3773
|
+
value = nestedCustom.value || customValue;
|
|
3774
|
+
customType = nestedCustom.customType || currentCustomType;
|
|
3775
|
+
}
|
|
3776
|
+
if (value && value._isArray)
|
|
3777
|
+
value = value.items;
|
|
3778
|
+
return { value, inherit, customType };
|
|
3779
|
+
}
|
|
3780
|
+
function toEdit(value, customType) {
|
|
3781
|
+
if (customType === "bigint")
|
|
3782
|
+
return value;
|
|
3783
|
+
return replaceTokenToString(JSON.stringify(value));
|
|
3784
|
+
}
|
|
3785
|
+
function toSubmit(value, customType) {
|
|
3786
|
+
if (customType === "bigint")
|
|
3787
|
+
return BigInt(value);
|
|
3788
|
+
return JSON.parse(replaceStringToToken(value), reviver);
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
// src/shared/util.ts
|
|
3792
|
+
function stringify(data) {
|
|
3793
|
+
return stringifyCircularAutoChunks(data, stringifyReplacer);
|
|
3673
3794
|
}
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
window.postMessage({
|
|
3685
|
-
event: "toggle-app-record",
|
|
3686
|
-
target: "vue-devtools"
|
|
3687
|
-
});
|
|
3688
|
-
}
|
|
3795
|
+
function parse(data, revive2 = false) {
|
|
3796
|
+
if (data == void 0)
|
|
3797
|
+
return {};
|
|
3798
|
+
return revive2 ? parseCircularAutoChunks(data, reviver) : parseCircularAutoChunks(data);
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
// src/shared/time.ts
|
|
3802
|
+
init_esm_shims();
|
|
3803
|
+
function now() {
|
|
3804
|
+
return Date.now();
|
|
3689
3805
|
}
|
|
3690
3806
|
|
|
3807
|
+
// src/shared/env.ts
|
|
3808
|
+
init_esm_shims();
|
|
3809
|
+
|
|
3691
3810
|
// src/core/custom-tab/index.ts
|
|
3692
3811
|
init_esm_shims();
|
|
3693
3812
|
function addCustomTab(tab) {
|
|
@@ -3710,18 +3829,18 @@ function removeCustomCommand(actionId) {
|
|
|
3710
3829
|
devtoolsState.commands.splice(index, 1);
|
|
3711
3830
|
}
|
|
3712
3831
|
|
|
3713
|
-
// src/core/
|
|
3832
|
+
// src/core/component-inspector/index.ts
|
|
3714
3833
|
init_esm_shims();
|
|
3715
|
-
import { target as
|
|
3716
|
-
var
|
|
3717
|
-
(
|
|
3834
|
+
import { target as target4 } from "@vue/devtools-shared";
|
|
3835
|
+
var _a3, _b3;
|
|
3836
|
+
(_b3 = (_a3 = target4).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b3 : _a3.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
|
|
3718
3837
|
function toggleComponentInspectorEnabled(enabled) {
|
|
3719
|
-
|
|
3838
|
+
target4.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = enabled;
|
|
3720
3839
|
}
|
|
3721
3840
|
function waitForInspectorInit(cb) {
|
|
3722
3841
|
let total = 0;
|
|
3723
3842
|
const timer = setInterval(() => {
|
|
3724
|
-
if (
|
|
3843
|
+
if (target4.__VUE_INSPECTOR__) {
|
|
3725
3844
|
clearInterval(timer);
|
|
3726
3845
|
total += 30;
|
|
3727
3846
|
cb();
|
|
@@ -3732,22 +3851,20 @@ function waitForInspectorInit(cb) {
|
|
|
3732
3851
|
}, 30);
|
|
3733
3852
|
}
|
|
3734
3853
|
function setupInspector() {
|
|
3735
|
-
const inspector =
|
|
3854
|
+
const inspector = target4.__VUE_INSPECTOR__;
|
|
3736
3855
|
const _openInEditor = inspector.openInEditor;
|
|
3737
3856
|
inspector.openInEditor = async (...params) => {
|
|
3738
3857
|
inspector.disable();
|
|
3739
3858
|
_openInEditor(...params);
|
|
3740
3859
|
};
|
|
3741
3860
|
}
|
|
3742
|
-
function
|
|
3861
|
+
function getComponentInspector() {
|
|
3743
3862
|
return new Promise((resolve) => {
|
|
3744
|
-
if (!target5.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)
|
|
3745
|
-
resolve(null);
|
|
3746
3863
|
function setup() {
|
|
3747
3864
|
setupInspector();
|
|
3748
|
-
resolve(
|
|
3865
|
+
resolve(target4.__VUE_INSPECTOR__);
|
|
3749
3866
|
}
|
|
3750
|
-
if (!
|
|
3867
|
+
if (!target4.__VUE_INSPECTOR__) {
|
|
3751
3868
|
waitForInspectorInit(() => {
|
|
3752
3869
|
setup();
|
|
3753
3870
|
});
|
|
@@ -3757,271 +3874,114 @@ function getVueInspector() {
|
|
|
3757
3874
|
});
|
|
3758
3875
|
}
|
|
3759
3876
|
|
|
3760
|
-
// src/core/
|
|
3877
|
+
// src/core/open-in-editor/index.ts
|
|
3761
3878
|
init_esm_shims();
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
backgroundColor: "#42b88325",
|
|
3771
|
-
border: "1px solid #42b88350",
|
|
3772
|
-
borderRadius: "5px",
|
|
3773
|
-
transition: "all 0.1s ease-in",
|
|
3774
|
-
pointerEvents: "none"
|
|
3775
|
-
};
|
|
3776
|
-
var cardStyles = {
|
|
3777
|
-
fontFamily: "Arial, Helvetica, sans-serif",
|
|
3778
|
-
padding: "5px 8px",
|
|
3779
|
-
borderRadius: "4px",
|
|
3780
|
-
textAlign: "left",
|
|
3781
|
-
position: "absolute",
|
|
3782
|
-
left: 0,
|
|
3783
|
-
color: "#e9e9e9",
|
|
3784
|
-
fontSize: "14px",
|
|
3785
|
-
fontWeight: 600,
|
|
3786
|
-
lineHeight: "24px",
|
|
3787
|
-
backgroundColor: "#42b883",
|
|
3788
|
-
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
|
|
3789
|
-
};
|
|
3790
|
-
var indicatorStyles = {
|
|
3791
|
-
display: "inline-block",
|
|
3792
|
-
fontWeight: 400,
|
|
3793
|
-
fontStyle: "normal",
|
|
3794
|
-
fontSize: "12px",
|
|
3795
|
-
opacity: 0.7
|
|
3796
|
-
};
|
|
3797
|
-
function getContainerElement() {
|
|
3798
|
-
return document.getElementById(CONTAINER_ELEMENT_ID);
|
|
3799
|
-
}
|
|
3800
|
-
function getCardElement() {
|
|
3801
|
-
return document.getElementById(CARD_ELEMENT_ID);
|
|
3802
|
-
}
|
|
3803
|
-
function getIndicatorElement() {
|
|
3804
|
-
return document.getElementById(INDICATOR_ELEMENT_ID);
|
|
3805
|
-
}
|
|
3806
|
-
function getNameElement() {
|
|
3807
|
-
return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
|
|
3808
|
-
}
|
|
3809
|
-
function getStyles(bounds) {
|
|
3810
|
-
return {
|
|
3811
|
-
left: `${Math.round(bounds.left * 100) / 100}px`,
|
|
3812
|
-
top: `${Math.round(bounds.top * 100) / 100}px`,
|
|
3813
|
-
width: `${Math.round(bounds.width * 100) / 100}px`,
|
|
3814
|
-
height: `${Math.round(bounds.height * 100) / 100}px`
|
|
3815
|
-
};
|
|
3816
|
-
}
|
|
3817
|
-
function create(options) {
|
|
3818
|
-
var _a9;
|
|
3819
|
-
const containerEl = document.createElement("div");
|
|
3820
|
-
containerEl.id = (_a9 = options.elementId) != null ? _a9 : CONTAINER_ELEMENT_ID;
|
|
3821
|
-
Object.assign(containerEl.style, {
|
|
3822
|
-
...containerStyles,
|
|
3823
|
-
...getStyles(options.bounds),
|
|
3824
|
-
...options.style
|
|
3825
|
-
});
|
|
3826
|
-
const cardEl = document.createElement("span");
|
|
3827
|
-
cardEl.id = CARD_ELEMENT_ID;
|
|
3828
|
-
Object.assign(cardEl.style, {
|
|
3829
|
-
...cardStyles,
|
|
3830
|
-
top: options.bounds.top < 35 ? 0 : "-35px"
|
|
3831
|
-
});
|
|
3832
|
-
const nameEl = document.createElement("span");
|
|
3833
|
-
nameEl.id = COMPONENT_NAME_ELEMENT_ID;
|
|
3834
|
-
nameEl.innerHTML = `<${options.name}> `;
|
|
3835
|
-
const indicatorEl = document.createElement("i");
|
|
3836
|
-
indicatorEl.id = INDICATOR_ELEMENT_ID;
|
|
3837
|
-
indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
|
|
3838
|
-
Object.assign(indicatorEl.style, indicatorStyles);
|
|
3839
|
-
cardEl.appendChild(nameEl);
|
|
3840
|
-
cardEl.appendChild(indicatorEl);
|
|
3841
|
-
containerEl.appendChild(cardEl);
|
|
3842
|
-
document.body.appendChild(containerEl);
|
|
3843
|
-
return containerEl;
|
|
3844
|
-
}
|
|
3845
|
-
function update(options) {
|
|
3846
|
-
const containerEl = getContainerElement();
|
|
3847
|
-
const cardEl = getCardElement();
|
|
3848
|
-
const nameEl = getNameElement();
|
|
3849
|
-
const indicatorEl = getIndicatorElement();
|
|
3850
|
-
if (containerEl) {
|
|
3851
|
-
Object.assign(containerEl.style, {
|
|
3852
|
-
...containerStyles,
|
|
3853
|
-
...getStyles(options.bounds)
|
|
3854
|
-
});
|
|
3855
|
-
Object.assign(cardEl.style, {
|
|
3856
|
-
top: options.bounds.top < 35 ? 0 : "-35px"
|
|
3857
|
-
});
|
|
3858
|
-
nameEl.innerHTML = `<${options.name}> `;
|
|
3859
|
-
indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
|
|
3860
|
-
}
|
|
3861
|
-
}
|
|
3862
|
-
function toggleComponentInspector(options) {
|
|
3863
|
-
if (options.visible) {
|
|
3864
|
-
const instance = getComponentInstance(devtoolsContext.appRecord, options.id);
|
|
3865
|
-
if (instance && (options.bounds.width || options.bounds.height)) {
|
|
3866
|
-
const name = getInstanceName(instance);
|
|
3867
|
-
const el = getContainerElement();
|
|
3868
|
-
el ? update({ ...options, name }) : create({ ...options, name });
|
|
3869
|
-
}
|
|
3870
|
-
} else {
|
|
3871
|
-
const el = getContainerElement();
|
|
3872
|
-
if (el)
|
|
3873
|
-
el.style.display = "none";
|
|
3874
|
-
}
|
|
3875
|
-
}
|
|
3876
|
-
function highlight(instance) {
|
|
3877
|
-
const bounds = getComponentBoundingRect(instance);
|
|
3878
|
-
const name = getInstanceName(instance);
|
|
3879
|
-
const container = getContainerElement();
|
|
3880
|
-
container ? update({ bounds, name }) : create({ bounds, name });
|
|
3881
|
-
}
|
|
3882
|
-
function unhighlight() {
|
|
3883
|
-
const el = getContainerElement();
|
|
3884
|
-
if (el)
|
|
3885
|
-
el.style.display = "none";
|
|
3886
|
-
}
|
|
3887
|
-
var inspectInstance = null;
|
|
3888
|
-
function inspectFn(e) {
|
|
3889
|
-
const target8 = e.target;
|
|
3890
|
-
if (target8) {
|
|
3891
|
-
const instance = target8.__vueParentComponent;
|
|
3892
|
-
if (instance) {
|
|
3893
|
-
inspectInstance = instance;
|
|
3894
|
-
const el = instance.vnode.el;
|
|
3895
|
-
if (el) {
|
|
3896
|
-
const bounds = getComponentBoundingRect(instance);
|
|
3897
|
-
const name = getInstanceName(instance);
|
|
3898
|
-
const container = getContainerElement();
|
|
3899
|
-
container ? update({ bounds, name }) : create({ bounds, name });
|
|
3900
|
-
}
|
|
3879
|
+
import { target as target5 } from "@vue/devtools-shared";
|
|
3880
|
+
function openInEditor(options = {}) {
|
|
3881
|
+
const { file, line = 0, column = 0 } = options;
|
|
3882
|
+
if (file) {
|
|
3883
|
+
const baseUrl = window.location.origin;
|
|
3884
|
+
if (devtoolsState.vitePluginDetected) {
|
|
3885
|
+
target5.__VUE_INSPECTOR__.openInEditor(baseUrl, file, line, column);
|
|
3886
|
+
} else {
|
|
3901
3887
|
}
|
|
3902
3888
|
}
|
|
3903
3889
|
}
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
scrollTarget.scrollIntoView({
|
|
3955
|
-
behavior: "smooth"
|
|
3956
|
-
});
|
|
3957
|
-
setTimeout(() => {
|
|
3958
|
-
document.body.removeChild(scrollTarget);
|
|
3959
|
-
}, 2e3);
|
|
3960
|
-
}
|
|
3961
|
-
setTimeout(() => {
|
|
3962
|
-
const bounds = getComponentBoundingRect(instance);
|
|
3963
|
-
if (bounds.width || bounds.height) {
|
|
3964
|
-
const name = getInstanceName(instance);
|
|
3965
|
-
const el2 = getContainerElement();
|
|
3966
|
-
el2 ? update({ ...options, name, bounds }) : create({ ...options, name, bounds });
|
|
3967
|
-
setTimeout(() => {
|
|
3968
|
-
if (el2)
|
|
3969
|
-
el2.style.display = "none";
|
|
3970
|
-
}, 1500);
|
|
3971
|
-
}
|
|
3972
|
-
}, 1200);
|
|
3890
|
+
|
|
3891
|
+
// src/api/on.ts
|
|
3892
|
+
init_esm_shims();
|
|
3893
|
+
var on2 = {
|
|
3894
|
+
// #region compatible with old devtools
|
|
3895
|
+
addTimelineEvent(fn) {
|
|
3896
|
+
apiHooks.hook("timeline:add-event" /* ADD_TIMELINE_EVENT */, fn);
|
|
3897
|
+
},
|
|
3898
|
+
inspectComponent(fn) {
|
|
3899
|
+
apiHooks.hook("component-state:inspect" /* COMPONENT_STATE_INSPECT */, fn);
|
|
3900
|
+
},
|
|
3901
|
+
visitComponentTree(fn) {
|
|
3902
|
+
apiHooks.hook("component-tree:visit" /* VISIT_COMPONENT_TREE */, fn);
|
|
3903
|
+
},
|
|
3904
|
+
getInspectorTree(fn) {
|
|
3905
|
+
apiHooks.hook("inspector-tree:get" /* GET_INSPECTOR_TREE */, fn);
|
|
3906
|
+
},
|
|
3907
|
+
getInspectorState(fn) {
|
|
3908
|
+
apiHooks.hook("inspector-state:get" /* GET_INSPECTOR_STATE */, fn);
|
|
3909
|
+
},
|
|
3910
|
+
sendInspectorTree(fn) {
|
|
3911
|
+
apiHooks.hook("inspector-tree:send" /* SEND_INSPECTOR_TREE */, fn);
|
|
3912
|
+
},
|
|
3913
|
+
sendInspectorState(fn) {
|
|
3914
|
+
apiHooks.hook("inspector-state:send" /* SEND_INSPECTOR_STATE */, fn);
|
|
3915
|
+
},
|
|
3916
|
+
editInspectorState(fn) {
|
|
3917
|
+
apiHooks.hook("inspector-state:edit" /* EDIT_INSPECTOR_STATE */, fn);
|
|
3918
|
+
},
|
|
3919
|
+
editComponentState() {
|
|
3920
|
+
},
|
|
3921
|
+
// #endregion compatible with old devtools
|
|
3922
|
+
// router
|
|
3923
|
+
routerInfoUpdated(fn) {
|
|
3924
|
+
apiHooks.hook("router-info:updated" /* ROUTER_INFO_UPDATED */, fn);
|
|
3925
|
+
},
|
|
3926
|
+
// component highlighter
|
|
3927
|
+
getComponentBoundingRect(fn) {
|
|
3928
|
+
apiHooks.hook("component-bounding-rect:get" /* GET_COMPONENT_BOUNDING_RECT */, fn);
|
|
3929
|
+
},
|
|
3930
|
+
// custom tabs
|
|
3931
|
+
customTabsUpdated(fn) {
|
|
3932
|
+
apiHooks.hook("custom-tabs:updated" /* CUSTOM_TABS_UPDATED */, fn);
|
|
3933
|
+
},
|
|
3934
|
+
// custom commands
|
|
3935
|
+
customCommandsUpdated(fn) {
|
|
3936
|
+
apiHooks.hook("custom-commands:updated" /* CUSTOM_COMMANDS_UPDATED */, fn);
|
|
3937
|
+
},
|
|
3938
|
+
devtoolsStateUpdated(fn) {
|
|
3939
|
+
apiHooks.hook("devtools:state-updated" /* DEVTOOLS_STATE_UPDATED */, fn);
|
|
3973
3940
|
}
|
|
3974
|
-
}
|
|
3941
|
+
};
|
|
3975
3942
|
|
|
3976
3943
|
// src/api/off.ts
|
|
3977
3944
|
init_esm_shims();
|
|
3978
|
-
function
|
|
3945
|
+
function remove() {
|
|
3979
3946
|
apiHooks.removeAllHooks();
|
|
3980
3947
|
}
|
|
3981
3948
|
|
|
3982
|
-
// src/api/
|
|
3949
|
+
// src/api/api.ts
|
|
3983
3950
|
var DevToolsPluginApi = class {
|
|
3984
3951
|
constructor() {
|
|
3952
|
+
this.clear = remove;
|
|
3985
3953
|
this.on = on2;
|
|
3986
|
-
this.clear = clear;
|
|
3987
|
-
}
|
|
3988
|
-
toggleApp(id) {
|
|
3989
|
-
return toggleAppRecord(id);
|
|
3990
3954
|
}
|
|
3991
|
-
|
|
3992
|
-
|
|
3955
|
+
// #region compatible with old devtools
|
|
3956
|
+
// timeline layer
|
|
3957
|
+
addTimelineLayer(payload) {
|
|
3958
|
+
addTimelineLayer(payload);
|
|
3993
3959
|
}
|
|
3994
|
-
|
|
3995
|
-
|
|
3960
|
+
// timeline event
|
|
3961
|
+
addTimelineEvent(...params) {
|
|
3962
|
+
apiHooks.callHook("timeline:add-event" /* ADD_TIMELINE_EVENT */, ...params);
|
|
3996
3963
|
}
|
|
3997
|
-
|
|
3998
|
-
|
|
3964
|
+
// add inspector
|
|
3965
|
+
addInspector(payload) {
|
|
3966
|
+
addInspector({
|
|
3967
|
+
id: payload.id,
|
|
3968
|
+
nodeId: "",
|
|
3969
|
+
filter: "",
|
|
3970
|
+
treeFilterPlaceholder: payload.treeFilterPlaceholder || ""
|
|
3971
|
+
});
|
|
3999
3972
|
}
|
|
4000
|
-
|
|
4001
|
-
|
|
3973
|
+
highlightElement(instance) {
|
|
3974
|
+
highlight(instance);
|
|
4002
3975
|
}
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
const _payload = {
|
|
4006
|
-
app: devtoolsContext.appRecord.app,
|
|
4007
|
-
inspectorId,
|
|
4008
|
-
instanceId,
|
|
4009
|
-
rect: {
|
|
4010
|
-
top: 0,
|
|
4011
|
-
left: 0,
|
|
4012
|
-
width: 0,
|
|
4013
|
-
height: 0
|
|
4014
|
-
}
|
|
4015
|
-
};
|
|
4016
|
-
apiHooks.callHookWith((callbacks) => {
|
|
4017
|
-
callbacks.map((cb) => cb(_payload));
|
|
4018
|
-
}, "component-bounding-rect:get" /* GET_COMPONENT_BOUNDING_RECT */);
|
|
4019
|
-
return stringify(_payload.rect);
|
|
3976
|
+
unhighlightElement() {
|
|
3977
|
+
unhighlight();
|
|
4020
3978
|
}
|
|
3979
|
+
// inspector
|
|
4021
3980
|
async getInspectorTree(payload = {}) {
|
|
3981
|
+
var _a10;
|
|
4022
3982
|
const { inspectorId, filter = "", instanceId = "" } = payload;
|
|
4023
3983
|
const _payload = {
|
|
4024
|
-
app: devtoolsContext.appRecord.app,
|
|
3984
|
+
app: (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.app,
|
|
4025
3985
|
inspectorId,
|
|
4026
3986
|
instanceId,
|
|
4027
3987
|
filter,
|
|
@@ -4039,9 +3999,10 @@ var DevToolsPluginApi = class {
|
|
|
4039
3999
|
return stringify(_payload.rootNodes);
|
|
4040
4000
|
}
|
|
4041
4001
|
getInspectorState(payload = {}) {
|
|
4002
|
+
var _a10;
|
|
4042
4003
|
const { inspectorId, nodeId } = payload;
|
|
4043
4004
|
const _payload = {
|
|
4044
|
-
app: devtoolsContext.appRecord.app,
|
|
4005
|
+
app: (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.app,
|
|
4045
4006
|
inspectorId,
|
|
4046
4007
|
nodeId
|
|
4047
4008
|
};
|
|
@@ -4056,10 +4017,11 @@ var DevToolsPluginApi = class {
|
|
|
4056
4017
|
return stringify(state);
|
|
4057
4018
|
}
|
|
4058
4019
|
async editInspectorState(payload) {
|
|
4020
|
+
var _a10;
|
|
4059
4021
|
const stateEditor2 = new StateEditor();
|
|
4060
4022
|
apiHooks.callHook("inspector-state:edit" /* EDIT_INSPECTOR_STATE */, {
|
|
4061
4023
|
...payload,
|
|
4062
|
-
app: devtoolsContext.appRecord.app,
|
|
4024
|
+
app: (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.app,
|
|
4063
4025
|
set: (obj, path = payload.path, value = payload.state.value, cb) => {
|
|
4064
4026
|
stateEditor2.set(obj, path, value, cb || stateEditor2.createDefaultSetCallback(payload.state));
|
|
4065
4027
|
}
|
|
@@ -4087,48 +4049,14 @@ var DevToolsPluginApi = class {
|
|
|
4087
4049
|
apiHooks.callHook("inspector-state:send" /* SEND_INSPECTOR_STATE */, stringify({ ...parse(res), inspectorId }));
|
|
4088
4050
|
}
|
|
4089
4051
|
}
|
|
4090
|
-
addCustomTab(tab) {
|
|
4091
|
-
addCustomTab(tab);
|
|
4092
|
-
}
|
|
4093
|
-
addCustomCommand(action) {
|
|
4094
|
-
addCustomCommand(action);
|
|
4095
|
-
}
|
|
4096
|
-
removeCustomCommand(actionId) {
|
|
4097
|
-
removeCustomCommand(actionId);
|
|
4098
|
-
}
|
|
4099
|
-
addInspector(payload) {
|
|
4100
|
-
var _a9;
|
|
4101
|
-
addInspector({
|
|
4102
|
-
id: payload.id,
|
|
4103
|
-
nodeId: "",
|
|
4104
|
-
filter: "",
|
|
4105
|
-
treeFilterPlaceholder: (_a9 = payload.treeFilterPlaceholder) != null ? _a9 : ""
|
|
4106
|
-
});
|
|
4107
|
-
}
|
|
4108
|
-
openInEditor(payload) {
|
|
4109
|
-
openInEditor(payload);
|
|
4110
|
-
}
|
|
4111
|
-
highlightElement(instance) {
|
|
4112
|
-
highlight(instance);
|
|
4113
|
-
}
|
|
4114
|
-
unhighlightElement() {
|
|
4115
|
-
unhighlight();
|
|
4116
|
-
}
|
|
4117
4052
|
async getComponentInstances(app) {
|
|
4118
4053
|
const appRecord = app.__VUE_DEVTOOLS_APP_RECORD__;
|
|
4119
4054
|
const appId = appRecord.id.toString();
|
|
4120
4055
|
const instances = [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
|
|
4121
4056
|
return instances;
|
|
4122
4057
|
}
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
return getVueInspector();
|
|
4126
|
-
}
|
|
4127
|
-
visitComponentTree(payload) {
|
|
4128
|
-
apiHooks.callHook("component-tree:visit" /* VISIT_COMPONENT_TREE */, payload);
|
|
4129
|
-
}
|
|
4130
|
-
addTimelineLayer(payload) {
|
|
4131
|
-
addTimelineLayer(payload);
|
|
4058
|
+
visitComponentTree(...params) {
|
|
4059
|
+
apiHooks.callHook("component-tree:visit" /* VISIT_COMPONENT_TREE */, ...params);
|
|
4132
4060
|
}
|
|
4133
4061
|
notifyComponentUpdate() {
|
|
4134
4062
|
}
|
|
@@ -4140,83 +4068,249 @@ var DevToolsPluginApi = class {
|
|
|
4140
4068
|
logStoreChanges: null
|
|
4141
4069
|
};
|
|
4142
4070
|
}
|
|
4071
|
+
// #endregion compatible with old devtools
|
|
4072
|
+
// #region highlighter
|
|
4073
|
+
toggleComponentInspector(...params) {
|
|
4074
|
+
return toggleComponentHighLighter(...params);
|
|
4075
|
+
}
|
|
4076
|
+
inspectComponentInspector() {
|
|
4077
|
+
return inspectComponentHighLighter();
|
|
4078
|
+
}
|
|
4079
|
+
scrollToComponent(...params) {
|
|
4080
|
+
return scrollToComponent(...params);
|
|
4081
|
+
}
|
|
4082
|
+
getComponentBoundingRect(...params) {
|
|
4083
|
+
var _a10;
|
|
4084
|
+
const { inspectorId, instanceId = "" } = params[0];
|
|
4085
|
+
const _payload = {
|
|
4086
|
+
app: (_a10 = devtoolsContext.appRecord) == null ? void 0 : _a10.app,
|
|
4087
|
+
inspectorId,
|
|
4088
|
+
instanceId,
|
|
4089
|
+
rect: {
|
|
4090
|
+
top: 0,
|
|
4091
|
+
left: 0,
|
|
4092
|
+
width: 0,
|
|
4093
|
+
height: 0
|
|
4094
|
+
}
|
|
4095
|
+
};
|
|
4096
|
+
apiHooks.callHookWith((callbacks) => {
|
|
4097
|
+
callbacks.map((cb) => cb(_payload));
|
|
4098
|
+
}, "component-bounding-rect:get" /* GET_COMPONENT_BOUNDING_RECT */);
|
|
4099
|
+
return stringify(_payload.rect);
|
|
4100
|
+
}
|
|
4101
|
+
// #endregion highlighter
|
|
4102
|
+
toggleApp(id) {
|
|
4103
|
+
return toggleActiveAppRecord(id);
|
|
4104
|
+
}
|
|
4105
|
+
addCustomTab(tab) {
|
|
4106
|
+
addCustomTab(tab);
|
|
4107
|
+
}
|
|
4108
|
+
addCustomCommand(action) {
|
|
4109
|
+
addCustomCommand(action);
|
|
4110
|
+
}
|
|
4111
|
+
removeCustomCommand(actionId) {
|
|
4112
|
+
removeCustomCommand(actionId);
|
|
4113
|
+
}
|
|
4114
|
+
openInEditor(payload) {
|
|
4115
|
+
openInEditor(payload);
|
|
4116
|
+
}
|
|
4117
|
+
getVueInspector() {
|
|
4118
|
+
return getComponentInspector();
|
|
4119
|
+
}
|
|
4143
4120
|
};
|
|
4144
4121
|
|
|
4145
|
-
// src/
|
|
4122
|
+
// src/state/state.ts
|
|
4123
|
+
var STATE_KEY = "__VUE_DEVTOOLS_GLOBAL_STATE__";
|
|
4124
|
+
function initStateFactory() {
|
|
4125
|
+
return {
|
|
4126
|
+
connected: false,
|
|
4127
|
+
clientConnected: false,
|
|
4128
|
+
appRecords: [],
|
|
4129
|
+
activeAppRecord: null,
|
|
4130
|
+
selectedComponentId: null,
|
|
4131
|
+
pluginBuffer: [],
|
|
4132
|
+
tabs: [],
|
|
4133
|
+
commands: [],
|
|
4134
|
+
vitePluginDetected: false,
|
|
4135
|
+
activeAppRecordId: null
|
|
4136
|
+
};
|
|
4137
|
+
}
|
|
4138
|
+
var _a4, _b4;
|
|
4139
|
+
(_b4 = (_a4 = global2)[STATE_KEY]) != null ? _b4 : _a4[STATE_KEY] = initStateFactory();
|
|
4140
|
+
var callStateUpdatedHook = debounce3((state, oldState) => {
|
|
4141
|
+
apiHooks.callHook("devtools:state-updated" /* DEVTOOLS_STATE_UPDATED */, state, oldState);
|
|
4142
|
+
}, 80);
|
|
4143
|
+
var callConnectedUpdatedHook = debounce3((state, oldState) => {
|
|
4144
|
+
apiHooks.callHook("devtools:connected-updated" /* DEVTOOLS_CONNECTED_UPDATED */, state, oldState);
|
|
4145
|
+
}, 80);
|
|
4146
|
+
var devtoolsState = new Proxy(global2[STATE_KEY], {
|
|
4147
|
+
get(target9, property) {
|
|
4148
|
+
return global2[STATE_KEY][property];
|
|
4149
|
+
},
|
|
4150
|
+
deleteProperty(target9, property) {
|
|
4151
|
+
delete target9[property];
|
|
4152
|
+
return true;
|
|
4153
|
+
},
|
|
4154
|
+
set(target9, property, value) {
|
|
4155
|
+
const oldState = { ...global2[STATE_KEY] };
|
|
4156
|
+
target9[property] = value;
|
|
4157
|
+
global2[STATE_KEY][property] = value;
|
|
4158
|
+
callStateUpdatedHook(global2[STATE_KEY], oldState);
|
|
4159
|
+
if (["connected", "clientConnected"].includes(property.toString()) && oldState[property] !== value)
|
|
4160
|
+
callConnectedUpdatedHook(global2[STATE_KEY], oldState);
|
|
4161
|
+
return true;
|
|
4162
|
+
}
|
|
4163
|
+
});
|
|
4164
|
+
Object.defineProperty(devtoolsState.tabs, "push", {
|
|
4165
|
+
configurable: true,
|
|
4166
|
+
value(...items) {
|
|
4167
|
+
const result = Array.prototype.push.apply(this, items);
|
|
4168
|
+
devtoolsState.tabs = this;
|
|
4169
|
+
apiHooks.callHook("custom-tabs:updated" /* CUSTOM_TABS_UPDATED */, this);
|
|
4170
|
+
return result;
|
|
4171
|
+
}
|
|
4172
|
+
});
|
|
4173
|
+
["push", "splice"].forEach((method) => {
|
|
4174
|
+
Object.defineProperty(devtoolsState.commands, method, {
|
|
4175
|
+
configurable: true,
|
|
4176
|
+
value(...args) {
|
|
4177
|
+
const result = Array.prototype[method].apply(this, args);
|
|
4178
|
+
devtoolsState.commands = this;
|
|
4179
|
+
apiHooks.callHook("custom-commands:updated" /* CUSTOM_COMMANDS_UPDATED */, this);
|
|
4180
|
+
return result;
|
|
4181
|
+
}
|
|
4182
|
+
});
|
|
4183
|
+
});
|
|
4184
|
+
|
|
4185
|
+
// src/state/app-record.ts
|
|
4146
4186
|
init_esm_shims();
|
|
4147
|
-
var import_speakingurl = __toESM(require_speakingurl2(), 1);
|
|
4148
4187
|
import { target as target6 } from "@vue/devtools-shared";
|
|
4188
|
+
|
|
4189
|
+
// src/state/router.ts
|
|
4190
|
+
init_esm_shims();
|
|
4191
|
+
import { target as global3 } from "@vue/devtools-shared";
|
|
4192
|
+
var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
|
|
4193
|
+
var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
|
|
4194
|
+
var _a5, _b5;
|
|
4195
|
+
(_b5 = (_a5 = global3)[ROUTER_INFO_KEY]) != null ? _b5 : _a5[ROUTER_INFO_KEY] = {
|
|
4196
|
+
currentRoute: null,
|
|
4197
|
+
routes: []
|
|
4198
|
+
};
|
|
4199
|
+
var _a6, _b6;
|
|
4200
|
+
(_b6 = (_a6 = global3)[ROUTER_KEY]) != null ? _b6 : _a6[ROUTER_KEY] = null;
|
|
4201
|
+
var devtoolsRouterInfo = new Proxy(global3[ROUTER_INFO_KEY], {
|
|
4202
|
+
get(target9, property) {
|
|
4203
|
+
return global3[ROUTER_INFO_KEY][property];
|
|
4204
|
+
}
|
|
4205
|
+
});
|
|
4206
|
+
|
|
4207
|
+
// src/state/context.ts
|
|
4208
|
+
init_esm_shims();
|
|
4209
|
+
import { target as global4 } from "@vue/devtools-shared";
|
|
4210
|
+
var CONTEXT_KEY = "__VUE_DEVTOOLS_CONTEXT__";
|
|
4211
|
+
function initContextFactory() {
|
|
4212
|
+
return {
|
|
4213
|
+
appRecord: null,
|
|
4214
|
+
api: null,
|
|
4215
|
+
inspector: [],
|
|
4216
|
+
timelineLayer: [],
|
|
4217
|
+
routerInfo: {},
|
|
4218
|
+
router: null,
|
|
4219
|
+
activeInspectorTreeId: "",
|
|
4220
|
+
componentPluginHookBuffer: []
|
|
4221
|
+
};
|
|
4222
|
+
}
|
|
4223
|
+
var _a7, _b7;
|
|
4224
|
+
(_b7 = (_a7 = global4)[CONTEXT_KEY]) != null ? _b7 : _a7[CONTEXT_KEY] = initContextFactory();
|
|
4225
|
+
function resetDevToolsContext() {
|
|
4226
|
+
global4[CONTEXT_KEY] = initContextFactory();
|
|
4227
|
+
}
|
|
4228
|
+
var devtoolsContext = new Proxy(global4[CONTEXT_KEY], {
|
|
4229
|
+
get(target9, property) {
|
|
4230
|
+
if (property === "router")
|
|
4231
|
+
return global4[ROUTER_KEY];
|
|
4232
|
+
else if (property === "clear")
|
|
4233
|
+
return resetDevToolsContext;
|
|
4234
|
+
return global4[CONTEXT_KEY][property];
|
|
4235
|
+
},
|
|
4236
|
+
set(target9, property, value) {
|
|
4237
|
+
global4[CONTEXT_KEY][property] = value;
|
|
4238
|
+
return true;
|
|
4239
|
+
}
|
|
4240
|
+
});
|
|
4241
|
+
|
|
4242
|
+
// src/state/app-record.ts
|
|
4243
|
+
var devtoolsAppRecords = new Proxy(devtoolsState.appRecords, {
|
|
4244
|
+
get(_, property) {
|
|
4245
|
+
if (property === "value")
|
|
4246
|
+
return devtoolsState.appRecords;
|
|
4247
|
+
else if (property === "active")
|
|
4248
|
+
return devtoolsState.activeAppRecord;
|
|
4249
|
+
else if (property === "activeId")
|
|
4250
|
+
return devtoolsState.activeAppRecordId;
|
|
4251
|
+
},
|
|
4252
|
+
set(target9, property, value) {
|
|
4253
|
+
var _a10;
|
|
4254
|
+
const oldState = { ...devtoolsState };
|
|
4255
|
+
if (property === "value") {
|
|
4256
|
+
devtoolsState.appRecords = value;
|
|
4257
|
+
} else if (property === "active") {
|
|
4258
|
+
const _value = value;
|
|
4259
|
+
devtoolsState.activeAppRecord = _value;
|
|
4260
|
+
devtoolsContext.appRecord = _value;
|
|
4261
|
+
devtoolsContext.api = _value.api;
|
|
4262
|
+
devtoolsContext.inspector = (_a10 = _value.inspector) != null ? _a10 : [];
|
|
4263
|
+
normalizeRouterInfo(value);
|
|
4264
|
+
devtoolsContext.routerInfo = devtoolsRouterInfo;
|
|
4265
|
+
} else if (property === "activeId") {
|
|
4266
|
+
devtoolsState.activeAppRecordId = value;
|
|
4267
|
+
}
|
|
4268
|
+
callStateUpdatedHook(devtoolsState, oldState);
|
|
4269
|
+
if (["connected", "clientConnected"].includes(property.toString()) && oldState[property] !== value)
|
|
4270
|
+
callConnectedUpdatedHook(devtoolsState, oldState);
|
|
4271
|
+
return true;
|
|
4272
|
+
}
|
|
4273
|
+
});
|
|
4149
4274
|
var _a8, _b8;
|
|
4150
4275
|
var appRecordInfo = (_b8 = (_a8 = target6).__VUE_DEVTOOLS_APP_RECROD_INFO__) != null ? _b8 : _a8.__VUE_DEVTOOLS_APP_RECROD_INFO__ = {
|
|
4151
4276
|
id: 0,
|
|
4152
4277
|
appIds: /* @__PURE__ */ new Set()
|
|
4153
4278
|
};
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
}
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
}
|
|
4165
|
-
function getAppRecordId(app, defaultId) {
|
|
4166
|
-
if (app.__VUE_DEVTOOLS_APP_RECORD_ID__ != null)
|
|
4167
|
-
return app.__VUE_DEVTOOLS_APP_RECORD_ID__;
|
|
4168
|
-
let id = defaultId != null ? defaultId : (appRecordInfo.id++).toString();
|
|
4169
|
-
if (defaultId && appRecordInfo.appIds.has(id)) {
|
|
4170
|
-
let count = 1;
|
|
4171
|
-
while (appRecordInfo.appIds.has(`${defaultId}_${count}`))
|
|
4172
|
-
count++;
|
|
4173
|
-
id = `${defaultId}_${count}`;
|
|
4174
|
-
}
|
|
4175
|
-
appRecordInfo.appIds.add(id);
|
|
4176
|
-
app.__VUE_DEVTOOLS_APP_RECORD_ID__ = id;
|
|
4177
|
-
return id;
|
|
4279
|
+
|
|
4280
|
+
// src/state/env.ts
|
|
4281
|
+
init_esm_shims();
|
|
4282
|
+
import { target as target7 } from "@vue/devtools-shared";
|
|
4283
|
+
var _a9, _b9;
|
|
4284
|
+
(_b9 = (_a9 = target7).__VUE_DEVTOOLS_ENV__) != null ? _b9 : _a9.__VUE_DEVTOOLS_ENV__ = {
|
|
4285
|
+
vitePluginDetected: false
|
|
4286
|
+
};
|
|
4287
|
+
function getDevToolsEnv() {
|
|
4288
|
+
return target7.__VUE_DEVTOOLS_ENV__;
|
|
4178
4289
|
}
|
|
4179
|
-
function
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
const id = getAppRecordId(app, (0, import_speakingurl.default)(name));
|
|
4185
|
-
const record = {
|
|
4186
|
-
id,
|
|
4187
|
-
name,
|
|
4188
|
-
instanceMap: /* @__PURE__ */ new Map(),
|
|
4189
|
-
rootInstance
|
|
4190
|
-
};
|
|
4191
|
-
app.__VUE_DEVTOOLS_APP_RECORD__ = record;
|
|
4192
|
-
const rootId = `${record.id}:root`;
|
|
4193
|
-
record.instanceMap.set(rootId, record.rootInstance);
|
|
4194
|
-
record.rootInstance.__VUE_DEVTOOLS_UID__ = rootId;
|
|
4195
|
-
return record;
|
|
4196
|
-
} else {
|
|
4197
|
-
return {};
|
|
4198
|
-
}
|
|
4290
|
+
function setDevToolsEnv(env) {
|
|
4291
|
+
target7.__VUE_DEVTOOLS_ENV__ = {
|
|
4292
|
+
...target7.__VUE_DEVTOOLS_ENV__,
|
|
4293
|
+
...env
|
|
4294
|
+
};
|
|
4199
4295
|
}
|
|
4200
4296
|
|
|
4201
|
-
// src/core/
|
|
4297
|
+
// src/core/index.ts
|
|
4202
4298
|
function initDevTools() {
|
|
4203
|
-
var
|
|
4204
|
-
devtoolsState.vitePluginDetected =
|
|
4205
|
-
const
|
|
4206
|
-
if (
|
|
4299
|
+
var _a10;
|
|
4300
|
+
devtoolsState.vitePluginDetected = getDevToolsEnv().vitePluginDetected;
|
|
4301
|
+
const isDevToolsNext = ((_a10 = target8.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a10.id) === "vue-devtools-next";
|
|
4302
|
+
if (target8.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
|
|
4207
4303
|
return;
|
|
4208
|
-
if (
|
|
4304
|
+
if (target8.__VUE_DEVTOOLS_GLOBAL_HOOK__)
|
|
4209
4305
|
Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
|
|
4210
4306
|
else
|
|
4211
|
-
|
|
4212
|
-
(
|
|
4213
|
-
hook.on.setupDevtoolsPlugin(collectRegisteredPlugin);
|
|
4307
|
+
target8.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
|
|
4308
|
+
hook.on.setupDevtoolsPlugin(collectDevToolsPlugin);
|
|
4214
4309
|
hook.on.vueAppInit(async (app, version) => {
|
|
4215
|
-
var _a10;
|
|
4216
4310
|
const record = createAppRecord(app);
|
|
4217
4311
|
const api = new DevToolsPluginApi();
|
|
4218
|
-
|
|
4219
|
-
...
|
|
4312
|
+
devtoolsAppRecords.value = [
|
|
4313
|
+
...devtoolsAppRecords.value,
|
|
4220
4314
|
{
|
|
4221
4315
|
...record,
|
|
4222
4316
|
app,
|
|
@@ -4224,10 +4318,10 @@ function initDevTools() {
|
|
|
4224
4318
|
api
|
|
4225
4319
|
}
|
|
4226
4320
|
];
|
|
4227
|
-
if (
|
|
4228
|
-
await setActiveAppRecord(
|
|
4321
|
+
if (devtoolsAppRecords.value.length === 1) {
|
|
4322
|
+
await setActiveAppRecord(devtoolsAppRecords.value[0]);
|
|
4229
4323
|
devtoolsState.connected = true;
|
|
4230
|
-
devtoolsHooks.callHook(
|
|
4324
|
+
devtoolsHooks.callHook("app:connected" /* APP_CONNECTED */);
|
|
4231
4325
|
}
|
|
4232
4326
|
});
|
|
4233
4327
|
subscribeDevToolsHook();
|
|
@@ -4267,39 +4361,28 @@ function onDevToolsClientConnected(fn) {
|
|
|
4267
4361
|
var devtools = {
|
|
4268
4362
|
state: devtoolsState,
|
|
4269
4363
|
context: devtoolsContext,
|
|
4270
|
-
init: initDevTools,
|
|
4271
4364
|
hook,
|
|
4365
|
+
init: initDevTools,
|
|
4272
4366
|
get api() {
|
|
4273
4367
|
return devtoolsContext.api;
|
|
4274
4368
|
}
|
|
4275
4369
|
};
|
|
4276
4370
|
export {
|
|
4277
|
-
ESC,
|
|
4278
|
-
INFINITY,
|
|
4279
|
-
MAX_ARRAY_SIZE,
|
|
4280
|
-
MAX_STRING_SIZE,
|
|
4281
|
-
NAN,
|
|
4282
|
-
NEGATIVE_INFINITY,
|
|
4283
4371
|
UNDEFINED,
|
|
4284
4372
|
addCustomCommand,
|
|
4285
4373
|
addCustomTab,
|
|
4286
4374
|
devtools,
|
|
4287
|
-
fnTypeRE,
|
|
4288
4375
|
formatInspectorStateValue,
|
|
4289
4376
|
getInspectorStateValueType,
|
|
4290
|
-
|
|
4291
|
-
now,
|
|
4377
|
+
getRaw,
|
|
4292
4378
|
onDevToolsClientConnected,
|
|
4293
4379
|
onDevToolsConnected,
|
|
4294
4380
|
parse,
|
|
4295
|
-
rawTypeRE,
|
|
4296
4381
|
removeCustomCommand,
|
|
4382
|
+
setDevToolsEnv,
|
|
4297
4383
|
setupDevToolsPlugin,
|
|
4298
|
-
specialTypeRE,
|
|
4299
4384
|
stringify,
|
|
4300
|
-
symbolRE,
|
|
4301
4385
|
toEdit,
|
|
4302
4386
|
toSubmit,
|
|
4303
|
-
toggleComponentInspectorEnabled
|
|
4304
|
-
vueBuiltins
|
|
4387
|
+
toggleComponentInspectorEnabled
|
|
4305
4388
|
};
|