const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/piano-component-o52hRpDk.js","assets/lit-element-BUNo9pnf.js","assets/custom-element-BhZVzxrc.js","assets/state-C9toMb2g.js","assets/property-MreHcJY-.js","assets/query-BApjzB0v.js","assets/three.module-Unazwo7z.js","assets/tslib.es6-h7HTSAm4.js","assets/calculator-DLn03-w9.js","assets/code-editor-DcpYVa1u.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/draggable-dom-DGr2odh4.js","assets/generated-app-BiIEAB40.js","assets/modulepreload-polyfill-B5Qt9EMX.js","assets/lit-force-graph-CFGrtq5z.js","assets/rich-text-D7pCZWly.js","assets/shady-render-CorlzxxM.js","assets/lit-html-table-vKgGpcji.js","assets/app-Bt-dmHaf.js","assets/node-editor-BOHAaH0p.js","assets/sheet-music-DaSY6xDg.js","assets/simple-greeting-BlRtYK3s.js"])))=>i.map(i=>d[i]);
import"./modulepreload-polyfill-B5Qt9EMX.js";const S="modulepreload",I=function(e){return"/rodydavis/lit-examples/"+e},x={},s=function(r,i,y){let u=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));u=Promise.allSettled(i.map(t=>{if(t=I(t),t in x)return;x[t]=!0;const n=t.endsWith(".css"),m=n?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${m}`))return;const c=document.createElement("link");if(c.rel=n?"stylesheet":S,n||(c.as="script"),c.crossOrigin="",c.href=t,o&&c.setAttribute("nonce",o),document.head.appendChild(c),n)return new Promise((L,k)=>{c.addEventListener("load",L),c.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${t}`)))})}))}function p(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return u.then(a=>{for(const o of a||[])o.status==="rejected"&&p(o.reason);return r().catch(p)})},P={"lit-3d-piano":()=>s(()=>import("./piano-component-o52hRpDk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"lit-calculator":()=>s(()=>import("./calculator-DLn03-w9.js"),__vite__mapDeps([8,1,2,4])),"lit-code-editor":()=>s(()=>import("./code-editor-DcpYVa1u.js").then(e=>e.c),__vite__mapDeps([9,1,2,4,10])),"lit-draggable-dom":()=>s(()=>import("./draggable-dom-DGr2odh4.js"),__vite__mapDeps([11,1,2,5])),"lit-file-based-routing":()=>s(()=>import("./generated-app-BiIEAB40.js"),__vite__mapDeps([12,1,2,4,3,13])),"lit-force-graph":()=>s(()=>import("./lit-force-graph-CFGrtq5z.js"),__vite__mapDeps([14,1,2,4,3,5,13])),"lit-html-editor":()=>s(()=>import("./rich-text-D7pCZWly.js"),__vite__mapDeps([15,1,2,4,3,5,7,16])),"lit-html-table":()=>s(()=>import("./lit-html-table-vKgGpcji.js"),__vite__mapDeps([17,1,2,4])),"lit-modules":()=>s(()=>import("./app-Bt-dmHaf.js"),__vite__mapDeps([18,1,2,4])),"lit-node-editor":()=>s(()=>import("./node-editor-BOHAaH0p.js"),__vite__mapDeps([19,1,2,5,4,3])),"lit-sheet-music":()=>s(()=>import("./sheet-music-DaSY6xDg.js"),__vite__mapDeps([20,1,2,4,5,10])),"lit-wmr":()=>s(()=>import("./simple-greeting-BlRtYK3s.js"),__vite__mapDeps([21,1]))},A={"lit-3d-piano":"piano-component","lit-calculator":"app-calculator","lit-code-editor":"code-editor","lit-draggable-dom":"draggable-dom","lit-file-based-routing":"generated-app","lit-force-graph":"lit-force-graph","lit-html-editor":"rich-text","lit-html-table":"lit-html-table","lit-modules":"app-module","lit-node-editor":"node-editor","lit-sheet-music":"sheet-music","lit-wmr":"simple-greeting"},g=document.querySelectorAll(".project-item"),E=document.getElementById("heroState"),w=document.getElementById("viewport"),l=document.getElementById("renderContainer"),d=document.getElementById("iframeWrapper"),f=document.getElementById("previewIframe"),T=document.getElementById("viewportTitle"),h=document.getElementById("extLink"),D=document.getElementById("backBtn");async function b(e,r=!0){const i=document.querySelector(`.project-item[data-slug="${e}"]`);if(!i)return;g.forEach(o=>o.classList.remove("active")),i.classList.add("active");const y=i.getAttribute("data-name"),u=i.getAttribute("data-type"),p=i.getAttribute("href");E.style.display="none",w.style.display="flex",T.textContent=y,v.forEach(o=>o.classList.remove("active"));const a=document.querySelector('.size-btn[data-size="desktop"]');if(a&&a.classList.add("active"),l.className="render-container desktop",d.className="iframe-wrapper desktop",u==="native"){l.style.display="flex",d.className="iframe-wrapper",f.src="about:blank",h.style.display="none",l.innerHTML='
Loading component...
';try{await P[e]();const o=A[e],t=document.createElement(o);if(t.style.width="100%",t.style.height="100%",t.style.minHeight="500px",e==="lit-html-table")t.values=[{id:1,name:"Minimoog Model D",type:"Analog Synthesizer",year:1970,price:"$3,499",status:"In Stock"},{id:2,name:"Roland Juno-106",type:"Polysynth",year:1984,price:"$1,899",status:"Rare"},{id:3,name:"Korg MS-20",type:"Monophonic Semi-Modular",year:1978,price:"$899",status:"In Stock"},{id:4,name:"Sequential Circuits Prophet-5",type:"Polysynth",year:1978,price:"$3,299",status:"Limited"},{id:5,name:"Yamaha DX7",type:"FM Synthesizer",year:1983,price:"$950",status:"Restocking"}],t.editable=!0;else if(e==="lit-code-editor")t.language="javascript",t.code=`import { LitElement, html, css } from 'lit';
import { customElement, property } from 'lit/decorators.js';
@customElement('glowing-button')
export class GlowingButton extends LitElement {
static styles = css\`
button {
background: linear-gradient(135deg, #ff007f, #7f00ff);
color: white;
border: none;
padding: 14px 28px;
font-size: 16px;
font-weight: bold;
border-radius: 30px;
cursor: pointer;
box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
transition: all 0.3s ease;
}
button:hover {
transform: scale(1.05);
box-shadow: 0 0 30px rgba(127, 0, 255, 0.8);
}
\`;
@property() label = 'Interact With Me';
render() {
return html\`\`;
}
}`;else if(e==="lit-draggable-dom")t.innerHTML=`
Design Token
Drag me around the canvas. I'll maintain my position smoothly!
Reactive State
Multitouch support is active. Zoom or pan to navigate.
Physics Grid
Snaps and transforms align to the background mesh.
`;else if(e==="lit-force-graph"){const n=document.createElement("script");n.type="application/json";const m={name:"DeepMind AI Ecosystem",description:"A force-directed graph illustrating Google DeepMind's prominent model architectures and system relationships.",nodes:[{id:"gemini",name:"Gemini 1.5 Pro",group:"Models"},{id:"gemma",name:"Gemma 2",group:"Models"},{id:"alphafold",name:"AlphaFold 3",group:"Scientific"},{id:"imagen",name:"Imagen 3",group:"Creative"},{id:"veo",name:"Veo",group:"Creative"},{id:"agent",name:"Antigravity Agent",group:"Agents"},{id:"workspace",name:"Federated Workspace",group:"Infrastructure"},{id:"lit",name:"Lit Component Library",group:"Infrastructure"}],links:[{source:"gemini",target:"agent"},{source:"agent",target:"workspace"},{source:"workspace",target:"lit"},{source:"gemini",target:"gemma"},{source:"gemini",target:"imagen"},{source:"gemini",target:"veo"},{source:"gemini",target:"alphafold"}]};n.textContent=JSON.stringify(m),t.appendChild(n)}else if(e==="lit-html-editor")t.node.innerHTML=`
Welcome to the Lit Rich Text Editor!
This is a fully custom, native HTML editor built using Lit.
You can use the toolbar above to:
- Apply bold, italic, or underline text formatting
- Create customized lists
- Insert links or blockquotes
"Simple, clean, and blazingly fast." - Modern Web Developer
`;else if(e==="lit-sheet-music"){const n=`
Ode to Joy (Theme)
Piano
1
0
G
2
E
4
1
1
quarter
E
4
1
1
quarter
F
4
1
1
quarter
G
4
1
1
quarter
`;t.updateComplete.then(()=>{t.renderMusic(n)})}if(e==="lit-sheet-music"||e==="lit-wmr"||e==="lit-html-table"?l.style.background="#ffffff":l.style.background="#0d1117",l.innerHTML="",e==="lit-html-table"){const n=document.createElement("script");n.type="application/json";const m=[{id:1,name:"Minimoog Model D",type:"Analog Synthesizer",year:1970,price:"$3,499",status:"In Stock"},{id:2,name:"Roland Juno-106",type:"Polysynth",year:1984,price:"$1,899",status:"Rare"},{id:3,name:"Korg MS-20",type:"Monophonic Semi-Modular",year:1978,price:"$899",status:"In Stock"},{id:4,name:"Sequential Circuits Prophet-5",type:"Polysynth",year:1978,price:"$3,299",status:"Limited"},{id:5,name:"Yamaha DX7",type:"FM Synthesizer",year:1983,price:"$950",status:"Restocking"}];n.textContent=JSON.stringify(m),l.appendChild(n)}l.appendChild(t)}catch(o){console.error("ESM Direct Render Error:",o),l.innerHTML=`
Direct Render Failed
${o.message}
`}}else l.style.display="none",d.className="iframe-wrapper show",f.src=p,h.style.display="flex",h.href=p;r&&history.pushState({slug:e},"",`?demo=${e}`)}const v=document.querySelectorAll(".size-btn");v.forEach(e=>{e.addEventListener("click",()=>{v.forEach(i=>i.classList.remove("active")),e.classList.add("active");const r=e.getAttribute("data-size");l.className="render-container "+r,d.className="iframe-wrapper "+r,(d.classList.contains("show")||f.src!=="about:blank")&&d.classList.add("show")})});function _(e=!0){g.forEach(r=>r.classList.remove("active")),l.innerHTML="",f.src="about:blank",w.style.display="none",E.style.display="flex",e&&history.pushState(null,"",window.location.pathname)}g.forEach(e=>{e.addEventListener("click",r=>{r.preventDefault();const i=e.getAttribute("data-slug");b(i)})});D.addEventListener("click",()=>{_()});const M=document.getElementById("search");M.addEventListener("input",e=>{const r=e.target.value.toLowerCase();g.forEach(i=>{i.getAttribute("data-name").toLowerCase().includes(r)?i.style.display="flex":i.style.display="none"})});window.addEventListener("load",()=>{const r=new URLSearchParams(window.location.search).get("demo");r&&b(r,!1)});window.addEventListener("popstate",e=>{const i=new URLSearchParams(window.location.search).get("demo");i?b(i,!1):_(!1)});export{s as _};