@aevantec/litevue 0.5.17 → 0.6.1

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.
Files changed (55) hide show
  1. package/LICENSE +2 -1
  2. package/dist/litevue-devtools.iife.js +1 -1
  3. package/dist/litevue-devtools.mjs +1 -1
  4. package/dist/litevue-devtools.umd.js +1 -1
  5. package/dist/litevue-plugins.dev.iife.js +63 -47
  6. package/dist/litevue-plugins.dev.mjs +63 -47
  7. package/dist/litevue-plugins.iife.js +1 -1
  8. package/dist/litevue-plugins.mjs +1 -1
  9. package/dist/litevue-plugins.umd.js +1 -1
  10. package/dist/litevue.dev.iife.js +28 -21
  11. package/dist/litevue.dev.mjs +28 -21
  12. package/dist/litevue.iife.js +1 -1
  13. package/dist/litevue.mjs +1 -1
  14. package/dist/litevue.umd.js +1 -1
  15. package/dist/plugins/collapse.iife.js +1 -1
  16. package/dist/plugins/collapse.mjs +1 -1
  17. package/dist/plugins/collapse.umd.js +1 -1
  18. package/dist/plugins/focus.iife.js +1 -1
  19. package/dist/plugins/focus.mjs +1 -1
  20. package/dist/plugins/focus.umd.js +1 -1
  21. package/dist/plugins/mask.iife.js +1 -1
  22. package/dist/plugins/mask.mjs +1 -1
  23. package/dist/plugins/mask.umd.js +1 -1
  24. package/dist/plugins/morph.dev.iife.js +24 -5
  25. package/dist/plugins/morph.dev.mjs +24 -5
  26. package/dist/plugins/morph.iife.js +1 -1
  27. package/dist/plugins/morph.mjs +1 -1
  28. package/dist/plugins/morph.umd.js +1 -1
  29. package/dist/plugins/navigate.dev.iife.js +26 -20
  30. package/dist/plugins/navigate.dev.mjs +26 -20
  31. package/dist/plugins/navigate.iife.js +1 -1
  32. package/dist/plugins/navigate.mjs +1 -1
  33. package/dist/plugins/navigate.umd.js +1 -1
  34. package/dist/plugins/persist.dev.iife.js +6 -8
  35. package/dist/plugins/persist.dev.mjs +6 -8
  36. package/dist/plugins/persist.iife.js +1 -1
  37. package/dist/plugins/persist.mjs +1 -1
  38. package/dist/plugins/persist.umd.js +1 -1
  39. package/dist/plugins/popover.iife.js +1 -1
  40. package/dist/plugins/popover.mjs +1 -1
  41. package/dist/plugins/popover.umd.js +1 -1
  42. package/dist/plugins/transition.iife.js +1 -1
  43. package/dist/plugins/transition.mjs +1 -1
  44. package/dist/plugins/transition.umd.js +1 -1
  45. package/dist/types/devtools-panel/values.d.mts +6 -0
  46. package/dist/types/devtools-panel/values.d.ts +6 -0
  47. package/dist/types/directives/index.d.mts +2 -0
  48. package/dist/types/directives/index.d.ts +2 -0
  49. package/dist/types/plugins/focus/index.d.mts +1 -1
  50. package/dist/types/plugins/focus/index.d.ts +1 -1
  51. package/dist/types/plugins/morph/index.d.mts +6 -0
  52. package/dist/types/plugins/morph/index.d.ts +6 -0
  53. package/dist/types/scheduler.d.mts +1 -1
  54. package/dist/types/scheduler.d.ts +1 -1
  55. package/package.json +10 -10
package/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021-present, Yuxi (Evan) You
3
+ Copyright (c) 2021-present, Yuxi (Evan) You (petite-vue)
4
+ Copyright (c) 2018-present, Yuxi (Evan) You (@vue/reactivity and @vue/shared)
4
5
  Copyright (c) 2026-present, litevue contributors
5
6
 
