1import W from"./BpG0IlsN.js";import{z as B,r as v,w as D,c as l,u as P,l as I,A as f,V as M,B as j,a as c,b as n,n as q,t as _,F,g as H,D as z,o as u,f as C,d as k,_ as G}from"#entry";import{d as R,f as U}from"./BUuZjhqo.js";import{g as O}from"./QreC5D3m.js";import{W as T}from"./DNZsKzZC.js";import{o as J}from"./BdmSeYdY.js";import"./MOgB9R2V.js";import"./DkkuzaFX.js";import"./uCmhvQh3.js";import"./Chx3igEn.js";const K={class:"artist-page page"},Q={class:"sr-only"},X={class:"simple-grid"},Y=["onClick","onMouseenter"],Z={class:"project-item--cover"},ee=["data-image-url"],te=["src","alt"],se={class:"project-item--infos"},ae={class:"h3"},ie={key:0,class:"h3"},oe=B({__name:"[slug]",async setup(re){let m,h;const V=z(),d=v(null),w=v(null),i=v(new Map),[y,$]=([m,h]=D(()=>Promise.all([R(),U()])),m=await m,h(),m),p=l(()=>V.params.slug),g=l(()=>$.find(e=>e.title.toLowerCase().replace(/\s+/g,"-")===p.value)),o=l(()=>g.value?.title||"");P({title:`${o.value} â Music Videos by Chris Macari | Director`,link:[{rel:"canonical",href:`https://chrismacarifilms.com/music/artist/${p.value}`}]}),P({meta:[{name:"description",content:`Watch music videos featuring ${o.value}, directed by Chris Macari. Creative visual storytelling and artistic collaboration.`},{property:"og:title",content:`${o.value} â Music Videos by Chris Macari`},{property:"og:description",content:`Watch music videos featuring ${o.value}, directed by Chris Macari.`},{property:"og:url",content:`https://chrismacarifilms.com/music/artist/${p.value}`},{property:"og:image",content:"https://chrismacarifilms.com/meta.jpg"},{name:"twitter:title",content:`${o.value} â Music Videos by Chris Macari`},{name:"twitter:description",content:`Watch music videos featuring ${o.value}, directed by Chris Macari.`},{name:"twitter:image",content:"https://chrismacarifilms.com/meta.jpg"}]});const A=l(()=>{const e=(y.grid||[]).filter(a=>a.type==="music"),s=(y.list||[]).filter(a=>a.type==="music");return[...e,...s]}),b=l(()=>g.value?A.value.filter(e=>Array.isArray(e.artist)&&e.artist.some(s=>s._id===g.value._id)):[]),x=(e,s)=>{const a=s?._id;if(a)if(e){const t=e.querySelector(".project-img");t&&i.value.set(a,t)}else i.value.delete(a)},E=async()=>{if(M.isMobile)return;await f();const e=window.webglPlanes;if(!e)return;e.setLayout("archives"),e.setAcceptNewPlanes(!0),e.clearAll(),e.restartIntro(50,.6,6),await f();const s=[];i.value.forEach(a=>{const t=a.querySelector("img");t&&!t.complete&&s.push(new Promise(r=>{t.onload=()=>r(),t.onerror=()=>r()}))}),await Promise.all(s),i.value.forEach((a,t)=>{b.value.find(S=>S._id===t)?.thumbnail?.asset?.url&&a&&e.createPlane(a)}),e.recalcBounds()},L=e=>{w.value=e;const s=i.value.get(e);s&&window.webglPlanes&&window.webglPlanes.setPlaneHover(s,!0)},N=()=>{const e=w.value;if(w.value=null,e){const s=i.value.get(e);s&&window.webglPlanes&&window.webglPlanes.setPlaneHover(s,!1)}};return I(async()=>{if(await f(),M.isMobile){window.webglPlanes?.destroy(),window.webglPlanes=null;return}d.value&&(window.webglPlanes?.destroy(),window.webglPlanes=new T(d.value),window.webglPlanes.setLayout("archives"),window.webglPlanes.setAcceptNewPlanes(!0));const e=[];i.value.forEach(s=>{const a=s.querySelector("img");a&&!a.complete&&e.push(new Promise(t=>{a.onload=()=>t()}
1))}),await Promise.all(e),await E()}),j(()=>{i.value.forEach(e=>{window.webglPlanes?.removePlane(e)}),i.value.clear(),window.webglPlanes?.destroy(),window.webglPlanes=null}),(e,s)=>{const a=W;return u(),c("div",K,[n("h1",Q,_(o.value)+" â Music Videos by Chris Macari",1),n("div",X,[(u(!0),c(F,null,H(b.value,t=>(u(),c("div",{class:"project-item",key:t._id,ref_for:!0,ref:r=>x(r,t),onClick:r=>C(J)(t.url),onMouseenter:r=>L(t._id),onMouseleave:N},[n("div",Z,[n("div",{class:"project-img","data-image-url":t.thumbnail?.asset?.url},[t.thumbnail?.asset?.url?(u(),c("img",{key:0,src:C(O)(t.thumbnail.asset,900,80),alt:t.title,crossorigin:"anonymous"},null,8,te)):k("",!0)],8,ee)]),n("div",se,[n("h3",ae,_(t.title),1),t.date?(u(),c("span",ie,"©"+_(t.date),1)):k("",!0)])],40,Y))),128))]),n("div",{class:"plane-imgs",ref_key:"canvas",ref:d},null,512),q(a)])}}}),fe=G(oe,[["__scopeId","data-v-2d14425a"]]);export{fe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.