@aevantec/litevue 0.5.3 → 0.5.5

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 (73) hide show
  1. package/dist/litevue-devtools.iife.js +1 -1
  2. package/dist/litevue-devtools.mjs +1 -853
  3. package/dist/litevue-devtools.umd.js +1 -1
  4. package/dist/litevue-plugins.iife.js +1 -1
  5. package/dist/litevue-plugins.mjs +1 -493
  6. package/dist/litevue-plugins.umd.js +1 -1
  7. package/dist/litevue.iife.js +1 -12
  8. package/dist/litevue.mjs +1 -1861
  9. package/dist/litevue.umd.js +1 -12
  10. package/dist/plugins/collapse.iife.js +1 -0
  11. package/dist/plugins/collapse.mjs +1 -0
  12. package/dist/plugins/collapse.umd.js +1 -0
  13. package/dist/plugins/focus.iife.js +1 -0
  14. package/dist/plugins/focus.mjs +1 -0
  15. package/dist/plugins/focus.umd.js +1 -0
  16. package/dist/plugins/intersect.iife.js +1 -0
  17. package/dist/plugins/intersect.mjs +1 -0
  18. package/dist/plugins/intersect.umd.js +1 -0
  19. package/dist/plugins/mask.iife.js +1 -0
  20. package/dist/plugins/mask.mjs +1 -0
  21. package/dist/plugins/mask.umd.js +1 -0
  22. package/dist/plugins/media.iife.js +1 -0
  23. package/dist/plugins/media.mjs +1 -0
  24. package/dist/plugins/media.umd.js +1 -0
  25. package/dist/plugins/morph.iife.js +1 -0
  26. package/dist/plugins/morph.mjs +1 -0
  27. package/dist/plugins/morph.umd.js +1 -0
  28. package/dist/plugins/persist.iife.js +1 -0
  29. package/dist/plugins/persist.mjs +1 -0
  30. package/dist/plugins/persist.umd.js +1 -0
  31. package/dist/plugins/resize.iife.js +1 -0
  32. package/dist/plugins/resize.mjs +1 -0
  33. package/dist/plugins/resize.umd.js +1 -0
  34. package/dist/plugins/transition.iife.js +1 -0
  35. package/dist/plugins/transition.mjs +1 -0
  36. package/dist/plugins/transition.umd.js +1 -0
  37. package/dist/types/app.d.mts +35 -3
  38. package/dist/types/app.d.ts +35 -3
  39. package/dist/types/block.d.mts +7 -0
  40. package/dist/types/block.d.ts +7 -0
  41. package/dist/types/context.d.mts +7 -0
  42. package/dist/types/context.d.ts +7 -0
  43. package/dist/types/index.d.mts +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types/ownership.d.mts +30 -0
  46. package/dist/types/ownership.d.ts +30 -0
  47. package/dist/types/plugins/{collapse.d.mts → collapse/index.d.mts} +1 -1
  48. package/dist/types/plugins/{collapse.d.ts → collapse/index.d.ts} +1 -1
  49. package/dist/types/plugins/{focus.d.mts → focus/index.d.mts} +1 -1
  50. package/dist/types/plugins/{focus.d.ts → focus/index.d.ts} +1 -1
  51. package/dist/types/plugins/index.d.mts +12 -9
  52. package/dist/types/plugins/index.d.ts +3 -0
  53. package/dist/types/plugins/{intersect.d.mts → intersect/index.d.mts} +1 -1
  54. package/dist/types/plugins/{intersect.d.ts → intersect/index.d.ts} +1 -1
  55. package/dist/types/plugins/{mask.d.mts → mask/index.d.mts} +1 -1
  56. package/dist/types/plugins/{mask.d.ts → mask/index.d.ts} +1 -1
  57. package/dist/types/plugins/media/index.d.mts +42 -0
  58. package/dist/types/plugins/media/index.d.ts +42 -0
  59. package/dist/types/plugins/{morph.d.mts → morph/index.d.mts} +1 -1
  60. package/dist/types/plugins/{morph.d.ts → morph/index.d.ts} +1 -1
  61. package/dist/types/plugins/{persist.d.mts → persist/index.d.mts} +1 -1
  62. package/dist/types/plugins/{persist.d.ts → persist/index.d.ts} +1 -1
  63. package/dist/types/plugins/resize/index.d.mts +12 -0
  64. package/dist/types/plugins/resize/index.d.ts +12 -0
  65. package/dist/types/plugins/{transition.d.mts → transition/index.d.mts} +1 -1
  66. package/dist/types/plugins/{transition.d.ts → transition/index.d.ts} +1 -1
  67. package/dist/types/scheduler.d.mts +3 -0
  68. package/dist/types/scheduler.d.ts +3 -0
  69. package/dist/types/utils.d.mts +6 -1
  70. package/dist/types/utils.d.ts +6 -1
  71. package/dist/types/warn.d.mts +16 -0
  72. package/dist/types/warn.d.ts +16 -0
  73. package/package.json +134 -11