6
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1 +1 @@
1
- var LiteVueDevtoolsPanel=function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});var e,t,o,r,i,l,d,a,s,p,c,h,g=n=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+n+"</svg>",u="litevue-devtools-theme",v="litevue-devtools-ui",f=()=>{try{return JSON.parse(localStorage.getItem(v)||"{}")}catch{return{}}},x=n=>{try{localStorage.setItem(v,JSON.stringify({...f(),...n}))}catch{}},m={dark:g('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:g('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:g('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},b={float:g('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},y={float:"bottom",bottom:"right",right:"float"},w={float:"floating",bottom:"docked to bottom",right:"docked to right"},k={dark:"light",light:"system",system:"dark"},C=(n,e,t)=>Math.min(Math.max(n,e),Math.max(e,t)),L=(n,e,t)=>{const o=document.createElement(n);return o.className=e,null!=t&&(o.textContent=t),o},E=(n,e)=>{const t=new Set,o=(n,r,i)=>{if(null!=n){if("object"!=typeof n)return String(n).toLowerCase().includes(e)?r:void 0;if(i>4||t.has(n))return;t.add(n);for(const t of Object.keys(n)){if("$"===t[0])continue;let l;try{l=n[t]}catch{continue}if("function"==typeof l)continue;const d=r?`${r}.${t}`:t;if(t.toLowerCase().includes(e))return d;const a=o(l,d,i+1);if(a)return a}}};return o(n,"",0)},O=n=>{let e;try{e=void 0===n?"undefined":JSON.stringify(n)??String(n)}catch{e=String(n)}return e.length>60?e.slice(0,60)+"\u2026":e},S=n=>[...n.directives.map(n=>"v-"+n),...n.magics].join(" "),M=null,$=null,_=!1,z="",j="Elements",I="float",N="",H="",P="",T="",D="",V="",W=()=>{},R=(()=>{try{const n=localStorage.getItem(u);if("light"===n||"system"===n)return n}catch{}return"dark"})(),X=matchMedia("(prefers-color-scheme: light)"),Y=()=>{const n="light"===R||"system"===R&&X.matches;t.host.classList.toggle("light",n),a.innerHTML=m[R],a.title="theme: "+R},A=new Set,B=new WeakSet,F=()=>{if("float"!==I)return;const n=parseInt(o.style.right)||0,e=parseInt(o.style.bottom)||0;P=o.style.right=C(n,0,window.innerWidth-o.offsetWidth)+"px",T=o.style.bottom=C(e,0,window.innerHeight-o.offsetHeight)+"px"},J=n=>{"float"===I?(N=o.style.width||N,H=o.style.height||H,P=o.style.right||P,T=o.style.bottom||T):"bottom"===I?D=o.style.height||D:V=o.style.width||V,I=n;const e="float"!==n;o.classList.toggle("dock-bottom","bottom"===n),o.classList.toggle("dock-right","right"===n),o.style.right=e?"":P,o.style.bottom=e?"":T,o.style.width="bottom"===n?"":"right"===n?V:N,o.style.height="right"===n?"":"bottom"===n?D:H,p.innerHTML=b[n],p.title="panel: "+w[n]},U=n=>{const e=L("span","label");return e.appendChild(L("span","punct","<")),e.appendChild(L("span","name",tn(n))),e.appendChild(L("span","punct",">")),e},q=n=>{let t=n.parentElement;for(;t;){if(e.scopes.has(t))return t;t=t.parentElement}return null},G=n=>{const e=n.getBoundingClientRect();s.style.cssText=`display:block;left:${e.left}px;top:${e.top}px;width:${e.width}px;height:${e.height}px`},Z=()=>{s.style.display="none"},K=n=>{n!==M&&A.clear(),$=null,M=n,j="Elements",window.$scope=n?e.scopes.get(n):void 0,on(),rn()},Q=n=>{n!==$&&A.clear(),M=null,$=n,j="Stores",window.$scope=e.stores.get(n),on(),rn()},nn=n=>{j=n,on()},en=/^\s*([A-Za-z_$][\w$]*)\s*\(/,tn=n=>e.names.get(n)||(n=>{const t=en.exec(e.exps.get(n)||"")?.[1];return t&&e.components?.has(t)?t:void 0})(n)||n.id||n.tagName.toLowerCase(),on=()=>{if((()=>{const n=e.stores?e.stores.size:0;c.textContent=`Elements (${e.scopes.size})`,c.className="Elements"===j?"tab active":"tab",h.textContent=`Stores (${n})`,h.className="Stores"===j?"tab active":"tab"})(),W(),i.textContent="","Elements"===j){const n=[...e.scopes.keys()].sort((n,e)=>n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=new Map;for(const i of n)if(!z||tn(i).toLowerCase().includes(z))t.set(i,void 0);else{const n=E(e.scopes.get(i),z);n&&t.set(i,n)}if(!t.size)return void i.appendChild(L("div","empty",z?"no matching scopes":"no scopes mounted"));const o=new Set;for(const e of t.keys()){o.add(e);for(let n=q(e);n;n=q(n))o.add(n)}const r=new Map,l=new Map,d=new Map;for(const e of n){if(!o.has(e))continue;const n=q(e);r.set(e,n),d.set(e,n?(d.get(n)??0)+1:0),n&&l.set(n,(l.get(n)||0)+1)}const a=n=>{for(let e=r.get(n);e;e=r.get(e)??null)if(B.has(e))return!0;return!1};for(const s of n){if(!o.has(s)||a(s))continue;const n=L("div",s===M?"row sel":"row");n.style.paddingLeft=8+12*(d.get(s)??0)+"px";const r=B.has(s);if(l.get(s)){const e=L("span",r?"arrow":"arrow open","\u25b6");e.onclick=n=>{n.stopPropagation(),r?B.delete(s):B.add(s),on()},n.appendChild(e)}else n.appendChild(L("span","spacer"));n.appendChild(U(s));const p=e.exps.get(s);p&&n.appendChild(L("span","exp"," "+p));const c=t.get(s);c&&n.appendChild(L("span","hit"," "+c)),n.onclick=()=>K(s),n.onmouseenter=()=>G(s),n.onmouseleave=Z,i.appendChild(n)}return}const n=new Map;for(const o of e.stores?e.stores.keys():[])if(!z||o.toLowerCase().includes(z))n.set(o,void 0);else{const t=E(e.stores.get(o),z);t&&n.set(o,t)}const t=[...n.keys()];if(t.length)for(const e of t){const t=L("div",e===$?"row sel":"row"),o=L("span","label");o.appendChild(L("span","punct","$store.")),o.appendChild(L("span","name",e)),t.appendChild(o);const r=n.get(e);r&&t.appendChild(L("span","hit"," "+r)),t.onclick=()=>Q(e),i.appendChild(t)}else i.appendChild(L("div","empty",z?"no matching stores":"no stores registered"))},rn=()=>{if(l.contains(t.activeElement))return;l.textContent="";const n=$?e.stores.get($):M?e.scopes.get(M):void 0;if(!n)return void l.appendChild(L("div","empty","Select a scope"));const{own:o,inherited:r}=(n=>{const e=(n,e)=>"$"!==e[0]&&"function"!=typeof n[e],t=Object.keys(n).filter(t=>e(n,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(n);for(;i&&i!==Object.prototype;){for(const n of Object.keys(i))!o.has(n)&&e(i,n)&&(o.add(n),r.push(n));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(n);o.forEach(e=>dn(e,n,e,0,"prop",[])),r.length&&(l.appendChild(L("div","divider","inherited")),r.forEach(e=>dn(e,n,e,0,"prop inherited",[]))),o.length||r.length||l.appendChild(L("div","empty","empty scope")),l.appendChild(ln(n))},ln=n=>{const e=L("div","prop adder");e.appendChild(L("span","spacer"));const t=L("input","val key-in");t.placeholder="key";const o=L("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=e=>{"Enter"===e.key&&(()=>{const e=t.value.trim();if(!e)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),n[e]=i,t.blur(),o.blur(),gn(),setTimeout(()=>{const n=l.querySelector(".adder .key-in");n&&n.focus()})})()},e.appendChild(t),e.appendChild(o),e},dn=(n,e,t,o,r,i)=>{const d=e[n],a=L("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&A.has(t);if(a.appendChild(L("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(L("span","key",n)),a.appendChild(L("span","preview",s?"(circular)":(n=>Array.isArray(n)?`(${n.length}) ${O(n)}`:O(n))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?A.delete(t):A.add(t),rn()}),an(a,e,n,o,r),l.appendChild(a),p){const n=Object.keys(d);if(!n.length){const n=L("div","muted","(empty)");n.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(n)}for(const e of n)dn(e,d,t+"."+e,o+1,r,i.concat([d]))}return}a.appendChild(L("span","spacer")),a.appendChild(L("span","key",n));const s=((n,e)=>{for(let t=n;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n}})(e,n);if("function"==typeof d)a.appendChild(L("span","preview","\u0192"));else if((n=>{if(!n)return!1;if(n.get&&!n.set)return!0;const e=n.value;return!!e&&!0===e.__v_isRef&&!0===e.__v_isReadonly})(s))a.appendChild(L("span","preview",O(d)));else if("boolean"==typeof d){a.appendChild(L("span","bool",String(d)));const t=L("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{e[n]=t.checked,t.blur(),gn()},a.appendChild(t)}else{const t=L("input","val");t.value=O(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=n=>{"Enter"===n.key&&t.blur(),"Escape"===n.key&&(t.value=O(d),t.blur())},t.onblur=()=>{const o=((n,e)=>{if("number"==typeof e){const e=parseFloat(n);return isNaN(e)?n:e}return n})(t.value,d);o!==d?(e[n]=o,gn()):t.value=O(d)},a.appendChild(t)}an(a,e,n,o,r),l.appendChild(a)},an=(n,e,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(e,o);if(l&&l.get)return;const d=L("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=n=>{n.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete e[o],gn()},n.appendChild(d)},sn=n=>{const o=n.target;if(o===t.host)return;n.preventDefault(),n.stopPropagation(),cn();let r=o;for(;r&&!e.scopes.has(r);)r=r.parentElement;r&&K(r)},pn=n=>{let o=n.target;if(o!==t.host){for(;o&&!e.scopes.has(o);)o=o.parentElement;o?G(o):Z()}},cn=()=>{_=!1,d.classList.remove("active"),Z(),document.removeEventListener("click",sn,!0),document.removeEventListener("mousemove",pn,!0)},hn=!1,gn=()=>{hn||(hn=!0,setTimeout(()=>{hn=!1,"none"!==o.style.display&&(on(),rn())}))},un=()=>{const n=document.createElement("div");t=n.attachShadow({mode:"open"});const v=document.createElement("style");v.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(v),s=L("div","highlight"),t.appendChild(s),(r=L("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",F(),x({open:!0}),gn()},t.appendChild(r),(o=L("div","panel")).style.display="none";const m=L("div","header");m.appendChild(L("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",n=>{if(n.target.closest(".btn"))return;if("float"!==I)return;n.preventDefault();const e=o.getBoundingClientRect(),t=window.innerWidth-e.right,r=window.innerHeight-e.bottom,i=n.clientX,l=n.clientY,d=n=>{o.style.right=C(t-(n.clientX-i),0,window.innerWidth-o.offsetWidth)+"px",o.style.bottom=C(r-(n.clientY-l),0,window.innerHeight-o.offsetHeight)+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),x({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const b=L("div","grip");b.addEventListener("mousedown",n=>{n.preventDefault(),b.classList.add("active");const e=o.getBoundingClientRect(),t=n.clientX,r=n.clientY,i=e.width,l=e.height,d=n=>{if("right"!==I){const e="bottom"===I?r-n.clientY:n.clientY-r;o.style.height=C(l+e,320,window.innerHeight-24)+"px"}if("bottom"!==I){const e="right"===I?t-n.clientX:n.clientX-t;o.style.width=C(i+e,320,window.innerWidth-24)+"px"}},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),b.classList.remove("active");const n=parseInt(o.style.width),e=parseInt(o.style.height);x("float"===I?{w:n,h:e}:"bottom"===I?{bh:e}:{rw:n})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const w=(n=>{let e=!1;const t=L("button","btn");t.innerHTML=g('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=L("div","plugins");o.hidden=!0;const r=()=>{const r=n.plugins||[];if(t.title=`plugins (${r.length})`,e)if(o.textContent="",r.length)for(const n of r){const e=L("div","plugin");e.appendChild(L("span","name",n.name)),e.appendChild(L("span","gave",S(n)||"nothing registered")),n.teardown||e.appendChild(L("span","flag","no teardown")),o.appendChild(e)}else o.appendChild(L("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{e=!e;for(const n of o.parentElement.children)n.hidden=n===o?!e:e;t.classList.toggle("active",e),r()},{btn:t,el:o,render:r}})(e);W=w.render,m.appendChild(w.btn),(p=L("button","btn")).onclick=()=>{J(y[I]),x({dock:I})},m.appendChild(p),(a=L("button","btn")).onclick=()=>{(n=>{try{localStorage.setItem(u,n)}catch{}})(R=k[R]),Y()},m.appendChild(a),X.addEventListener("change",()=>{"system"===R&&Y()}),Y(),(d=L("button","btn")).title="pick an element on the page",d.innerHTML=g('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),d.onclick=()=>_?cn():(_=!0,d.classList.add("active"),document.addEventListener("click",sn,!0),void document.addEventListener("mousemove",pn,!0)),m.appendChild(d);const E=L("button","btn","\u2715");E.onclick=()=>{_&&cn(),o.style.display="none",r.style.display="",x({open:!1})},m.appendChild(E),o.appendChild(m);const O=L("div","body"),$=L("div","side"),j=L("div","tabs");(c=L("div","tab active")).onclick=()=>nn("Elements"),(h=L("div","tab")).onclick=()=>nn("Stores"),j.appendChild(c),j.appendChild(h),$.appendChild(j);const A=L("input","filter");A.placeholder="Filter by name or state",A.oninput=()=>{z=A.value.trim().toLowerCase(),on()},A.onkeydown=n=>{"Escape"===n.key&&(A.value="",z="",on())},$.appendChild(A),i=L("div","tree"),$.appendChild(i),l=L("div","state"),O.appendChild($),O.appendChild(l),O.appendChild(w.el),o.appendChild(O),o.appendChild(b),t.appendChild(o);const B=f();B.w&&(N=o.style.width=B.w+"px"),B.h&&(H=o.style.height=B.h+"px"),null!=B.right&&(P=o.style.right=B.right+"px"),null!=B.bottom&&(T=o.style.bottom=B.bottom+"px"),B.bh&&(D=B.bh+"px"),B.rw&&(V=B.rw+"px"),J(B.dock||"float"),document.body.appendChild(n),B.open&&(r.style.display="none",o.style.display="flex",F(),gn()),e.on("scope:mount",gn),e.on("scope:unmount",n=>{n===M&&(M=null),gn()}),e.stores&&e.on("store:register",gn),e.plugins&&e.on("plugin:install",gn),e.on("flush",gn)},vn=()=>{const n=window.__LITE_VUE__;n?(e=n,document.body?un():addEventListener("DOMContentLoaded",un)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};return vn(),n.init=vn,n}({});
1
+ var LiteVueDevtoolsPanel=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n,t,o,r,i,l,a,d,s,p,c,h,g=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",u="litevue-devtools-theme",f="litevue-devtools-ui",v=()=>{try{return JSON.parse(localStorage.getItem(f)||"{}")}catch{return{}}},b=e=>{try{localStorage.setItem(f,JSON.stringify({...v(),...e}))}catch{}},m={dark:g('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:g('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:g('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},x={float:g('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},y={float:"bottom",bottom:"right",right:"float"},w={float:"floating",bottom:"docked to bottom",right:"docked to right"},k={dark:"light",light:"system",system:"dark"},C=(e,n,t)=>Math.min(Math.max(e,n),Math.max(n,t)),L=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},E=(e,n)=>{const t=new Set,o=(e,r,i)=>{if(null!=e){if("object"==typeof e){if(i>4||t.has(e))return;t.add(e);const l=!Array.isArray(e);for(const t of Object.keys(e)){if("$"===t[0])continue;let a;try{a=e[t]}catch{continue}if("function"==typeof a)continue;const d=r?`${r}.${t}`:t;if(l&&t.toLowerCase().includes(n))return d;const s=o(a,d,i+1);if(s)return s}return}return String(e).toLowerCase().includes(n)?r:void 0}};return o(e,"",0)},S=e=>e instanceof Map||e instanceof Set,O=e=>{let n="";const t=e=>{if(S(e))n+=`${e.constructor.name}(${e.size})`;else if(!e||"object"!=typeof e||e.toJSON)n+=JSON.stringify(e)??String(e);else{const o=Array.isArray(e);n+=o?"[":"{";let r=0;for(const i of o?e.keys():Object.keys(e)){if(n.length>60)break;const l=e[i],a=void 0===l||"function"==typeof l;a&&!o||(r++&&(n+=","),o||(n+=JSON.stringify(i)+":"),a?n+="null":t(l))}n+=o?"]":"}"}};try{t(e)}catch{n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},$=(e,n)=>{for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyDescriptor(t,n);if(e)return e}},M=e=>[...e.directives.map(e=>"v-"+e),...e.magics].join(" "),_=null,j=null,z=!1,N="",I="Elements",H="float",P="",T="",A="",D="",V="",W="",J=()=>{},R=(()=>{try{const e=localStorage.getItem(u);if("light"===e||"system"===e)return e}catch{}return"dark"})(),X=matchMedia("(prefers-color-scheme: light)"),Y=()=>{const e="light"===R||"system"===R&&X.matches;t.host.classList.toggle("light",e),d.innerHTML=m[R],d.title="theme: "+R},B=new Set,F=new WeakSet,U=()=>{if("float"!==H)return;const e=parseInt(o.style.right)||0,n=parseInt(o.style.bottom)||0;A=o.style.right=C(e,0,window.innerWidth-o.offsetWidth)+"px",D=o.style.bottom=C(n,0,window.innerHeight-o.offsetHeight)+"px"},q=e=>{"float"===H?(P=o.style.width||P,T=o.style.height||T,A=o.style.right||A,D=o.style.bottom||D):"bottom"===H?V=o.style.height||V:W=o.style.width||W,H=e;const n="float"!==e;o.classList.toggle("dock-bottom","bottom"===e),o.classList.toggle("dock-right","right"===e),o.style.right=n?"":A,o.style.bottom=n?"":D,o.style.width="bottom"===e?"":"right"===e?W:P,o.style.height="right"===e?"":"bottom"===e?V:T,p.innerHTML=x[e],p.title="panel: "+w[e]},G=e=>{const n=L("span","label");return n.appendChild(L("span","punct","<")),n.appendChild(L("span","name",re(e))),n.appendChild(L("span","punct",">")),n},Z=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},K=e=>{const n=e.getBoundingClientRect();s.style.cssText=`display:block;left:${n.left}px;top:${n.top}px;width:${n.width}px;height:${n.height}px`},Q=()=>{s.style.display="none"},ee=e=>{e!==_&&B.clear(),j=null,_=e,I="Elements",window.$scope=e?n.scopes.get(e):void 0,ie(),le()},ne=e=>{e!==j&&B.clear(),_=null,j=e,I="Stores",window.$scope=n.stores.get(e),ie(),le()},te=e=>{I=e,ie()},oe=/^\s*([A-Za-z_$][\w$]*)\s*\(/,re=e=>n.names.get(e)||(e=>{const t=oe.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.getAttribute("id")||e.localName,ie=()=>{if((()=>{const e=n.stores?n.stores.size:0;c.textContent=`Elements (${n.scopes.size})`,c.className="Elements"===I?"tab active":"tab",h.textContent=`Stores (${e})`,h.className="Stores"===I?"tab active":"tab"})(),J(),i.textContent="","Elements"===I){const e=[...n.scopes.keys()].sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=new Map;for(const i of e)if(!N||re(i).toLowerCase().includes(N))t.set(i,void 0);else{const e=E(n.scopes.get(i),N);e&&t.set(i,e)}if(!t.size)return void i.appendChild(L("div","empty",N?"no matching scopes":"no scopes mounted"));const o=new Set;for(const n of t.keys()){o.add(n);for(let e=Z(n);e;e=Z(e))o.add(e)}const r=new Map,l=new Map,a=new Map;for(const n of e){if(!o.has(n))continue;const e=Z(n);r.set(n,e),a.set(n,e?(a.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const d=e=>{for(let n=r.get(e);n;n=r.get(n)??null)if(F.has(n))return!0;return!1};for(const s of e){if(!o.has(s)||d(s))continue;const e=L("div",s===_?"row sel":"row");e.style.paddingLeft=8+12*(a.get(s)??0)+"px";const r=F.has(s);if(l.get(s)){const n=L("span",r?"arrow":"arrow open","\u25b6");n.onclick=e=>{e.stopPropagation(),r?F.delete(s):F.add(s),ie()},e.appendChild(n)}else e.appendChild(L("span","spacer"));e.appendChild(G(s));const p=n.exps.get(s);p&&e.appendChild(L("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(L("span","hit"," "+c)),e.onclick=()=>ee(s),e.onmouseenter=()=>K(s),e.onmouseleave=Q,i.appendChild(e)}return}const e=new Map;for(const o of n.stores?n.stores.keys():[])if(!N||o.toLowerCase().includes(N))e.set(o,void 0);else{const t=E(n.stores.get(o),N);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=L("div",n===j?"row sel":"row"),o=L("span","label");o.appendChild(L("span","punct","$store.")),o.appendChild(L("span","name",n)),t.appendChild(o);const r=e.get(n);r&&t.appendChild(L("span","hit"," "+r)),t.onclick=()=>ne(n),i.appendChild(t)}else i.appendChild(L("div","empty",N?"no matching stores":"no stores registered"))},le=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=j?n.stores.get(j):_?n.scopes.get(_):void 0;if(!e)return void l.appendChild(L("div","empty","Select a scope"));const{own:o,inherited:r}=(e=>{const n=(e,n)=>"$"!==n[0]&&"function"!=typeof $(e,n)?.value,t=Object.keys(e).filter(t=>n(e,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(e);for(;i&&i!==Object.prototype;){for(const e of Object.keys(i))!o.has(e)&&n(i,e)&&(o.add(e),r.push(e));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(e);o.forEach(n=>de(n,e,n,0,"prop",[])),r.length&&(l.appendChild(L("div","divider","inherited")),r.forEach(n=>de(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(L("div","empty","empty scope")),l.appendChild(ae(e))},ae=e=>{const n=L("div","prop adder");n.appendChild(L("span","spacer"));const t=L("input","val key-in");t.placeholder="key";const o=L("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=n=>{"Enter"===n.key&&(()=>{const n=t.value.trim();if(!n)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),e[n]=i,t.blur(),o.blur(),ue(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},de=(e,n,t,o,r,i,a)=>{let d,s;try{d=n[e]}catch{s=1}const p=L("div",r);p.style.paddingLeft=8+14*o+"px";const c=$(n,e);if(a||=(e=>{if(!e)return!1;if(e.get&&!e.set)return!0;const n=e.value;return!!n&&!0===n.__v_isRef&&!0===n.__v_isReadonly})(c),null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,c=!s&&B.has(t);if(p.appendChild(L("span",c?"arrow open":"arrow","\u25b6")),p.appendChild(L("span","key",e)),p.appendChild(L("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${O(e)}`:O(e))(d))),s||(p.classList.add("toggle"),p.onclick=()=>{c?B.delete(t):B.add(t),le()}),se(p,n,e,o,r),l.appendChild(p),c){const e=S(d),n=e?d instanceof Map?Object.fromEntries(d):[...d]:d,s=Object.keys(n);if(!s.length){const e=L("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const l of s)de(l,n,t+"."+l,o+1,r,i.concat([d]),a||e)}return}if(p.appendChild(L("span","spacer")),p.appendChild(L("span","key",e)),"function"==typeof d)p.appendChild(L("span","preview","\u0192"));else if(s||a)p.appendChild(L("span","preview",s?"(threw)":O(d)));else if("boolean"==typeof d){p.appendChild(L("span","bool",String(d)));const t=L("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),ue()},p.appendChild(t)}else{const t=L("input","val");t.value=O(d),t.onfocus=()=>{t.value=String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=String(d),t.blur())},t.onblur=()=>{const o=((e,n)=>{if("number"==typeof n){const n=parseFloat(e);return isNaN(n)?e:n}return e})(t.value,d);t.value!==String(d)&&o!==d?(n[e]=o,ue()):t.value=O(d)},p.appendChild(t)}se(p,n,e,o,r),l.appendChild(p)},se=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const a=L("button","del","\u2715");a.title=`delete "${o}"`,a.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],ue()},e.appendChild(a)},pe=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),he();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&ee(r)},ce=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?K(o):Q()}},he=()=>{z=!1,a.classList.remove("active"),Q(),document.removeEventListener("click",pe,!0),document.removeEventListener("mousemove",ce,!0)},ge=!1,ue=()=>{ge||(ge=!0,setTimeout(()=>{ge=!1,"none"!==o.style.display&&(ie(),le())}))},fe=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const f=document.createElement("style");f.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(f),s=L("div","highlight"),t.appendChild(s),(r=L("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",U(),b({open:!0}),ue()},t.appendChild(r),(o=L("div","panel")).style.display="none";const m=L("div","header");m.appendChild(L("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;if("float"!==H)return;e.preventDefault();const n=o.getBoundingClientRect(),t=window.innerWidth-n.right,r=window.innerHeight-n.bottom,i=e.clientX,l=e.clientY,a=e=>{o.style.right=C(t-(e.clientX-i),0,window.innerWidth-o.offsetWidth)+"px",o.style.bottom=C(r-(e.clientY-l),0,window.innerHeight-o.offsetHeight)+"px"},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),b({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const x=L("div","grip");x.addEventListener("mousedown",e=>{e.preventDefault(),x.classList.add("active");const n=o.getBoundingClientRect(),t=e.clientX,r=e.clientY,i=n.width,l=n.height,a=e=>{if("right"!==H){const n="bottom"===H?r-e.clientY:e.clientY-r;o.style.height=C(l+n,320,window.innerHeight-24)+"px"}if("bottom"!==H){const n="right"===H?t-e.clientX:e.clientX-t;o.style.width=C(i+n,320,window.innerWidth-24)+"px"}},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),x.classList.remove("active");const e=parseInt(o.style.width),n=parseInt(o.style.height);b("float"===H?{w:e,h:n}:"bottom"===H?{bh:n}:{rw:e})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const w=(e=>{let n=!1;const t=L("button","btn");t.innerHTML=g('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=L("div","plugins");o.hidden=!0;const r=()=>{const r=e.plugins||[];if(t.title=`plugins (${r.length})`,n)if(o.textContent="",r.length)for(const e of r){const n=L("div","plugin");n.appendChild(L("span","name",e.name)),n.appendChild(L("span","gave",M(e)||"nothing registered")),e.teardown||n.appendChild(L("span","flag","no teardown")),o.appendChild(n)}else o.appendChild(L("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{n=!n;for(const e of o.parentElement.children)e.hidden=e===o?!n:n;t.classList.toggle("active",n),r()},{btn:t,el:o,render:r}})(n);J=w.render,m.appendChild(w.btn),(p=L("button","btn")).onclick=()=>{q(y[H]),b({dock:H})},m.appendChild(p),(d=L("button","btn")).onclick=()=>{(e=>{try{localStorage.setItem(u,e)}catch{}})(R=k[R]),Y()},m.appendChild(d),X.addEventListener("change",()=>{"system"===R&&Y()}),Y(),(a=L("button","btn")).title="pick an element on the page",a.innerHTML=g('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),a.onclick=()=>z?he():(z=!0,a.classList.add("active"),document.addEventListener("click",pe,!0),void document.addEventListener("mousemove",ce,!0)),m.appendChild(a);const E=L("button","btn","\u2715");E.onclick=()=>{z&&he(),o.style.display="none",r.style.display="",b({open:!1})},m.appendChild(E),o.appendChild(m);const S=L("div","body"),O=L("div","side"),$=L("div","tabs");(c=L("div","tab active")).onclick=()=>te("Elements"),(h=L("div","tab")).onclick=()=>te("Stores"),$.appendChild(c),$.appendChild(h),O.appendChild($);const j=L("input","filter");j.placeholder="Filter by name or state",j.oninput=()=>{N=j.value.trim().toLowerCase(),ie()},j.onkeydown=e=>{"Escape"===e.key&&(j.value="",N="",ie())},O.appendChild(j),i=L("div","tree"),O.appendChild(i),l=L("div","state"),S.appendChild(O),S.appendChild(l),S.appendChild(w.el),o.appendChild(S),o.appendChild(x),t.appendChild(o);const I=v();I.w&&(P=o.style.width=I.w+"px"),I.h&&(T=o.style.height=I.h+"px"),null!=I.right&&(A=o.style.right=I.right+"px"),null!=I.bottom&&(D=o.style.bottom=I.bottom+"px"),I.bh&&(V=I.bh+"px"),I.rw&&(W=I.rw+"px"),q(I.dock||"float"),document.body.appendChild(e),I.open&&(r.style.display="none",o.style.display="flex",U(),ue()),n.on("scope:mount",ue),n.on("scope:unmount",e=>{e===_&&(_=window.$scope=null),ue()}),n.stores&&n.on("store:register",ue),n.plugins&&n.on("plugin:install",ue),n.on("flush",ue)},ve=!1,be=()=>{if(ve)return;const e=window.__LITE_VUE__;e?(ve=!0,n=e,document.body?fe():addEventListener("DOMContentLoaded",fe)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};return be(),e.init=be,e}({});
@@ -1 +1 @@
1
- var n,e,t,o,r,i,l,d,a,s,p,c,h=n=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+n+"</svg>",g="litevue-devtools-theme",u="litevue-devtools-ui",v=()=>{try{return JSON.parse(localStorage.getItem(u)||"{}")}catch{return{}}},f=n=>{try{localStorage.setItem(u,JSON.stringify({...v(),...n}))}catch{}},x={dark:h('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:h('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:h('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},m={float:h('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:h('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:h('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},b={float:"bottom",bottom:"right",right:"float"},y={float:"floating",bottom:"docked to bottom",right:"docked to right"},w={dark:"light",light:"system",system:"dark"},k=(n,e,t)=>Math.min(Math.max(n,e),Math.max(e,t)),C=(n,e,t)=>{const o=document.createElement(n);return o.className=e,null!=t&&(o.textContent=t),o},L=(n,e)=>{const t=/* @__PURE__ */new Set,o=(n,r,i)=>{if(null!=n){if("object"!=typeof n)return String(n).toLowerCase().includes(e)?r:void 0;if(i>4||t.has(n))return;t.add(n);for(const t of Object.keys(n)){if("$"===t[0])continue;let l;try{l=n[t]}catch{continue}if("function"==typeof l)continue;const d=r?`${r}.${t}`:t;if(t.toLowerCase().includes(e))return d;const a=o(l,d,i+1);if(a)return a}}};return o(n,"",0)},E=n=>{let e;try{e=void 0===n?"undefined":JSON.stringify(n)??String(n)}catch{e=String(n)}return e.length>60?e.slice(0,60)+"\u2026":e},O=n=>[...n.directives.map(n=>"v-"+n),...n.magics].join(" "),S=null,$=null,_=!1,M="",z="Elements",I="float",N="",j="",H="",T="",P="",D="",W=()=>{},V=(()=>{try{const n=localStorage.getItem(g);if("light"===n||"system"===n)return n}catch{}return"dark"})(),R=matchMedia("(prefers-color-scheme: light)"),X=()=>{const n="light"===V||"system"===V&&R.matches;e.host.classList.toggle("light",n),d.innerHTML=x[V],d.title="theme: "+V},Y=/* @__PURE__ */new Set,A=/* @__PURE__ */new WeakSet,B=()=>{if("float"!==I)return;const n=parseInt(t.style.right)||0,e=parseInt(t.style.bottom)||0;H=t.style.right=k(n,0,window.innerWidth-t.offsetWidth)+"px",T=t.style.bottom=k(e,0,window.innerHeight-t.offsetHeight)+"px"},F=n=>{"float"===I?(N=t.style.width||N,j=t.style.height||j,H=t.style.right||H,T=t.style.bottom||T):"bottom"===I?P=t.style.height||P:D=t.style.width||D,I=n;const e="float"!==n;t.classList.toggle("dock-bottom","bottom"===n),t.classList.toggle("dock-right","right"===n),t.style.right=e?"":H,t.style.bottom=e?"":T,t.style.width="bottom"===n?"":"right"===n?D:N,t.style.height="right"===n?"":"bottom"===n?P:j,s.innerHTML=m[n],s.title="panel: "+y[n]},J=n=>{const e=C("span","label");return e.appendChild(C("span","punct","<")),e.appendChild(C("span","name",en(n))),e.appendChild(C("span","punct",">")),e},U=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},q=n=>{const e=n.getBoundingClientRect();a.style.cssText=`display:block;left:${e.left}px;top:${e.top}px;width:${e.width}px;height:${e.height}px`},G=()=>{a.style.display="none"},Z=e=>{e!==S&&Y.clear(),$=null,S=e,z="Elements",window.$scope=e?n.scopes.get(e):void 0,tn(),on()},K=e=>{e!==$&&Y.clear(),S=null,$=e,z="Stores",window.$scope=n.stores.get(e),tn(),on()},Q=n=>{z=n,tn()},nn=/^\s*([A-Za-z_$][\w$]*)\s*\(/,en=e=>n.names.get(e)||(e=>{const t=nn.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.id||e.tagName.toLowerCase(),tn=()=>{if((()=>{const e=n.stores?n.stores.size:0;p.textContent=`Elements (${n.scopes.size})`,p.className="Elements"===z?"tab active":"tab",c.textContent=`Stores (${e})`,c.className="Stores"===z?"tab active":"tab"})(),W(),r.textContent="","Elements"===z){const e=[...n.scopes.keys()].sort((n,e)=>n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=/* @__PURE__ */new Map;for(const r of e)if(!M||en(r).toLowerCase().includes(M))t.set(r,void 0);else{const e=L(n.scopes.get(r),M);e&&t.set(r,e)}if(!t.size)return void r.appendChild(C("div","empty",M?"no matching scopes":"no scopes mounted"));const o=/* @__PURE__ */new Set;for(const n of t.keys()){o.add(n);for(let e=U(n);e;e=U(e))o.add(e)}const i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,d=/* @__PURE__ */new Map;for(const n of e){if(!o.has(n))continue;const e=U(n);i.set(n,e),d.set(n,e?(d.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const a=n=>{for(let e=i.get(n);e;e=i.get(e)??null)if(A.has(e))return!0;return!1};for(const s of e){if(!o.has(s)||a(s))continue;const e=C("div",s===S?"row sel":"row");e.style.paddingLeft=8+12*(d.get(s)??0)+"px";const i=A.has(s);if(l.get(s)){const n=C("span",i?"arrow":"arrow open","\u25b6");n.onclick=n=>{n.stopPropagation(),i?A.delete(s):A.add(s),tn()},e.appendChild(n)}else e.appendChild(C("span","spacer"));e.appendChild(J(s));const p=n.exps.get(s);p&&e.appendChild(C("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(C("span","hit"," "+c)),e.onclick=()=>Z(s),e.onmouseenter=()=>q(s),e.onmouseleave=G,r.appendChild(e)}return}const e=/* @__PURE__ */new Map;for(const o of n.stores?n.stores.keys():[])if(!M||o.toLowerCase().includes(M))e.set(o,void 0);else{const t=L(n.stores.get(o),M);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=C("div",n===$?"row sel":"row"),o=C("span","label");o.appendChild(C("span","punct","$store.")),o.appendChild(C("span","name",n)),t.appendChild(o);const i=e.get(n);i&&t.appendChild(C("span","hit"," "+i)),t.onclick=()=>K(n),r.appendChild(t)}else r.appendChild(C("div","empty",M?"no matching stores":"no stores registered"))},on=()=>{if(i.contains(e.activeElement))return;i.textContent="";const t=$?n.stores.get($):S?n.scopes.get(S):void 0;if(!t)return void i.appendChild(C("div","empty","Select a scope"));const{own:o,inherited:r}=(n=>{const e=(n,e)=>"$"!==e[0]&&"function"!=typeof n[e],t=Object.keys(n).filter(t=>e(n,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(n);for(;i&&i!==Object.prototype;){for(const n of Object.keys(i))!o.has(n)&&e(i,n)&&(o.add(n),r.push(n));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(t);o.forEach(n=>ln(n,t,n,0,"prop",[])),r.length&&(i.appendChild(C("div","divider","inherited")),r.forEach(n=>ln(n,t,n,0,"prop inherited",[]))),o.length||r.length||i.appendChild(C("div","empty","empty scope")),i.appendChild(rn(t))},rn=n=>{const e=C("div","prop adder");e.appendChild(C("span","spacer"));const t=C("input","val key-in");t.placeholder="key";const o=C("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=e=>{"Enter"===e.key&&(()=>{const e=t.value.trim();if(!e)return;const r=o.value;let l=r;"true"===r?l=!0:"false"===r?l=!1:""===r||isNaN(+r)||(l=+r),n[e]=l,t.blur(),o.blur(),hn(),setTimeout(()=>{const n=i.querySelector(".adder .key-in");n&&n.focus()})})()},e.appendChild(t),e.appendChild(o),e},ln=(n,e,t,o,r,l)=>{const d=e[n],a=C("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=l.indexOf(d)>-1,p=!s&&Y.has(t);if(a.appendChild(C("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(C("span","key",n)),a.appendChild(C("span","preview",s?"(circular)":(n=>Array.isArray(n)?`(${n.length}) ${E(n)}`:E(n))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?Y.delete(t):Y.add(t),on()}),dn(a,e,n,o,r),i.appendChild(a),p){const n=Object.keys(d);if(!n.length){const n=C("div","muted","(empty)");n.style.paddingLeft=22+14*(o+1)+"px",i.appendChild(n)}for(const e of n)ln(e,d,t+"."+e,o+1,r,l.concat([d]))}return}a.appendChild(C("span","spacer")),a.appendChild(C("span","key",n));const s=((n,e)=>{for(let t=n;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n}})(e,n);if("function"==typeof d)a.appendChild(C("span","preview","\u0192"));else if((n=>{if(!n)return!1;if(n.get&&!n.set)return!0;const e=n.value;return!!e&&!0===e.__v_isRef&&!0===e.__v_isReadonly})(s))a.appendChild(C("span","preview",E(d)));else if("boolean"==typeof d){a.appendChild(C("span","bool",String(d)));const t=C("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{e[n]=t.checked,t.blur(),hn()},a.appendChild(t)}else{const t=C("input","val");t.value=E(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=n=>{"Enter"===n.key&&t.blur(),"Escape"===n.key&&(t.value=E(d),t.blur())},t.onblur=()=>{const o=((n,e)=>{if("number"==typeof e){const e=parseFloat(n);return isNaN(e)?n:e}return n})(t.value,d);o!==d?(e[n]=o,hn()):t.value=E(d)},a.appendChild(t)}dn(a,e,n,o,r),i.appendChild(a)},dn=(n,t,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(t,o);if(l&&l.get)return;const d=C("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=n=>{n.stopPropagation();const r=e.activeElement;r&&r.blur&&r.blur(),delete t[o],hn()},n.appendChild(d)},an=t=>{const o=t.target;if(o===e.host)return;t.preventDefault(),t.stopPropagation(),pn();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&Z(r)},sn=t=>{let o=t.target;if(o!==e.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?q(o):G()}},pn=()=>{_=!1,l.classList.remove("active"),G(),document.removeEventListener("click",an,!0),document.removeEventListener("mousemove",sn,!0)},cn=!1,hn=()=>{cn||(cn=!0,setTimeout(()=>{cn=!1,"none"!==t.style.display&&(tn(),on())}))},gn=()=>{const u=document.createElement("div");e=u.attachShadow({mode:"open"});const x=document.createElement("style");x.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",e.appendChild(x),a=C("div","highlight"),e.appendChild(a),(o=C("div","pill","\u26a1 LiteVue")).onclick=()=>{o.style.display="none",t.style.display="flex",B(),f({open:!0}),hn()},e.appendChild(o),(t=C("div","panel")).style.display="none";const m=C("div","header");m.appendChild(C("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",n=>{if(n.target.closest(".btn"))return;if("float"!==I)return;n.preventDefault();const e=t.getBoundingClientRect(),o=window.innerWidth-e.right,r=window.innerHeight-e.bottom,i=n.clientX,l=n.clientY,d=n=>{t.style.right=k(o-(n.clientX-i),0,window.innerWidth-t.offsetWidth)+"px",t.style.bottom=k(r-(n.clientY-l),0,window.innerHeight-t.offsetHeight)+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),f({right:parseInt(t.style.right)||12,bottom:parseInt(t.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const y=C("div","grip");y.addEventListener("mousedown",n=>{n.preventDefault(),y.classList.add("active");const e=t.getBoundingClientRect(),o=n.clientX,r=n.clientY,i=e.width,l=e.height,d=n=>{if("right"!==I){const e="bottom"===I?r-n.clientY:n.clientY-r;t.style.height=k(l+e,320,window.innerHeight-24)+"px"}if("bottom"!==I){const e="right"===I?o-n.clientX:n.clientX-o;t.style.width=k(i+e,320,window.innerWidth-24)+"px"}},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),y.classList.remove("active");const n=parseInt(t.style.width),e=parseInt(t.style.height);f("float"===I?{w:n,h:e}:"bottom"===I?{bh:e}:{rw:n})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const L=(n=>{let e=!1;const t=C("button","btn");t.innerHTML=h('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=C("div","plugins");o.hidden=!0;const r=()=>{const r=n.plugins||[];if(t.title=`plugins (${r.length})`,e)if(o.textContent="",r.length)for(const n of r){const e=C("div","plugin");e.appendChild(C("span","name",n.name)),e.appendChild(C("span","gave",O(n)||"nothing registered")),n.teardown||e.appendChild(C("span","flag","no teardown")),o.appendChild(e)}else o.appendChild(C("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{e=!e;for(const n of o.parentElement.children)n.hidden=n===o?!e:e;t.classList.toggle("active",e),r()},{btn:t,el:o,render:r}})(n);W=L.render,m.appendChild(L.btn),(s=C("button","btn")).onclick=()=>{F(b[I]),f({dock:I})},m.appendChild(s),(d=C("button","btn")).onclick=()=>{(n=>{try{localStorage.setItem(g,n)}catch{}})(V=w[V]),X()},m.appendChild(d),R.addEventListener("change",()=>{"system"===V&&X()}),X(),(l=C("button","btn")).title="pick an element on the page",l.innerHTML=h('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),l.onclick=()=>_?pn():(_=!0,l.classList.add("active"),document.addEventListener("click",an,!0),void document.addEventListener("mousemove",sn,!0)),m.appendChild(l);const E=C("button","btn","\u2715");E.onclick=()=>{_&&pn(),t.style.display="none",o.style.display="",f({open:!1})},m.appendChild(E),t.appendChild(m);const $=C("div","body"),z=C("div","side"),Y=C("div","tabs");(p=C("div","tab active")).onclick=()=>Q("Elements"),(c=C("div","tab")).onclick=()=>Q("Stores"),Y.appendChild(p),Y.appendChild(c),z.appendChild(Y);const A=C("input","filter");A.placeholder="Filter by name or state",A.oninput=()=>{M=A.value.trim().toLowerCase(),tn()},A.onkeydown=n=>{"Escape"===n.key&&(A.value="",M="",tn())},z.appendChild(A),r=C("div","tree"),z.appendChild(r),i=C("div","state"),$.appendChild(z),$.appendChild(i),$.appendChild(L.el),t.appendChild($),t.appendChild(y),e.appendChild(t);const J=v();J.w&&(N=t.style.width=J.w+"px"),J.h&&(j=t.style.height=J.h+"px"),null!=J.right&&(H=t.style.right=J.right+"px"),null!=J.bottom&&(T=t.style.bottom=J.bottom+"px"),J.bh&&(P=J.bh+"px"),J.rw&&(D=J.rw+"px"),F(J.dock||"float"),document.body.appendChild(u),J.open&&(o.style.display="none",t.style.display="flex",B(),hn()),n.on("scope:mount",hn),n.on("scope:unmount",n=>{n===S&&(S=null),hn()}),n.stores&&n.on("store:register",hn),n.plugins&&n.on("plugin:install",hn),n.on("flush",hn)},un=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?gn():addEventListener("DOMContentLoaded",gn)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};un();export{un as init};
1
+ var n,e,t,o,r,i,l,a,d,s,p,c,h=n=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+n+"</svg>",g="litevue-devtools-theme",u="litevue-devtools-ui",f=()=>{try{return JSON.parse(localStorage.getItem(u)||"{}")}catch{return{}}},v=n=>{try{localStorage.setItem(u,JSON.stringify({...f(),...n}))}catch{}},x={dark:h('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:h('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:h('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},m={float:h('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:h('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:h('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},b={float:"bottom",bottom:"right",right:"float"},y={float:"floating",bottom:"docked to bottom",right:"docked to right"},w={dark:"light",light:"system",system:"dark"},k=(n,e,t)=>Math.min(Math.max(n,e),Math.max(e,t)),C=(n,e,t)=>{const o=document.createElement(n);return o.className=e,null!=t&&(o.textContent=t),o},L=(n,e)=>{const t=/* @__PURE__ */new Set,o=(n,r,i)=>{if(null!=n){if("object"==typeof n){if(i>4||t.has(n))return;t.add(n);const l=!Array.isArray(n);for(const t of Object.keys(n)){if("$"===t[0])continue;let a;try{a=n[t]}catch{continue}if("function"==typeof a)continue;const d=r?`${r}.${t}`:t;if(l&&t.toLowerCase().includes(e))return d;const s=o(a,d,i+1);if(s)return s}return}return String(n).toLowerCase().includes(e)?r:void 0}};return o(n,"",0)},E=n=>n instanceof Map||n instanceof Set,O=n=>{let e="";const t=n=>{if(E(n))e+=`${n.constructor.name}(${n.size})`;else if(!n||"object"!=typeof n||n.toJSON)e+=JSON.stringify(n)??String(n);else{const o=Array.isArray(n);e+=o?"[":"{";let r=0;for(const i of o?n.keys():Object.keys(n)){if(e.length>60)break;const l=n[i],a=void 0===l||"function"==typeof l;a&&!o||(r++&&(e+=","),o||(e+=JSON.stringify(i)+":"),a?e+="null":t(l))}e+=o?"]":"}"}};try{t(n)}catch{e=String(n)}return e.length>60?e.slice(0,60)+"\u2026":e},S=(n,e)=>{for(let t=n;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n}},$=n=>[...n.directives.map(n=>"v-"+n),...n.magics].join(" "),M=null,_=null,j=!1,z="",N="Elements",I="float",H="",T="",P="",A="",D="",W="",V=()=>{},J=(()=>{try{const n=localStorage.getItem(g);if("light"===n||"system"===n)return n}catch{}return"dark"})(),R=matchMedia("(prefers-color-scheme: light)"),X=()=>{const n="light"===J||"system"===J&&R.matches;e.host.classList.toggle("light",n),a.innerHTML=x[J],a.title="theme: "+J},Y=/* @__PURE__ */new Set,B=/* @__PURE__ */new WeakSet,F=()=>{if("float"!==I)return;const n=parseInt(t.style.right)||0,e=parseInt(t.style.bottom)||0;P=t.style.right=k(n,0,window.innerWidth-t.offsetWidth)+"px",A=t.style.bottom=k(e,0,window.innerHeight-t.offsetHeight)+"px"},U=n=>{"float"===I?(H=t.style.width||H,T=t.style.height||T,P=t.style.right||P,A=t.style.bottom||A):"bottom"===I?D=t.style.height||D:W=t.style.width||W,I=n;const e="float"!==n;t.classList.toggle("dock-bottom","bottom"===n),t.classList.toggle("dock-right","right"===n),t.style.right=e?"":P,t.style.bottom=e?"":A,t.style.width="bottom"===n?"":"right"===n?W:H,t.style.height="right"===n?"":"bottom"===n?D:T,s.innerHTML=m[n],s.title="panel: "+y[n]},q=n=>{const e=C("span","label");return e.appendChild(C("span","punct","<")),e.appendChild(C("span","name",on(n))),e.appendChild(C("span","punct",">")),e},G=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},Z=n=>{const e=n.getBoundingClientRect();d.style.cssText=`display:block;left:${e.left}px;top:${e.top}px;width:${e.width}px;height:${e.height}px`},K=()=>{d.style.display="none"},Q=e=>{e!==M&&Y.clear(),_=null,M=e,N="Elements",window.$scope=e?n.scopes.get(e):void 0,rn(),ln()},nn=e=>{e!==_&&Y.clear(),M=null,_=e,N="Stores",window.$scope=n.stores.get(e),rn(),ln()},en=n=>{N=n,rn()},tn=/^\s*([A-Za-z_$][\w$]*)\s*\(/,on=e=>n.names.get(e)||(e=>{const t=tn.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.getAttribute("id")||e.localName,rn=()=>{if((()=>{const e=n.stores?n.stores.size:0;p.textContent=`Elements (${n.scopes.size})`,p.className="Elements"===N?"tab active":"tab",c.textContent=`Stores (${e})`,c.className="Stores"===N?"tab active":"tab"})(),V(),r.textContent="","Elements"===N){const e=[...n.scopes.keys()].sort((n,e)=>n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=/* @__PURE__ */new Map;for(const r of e)if(!z||on(r).toLowerCase().includes(z))t.set(r,void 0);else{const e=L(n.scopes.get(r),z);e&&t.set(r,e)}if(!t.size)return void r.appendChild(C("div","empty",z?"no matching scopes":"no scopes mounted"));const o=/* @__PURE__ */new Set;for(const n of t.keys()){o.add(n);for(let e=G(n);e;e=G(e))o.add(e)}const i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,a=/* @__PURE__ */new Map;for(const n of e){if(!o.has(n))continue;const e=G(n);i.set(n,e),a.set(n,e?(a.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const d=n=>{for(let e=i.get(n);e;e=i.get(e)??null)if(B.has(e))return!0;return!1};for(const s of e){if(!o.has(s)||d(s))continue;const e=C("div",s===M?"row sel":"row");e.style.paddingLeft=8+12*(a.get(s)??0)+"px";const i=B.has(s);if(l.get(s)){const n=C("span",i?"arrow":"arrow open","\u25b6");n.onclick=n=>{n.stopPropagation(),i?B.delete(s):B.add(s),rn()},e.appendChild(n)}else e.appendChild(C("span","spacer"));e.appendChild(q(s));const p=n.exps.get(s);p&&e.appendChild(C("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(C("span","hit"," "+c)),e.onclick=()=>Q(s),e.onmouseenter=()=>Z(s),e.onmouseleave=K,r.appendChild(e)}return}const e=/* @__PURE__ */new Map;for(const o of n.stores?n.stores.keys():[])if(!z||o.toLowerCase().includes(z))e.set(o,void 0);else{const t=L(n.stores.get(o),z);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=C("div",n===_?"row sel":"row"),o=C("span","label");o.appendChild(C("span","punct","$store.")),o.appendChild(C("span","name",n)),t.appendChild(o);const i=e.get(n);i&&t.appendChild(C("span","hit"," "+i)),t.onclick=()=>nn(n),r.appendChild(t)}else r.appendChild(C("div","empty",z?"no matching stores":"no stores registered"))},ln=()=>{if(i.contains(e.activeElement))return;i.textContent="";const t=_?n.stores.get(_):M?n.scopes.get(M):void 0;if(!t)return void i.appendChild(C("div","empty","Select a scope"));const{own:o,inherited:r}=(n=>{const e=(n,e)=>"$"!==e[0]&&"function"!=typeof S(n,e)?.value,t=Object.keys(n).filter(t=>e(n,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(n);for(;i&&i!==Object.prototype;){for(const n of Object.keys(i))!o.has(n)&&e(i,n)&&(o.add(n),r.push(n));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(t);o.forEach(n=>dn(n,t,n,0,"prop",[])),r.length&&(i.appendChild(C("div","divider","inherited")),r.forEach(n=>dn(n,t,n,0,"prop inherited",[]))),o.length||r.length||i.appendChild(C("div","empty","empty scope")),i.appendChild(an(t))},an=n=>{const e=C("div","prop adder");e.appendChild(C("span","spacer"));const t=C("input","val key-in");t.placeholder="key";const o=C("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=e=>{"Enter"===e.key&&(()=>{const e=t.value.trim();if(!e)return;const r=o.value;let l=r;"true"===r?l=!0:"false"===r?l=!1:""===r||isNaN(+r)||(l=+r),n[e]=l,t.blur(),o.blur(),un(),setTimeout(()=>{const n=i.querySelector(".adder .key-in");n&&n.focus()})})()},e.appendChild(t),e.appendChild(o),e},dn=(n,e,t,o,r,l,a)=>{let d,s;try{d=e[n]}catch{s=1}const p=C("div",r);p.style.paddingLeft=8+14*o+"px";const c=S(e,n);if(a||=(n=>{if(!n)return!1;if(n.get&&!n.set)return!0;const e=n.value;return!!e&&!0===e.__v_isRef&&!0===e.__v_isReadonly})(c),null!==d&&"object"==typeof d){const s=l.indexOf(d)>-1,c=!s&&Y.has(t);if(p.appendChild(C("span",c?"arrow open":"arrow","\u25b6")),p.appendChild(C("span","key",n)),p.appendChild(C("span","preview",s?"(circular)":(n=>Array.isArray(n)?`(${n.length}) ${O(n)}`:O(n))(d))),s||(p.classList.add("toggle"),p.onclick=()=>{c?Y.delete(t):Y.add(t),ln()}),sn(p,e,n,o,r),i.appendChild(p),c){const n=E(d),e=n?d instanceof Map?Object.fromEntries(d):[...d]:d,s=Object.keys(e);if(!s.length){const n=C("div","muted","(empty)");n.style.paddingLeft=22+14*(o+1)+"px",i.appendChild(n)}for(const i of s)dn(i,e,t+"."+i,o+1,r,l.concat([d]),a||n)}return}if(p.appendChild(C("span","spacer")),p.appendChild(C("span","key",n)),"function"==typeof d)p.appendChild(C("span","preview","\u0192"));else if(s||a)p.appendChild(C("span","preview",s?"(threw)":O(d)));else if("boolean"==typeof d){p.appendChild(C("span","bool",String(d)));const t=C("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{e[n]=t.checked,t.blur(),un()},p.appendChild(t)}else{const t=C("input","val");t.value=O(d),t.onfocus=()=>{t.value=String(d)},t.onkeydown=n=>{"Enter"===n.key&&t.blur(),"Escape"===n.key&&(t.value=String(d),t.blur())},t.onblur=()=>{const o=((n,e)=>{if("number"==typeof e){const e=parseFloat(n);return isNaN(e)?n:e}return n})(t.value,d);t.value!==String(d)&&o!==d?(e[n]=o,un()):t.value=O(d)},p.appendChild(t)}sn(p,e,n,o,r),i.appendChild(p)},sn=(n,t,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(t,o);if(l&&l.get)return;const a=C("button","del","\u2715");a.title=`delete "${o}"`,a.onclick=n=>{n.stopPropagation();const r=e.activeElement;r&&r.blur&&r.blur(),delete t[o],un()},n.appendChild(a)},pn=t=>{const o=t.target;if(o===e.host)return;t.preventDefault(),t.stopPropagation(),hn();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&Q(r)},cn=t=>{let o=t.target;if(o!==e.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?Z(o):K()}},hn=()=>{j=!1,l.classList.remove("active"),K(),document.removeEventListener("click",pn,!0),document.removeEventListener("mousemove",cn,!0)},gn=!1,un=()=>{gn||(gn=!0,setTimeout(()=>{gn=!1,"none"!==t.style.display&&(rn(),ln())}))},fn=()=>{const u=document.createElement("div");e=u.attachShadow({mode:"open"});const x=document.createElement("style");x.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",e.appendChild(x),d=C("div","highlight"),e.appendChild(d),(o=C("div","pill","\u26a1 LiteVue")).onclick=()=>{o.style.display="none",t.style.display="flex",F(),v({open:!0}),un()},e.appendChild(o),(t=C("div","panel")).style.display="none";const m=C("div","header");m.appendChild(C("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",n=>{if(n.target.closest(".btn"))return;if("float"!==I)return;n.preventDefault();const e=t.getBoundingClientRect(),o=window.innerWidth-e.right,r=window.innerHeight-e.bottom,i=n.clientX,l=n.clientY,a=n=>{t.style.right=k(o-(n.clientX-i),0,window.innerWidth-t.offsetWidth)+"px",t.style.bottom=k(r-(n.clientY-l),0,window.innerHeight-t.offsetHeight)+"px"},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),v({right:parseInt(t.style.right)||12,bottom:parseInt(t.style.bottom)||12})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const y=C("div","grip");y.addEventListener("mousedown",n=>{n.preventDefault(),y.classList.add("active");const e=t.getBoundingClientRect(),o=n.clientX,r=n.clientY,i=e.width,l=e.height,a=n=>{if("right"!==I){const e="bottom"===I?r-n.clientY:n.clientY-r;t.style.height=k(l+e,320,window.innerHeight-24)+"px"}if("bottom"!==I){const e="right"===I?o-n.clientX:n.clientX-o;t.style.width=k(i+e,320,window.innerWidth-24)+"px"}},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),y.classList.remove("active");const n=parseInt(t.style.width),e=parseInt(t.style.height);v("float"===I?{w:n,h:e}:"bottom"===I?{bh:e}:{rw:n})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const L=(n=>{let e=!1;const t=C("button","btn");t.innerHTML=h('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=C("div","plugins");o.hidden=!0;const r=()=>{const r=n.plugins||[];if(t.title=`plugins (${r.length})`,e)if(o.textContent="",r.length)for(const n of r){const e=C("div","plugin");e.appendChild(C("span","name",n.name)),e.appendChild(C("span","gave",$(n)||"nothing registered")),n.teardown||e.appendChild(C("span","flag","no teardown")),o.appendChild(e)}else o.appendChild(C("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{e=!e;for(const n of o.parentElement.children)n.hidden=n===o?!e:e;t.classList.toggle("active",e),r()},{btn:t,el:o,render:r}})(n);V=L.render,m.appendChild(L.btn),(s=C("button","btn")).onclick=()=>{U(b[I]),v({dock:I})},m.appendChild(s),(a=C("button","btn")).onclick=()=>{(n=>{try{localStorage.setItem(g,n)}catch{}})(J=w[J]),X()},m.appendChild(a),R.addEventListener("change",()=>{"system"===J&&X()}),X(),(l=C("button","btn")).title="pick an element on the page",l.innerHTML=h('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),l.onclick=()=>j?hn():(j=!0,l.classList.add("active"),document.addEventListener("click",pn,!0),void document.addEventListener("mousemove",cn,!0)),m.appendChild(l);const E=C("button","btn","\u2715");E.onclick=()=>{j&&hn(),t.style.display="none",o.style.display="",v({open:!1})},m.appendChild(E),t.appendChild(m);const O=C("div","body"),S=C("div","side"),_=C("div","tabs");(p=C("div","tab active")).onclick=()=>en("Elements"),(c=C("div","tab")).onclick=()=>en("Stores"),_.appendChild(p),_.appendChild(c),S.appendChild(_);const N=C("input","filter");N.placeholder="Filter by name or state",N.oninput=()=>{z=N.value.trim().toLowerCase(),rn()},N.onkeydown=n=>{"Escape"===n.key&&(N.value="",z="",rn())},S.appendChild(N),r=C("div","tree"),S.appendChild(r),i=C("div","state"),O.appendChild(S),O.appendChild(i),O.appendChild(L.el),t.appendChild(O),t.appendChild(y),e.appendChild(t);const Y=f();Y.w&&(H=t.style.width=Y.w+"px"),Y.h&&(T=t.style.height=Y.h+"px"),null!=Y.right&&(P=t.style.right=Y.right+"px"),null!=Y.bottom&&(A=t.style.bottom=Y.bottom+"px"),Y.bh&&(D=Y.bh+"px"),Y.rw&&(W=Y.rw+"px"),U(Y.dock||"float"),document.body.appendChild(u),Y.open&&(o.style.display="none",t.style.display="flex",F(),un()),n.on("scope:mount",un),n.on("scope:unmount",n=>{n===M&&(M=window.$scope=null),un()}),n.stores&&n.on("store:register",un),n.plugins&&n.on("plugin:install",un),n.on("flush",un)},vn=!1,xn=()=>{if(vn)return;const e=window.__LITE_VUE__;e?(vn=!0,n=e,document.body?fn():addEventListener("DOMContentLoaded",fn)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};xn();export{xn as init};
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueDevtoolsPanel={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n,t,o,r,i,l,d,a,s,p,c,h,g=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",u="litevue-devtools-theme",f="litevue-devtools-ui",v=()=>{try{return JSON.parse(localStorage.getItem(f)||"{}")}catch{return{}}},x=e=>{try{localStorage.setItem(f,JSON.stringify({...v(),...e}))}catch{}},m={dark:g('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:g('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:g('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},b={float:g('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:g('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},y={float:"bottom",bottom:"right",right:"float"},w={float:"floating",bottom:"docked to bottom",right:"docked to right"},k={dark:"light",light:"system",system:"dark"},C=(e,n,t)=>Math.min(Math.max(e,n),Math.max(n,t)),L=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},E=(e,n)=>{const t=new Set,o=(e,r,i)=>{if(null!=e){if("object"!=typeof e)return String(e).toLowerCase().includes(n)?r:void 0;if(i>4||t.has(e))return;t.add(e);for(const t of Object.keys(e)){if("$"===t[0])continue;let l;try{l=e[t]}catch{continue}if("function"==typeof l)continue;const d=r?`${r}.${t}`:t;if(t.toLowerCase().includes(n))return d;const a=o(l,d,i+1);if(a)return a}}};return o(e,"",0)},O=e=>{let n;try{n=void 0===e?"undefined":JSON.stringify(e)??String(e)}catch{n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},S=e=>[...e.directives.map(e=>"v-"+e),...e.magics].join(" "),M=null,$=null,_=!1,j="",z="Elements",I="float",N="",T="",H="",P="",D="",V="",W=()=>{},R=(()=>{try{const e=localStorage.getItem(u);if("light"===e||"system"===e)return e}catch{}return"dark"})(),X=matchMedia("(prefers-color-scheme: light)"),Y=()=>{const e="light"===R||"system"===R&&X.matches;t.host.classList.toggle("light",e),a.innerHTML=m[R],a.title="theme: "+R},A=new Set,B=new WeakSet,F=()=>{if("float"!==I)return;const e=parseInt(o.style.right)||0,n=parseInt(o.style.bottom)||0;H=o.style.right=C(e,0,window.innerWidth-o.offsetWidth)+"px",P=o.style.bottom=C(n,0,window.innerHeight-o.offsetHeight)+"px"},J=e=>{"float"===I?(N=o.style.width||N,T=o.style.height||T,H=o.style.right||H,P=o.style.bottom||P):"bottom"===I?D=o.style.height||D:V=o.style.width||V,I=e;const n="float"!==e;o.classList.toggle("dock-bottom","bottom"===e),o.classList.toggle("dock-right","right"===e),o.style.right=n?"":H,o.style.bottom=n?"":P,o.style.width="bottom"===e?"":"right"===e?V:N,o.style.height="right"===e?"":"bottom"===e?D:T,p.innerHTML=b[e],p.title="panel: "+w[e]},U=e=>{const n=L("span","label");return n.appendChild(L("span","punct","<")),n.appendChild(L("span","name",te(e))),n.appendChild(L("span","punct",">")),n},q=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},G=e=>{const n=e.getBoundingClientRect();s.style.cssText=`display:block;left:${n.left}px;top:${n.top}px;width:${n.width}px;height:${n.height}px`},Z=()=>{s.style.display="none"},K=e=>{e!==M&&A.clear(),$=null,M=e,z="Elements",window.$scope=e?n.scopes.get(e):void 0,oe(),re()},Q=e=>{e!==$&&A.clear(),M=null,$=e,z="Stores",window.$scope=n.stores.get(e),oe(),re()},ee=e=>{z=e,oe()},ne=/^\s*([A-Za-z_$][\w$]*)\s*\(/,te=e=>n.names.get(e)||(e=>{const t=ne.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.id||e.tagName.toLowerCase(),oe=()=>{if((()=>{const e=n.stores?n.stores.size:0;c.textContent=`Elements (${n.scopes.size})`,c.className="Elements"===z?"tab active":"tab",h.textContent=`Stores (${e})`,h.className="Stores"===z?"tab active":"tab"})(),W(),i.textContent="","Elements"===z){const e=[...n.scopes.keys()].sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=new Map;for(const i of e)if(!j||te(i).toLowerCase().includes(j))t.set(i,void 0);else{const e=E(n.scopes.get(i),j);e&&t.set(i,e)}if(!t.size)return void i.appendChild(L("div","empty",j?"no matching scopes":"no scopes mounted"));const o=new Set;for(const n of t.keys()){o.add(n);for(let e=q(n);e;e=q(e))o.add(e)}const r=new Map,l=new Map,d=new Map;for(const n of e){if(!o.has(n))continue;const e=q(n);r.set(n,e),d.set(n,e?(d.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const a=e=>{for(let n=r.get(e);n;n=r.get(n)??null)if(B.has(n))return!0;return!1};for(const s of e){if(!o.has(s)||a(s))continue;const e=L("div",s===M?"row sel":"row");e.style.paddingLeft=8+12*(d.get(s)??0)+"px";const r=B.has(s);if(l.get(s)){const n=L("span",r?"arrow":"arrow open","\u25b6");n.onclick=e=>{e.stopPropagation(),r?B.delete(s):B.add(s),oe()},e.appendChild(n)}else e.appendChild(L("span","spacer"));e.appendChild(U(s));const p=n.exps.get(s);p&&e.appendChild(L("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(L("span","hit"," "+c)),e.onclick=()=>K(s),e.onmouseenter=()=>G(s),e.onmouseleave=Z,i.appendChild(e)}return}const e=new Map;for(const o of n.stores?n.stores.keys():[])if(!j||o.toLowerCase().includes(j))e.set(o,void 0);else{const t=E(n.stores.get(o),j);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=L("div",n===$?"row sel":"row"),o=L("span","label");o.appendChild(L("span","punct","$store.")),o.appendChild(L("span","name",n)),t.appendChild(o);const r=e.get(n);r&&t.appendChild(L("span","hit"," "+r)),t.onclick=()=>Q(n),i.appendChild(t)}else i.appendChild(L("div","empty",j?"no matching stores":"no stores registered"))},re=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=$?n.stores.get($):M?n.scopes.get(M):void 0;if(!e)return void l.appendChild(L("div","empty","Select a scope"));const{own:o,inherited:r}=(e=>{const n=(e,n)=>"$"!==n[0]&&"function"!=typeof e[n],t=Object.keys(e).filter(t=>n(e,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(e);for(;i&&i!==Object.prototype;){for(const e of Object.keys(i))!o.has(e)&&n(i,e)&&(o.add(e),r.push(e));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(e);o.forEach(n=>le(n,e,n,0,"prop",[])),r.length&&(l.appendChild(L("div","divider","inherited")),r.forEach(n=>le(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(L("div","empty","empty scope")),l.appendChild(ie(e))},ie=e=>{const n=L("div","prop adder");n.appendChild(L("span","spacer"));const t=L("input","val key-in");t.placeholder="key";const o=L("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=n=>{"Enter"===n.key&&(()=>{const n=t.value.trim();if(!n)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),e[n]=i,t.blur(),o.blur(),he(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},le=(e,n,t,o,r,i)=>{const d=n[e],a=L("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&A.has(t);if(a.appendChild(L("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(L("span","key",e)),a.appendChild(L("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${O(e)}`:O(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?A.delete(t):A.add(t),re()}),de(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=L("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const n of e)le(n,d,t+"."+n,o+1,r,i.concat([d]))}return}a.appendChild(L("span","spacer")),a.appendChild(L("span","key",e));const s=((e,n)=>{for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyDescriptor(t,n);if(e)return e}})(n,e);if("function"==typeof d)a.appendChild(L("span","preview","\u0192"));else if((e=>{if(!e)return!1;if(e.get&&!e.set)return!0;const n=e.value;return!!n&&!0===n.__v_isRef&&!0===n.__v_isReadonly})(s))a.appendChild(L("span","preview",O(d)));else if("boolean"==typeof d){a.appendChild(L("span","bool",String(d)));const t=L("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),he()},a.appendChild(t)}else{const t=L("input","val");t.value=O(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=O(d),t.blur())},t.onblur=()=>{const o=((e,n)=>{if("number"==typeof n){const n=parseFloat(e);return isNaN(n)?e:n}return e})(t.value,d);o!==d?(n[e]=o,he()):t.value=O(d)},a.appendChild(t)}de(a,n,e,o,r),l.appendChild(a)},de=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const d=L("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],he()},e.appendChild(d)},ae=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),pe();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&K(r)},se=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?G(o):Z()}},pe=()=>{_=!1,d.classList.remove("active"),Z(),document.removeEventListener("click",ae,!0),document.removeEventListener("mousemove",se,!0)},ce=!1,he=()=>{ce||(ce=!0,setTimeout(()=>{ce=!1,"none"!==o.style.display&&(oe(),re())}))},ge=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const f=document.createElement("style");f.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(f),s=L("div","highlight"),t.appendChild(s),(r=L("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",F(),x({open:!0}),he()},t.appendChild(r),(o=L("div","panel")).style.display="none";const m=L("div","header");m.appendChild(L("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;if("float"!==I)return;e.preventDefault();const n=o.getBoundingClientRect(),t=window.innerWidth-n.right,r=window.innerHeight-n.bottom,i=e.clientX,l=e.clientY,d=e=>{o.style.right=C(t-(e.clientX-i),0,window.innerWidth-o.offsetWidth)+"px",o.style.bottom=C(r-(e.clientY-l),0,window.innerHeight-o.offsetHeight)+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),x({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const b=L("div","grip");b.addEventListener("mousedown",e=>{e.preventDefault(),b.classList.add("active");const n=o.getBoundingClientRect(),t=e.clientX,r=e.clientY,i=n.width,l=n.height,d=e=>{if("right"!==I){const n="bottom"===I?r-e.clientY:e.clientY-r;o.style.height=C(l+n,320,window.innerHeight-24)+"px"}if("bottom"!==I){const n="right"===I?t-e.clientX:e.clientX-t;o.style.width=C(i+n,320,window.innerWidth-24)+"px"}},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),b.classList.remove("active");const e=parseInt(o.style.width),n=parseInt(o.style.height);x("float"===I?{w:e,h:n}:"bottom"===I?{bh:n}:{rw:e})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)});const w=(e=>{let n=!1;const t=L("button","btn");t.innerHTML=g('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=L("div","plugins");o.hidden=!0;const r=()=>{const r=e.plugins||[];if(t.title=`plugins (${r.length})`,n)if(o.textContent="",r.length)for(const e of r){const n=L("div","plugin");n.appendChild(L("span","name",e.name)),n.appendChild(L("span","gave",S(e)||"nothing registered")),e.teardown||n.appendChild(L("span","flag","no teardown")),o.appendChild(n)}else o.appendChild(L("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{n=!n;for(const e of o.parentElement.children)e.hidden=e===o?!n:n;t.classList.toggle("active",n),r()},{btn:t,el:o,render:r}})(n);W=w.render,m.appendChild(w.btn),(p=L("button","btn")).onclick=()=>{J(y[I]),x({dock:I})},m.appendChild(p),(a=L("button","btn")).onclick=()=>{(e=>{try{localStorage.setItem(u,e)}catch{}})(R=k[R]),Y()},m.appendChild(a),X.addEventListener("change",()=>{"system"===R&&Y()}),Y(),(d=L("button","btn")).title="pick an element on the page",d.innerHTML=g('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),d.onclick=()=>_?pe():(_=!0,d.classList.add("active"),document.addEventListener("click",ae,!0),void document.addEventListener("mousemove",se,!0)),m.appendChild(d);const E=L("button","btn","\u2715");E.onclick=()=>{_&&pe(),o.style.display="none",r.style.display="",x({open:!1})},m.appendChild(E),o.appendChild(m);const O=L("div","body"),$=L("div","side"),z=L("div","tabs");(c=L("div","tab active")).onclick=()=>ee("Elements"),(h=L("div","tab")).onclick=()=>ee("Stores"),z.appendChild(c),z.appendChild(h),$.appendChild(z);const A=L("input","filter");A.placeholder="Filter by name or state",A.oninput=()=>{j=A.value.trim().toLowerCase(),oe()},A.onkeydown=e=>{"Escape"===e.key&&(A.value="",j="",oe())},$.appendChild(A),i=L("div","tree"),$.appendChild(i),l=L("div","state"),O.appendChild($),O.appendChild(l),O.appendChild(w.el),o.appendChild(O),o.appendChild(b),t.appendChild(o);const B=v();B.w&&(N=o.style.width=B.w+"px"),B.h&&(T=o.style.height=B.h+"px"),null!=B.right&&(H=o.style.right=B.right+"px"),null!=B.bottom&&(P=o.style.bottom=B.bottom+"px"),B.bh&&(D=B.bh+"px"),B.rw&&(V=B.rw+"px"),J(B.dock||"float"),document.body.appendChild(e),B.open&&(r.style.display="none",o.style.display="flex",F(),he()),n.on("scope:mount",he),n.on("scope:unmount",e=>{e===M&&(M=null),he()}),n.stores&&n.on("store:register",he),n.plugins&&n.on("plugin:install",he),n.on("flush",he)},ue=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?ge():addEventListener("DOMContentLoaded",ge)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};ue(),e.init=ue});
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueDevtoolsPanel={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n,t,o,r,i,l,a,d,s,p,c,h,u=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",g="litevue-devtools-theme",f="litevue-devtools-ui",v=()=>{try{return JSON.parse(localStorage.getItem(f)||"{}")}catch{return{}}},b=e=>{try{localStorage.setItem(f,JSON.stringify({...v(),...e}))}catch{}},m={dark:u('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:u('<circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="18.4" y1="18.4" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="5.6" y2="18.4"/><line x1="18.4" y1="5.6" x2="19.8" y2="4.2"/>'),system:u('<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/>')},x={float:u('<rect x="2" y="4" width="14" height="11" rx="1"/><rect x="9" y="10" width="13" height="10" rx="1" fill="currentColor"/>'),bottom:u('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:u('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},y={float:"bottom",bottom:"right",right:"float"},w={float:"floating",bottom:"docked to bottom",right:"docked to right"},k={dark:"light",light:"system",system:"dark"},C=(e,n,t)=>Math.min(Math.max(e,n),Math.max(n,t)),L=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},E=(e,n)=>{const t=new Set,o=(e,r,i)=>{if(null!=e){if("object"==typeof e){if(i>4||t.has(e))return;t.add(e);const l=!Array.isArray(e);for(const t of Object.keys(e)){if("$"===t[0])continue;let a;try{a=e[t]}catch{continue}if("function"==typeof a)continue;const d=r?`${r}.${t}`:t;if(l&&t.toLowerCase().includes(n))return d;const s=o(a,d,i+1);if(s)return s}return}return String(e).toLowerCase().includes(n)?r:void 0}};return o(e,"",0)},S=e=>e instanceof Map||e instanceof Set,O=e=>{let n="";const t=e=>{if(S(e))n+=`${e.constructor.name}(${e.size})`;else if(!e||"object"!=typeof e||e.toJSON)n+=JSON.stringify(e)??String(e);else{const o=Array.isArray(e);n+=o?"[":"{";let r=0;for(const i of o?e.keys():Object.keys(e)){if(n.length>60)break;const l=e[i],a=void 0===l||"function"==typeof l;a&&!o||(r++&&(n+=","),o||(n+=JSON.stringify(i)+":"),a?n+="null":t(l))}n+=o?"]":"}"}};try{t(e)}catch{n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},$=(e,n)=>{for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t)){const e=Object.getOwnPropertyDescriptor(t,n);if(e)return e}},M=e=>[...e.directives.map(e=>"v-"+e),...e.magics].join(" "),j=null,_=null,z=!1,N="",I="Elements",T="float",H="",P="",A="",D="",V="",W="",J=()=>{},R=(()=>{try{const e=localStorage.getItem(g);if("light"===e||"system"===e)return e}catch{}return"dark"})(),X=matchMedia("(prefers-color-scheme: light)"),Y=()=>{const e="light"===R||"system"===R&&X.matches;t.host.classList.toggle("light",e),d.innerHTML=m[R],d.title="theme: "+R},B=new Set,F=new WeakSet,U=()=>{if("float"!==T)return;const e=parseInt(o.style.right)||0,n=parseInt(o.style.bottom)||0;A=o.style.right=C(e,0,window.innerWidth-o.offsetWidth)+"px",D=o.style.bottom=C(n,0,window.innerHeight-o.offsetHeight)+"px"},q=e=>{"float"===T?(H=o.style.width||H,P=o.style.height||P,A=o.style.right||A,D=o.style.bottom||D):"bottom"===T?V=o.style.height||V:W=o.style.width||W,T=e;const n="float"!==e;o.classList.toggle("dock-bottom","bottom"===e),o.classList.toggle("dock-right","right"===e),o.style.right=n?"":A,o.style.bottom=n?"":D,o.style.width="bottom"===e?"":"right"===e?W:H,o.style.height="right"===e?"":"bottom"===e?V:P,p.innerHTML=x[e],p.title="panel: "+w[e]},G=e=>{const n=L("span","label");return n.appendChild(L("span","punct","<")),n.appendChild(L("span","name",re(e))),n.appendChild(L("span","punct",">")),n},Z=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},K=e=>{const n=e.getBoundingClientRect();s.style.cssText=`display:block;left:${n.left}px;top:${n.top}px;width:${n.width}px;height:${n.height}px`},Q=()=>{s.style.display="none"},ee=e=>{e!==j&&B.clear(),_=null,j=e,I="Elements",window.$scope=e?n.scopes.get(e):void 0,ie(),le()},ne=e=>{e!==_&&B.clear(),j=null,_=e,I="Stores",window.$scope=n.stores.get(e),ie(),le()},te=e=>{I=e,ie()},oe=/^\s*([A-Za-z_$][\w$]*)\s*\(/,re=e=>n.names.get(e)||(e=>{const t=oe.exec(n.exps.get(e)||"")?.[1];return t&&n.components?.has(t)?t:void 0})(e)||e.getAttribute("id")||e.localName,ie=()=>{if((()=>{const e=n.stores?n.stores.size:0;c.textContent=`Elements (${n.scopes.size})`,c.className="Elements"===I?"tab active":"tab",h.textContent=`Stores (${e})`,h.className="Stores"===I?"tab active":"tab"})(),J(),i.textContent="","Elements"===I){const e=[...n.scopes.keys()].sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t=new Map;for(const i of e)if(!N||re(i).toLowerCase().includes(N))t.set(i,void 0);else{const e=E(n.scopes.get(i),N);e&&t.set(i,e)}if(!t.size)return void i.appendChild(L("div","empty",N?"no matching scopes":"no scopes mounted"));const o=new Set;for(const n of t.keys()){o.add(n);for(let e=Z(n);e;e=Z(e))o.add(e)}const r=new Map,l=new Map,a=new Map;for(const n of e){if(!o.has(n))continue;const e=Z(n);r.set(n,e),a.set(n,e?(a.get(e)??0)+1:0),e&&l.set(e,(l.get(e)||0)+1)}const d=e=>{for(let n=r.get(e);n;n=r.get(n)??null)if(F.has(n))return!0;return!1};for(const s of e){if(!o.has(s)||d(s))continue;const e=L("div",s===j?"row sel":"row");e.style.paddingLeft=8+12*(a.get(s)??0)+"px";const r=F.has(s);if(l.get(s)){const n=L("span",r?"arrow":"arrow open","\u25b6");n.onclick=e=>{e.stopPropagation(),r?F.delete(s):F.add(s),ie()},e.appendChild(n)}else e.appendChild(L("span","spacer"));e.appendChild(G(s));const p=n.exps.get(s);p&&e.appendChild(L("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(L("span","hit"," "+c)),e.onclick=()=>ee(s),e.onmouseenter=()=>K(s),e.onmouseleave=Q,i.appendChild(e)}return}const e=new Map;for(const o of n.stores?n.stores.keys():[])if(!N||o.toLowerCase().includes(N))e.set(o,void 0);else{const t=E(n.stores.get(o),N);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=L("div",n===_?"row sel":"row"),o=L("span","label");o.appendChild(L("span","punct","$store.")),o.appendChild(L("span","name",n)),t.appendChild(o);const r=e.get(n);r&&t.appendChild(L("span","hit"," "+r)),t.onclick=()=>ne(n),i.appendChild(t)}else i.appendChild(L("div","empty",N?"no matching stores":"no stores registered"))},le=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=_?n.stores.get(_):j?n.scopes.get(j):void 0;if(!e)return void l.appendChild(L("div","empty","Select a scope"));const{own:o,inherited:r}=(e=>{const n=(e,n)=>"$"!==n[0]&&"function"!=typeof $(e,n)?.value,t=Object.keys(e).filter(t=>n(e,t)),o=new Set(t),r=[];let i=Object.getPrototypeOf(e);for(;i&&i!==Object.prototype;){for(const e of Object.keys(i))!o.has(e)&&n(i,e)&&(o.add(e),r.push(e));i=Object.getPrototypeOf(i)}return{own:t,inherited:r}})(e);o.forEach(n=>de(n,e,n,0,"prop",[])),r.length&&(l.appendChild(L("div","divider","inherited")),r.forEach(n=>de(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(L("div","empty","empty scope")),l.appendChild(ae(e))},ae=e=>{const n=L("div","prop adder");n.appendChild(L("span","spacer"));const t=L("input","val key-in");t.placeholder="key";const o=L("input","val");o.placeholder="value";return t.onkeydown=o.onkeydown=n=>{"Enter"===n.key&&(()=>{const n=t.value.trim();if(!n)return;const r=o.value;let i=r;"true"===r?i=!0:"false"===r?i=!1:""===r||isNaN(+r)||(i=+r),e[n]=i,t.blur(),o.blur(),ge(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},de=(e,n,t,o,r,i,a)=>{let d,s;try{d=n[e]}catch{s=1}const p=L("div",r);p.style.paddingLeft=8+14*o+"px";const c=$(n,e);if(a||=(e=>{if(!e)return!1;if(e.get&&!e.set)return!0;const n=e.value;return!!n&&!0===n.__v_isRef&&!0===n.__v_isReadonly})(c),null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,c=!s&&B.has(t);if(p.appendChild(L("span",c?"arrow open":"arrow","\u25b6")),p.appendChild(L("span","key",e)),p.appendChild(L("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${O(e)}`:O(e))(d))),s||(p.classList.add("toggle"),p.onclick=()=>{c?B.delete(t):B.add(t),le()}),se(p,n,e,o,r),l.appendChild(p),c){const e=S(d),n=e?d instanceof Map?Object.fromEntries(d):[...d]:d,s=Object.keys(n);if(!s.length){const e=L("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const l of s)de(l,n,t+"."+l,o+1,r,i.concat([d]),a||e)}return}if(p.appendChild(L("span","spacer")),p.appendChild(L("span","key",e)),"function"==typeof d)p.appendChild(L("span","preview","\u0192"));else if(s||a)p.appendChild(L("span","preview",s?"(threw)":O(d)));else if("boolean"==typeof d){p.appendChild(L("span","bool",String(d)));const t=L("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),ge()},p.appendChild(t)}else{const t=L("input","val");t.value=O(d),t.onfocus=()=>{t.value=String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=String(d),t.blur())},t.onblur=()=>{const o=((e,n)=>{if("number"==typeof n){const n=parseFloat(e);return isNaN(n)?e:n}return e})(t.value,d);t.value!==String(d)&&o!==d?(n[e]=o,ge()):t.value=O(d)},p.appendChild(t)}se(p,n,e,o,r),l.appendChild(p)},se=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const a=L("button","del","\u2715");a.title=`delete "${o}"`,a.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],ge()},e.appendChild(a)},pe=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),he();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&ee(r)},ce=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?K(o):Q()}},he=()=>{z=!1,a.classList.remove("active"),Q(),document.removeEventListener("click",pe,!0),document.removeEventListener("mousemove",ce,!0)},ue=!1,ge=()=>{ue||(ue=!0,setTimeout(()=>{ue=!1,"none"!==o.style.display&&(ie(),le())}))},fe=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const f=document.createElement("style");f.textContent="\n:host {\n all: initial;\n --bg: #1e1e1e;\n --bg2: #252526;\n --hover: #2a2d2e;\n --border: #3c3c3c;\n --fg: #d4d4d4;\n --muted: #808080;\n --accent: #42b883;\n --sel: #094771;\n --key: #9cdcfe;\n --val: #ce9178;\n --exp: #6a9955;\n}\n:host(.light) {\n --bg: #ffffff;\n --bg2: #f3f3f3;\n --hover: #ececec;\n --border: #d0d0d0;\n --fg: #383a42;\n --muted: #8e8e90;\n --sel: #d2e5f5;\n --key: #0451a5;\n --val: #a31515;\n --exp: #22863a;\n}\n* {\n box-sizing: border-box;\n}\n.pill, .panel {\n position: fixed;\n right: 12px;\n bottom: 12px;\n z-index: 2147483646;\n font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n.pill {\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 999px;\n padding: 4px 10px;\n cursor: pointer;\n user-select: none;\n}\n.pill:hover {\n border-color: var(--accent);\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 760px;\n max-width: calc(100vw - 24px);\n height: 450px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 320px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\n}\n.panel.dock-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: none;\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-right {\n top: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n max-height: none;\n border-radius: 0;\n border-top: 0;\n border-right: 0;\n border-bottom: 0;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\n}\n.grip {\n position: absolute;\n z-index: 1;\n touch-action: none;\n right: 0;\n bottom: 0;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n background: linear-gradient(135deg, transparent 50%, var(--border) 50%);\n}\n.panel.dock-bottom .grip {\n top: 0;\n left: 0;\n width: auto;\n height: 5px;\n cursor: ns-resize;\n background: none;\n}\n.panel.dock-right .grip {\n top: 0;\n left: 0;\n width: 5px;\n height: auto;\n cursor: ew-resize;\n background: none;\n}\n.panel.dock-bottom .grip:hover,\n.panel.dock-bottom .grip.active,\n.panel.dock-right .grip:hover,\n.panel.dock-right .grip.active {\n background: var(--accent);\n}\n.header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 8px;\n background: var(--bg2);\n border-bottom: 1px solid var(--border);\n user-select: none;\n cursor: move;\n}\n.title {\n color: var(--accent);\n font-weight: bold;\n margin-right: auto;\n}\n.btn {\n display: flex;\n align-items: center;\n background: none;\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 3px 7px;\n cursor: pointer;\n}\n.btn svg {\n display: block;\n}\n.btn:hover {\n border-color: var(--accent);\n}\n.btn.active {\n background: var(--accent);\n border-color: var(--accent);\n color: var(--bg);\n}\n.body {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n[hidden] {\n display: none !important;\n}\n.plugins {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.plugin {\n display: flex;\n gap: 8px;\n padding: 3px 10px;\n align-items: baseline;\n}\n.plugin .name {\n min-width: 120px;\n}\n.plugin .gave {\n flex: 1;\n color: var(--muted);\n word-break: break-word;\n}\n.plugin .flag {\n color: var(--muted);\n opacity: 0.7;\n}\n.side {\n display: flex;\n flex-direction: column;\n width: 40%;\n min-width: 0;\n border-right: 1px solid var(--border);\n}\n.tabs {\n display: flex;\n border-bottom: 1px solid var(--border);\n user-select: none;\n}\n.tab {\n flex: 1;\n padding: 4px 0;\n text-align: center;\n color: var(--muted);\n border-bottom: 2px solid transparent;\n cursor: pointer;\n}\n.tab:hover {\n color: var(--fg);\n}\n.tab.active {\n color: var(--fg);\n border-bottom-color: var(--accent);\n}\n.filter {\n margin: 6px 6px 2px;\n background: var(--bg2);\n border: 1px solid var(--border);\n border-radius: 3px;\n color: var(--fg);\n font: inherit;\n padding: 2px 6px;\n outline: none;\n}\n.filter:focus {\n border-color: var(--accent);\n}\n.filter::placeholder {\n color: var(--muted);\n}\n.tree {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.state {\n flex: 1;\n overflow: auto;\n padding: 4px 0;\n}\n.row {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n.row .label {\n flex-shrink: 0;\n}\n.row .arrow {\n cursor: pointer;\n padding: 3px 4px;\n margin: -3px -4px;\n box-sizing: content-box;\n}\n.row .arrow:hover {\n color: var(--key);\n}\n.row .hit {\n color: var(--exp);\n opacity: 0.75;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.row:hover {\n background: var(--hover);\n}\n.row.sel {\n background: var(--sel);\n}\n.row .name {\n color: var(--key);\n}\n.row .punct {\n color: var(--muted);\n}\n.row .exp {\n color: var(--exp);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.prop {\n display: flex;\n gap: 6px;\n padding: 2px 8px;\n align-items: center;\n}\n.prop .key {\n color: var(--key);\n flex-shrink: 0;\n}\n.arrow {\n width: 12px;\n flex-shrink: 0;\n color: var(--muted);\n font-size: 9px;\n transition: transform 0.1s;\n}\n.arrow.open {\n transform: rotate(90deg);\n}\n.spacer {\n width: 12px;\n flex-shrink: 0;\n}\n.prop.toggle {\n cursor: pointer;\n user-select: none;\n}\n.prop.toggle:hover {\n background: var(--hover);\n}\n.preview {\n flex: 1;\n min-width: 0;\n color: var(--muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.muted {\n color: var(--muted);\n padding: 2px 8px;\n}\n.check {\n margin: 0;\n flex-shrink: 0;\n accent-color: var(--accent);\n cursor: pointer;\n}\n.del {\n visibility: hidden;\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n cursor: pointer;\n}\n.prop:hover .del {\n visibility: visible;\n}\n.del:hover {\n color: #e5534b;\n}\n.adder .key-in {\n flex: 0 0 30%;\n color: var(--key);\n}\n.adder input::placeholder {\n color: var(--muted);\n}\n.adder input {\n border-color: var(--border);\n}\n.bool {\n color: var(--val);\n}\n.prop.inherited .key {\n color: var(--muted);\n}\n.prop .val {\n flex: 1;\n min-width: 0;\n background: none;\n border: 1px solid transparent;\n border-radius: 3px;\n color: var(--val);\n font: inherit;\n padding: 0 3px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\ninput.val:hover, input.val:focus {\n border-color: var(--border);\n outline: none;\n background: var(--bg2);\n}\n.divider {\n padding: 4px 8px 1px;\n color: var(--muted);\n font-size: 10px;\n text-transform: uppercase;\n user-select: none;\n}\n.empty {\n padding: 8px;\n color: var(--muted);\n}\n.highlight {\n position: fixed;\n z-index: 2147483645;\n background: rgba(66, 184, 131, 0.25);\n border: 1px solid var(--accent);\n pointer-events: none;\n display: none;\n}\n",t.appendChild(f),s=L("div","highlight"),t.appendChild(s),(r=L("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",U(),b({open:!0}),ge()},t.appendChild(r),(o=L("div","panel")).style.display="none";const m=L("div","header");m.appendChild(L("span","title","\u26a1 LiteVue")),m.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;if("float"!==T)return;e.preventDefault();const n=o.getBoundingClientRect(),t=window.innerWidth-n.right,r=window.innerHeight-n.bottom,i=e.clientX,l=e.clientY,a=e=>{o.style.right=C(t-(e.clientX-i),0,window.innerWidth-o.offsetWidth)+"px",o.style.bottom=C(r-(e.clientY-l),0,window.innerHeight-o.offsetHeight)+"px"},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),b({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const x=L("div","grip");x.addEventListener("mousedown",e=>{e.preventDefault(),x.classList.add("active");const n=o.getBoundingClientRect(),t=e.clientX,r=e.clientY,i=n.width,l=n.height,a=e=>{if("right"!==T){const n="bottom"===T?r-e.clientY:e.clientY-r;o.style.height=C(l+n,320,window.innerHeight-24)+"px"}if("bottom"!==T){const n="right"===T?t-e.clientX:e.clientX-t;o.style.width=C(i+n,320,window.innerWidth-24)+"px"}},d=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d),x.classList.remove("active");const e=parseInt(o.style.width),n=parseInt(o.style.height);b("float"===T?{w:e,h:n}:"bottom"===T?{bh:n}:{rw:e})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)});const w=(e=>{let n=!1;const t=L("button","btn");t.innerHTML=u('<path d="M9 3a2 2 0 0 1 4 0v1h3a1 1 0 0 1 1 1v3h1a2 2 0 0 1 0 4h-1v3a1 1 0 0 1-1 1h-3v-1a2 2 0 0 0-4 0v1H6a1 1 0 0 1-1-1v-3H4a2 2 0 0 1 0-4h1V5a1 1 0 0 1 1-1h3z"/>');const o=L("div","plugins");o.hidden=!0;const r=()=>{const r=e.plugins||[];if(t.title=`plugins (${r.length})`,n)if(o.textContent="",r.length)for(const e of r){const n=L("div","plugin");n.appendChild(L("span","name",e.name)),n.appendChild(L("span","gave",M(e)||"nothing registered")),e.teardown||n.appendChild(L("span","flag","no teardown")),o.appendChild(n)}else o.appendChild(L("div","empty","no plugins installed, or this is a production build"))};return t.onclick=()=>{n=!n;for(const e of o.parentElement.children)e.hidden=e===o?!n:n;t.classList.toggle("active",n),r()},{btn:t,el:o,render:r}})(n);J=w.render,m.appendChild(w.btn),(p=L("button","btn")).onclick=()=>{q(y[T]),b({dock:T})},m.appendChild(p),(d=L("button","btn")).onclick=()=>{(e=>{try{localStorage.setItem(g,e)}catch{}})(R=k[R]),Y()},m.appendChild(d),X.addEventListener("change",()=>{"system"===R&&Y()}),Y(),(a=L("button","btn")).title="pick an element on the page",a.innerHTML=u('<circle cx="12" cy="12" r="7"/><line x1="12" y1="1" x2="12" y2="6"/><line x1="12" y1="18" x2="12" y2="23"/><line x1="1" y1="12" x2="6" y2="12"/><line x1="18" y1="12" x2="23" y2="12"/>'),a.onclick=()=>z?he():(z=!0,a.classList.add("active"),document.addEventListener("click",pe,!0),void document.addEventListener("mousemove",ce,!0)),m.appendChild(a);const E=L("button","btn","\u2715");E.onclick=()=>{z&&he(),o.style.display="none",r.style.display="",b({open:!1})},m.appendChild(E),o.appendChild(m);const S=L("div","body"),O=L("div","side"),$=L("div","tabs");(c=L("div","tab active")).onclick=()=>te("Elements"),(h=L("div","tab")).onclick=()=>te("Stores"),$.appendChild(c),$.appendChild(h),O.appendChild($);const _=L("input","filter");_.placeholder="Filter by name or state",_.oninput=()=>{N=_.value.trim().toLowerCase(),ie()},_.onkeydown=e=>{"Escape"===e.key&&(_.value="",N="",ie())},O.appendChild(_),i=L("div","tree"),O.appendChild(i),l=L("div","state"),S.appendChild(O),S.appendChild(l),S.appendChild(w.el),o.appendChild(S),o.appendChild(x),t.appendChild(o);const I=v();I.w&&(H=o.style.width=I.w+"px"),I.h&&(P=o.style.height=I.h+"px"),null!=I.right&&(A=o.style.right=I.right+"px"),null!=I.bottom&&(D=o.style.bottom=I.bottom+"px"),I.bh&&(V=I.bh+"px"),I.rw&&(W=I.rw+"px"),q(I.dock||"float"),document.body.appendChild(e),I.open&&(r.style.display="none",o.style.display="flex",U(),ge()),n.on("scope:mount",ge),n.on("scope:unmount",e=>{e===j&&(j=window.$scope=null),ge()}),n.stores&&n.on("store:register",ge),n.plugins&&n.on("plugin:install",ge),n.on("flush",ge)},ve=!1,be=()=>{if(ve)return;const e=window.__LITE_VUE__;e?(ve=!0,n=e,document.body?fe():addEventListener("DOMContentLoaded",fe)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};be(),e.init=be});