1import U from"./MImn2Oc5.js";import O from"./BtT3Mur_.js";import J from"./BpG0IlsN.js";import{d as K,e as Q}from"./BUuZjhqo.js";import{g as S}from"./QreC5D3m.js";import{W as X}from"./DNZsKzZC.js";import{o as I}from"./BdmSeYdY.js";import{z as Y,r as d,w as T,u as z,c as x,m as E,l as Z,A as f,V as j,B as ee,a as n,b as o,n as A,d as w,F as L,g as V,C as te,o as l,f as y,t as P,_ as se}from"#entry";import"./MOgB9R2V.js";import"./DkkuzaFX.js";import"./CCkUW_u0.js";import"./uCmhvQh3.js";import"./Chx3igEn.js";const ae={class:"films page"},ie=["onMouseenter","onClick"],oe={class:"project-item--cover"},re=["data-image-url"],ne=["src","alt"],le={class:"project-item--infos"},ce={class:"h3"},me={key:0,class:"h3"},ue=["onClick"],de={class:"project-item--cover"},fe=["data-image-url"],we=["src","alt"],ve={class:"project-item--infos"},_e={class:"h3"},pe={key:0,class:"h3"},ge=Y({__name:"index",async setup(he){let c,v;const m=d("default"),b=d(null),u=d("all"),C=d(null),i=d(new Map),F=([c,v]=T(()=>K()),c=await c,v(),c),q=([c,v]=T(()=>Q()),c=await c,v(),c);z({title:"Films â Chris Macari | Cinematic Projects & Short Films",link:[{rel:"canonical",href:"https://chrismacarifilms.com/films"}]}),z({meta:[{name:"description",content:"Browse Chris Macari's film portfolio â
1cinematic projects, short films, and narrative works directed with a bold visual approach."},{property:"og:title",content:"Films â Chris Macari | Cinematic Projects"},{property:"og:description",content:"Browse Chris Macari's film portfolio â cinematic projects, short films, and narrative works."},{property:"og:url",content:"https://chrismacarifilms.com/films"},{property:"og:image",content:"https://chrismacarifilms.com/meta.jpg"},{name:"twitter:title",content:"Films â Chris Macari"},{name:"twitter:description",content:"Browse Chris Macari's film portfolio â cinematic projects, short films, and narrative works."},{name:"twitter:image",content:"https://chrismacarifilms.com/meta.jpg"}]});const D=x(()=>(q?.film||[]).map(t=>({label:t.title,value:t._id}))),H=t=>{const e=t%12+1;return{1:1200,2:800,3:1800,4:900,5:1200,6:1800,7:1200,8:800,9:800,10:1800,11:800,12:1200}[e]||1200},_=x(()=>{const t=(F.grid||[]).filter(e=>e.type==="film");return u.value==="all"?t:t.filter(e=>Array.isArray(e.filmCategories)&&e.filmCategories.some(s=>s._id===u.value)).sort((e,s)=>(s.date??0)-(e.date??0))}),k=x(()=>{const t=(F.list||[]).filter(e=>e.type==="film");return u.value==="all"?t:t.filter(e=>Array.isArray(e.filmCategories)&&e.filmCategories.some(s=>s._id===u.value))}),p=async()=>{if(j.isMobile||(await f(),!window.webglPlanes))return;window.webglPlanes.clearAll(),window.webglPlanes.restartIntro(50,.6,6),await f();const t=[];i.value.forEach(e=>{const s=e.querySelector("img");s&&!s.complete&&t.push(new Promise(r=>{s.onload=()=>r(),s.onerror=()=>r()}))}),await Promise.all(t),i.value.forEach((e,s)=>{const r=s.replace("-archives","");[..._.value,...k.value].find(a=>a._id===r)?.thumbnail?.asset?.url&&e&&window.webglPlanes.createPlane(e)}),window.webglPlanes.recalcBounds()},N=(t,e)=>{if(e)if(t){const s=t.querySelector(".project-img");s&&i.value.set(e._id,s)}else i.value.delete(e._id)},W=(t,e)=>{if(!e)return;const s=e._id+"-archives";if(t){const r=t.querySelector(".project-img");r&&i.value.set(s,r)}else i.value.delete(s)},$=async t=>{window.lenis&&window.lenis.scrollTo(0,{immediate:!0}),t==="all"?(m.value="default",u.value="all"):(u.value=t,m.value="archives"),await f(),await f(),await p()},G=t=>{b.value=t;const e=i.value.get(t);e&&window.webglPlanes&&window.webglPlanes.setPlaneHover(e,!0)},R=()=>{const t=b.value;if(b.value=null,t){const e=i.value.get(t);e&&window.webglPlanes&&window.webglPlanes.setPlaneHover(e,!1)}};let g;return E(_,async(t,e)=>{clearTimeout(g),t?.length!==e?.length&&(g=setTimeout(async()=>{await p()},50))}),E(k,async(t,e)=>{clearTimeout(g),t?.length!==e?.length&&(g=setTimeout(async()=>{await p()},50))}),Z(async()=>{if(await f(),j.isMobile){window.webglPlanes?.destroy(),window.webglPlanes=null;return}C.value&&(window.webglPlanes?.destroy(),window.webglPlanes=new X(C.value)),await Promise.all(Array.from(i.value.values()).map(t=>{const e=t.querySelector("img");return!e||e.complete?Promise.resolve():new Promise(s=>{e.onload=()=>s(),e.onerror=()=>s()})})),await p()}),ee(()=>{i.value.forEach(t=>{window.webglPlanes?.removePlane(t)}),i.value.clear(),window.webglPlanes?.destroy(),window.webglPlanes=null}),(t,e)=>{const s=U,r=O,B=J;return l(),n("div",ae,[e[0]||(e[0]=o("h1",{class:"sr-only"},"Films â Chris Macari",-1)),o("div",{class:te({grid:m.value==="default","simple-grid":m.value==="archives"})},[m.value==="default"?(l(!0),n(L,{key:0},V(_.value,(a,h)=>(l(),n("div",{class:"project-item",key:a._id,ref_for:!0,ref:M=>N(M,a),onMouseenter:M=>G(a._id),onMouseleave:R,onClick:M=>y(I)(a.url)},[o("div",oe,[o("div",{class:"project-img","data-image-url":a.thumbnail?.asset?.url},[a.thumbnail?.asset?.url?(l(),n("img",{key:0,src:y(S)(a.thumbnail.asset,H(h),80),alt:a.title,crossorigin:"anonymous"},null,8,ne)):w("",!0)],8,re)]),o("div",le,[o("h3",ce,P(a.title),1),a.date?(l(),n("span",me,"©"+P(a.date),1)):w("",!0)])],40,ie))),128)):m.value==="archives"?(l(!0),n(L,{key:1},V(_.value,a=>(l(),n("div",{class:"project-item",key:a._id+"-archives",ref_for:!0,ref:h=>W(h,a),onClick:h=>y(I)(a.url)},[o("div",de,[o("div",{class:"project-img","data-image-url":a.thumbnail?.asset?.url},[a.thumbnail?.asset?.url?(l(),n("img",{key:0,src:y(S)(a.thumbnail.asset,900,80),alt:a.title,crossorigin:"anonymous"},null,8,we)):w("",!0)],8,fe)]),o("div",ve,[o("h3",_e,P(a.title),1),a.date?(l(),n("span",pe,"©"+P(a.date),1)):w("",!0)])],8,ue))),128)):w("",!0)],2),o("div",{class:"plane-imgs",ref_key:"canvas",ref:C},null,512),A(s,{filters:D.value,onSelect:$},null,8,["filters"]),A(r,{projects:k.value},null,8,["projects"]),A(B)])}}}),ze=se(ge,[["__scopeId","data-v-37c31599"]]);export{ze 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.