@@ -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){"use strict";let n,t,o,r,i,l,d,a,s,p,c,h=null,u=null,v=!1,f="",x="Elements";const g=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",y="litevue-devtools-theme",b="litevue-devtools-ui",m=()=>{try{return JSON.parse(localStorage.getItem(b)||"{}")}catch{return{}}},w=e=>{try{localStorage.setItem(b,JSON.stringify({...m(),...e}))}catch{}},k={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"/>')},C={dark:"light",light:"system",system:"dark"};let E="dark";try{const e=localStorage.getItem(y);"light"!==e&&"system"!==e||(E=e)}catch{}const L=matchMedia("(prefers-color-scheme: light)"),O=()=>{const e="light"===E||"system"===E&&L.matches;t.host.classList.toggle("light",e),a.innerHTML=k[E],a.title="theme: "+E},S=new Set,_=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},N=e=>{const n=_("span","label");return n.appendChild(_("span","punct","<")),n.appendChild(_("span","name",D(e))),n.appendChild(_("span","punct",">")),n},T=e=>{let t=0,o=e.parentElement;for(;o;)n.scopes.has(o)&&t++,o=o.parentElement;return t},j=e=>{let n;try{n=void 0===e?"undefined":JSON.stringify(e)??String(e)}catch(t){n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},$=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"},I=e=>{e!==h&&S.clear(),u=null,h=e,x="Elements",window.$scope=e?n.scopes.get(e):void 0,V(),R()},P=e=>{e!==u&&S.clear(),h=null,u=e,x="Stores",window.$scope=n.stores.get(e),V(),R()},M=e=>{x=e,V()},D=e=>n.names.get(e)||e.id||e.tagName.toLowerCase(),V=()=>{if((()=>{const e=n.stores?n.stores.size:0;p.textContent=`Elements (${n.scopes.size})`,p.className="Elements"===x?"tab active":"tab",c.textContent=`Stores (${e})`,c.className="Stores"===x?"tab active":"tab"})(),i.textContent="","Elements"===x){const e=[...n.scopes.keys()].filter(e=>D(e).toLowerCase().includes(f)).sort((e,n)=>e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);if(!e.length)return void i.appendChild(_("div","empty",f?"no matching scopes":"no scopes mounted"));for(const t of e){const e=_("div",t===h?"row sel":"row");e.style.paddingLeft=8+12*T(t)+"px",e.appendChild(N(t));const o=n.exps.get(t);o&&e.appendChild(_("span","exp"," "+o)),e.onclick=()=>I(t),e.onmouseenter=()=>$(t),e.onmouseleave=z,i.appendChild(e)}return}const e=[...n.stores?n.stores.keys():[]].filter(e=>e.toLowerCase().includes(f));if(e.length)for(const n of e){const e=_("div",n===u?"row sel":"row"),t=_("span","label");t.appendChild(_("span","punct","$store.")),t.appendChild(_("span","name",n)),e.appendChild(t),e.onclick=()=>P(n),i.appendChild(e)}else i.appendChild(_("div","empty",f?"no matching stores":"no stores registered"))},R=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=u?n.stores.get(u):h?n.scopes.get(h):void 0;if(!e)return void l.appendChild(_("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=>W(n,e,n,0,"prop",[])),r.length&&(l.appendChild(_("div","divider","inherited")),r.forEach(n=>W(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(_("div","empty","empty scope")),l.appendChild(H(e))},H=e=>{const n=_("div","prop adder");n.appendChild(_("span","spacer"));const t=_("input","val key-in");t.placeholder="key";const o=_("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(),X(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},W=(e,n,t,o,r,i)=>{const d=n[e],a=_("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&S.has(t);if(a.appendChild(_("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(_("span","key",e)),a.appendChild(_("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${j(e)}`:j(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?S.delete(t):S.add(t),R()}),A(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=_("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const n of e)W(n,d,t+"."+n,o+1,r,i.concat([d]))}return}a.appendChild(_("span","spacer")),a.appendChild(_("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(_("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(_("span","preview",j(d)));else if("boolean"==typeof d){a.appendChild(_("span","bool",String(d)));const t=_("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),X()},a.appendChild(t)}else{const t=_("input","val");t.value=j(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=j(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,X()):t.value=j(d)},a.appendChild(t)}A(a,n,e,o,r),l.appendChild(a)},A=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const d=_("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],X()},e.appendChild(d)},B=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),J();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&I(r)},F=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?$(o):z()}},J=()=>{v=!1,d.classList.remove("active"),z(),document.removeEventListener("click",B,!0),document.removeEventListener("mousemove",F,!0)};let U=!1;const X=()=>{U||(U=!0,setTimeout(()=>{U=!1,"none"!==o.style.display&&(V(),R())}))},Y=()=>{const e=document.createElement("div");t=e.attachShadow({mode:"open"});const u=document.createElement("style");u.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: 640px;\n max-width: calc(100vw - 24px);\n height: 440px;\n max-height: calc(100vh - 24px);\n min-width: 320px;\n min-height: 200px;\n background: var(--bg);\n border: 1px solid var(--border);\n border-radius: 6px;\n overflow: hidden;\n resize: both;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);\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.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 padding: 2px 8px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\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}\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(u),s=_("div","highlight"),t.appendChild(s),r=_("div","pill","\u26a1 LiteVue"),r.onclick=()=>{r.style.display="none",o.style.display="flex",w({open:!0}),X()},t.appendChild(r),o=_("div","panel"),o.style.display="none";const x=_("div","header");x.appendChild(_("span","title","\u26a1 LiteVue")),x.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))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=Math.max(0,t-(e.clientX-i))+"px",o.style.bottom=Math.max(0,r-(e.clientY-l))+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),w({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)}),a=_("button","btn"),a.onclick=()=>{E=C[E];try{localStorage.setItem(y,E)}catch{}O()},x.appendChild(a),L.addEventListener("change",()=>{"system"===E&&O()}),O(),d=_("button","btn"),d.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=()=>v?J():(v=!0,d.classList.add("active"),document.addEventListener("click",B,!0),void document.addEventListener("mousemove",F,!0)),x.appendChild(d);const b=_("button","btn","\u2715");b.onclick=()=>{v&&J(),o.style.display="none",r.style.display="",w({open:!1})},x.appendChild(b),o.appendChild(x);const k=_("div","body"),S=_("div","side"),N=_("div","tabs");p=_("div","tab active"),p.onclick=()=>M("Elements"),c=_("div","tab"),c.onclick=()=>M("Stores"),N.appendChild(p),N.appendChild(c),S.appendChild(N);const T=_("input","filter");T.placeholder="Filter by name",T.oninput=()=>{f=T.value.trim().toLowerCase(),V()},T.onkeydown=e=>{"Escape"===e.key&&(T.value="",f="",V())},S.appendChild(T),i=_("div","tree"),S.appendChild(i),l=_("div","state"),k.appendChild(S),k.appendChild(l),o.appendChild(k),t.appendChild(o);const j=m();if(null!=j.right&&(o.style.right=j.right+"px"),null!=j.bottom&&(o.style.bottom=j.bottom+"px"),j.w&&(o.style.width=j.w+"px"),j.h&&(o.style.height=j.h+"px"),j.open&&(r.style.display="none",o.style.display="flex",X()),"undefined"!=typeof ResizeObserver){let e;new ResizeObserver(()=>{clearTimeout(e),e=setTimeout(()=>{"none"!==o.style.display&&o.offsetWidth&&w({w:o.offsetWidth,h:o.offsetHeight})},300)}).observe(o)}document.body.appendChild(e),n.on("scope:mount",X),n.on("scope:unmount",e=>{e===h&&(h=null),X()}),n.stores&&n.on("store:register",X),n.on("flush",X)},q=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?Y():addEventListener("DOMContentLoaded",Y)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};q(),e.init=q,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
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,u=null,f=null,g=!1,v="",x="Elements",b="float",y="",m="",w="",k="",C=e=>'<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">'+e+"</svg>",L="litevue-devtools-theme",E="litevue-devtools-ui",O=()=>{try{return JSON.parse(localStorage.getItem(E)||"{}")}catch{return{}}},S=e=>{try{localStorage.setItem(E,JSON.stringify({...O(),...e}))}catch{}},_={dark:C('<path d="M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z"/>'),light:C('<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:C('<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"/>')},z={float:C('<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:C('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="2" y="14" width="20" height="7" fill="currentColor"/>'),right:C('<rect x="2" y="3" width="20" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" fill="currentColor"/>')},M={float:"bottom",bottom:"right",right:"float"},$={float:"floating",bottom:"docked to bottom",right:"docked to right"},j={dark:"light",light:"system",system:"dark"},N="dark";try{const e=localStorage.getItem(L);"light"!==e&&"system"!==e||(N=e)}catch{}var T=matchMedia("(prefers-color-scheme: light)"),P=()=>{const e="light"===N||"system"===N&&T.matches;t.host.classList.toggle("light",e),a.innerHTML=_[N],a.title="theme: "+N},I=new Set,D=new WeakSet,V=e=>{"float"===b&&(y=o.style.width||y,m=o.style.height||m,w=o.style.right||w,k=o.style.bottom||k),b=e;const n="float"!==e;o.classList.toggle("dock-bottom","bottom"===e),o.classList.toggle("dock-right","right"===e),o.style.right=n?"":w,o.style.bottom=n?"":k,o.style.width="bottom"===e?"":y,o.style.height="right"===e?"":m,p.innerHTML=z[e],p.title="panel: "+$[e]},R=(e,n,t)=>{const o=document.createElement(e);return o.className=n,null!=t&&(o.textContent=t),o},H=e=>{const n=R("span","label");return n.appendChild(R("span","punct","<")),n.appendChild(R("span","name",q(e))),n.appendChild(R("span","punct",">")),n},W=e=>{let t=e.parentElement;for(;t;){if(n.scopes.has(t))return t;t=t.parentElement}return null},A=(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)},B=e=>{let n;try{n=void 0===e?"undefined":JSON.stringify(e)??String(e)}catch(t){n=String(e)}return n.length>60?n.slice(0,60)+"\u2026":n},F=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`},J=()=>{s.style.display="none"},U=e=>{e!==u&&I.clear(),f=null,u=e,x="Elements",window.$scope=e?n.scopes.get(e):void 0,G(),K()},X=e=>{e!==f&&I.clear(),u=null,f=e,x="Stores",window.$scope=n.stores.get(e),G(),K()},Y=e=>{x=e,G()},q=e=>n.names.get(e)||e.id||e.tagName.toLowerCase(),G=()=>{if((()=>{const e=n.stores?n.stores.size:0;c.textContent=`Elements (${n.scopes.size})`,c.className="Elements"===x?"tab active":"tab",h.textContent=`Stores (${e})`,h.className="Stores"===x?"tab active":"tab"})(),i.textContent="","Elements"===x){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(!v||q(i).toLowerCase().includes(v))t.set(i,void 0);else{const e=A(n.scopes.get(i),v);e&&t.set(i,e)}if(!t.size)return void i.appendChild(R("div","empty",v?"no matching scopes":"no scopes mounted"));const o=new Set;for(const n of t.keys()){o.add(n);for(let e=W(n);e;e=W(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=W(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(D.has(n))return!0;return!1};for(const s of e){if(!o.has(s)||a(s))continue;const e=R("div",s===u?"row sel":"row");e.style.paddingLeft=8+12*(d.get(s)??0)+"px";const r=D.has(s);if(l.get(s)){const n=R("span",r?"arrow":"arrow open","\u25b6");n.onclick=e=>{e.stopPropagation(),r?D.delete(s):D.add(s),G()},e.appendChild(n)}else e.appendChild(R("span","spacer"));e.appendChild(H(s));const p=n.exps.get(s);p&&e.appendChild(R("span","exp"," "+p));const c=t.get(s);c&&e.appendChild(R("span","hit"," "+c)),e.onclick=()=>U(s),e.onmouseenter=()=>F(s),e.onmouseleave=J,i.appendChild(e)}return}const e=new Map;for(const o of n.stores?n.stores.keys():[])if(!v||o.toLowerCase().includes(v))e.set(o,void 0);else{const t=A(n.stores.get(o),v);t&&e.set(o,t)}const t=[...e.keys()];if(t.length)for(const n of t){const t=R("div",n===f?"row sel":"row"),o=R("span","label");o.appendChild(R("span","punct","$store.")),o.appendChild(R("span","name",n)),t.appendChild(o);const r=e.get(n);r&&t.appendChild(R("span","hit"," "+r)),t.onclick=()=>X(n),i.appendChild(t)}else i.appendChild(R("div","empty",v?"no matching stores":"no stores registered"))},K=()=>{if(l.contains(t.activeElement))return;l.textContent="";const e=f?n.stores.get(f):u?n.scopes.get(u):void 0;if(!e)return void l.appendChild(R("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=>Z(n,e,n,0,"prop",[])),r.length&&(l.appendChild(R("div","divider","inherited")),r.forEach(n=>Z(n,e,n,0,"prop inherited",[]))),o.length||r.length||l.appendChild(R("div","empty","empty scope")),l.appendChild(Q(e))},Q=e=>{const n=R("div","prop adder");n.appendChild(R("span","spacer"));const t=R("input","val key-in");t.placeholder="key";const o=R("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(),ie(),setTimeout(()=>{const e=l.querySelector(".adder .key-in");e&&e.focus()})})()},n.appendChild(t),n.appendChild(o),n},Z=(e,n,t,o,r,i)=>{const d=n[e],a=R("div",r);if(a.style.paddingLeft=8+14*o+"px",null!==d&&"object"==typeof d){const s=i.indexOf(d)>-1,p=!s&&I.has(t);if(a.appendChild(R("span",p?"arrow open":"arrow","\u25b6")),a.appendChild(R("span","key",e)),a.appendChild(R("span","preview",s?"(circular)":(e=>Array.isArray(e)?`(${e.length}) ${B(e)}`:B(e))(d))),s||(a.classList.add("toggle"),a.onclick=()=>{p?I.delete(t):I.add(t),K()}),ee(a,n,e,o,r),l.appendChild(a),p){const e=Object.keys(d);if(!e.length){const e=R("div","muted","(empty)");e.style.paddingLeft=22+14*(o+1)+"px",l.appendChild(e)}for(const n of e)Z(n,d,t+"."+n,o+1,r,i.concat([d]))}return}a.appendChild(R("span","spacer")),a.appendChild(R("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(R("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(R("span","preview",B(d)));else if("boolean"==typeof d){a.appendChild(R("span","bool",String(d)));const t=R("input","check");t.type="checkbox",t.checked=d,t.onchange=()=>{n[e]=t.checked,t.blur(),ie()},a.appendChild(t)}else{const t=R("input","val");t.value=B(d),t.onfocus=()=>{t.value="string"==typeof d?d:String(d)},t.onkeydown=e=>{"Enter"===e.key&&t.blur(),"Escape"===e.key&&(t.value=B(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,ie()):t.value=B(d)},a.appendChild(t)}ee(a,n,e,o,r),l.appendChild(a)},ee=(e,n,o,r,i)=>{if(0!==r||"prop"!==i)return;const l=Object.getOwnPropertyDescriptor(n,o);if(l&&l.get)return;const d=R("button","del","\u2715");d.title=`delete "${o}"`,d.onclick=e=>{e.stopPropagation();const r=t.activeElement;r&&r.blur&&r.blur(),delete n[o],ie()},e.appendChild(d)},ne=e=>{const o=e.target;if(o===t.host)return;e.preventDefault(),e.stopPropagation(),oe();let r=o;for(;r&&!n.scopes.has(r);)r=r.parentElement;r&&U(r)},te=e=>{let o=e.target;if(o!==t.host){for(;o&&!n.scopes.has(o);)o=o.parentElement;o?F(o):J()}},oe=()=>{g=!1,d.classList.remove("active"),J(),document.removeEventListener("click",ne,!0),document.removeEventListener("mousemove",te,!0)},re=!1,ie=()=>{re||(re=!0,setTimeout(()=>{re=!1,"none"!==o.style.display&&(G(),K())}))},le=()=>{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: 640px;\n max-width: calc(100vw - 24px);\n height: 440px;\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 resize: both;\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 resize: vertical;\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 resize: horizontal;\n}\n.panel.dock-bottom .header,\n.panel.dock-right .header {\n cursor: default;\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.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=R("div","highlight"),t.appendChild(s),(r=R("div","pill","\u26a1 LiteVue")).onclick=()=>{r.style.display="none",o.style.display="flex",S({open:!0}),ie()},t.appendChild(r),(o=R("div","panel")).style.display="none";const x=R("div","header");x.appendChild(R("span","title","\u26a1 LiteVue")),x.addEventListener("mousedown",e=>{if(e.target.closest(".btn"))return;if("float"!==b)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=Math.max(0,t-(e.clientX-i))+"px",o.style.bottom=Math.max(0,r-(e.clientY-l))+"px"},a=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",a),S({right:parseInt(o.style.right)||12,bottom:parseInt(o.style.bottom)||12})};document.addEventListener("mousemove",d),document.addEventListener("mouseup",a)}),(p=R("button","btn")).onclick=()=>{V(M[b]),S({dock:b})},x.appendChild(p),(a=R("button","btn")).onclick=()=>{N=j[N];try{localStorage.setItem(L,N)}catch{}P()},x.appendChild(a),T.addEventListener("change",()=>{"system"===N&&P()}),P(),(d=R("button","btn")).title="pick an element on the page",d.innerHTML=C('<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=()=>g?oe():(g=!0,d.classList.add("active"),document.addEventListener("click",ne,!0),void document.addEventListener("mousemove",te,!0)),x.appendChild(d);const E=R("button","btn","\u2715");E.onclick=()=>{g&&oe(),o.style.display="none",r.style.display="",S({open:!1})},x.appendChild(E),o.appendChild(x);const _=R("div","body"),z=R("div","side"),$=R("div","tabs");(c=R("div","tab active")).onclick=()=>Y("Elements"),(h=R("div","tab")).onclick=()=>Y("Stores"),$.appendChild(c),$.appendChild(h),z.appendChild($);const I=R("input","filter");I.placeholder="Filter by name or state",I.oninput=()=>{v=I.value.trim().toLowerCase(),G()},I.onkeydown=e=>{"Escape"===e.key&&(I.value="",v="",G())},z.appendChild(I),i=R("div","tree"),z.appendChild(i),l=R("div","state"),_.appendChild(z),_.appendChild(l),o.appendChild(_),t.appendChild(o);const D=O();if(null!=D.right&&(w=o.style.right=D.right+"px"),null!=D.bottom&&(k=o.style.bottom=D.bottom+"px"),D.w&&(y=o.style.width=D.w+"px"),D.h&&(m=o.style.height=D.h+"px"),V(D.dock||"float"),D.open&&(r.style.display="none",o.style.display="flex",ie()),"undefined"!=typeof ResizeObserver){let e;new ResizeObserver(()=>{clearTimeout(e),e=setTimeout(()=>{"none"!==o.style.display&&o.offsetWidth&&S({..."bottom"!==b&&{w:o.offsetWidth},..."right"!==b&&{h:o.offsetHeight}})},300)}).observe(o)}document.body.appendChild(e),n.on("scope:mount",ie),n.on("scope:unmount",e=>{e===u&&(u=null),ie()}),n.stores&&n.on("store:register",ie),n.on("flush",ie)},de=()=>{const e=window.__LITE_VUE__;e?(n=e,document.body?le():addEventListener("DOMContentLoaded",le)):console.warn("[LiteVue devtools] window.__LITE_VUE__ not found \u2014 load LiteVue before the devtools panel script.")};de(),e.init=de});
@@ -1 +1 @@
1
- var LiteVuePlugins=function(e,t){"use strict";const n={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},r=e=>(parseFloat(e)||0)*(e.includes("ms")?1:1e3),s=(e,t)=>{const n=e.split(","),s=t.split(",");let o=0;for(let i=0;i<n.length;i++)o=Math.max(o,r(n[i])+r(s[i%s.length]));return o},o="litevue:",i=Object.create(null);let l="local";const c=e=>{const t=e??l;return"string"!=typeof t?t:i[t]??(e=>{try{if("local"===e||"localStorage"===e)return localStorage;if("session"===e||"sessionStorage"===e)return sessionStorage}catch{}})(t)},a=(e,t,n,r,s)=>{if(!r)return s(()=>{});const o=((e,t)=>(t??Object.keys(e)).filter(t=>{if("$"===t[0])return!1;const n=Object.getOwnPropertyDescriptor(e,t);if(n&&n.get&&!n.set)return!1;const r=n&&n.value;return(!r||!0!==r.__v_isRef||!0!==r.__v_isReadonly)&&"function"!=typeof e[t]}))(e,n);try{const n=JSON.parse(r.getItem(t)||"null");if(n)for(const t of o)t in n&&(e[t]=n[t])}catch{}return s(()=>{const n={};for(const t of o)n[t]=e[t];try{r.setItem(t,JSON.stringify(n))}catch{}})},u=/^(?:v-|:|@)/,f=/^(?::|v-bind:)/,d=["id","data-key","data-id"],v=e=>{for(const t of d){const n=e.getAttribute(t);if(null!=n)return t+"="+n}return null},h=e=>{for(let t=e;t;t=t.parentElement)if(t.__ctx)return t.__ctx},m=e=>e.hasAttribute("v-for")||e.hasAttribute("v-if")||e.hasAttribute("v-else")||e.hasAttribute("v-else-if"),p=(e,t)=>{const n=(e=>{const t=new Set;for(const{name:n}of e.attributes)f.test(n)?t.add(n.replace(f,"").split(".")[0]):"v-model"===n&&(t.add("value"),t.add("checked"));return t})(t);for(const{name:r,value:s}of[...t.attributes])u.test(r)||n.has(r)||e.getAttribute(r)!==s&&e.setAttribute(r,s);for(const{name:r}of[...e.attributes])n.has(r)||t.hasAttribute(r)||e.removeAttribute(r)},g=(e,t,n,r)=>{if(e.nodeType!==t.nodeType)return y(e,t,n);if(3===e.nodeType||8===e.nodeType){const r=t.data;if(((e,t)=>e.includes(t?t.delimiters[0]:"{{"))(r,n))return;return void(e.data!==r&&(e.data=r))}if(1!==e.nodeType)return;const s=e,o=t;if(s.tagName!==o.tagName)return y(e,t,n);r.skip?.(s,o)||s.hasAttribute("data-morph-skip")||(p(s,o),(e=>{if(e.hasAttribute("v-text")||e.hasAttribute("v-html")||e.hasAttribute("v-pre")||e.hasAttribute("v-once")||m(e))return!0;for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(m(t))return!0;return!1})(o)||x(s,o,s.__ctx||n,r))},y=(e,t,n)=>{const r=t.cloneNode(!0);e.parentNode.replaceChild(r,e),b(r,n)},b=(e,t)=>{const n=t||h(e.parentNode);n?.walk?.(e,n)},x=(e,t,n,r)=>{const s=r.key||v,o=new Map;for(let u=e.firstChild;u;u=u.nextSibling)if(1===u.nodeType){const e=s(u);if(null==e)continue;o.set(e,u)}const i=e=>e&&1===e.nodeType?s(e):null;let l=e.firstChild,c=t.firstChild;const a=t=>{const r=t.cloneNode(!0);e.insertBefore(r,l),b(r,n)};for(;c;){const t=c.nextSibling,s=i(c);if(null!=s){const t=o.get(s);t?(t===l?l=l.nextSibling:e.insertBefore(t,l),o.delete(s),g(t,c,n,r)):a(c)}else if(l&&null==i(l)){const e=l.nextSibling;g(l,c,n,r),l=e}else a(c);c=t}for(;l;){const t=l.nextSibling;e.removeChild(l),l=t}},S=(e,t,n={})=>{let r;if("string"==typeof t){const n=document.createElement("template");n.innerHTML=t.trim();const s=n.content;r=1===s.childElementCount?s.firstElementChild:(()=>{const t=e.cloneNode(!1);return t.appendChild(s),t})()}else r=t;if(r){const t=A();g(e,r,h(e),n),t()}return e},A=()=>{const e=document.activeElement;if(!e||e===document.body)return()=>{};const t=e;let n=null,r=null;try{n=t.selectionStart,r=t.selectionEnd}catch{}return()=>{if(e!==document.activeElement&&e.isConnected&&(e.focus(),null!==n))try{t.setSelectionRange(n,r)}catch{}}};return e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:n,modifiers:r})=>{const s=e;let o=250;for(const c in r||{}){const e=/^duration-(\d+)$/.exec(c);e&&(o=+e[1])}s.style.overflow="hidden";let i=!0,l=0;n(()=>{const e=!!t(),n=++l;if(i)return i=!1,e||(s.style.height="0px"),void setTimeout(()=>{s.style.transition=`height ${o}ms ease`});e?(s.style.height=s.scrollHeight+"px",setTimeout(()=>{n===l&&(s.style.height="")},o)):(s.style.height=s.scrollHeight+"px",s.offsetHeight,s.style.height="0px")})})},e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:r})=>{n(()=>{const n=!!t();Promise.resolve().then(()=>{n&&(e.focus(),r?.select&&e.select&&e.select())})})}),e.directive("trap",({el:e,get:t,effect:n})=>{let r=!1,s=null;const o=()=>[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(e=>!e.hasAttribute("disabled")),i=t=>{if("Tab"!==t.key)return;const n=o();if(!n.length)return void t.preventDefault();const r=n[0],s=n[n.length-1],i=document.activeElement;e.contains(i)?t.shiftKey&&i===r?(t.preventDefault(),s.focus()):t.shiftKey||i!==s||(t.preventDefault(),r.focus()):(t.preventDefault(),r.focus())},l=()=>{r=!1,document.removeEventListener("keydown",i,!0),s&&s.focus&&s.focus()};return n(()=>{const n=!!t();n&&!r?(r=!0,s=document.activeElement,document.addEventListener("keydown",i,!0),Promise.resolve().then(()=>{r&&(o()[0]||e).focus()})):!n&&r&&l()}),()=>{r&&l()}})},e.intersect=e=>{e.directive("intersect",({el:e,get:t,modifiers:n})=>{const r=new IntersectionObserver(e=>{for(const s of e){(n?.leave?!s.isIntersecting:s.isIntersecting)&&(t(),n?.once&&r.disconnect())}},{threshold:n?.full?1:0});return r.observe(e),()=>r.disconnect()})},e.mask=e=>{e.directive("mask",({el:e,exp:t})=>{const r=e,s=()=>{const e=((e,t)=>{let r="",s="",o=0;for(let i=0;i<t.length;i++){const l=n[t[i]];if(l){for(;o<e.length&&!l.test(e[o]);)o++;if(o>=e.length)break;r+=s+e[o++],s=""}else s+=t[i],e[o]===t[i]&&o++}return r})(r.value,t);e!==r.value&&(r.value=e)};return e.addEventListener("input",s),s(),()=>e.removeEventListener("input",s)})},e.morph=S,e.morphPlugin=e=>{e.scope.$morph=S},e.persist=e=>{e.directive("persist",({ctx:e,el:t,exp:n,arg:r,modifiers:s,effect:i})=>{const l=o+(n||t.id);let u;for(const o in s||{})if(c(o)){u=o;break}const f=r?r.split(",").map(e=>e.trim()).filter(Boolean):void 0;a(e.scope,l,f,c(u),i)})},e.persistStore=(e,n={})=>{const r=t.store(e);if(!r)return()=>{};const s=c(n.storage);return a(r,o+(n.key??e),n.keys,s,t.watchEffect)},e.registerStorage=(e,t)=>{i[e]=t},e.setDefaultStorage=e=>{l=e},e.transition=e=>{e.directive("transition",({el:e,get:t,effect:n,arg:r,modifiers:o,exp:i})=>{const l=e,c=r||"v",a=e=>`${c}-${e}`;let u=0,f=!0;const d=()=>{l.classList.remove(a("enter-from"),a("enter-active"),a("enter-to"),a("leave-from"),a("leave-active"),a("leave-to"))},v=(e,t)=>{const n=++u;d(),l.classList.add(a(e+"-from"),a(e+"-active")),l.offsetWidth,l.classList.remove(a(e+"-from")),l.classList.add(a(e+"-to")),setTimeout(()=>{n===u&&(d(),t&&t())},(e=>{const t=getComputedStyle(e);return Math.max(s(t.transitionDuration,t.transitionDelay),s(t.animationDuration,t.animationDelay))})(l))};if(!i)return Promise.resolve().then(()=>v("enter")),l.__leave=()=>new Promise(e=>v("leave",e)),()=>{delete l.__leave};n(()=>{const e=!!t();if(f)return f=!1,l.style.display=e?"":"none",void(e&&o?.appear&&v("enter"));e?(l.style.display="",v("enter")):v("leave",()=>{l.style.display="none"})})})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({},LiteVue);
1
+ var LiteVuePlugins=function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},r=e=>(parseFloat(e)||0)*(e.includes("ms")?1:1e3),o=(e,t)=>{const n=e.split(","),o=t.split(",");let i=0;for(let s=0;s<n.length;s++)i=Math.max(i,r(n[s])+r(o[s%o.length]));return i},i="litevue:",s=Object.create(null),c="local",l=e=>{const t=e??c;return"string"!=typeof t?t:s[t]??(e=>{try{if("local"===e||"localStorage"===e)return localStorage;if("session"===e||"sessionStorage"===e)return sessionStorage}catch{}})(t)},a=(e,t,n,r,o)=>{if(!r)return o(()=>{});const i=((e,t)=>(t??Object.keys(e)).filter(t=>{if("$"===t[0])return!1;const n=Object.getOwnPropertyDescriptor(e,t);if(n&&n.get&&!n.set)return!1;const r=n&&n.value;return(!r||!0!==r.__v_isRef||!0!==r.__v_isReadonly)&&"function"!=typeof e[t]}))(e,n);try{const n=JSON.parse(r.getItem(t)||"null");if(n)for(const t of i)t in n&&(e[t]=n[t])}catch{}return o(()=>{const n={};for(const t of i)n[t]=e[t];try{r.setItem(t,JSON.stringify(n))}catch{}})},f=/^(?:v-|:|@)/,u=/^(?::|v-bind:)/,d=["id","data-key","data-id"],m=e=>{for(const t of d){const n=e.getAttribute(t);if(null!=n)return t+"="+n}return null},p=e=>{for(let t=e;t;t=t.parentElement)if(t.__ctx)return t.__ctx},v=e=>e.hasAttribute("v-for")||e.hasAttribute("v-if")||e.hasAttribute("v-else")||e.hasAttribute("v-else-if"),h=(e,t)=>{const n=(e=>{const t=new Set;for(const{name:n}of e.attributes)u.test(n)?t.add(n.replace(u,"").split(".")[0]):"v-model"===n&&(t.add("value"),t.add("checked"));return t})(t);for(const{name:r,value:o}of[...t.attributes])f.test(r)||n.has(r)||e.getAttribute(r)!==o&&e.setAttribute(r,o);for(const{name:r}of[...e.attributes])n.has(r)||t.hasAttribute(r)||e.removeAttribute(r)},b=(e,t,n,r)=>{if(e.nodeType!==t.nodeType)return g(e,t,n);if(3===e.nodeType||8===e.nodeType){const r=t.data;if(((e,t)=>e.includes(t?t.delimiters[0]:"{{"))(r,n))return;return void(e.data!==r&&(e.data=r))}if(1!==e.nodeType)return;const o=e,i=t;if(o.tagName!==i.tagName)return g(e,t,n);r.skip?.(o,i)||o.hasAttribute("data-morph-skip")||(h(o,i),(e=>{if(e.hasAttribute("v-text")||e.hasAttribute("v-html")||e.hasAttribute("v-pre")||e.hasAttribute("v-once")||v(e))return!0;for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(v(t))return!0;return!1})(i)||k(o,i,o.__ctx||n,r))},g=(e,t,n)=>{const r=t.cloneNode(!0);n?.dispose?.(e),e.parentNode.replaceChild(r,e),y(r,n)},y=(e,t)=>{const n=t||p(e.parentNode);n?.walk?.(e,n)},k=(e,t,n,r)=>{const o=r.key||m,i=new Map;for(let f=e.firstChild;f;f=f.nextSibling)if(1===f.nodeType){const e=o(f);if(null==e)continue;i.set(e,f)}const s=e=>e&&1===e.nodeType?o(e):null;let c=e.firstChild,l=t.firstChild;const a=t=>{const r=t.cloneNode(!0);e.insertBefore(r,c),y(r,n)};for(;l;){const t=l.nextSibling,o=s(l);if(null!=o){const t=i.get(o);t?(t===c?c=c.nextSibling:e.insertBefore(t,c),i.delete(o),b(t,l,n,r)):a(l)}else if(c&&null==s(c)){const e=c.nextSibling;b(c,l,n,r),c=e}else a(l);l=t}for(;c;){const t=c.nextSibling;n?.dispose?.(c),e.removeChild(c),c=t}},x=(e,t,n={})=>{let r;if("string"==typeof t){const n=document.createElement("template");n.innerHTML=t.trim();const o=n.content;r=1===o.childElementCount?o.firstElementChild:(()=>{const t=e.cloneNode(!1);return t.appendChild(o),t})()}else r=t;if(r){const t=w();b(e,r,p(e),n),t()}return e},w=()=>{const e=document.activeElement;if(!e||e===document.body)return()=>{};const t=e;let n=null,r=null;try{n=t.selectionStart,r=t.selectionEnd}catch{}return()=>{if(e!==document.activeElement&&e.isConnected&&(e.focus(),null!==n))try{t.setSelectionRange(n,r)}catch{}}},S={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},E=Object.freeze({...S}),O={mobile:"base",tablet:"md",desktop:"lg"},A=/^\d+$/,L=(0,t.reactive)({bp:"base",tick:0}),$={...S},T=["base"],_=!1,j=[],q=new Map,P=()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia,C=(e,t)=>e.addEventListener?(e.addEventListener("change",t),{mql:e,off:()=>e.removeEventListener("change",t)}):(e.addListener(t),{mql:e,off:()=>e.removeListener(t)}),D=()=>{for(let e=j.length-1;e>=0;e--)if(j[e].mql.matches)return T[e+1];return"base"},M=()=>{j.forEach(e=>e.off()),j=[];const e=Object.keys($).filter(e=>$[e]>0).sort((e,t)=>$[e]-$[t]);T=["base",...e],P()&&(j=e.map(e=>{const t=window.matchMedia(`(min-width: ${$[e]}px)`);return C(t,()=>{L.bp=D()})}),L.bp=D())},N=()=>{_||(_=!0,M()),L.tick},z=e=>{if(!P())return!1;let t=q.get(e);if(!t){const n=window.matchMedia(e);t=C(n,()=>L.tick++),q.set(e,t)}return t.mql.matches},I=e=>{if("number"==typeof e)return e;if("base"===e)return 0;if(A.test(e))return Number(e);const t=O[e];return void 0!==t?"base"===t?0:$[t]:$[e]},B=e=>{if(e<=0)return!0;const t=T.findIndex(t=>"base"!==t&&$[t]===e);return-1!==t?T.indexOf(L.bp)>=t:(L.tick,z(`(min-width: ${e}px)`))},R=new Set,H=(e,t)=>{let n;N();let r=-1;for(const o of Object.keys(e)){const t=I(o);void 0!==t?t>=r&&B(t)&&(r=t,n=e[o]):(T.join(", "),Object.keys(O).join(", "))}return void 0!==n?n:t},J=e=>{const t=O[e],n=$[t];return void 0!==n?n:S[t]},K=Object.defineProperties((e,t)=>H(e,t),{props:{value:e=>{N();const t={};for(const n of Object.keys(e))t[n]=H(e[n]);return t}},breakpoint:{get:()=>(N(),L.bp),enumerable:!0},device:{get:()=>(N(),B(J("tablet"))?B(J("desktop"))?"desktop":"tablet":"mobile"),enumerable:!0},atLeast:{value:e=>{N();const t=I(e);return void 0!==t&&B(t)}},match:{value:e=>(N(),z(e))},configure:{value:({breakpoints:e})=>{e&&($={...e},_&&(M(),L.tick++))}}}),V=()=>{j.forEach(e=>e.off()),q.forEach(e=>e.off()),j=[],q.clear(),_=!1};return e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:n,modifiers:r})=>{const o=e;let i=250;for(const f in r||{}){const e=/^duration-(\d+)$/.exec(f);e&&(i=+e[1])}o.style.overflow="hidden";let s=!0,c=0;const l=new Set,a=(e,t)=>{const n=setTimeout(()=>{l.delete(n),e()},t);l.add(n)};return n(()=>{const e=!!t(),n=++c;if(s)return s=!1,e||(o.style.height="0px"),void a(()=>{o.style.transition=`height ${i}ms ease`});e?(o.style.height=o.scrollHeight+"px",a(()=>{n===c&&(o.style.height="")},i)):(o.style.height=o.scrollHeight+"px",o.offsetHeight,o.style.height="0px")}),()=>l.forEach(clearTimeout)})},e.defaultBreakpoints=E,e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:r})=>{let o=!0;return n(()=>{const n=!!t();Promise.resolve().then(()=>{o&&n&&(e.focus(),r?.select&&e.select&&e.select())})}),()=>{o=!1}}),e.directive("trap",({el:e,get:t,effect:n})=>{let r=!1,o=null;const i=()=>[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(e=>!e.hasAttribute("disabled")),s=t=>{if("Tab"!==t.key)return;const n=i();if(!n.length)return void t.preventDefault();const r=n[0],o=n[n.length-1],s=document.activeElement;e.contains(s)?t.shiftKey&&s===r?(t.preventDefault(),o.focus()):t.shiftKey||s!==o||(t.preventDefault(),r.focus()):(t.preventDefault(),r.focus())},c=()=>{r=!1,document.removeEventListener("keydown",s,!0),o&&o.focus&&o.focus()};return n(()=>{const n=!!t();n&&!r?(r=!0,o=document.activeElement,document.addEventListener("keydown",s,!0),Promise.resolve().then(()=>{r&&(i()[0]||e).focus()})):!n&&r&&c()}),()=>{r&&c()}})},e.intersect=e=>{e.directive("intersect",({el:e,get:t,modifiers:n})=>{const r=new IntersectionObserver(e=>{for(const o of e)(n?.leave?!o.isIntersecting:o.isIntersecting)&&(t(),n?.once&&r.disconnect())},{threshold:n?.full?1:0});return r.observe(e),()=>r.disconnect()})},e.mask=e=>{e.directive("mask",({el:e,exp:t})=>{const r=e,o=()=>{const e=((e,t)=>{let r="",o="",i=0;for(let s=0;s<t.length;s++){const c=n[t[s]];if(c){for(;i<e.length&&!c.test(e[i]);)i++;if(i>=e.length)break;r+=o+e[i++],o=""}else o+=t[s],e[i]===t[s]&&i++}return r})(r.value,t);e!==r.value&&(r.value=e)};return e.addEventListener("input",o),o(),()=>e.removeEventListener("input",o)})},e.media=(e,t)=>(t?.breakpoints&&JSON.stringify(t.breakpoints),t&&K.configure(t),e.scope.$mq=K,e.scope.$mqProps=K.props,e.scope.$mqAtLeast=K.atLeast,e.scope.$mqMatch=K.match,Object.defineProperty(e.scope,"$mqBreakpoint",{get:()=>K.breakpoint,enumerable:!0,configurable:!0}),Object.defineProperty(e.scope,"$mqDevice",{get:()=>K.device,enumerable:!0,configurable:!0}),V),e.morph=x,e.morphPlugin=e=>{e.scope.$morph=x},e.mq=K,e.persist=e=>{e.directive("persist",({ctx:e,el:t,exp:n,arg:r,modifiers:o,effect:s})=>{const c=i+(n||t.id);let f;for(const i in o||{})if(l(i)){f=i;break}const u=r?r.split(",").map(e=>e.trim()).filter(Boolean):void 0;a(e.scope,c,u,l(f),s)})},e.persistStore=(e,n={})=>{const r=(0,t.store)(e);if(!r)return()=>{};const o=l(n.storage);return a(r,i+(n.key??e),n.keys,o,t.watchEffect)},e.registerStorage=(e,t)=>{s[e]=t},e.resetMedia=()=>{V(),$={...S},T=["base",...Object.keys($).sort((e,t)=>$[e]-$[t])],_=!1,R.clear(),L.bp="base",L.tick=0},e.resize=e=>{e.directive("resize",({el:e,get:t,exp:n})=>{const r=t(`(($width, $height) => { ${n} })`),o=new ResizeObserver(e=>{for(const t of e){const e=t.contentRect;r(e.width,e.height)}});return o.observe(e),()=>o.disconnect()})},e.setDefaultStorage=e=>{c=e},e.transition=e=>{e.directive("transition",({el:e,get:t,effect:n,arg:r,modifiers:i,exp:s})=>{const c=e,l=r||"v",a=e=>`${l}-${e}`;let f,u=0,d=!0;const m=()=>{c.classList.remove(a("enter-from"),a("enter-active"),a("enter-to"),a("leave-from"),a("leave-active"),a("leave-to"))},p=(e,t)=>{const n=++u;m(),c.classList.add(a(e+"-from"),a(e+"-active")),c.offsetWidth,c.classList.remove(a(e+"-from")),c.classList.add(a(e+"-to")),clearTimeout(f),f=setTimeout(()=>{n===u&&(m(),t&&t())},(e=>{const t=getComputedStyle(e);return Math.max(o(t.transitionDuration,t.transitionDelay),o(t.animationDuration,t.animationDelay))})(c))};if(!s){let e=!0;return Promise.resolve().then(()=>{e&&p("enter")}),c.__leave=()=>new Promise(e=>p("leave",e)),()=>{e=!1,clearTimeout(f),delete c.__leave}}return n(()=>{const e=!!t();if(d)return d=!1,c.style.display=e?"":"none",void(e&&i?.appear&&p("enter"));e?(c.style.display="",p("enter")):p("leave",()=>{c.style.display="none"})}),()=>clearTimeout(f)})},e}({},LiteVue);