1var e=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),t=(e,t,n)=>e+(t-e)*n,n=(e,t)=>(e%t+t)%t;function r(e,t=12,n=.9){if(e<=0)return 0;if(n>=1)return 1-Math.exp(-t*e)*(1+t*e);let r=Math.sqrt(1-n*n),i=t*r;return 1-Math.exp(-n*t*e)*(Math.cos(i*e)+n/r*Math.sin(i*e))}var i=1.6,a=.3,o=150;function s(e){let t=e.filter(e=>e.dur<=70);for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}let n=[],r=(e,t)=>{for(let r of e){if(n.length===t)break;n.some(e=>e.who===r.who)||n.push(r)}};return r(t.filter(e=>e.dur<=32),5),r(t.filter(e=>e.dur>32),7),r(t,7),n}async function c(c){let l=c.querySelector(`.stage`);await new Promise(e=>{let t=new IntersectionObserver(([n])=>{n.isIntersecting&&(t.disconnect(),e())},{rootMargin:`600px`});t.observe(c)});try{let e=await fetch(`/hope-clips.json`,{cache:`no-cache`});if(!e.ok)throw Error(`Hope clips: ${e.status}`);let t=s(await e.json());if(t.length){let e=l.querySelector(`.screen`),n=e.getAttributeNames().find(e=>e.startsWith(`data-astro-cid-`)),r=(e,t=``)=>{let r=document.createElement(e);return t&&(r.className=t),n&&r.setAttribute(n,``),r},i=t.map((e,t)=>{let n=r(`section`,`screen`);n.dataset.src=e.src,n.dataset.at=String(e.at),n.dataset.dur=String(e.dur),n.dataset.label=`${e.who}, ${e.ep}`,n.setAttribute(`aria-hidden`,String(t!==0));let i=r(`header`,`who`);if(e.face){let t=r(`img`,`av`);t.src=e.face,t.alt=``,t.width=t.height=88,t.loading=`lazy`,t.decoding=`async`,i.append(t)}else{let t=r(`span`,`av mono`);t.textContent=e.who.split(/\s+/).filter(e=>/^[A-Z]/.test(e)).map(e=>e[0]).slice(0,2).join(``),t.setAttribute(`aria-hidden`,`true`),i.append(t)}let a=r(`span`,`name`),o=r(`a`,`ep`);a.textContent=e.who,o.textContent=e.ep,o.href=e.sourceHref,o.target=`_blank`,o.rel=`noopener`,o.setAttribute(`aria-label`,`${e.sourceLabel}: ${e.ep}`),i.append(a,o);let s=r(`div`,`window`),c=r(`div`,`col`),l=new Set(e.phrases.map(e=>e.spk)).size>1;return e.phrases.forEach((t,n)=>{let i=r(`p`,`ph`);if(l&&(n===0||e.phrases[n-1].spk!==t.spk)){let e=r(`span`,t.spk===`Henry`?`spk host`:`spk`);e.textContent=t.spk,i.append(e)}t.text.split(` `).forEach((e,n)=>{let a=r(`span`,`w${t.em?.includes(n)?` em`:``}${t.strong?.includes(n)?` strong`:``}`);a.dataset.t=String(t.t[n]),a.textContent=e,i.append(a,` `)}),c.append(i)}),s.append(c),n.append(i,s),n});e.replaceWith(...i)}}catch(e){console.warn(`Hope reel is using its first clip.`,e)}let u=c.querySelector(`audio`),d=e=>c.querySelector(e),f=d(`.sound`),p=d(`.pause`),m=d(`.said`),h=d(`.progress i`),g=matchMedia(`(prefers-reduced-motion: reduce)`).matches,_=[...c.querySelectorAll(`.screen`)].map(e=>({node:e,window:e.querySelector(`.window`),src:e.dataset.src,at:Number(e.dataset.at),dur:Number(e.dataset.dur),label:e.dataset.label,active:-1,lines:[...e.querySelectorAll(`.ph`)].map(e=>{let t=[...e.querySelectorAll(`.w`)];return{node:e,words:t,t:t.map(e=>Number(e.dataset.t)),tint:t.map(()=>``),top:0}})})),v=_.length,y=()=>_.forEach(e=>e.lines.forEach(e=>{e.top=e.node.offsetTop})),b=`muted`,x=0,S=0,C=_.map(()=>0),w={from:0,to:0,at:-10},T=-10,E=0,D=0;function O(e){return u.currentTime!==E&&(E=u.currentTime,D=e),u.paused?E:E+Math.min(e-D,.25)}let k=e=>b===`sound`?O(e):S,A=null;function j(e,t){let n=new URL(_[e].src,location.href).href;u.src===n?u.currentTime=E=t:(u.src=n,A=t,E=t),u.play().catch(e=>{e.name!==`AbortError`&&M(`muted`)}),fetch(_[(e+1)%v].src).catch(()=>{})}u.addEventListener(`loadedmetadata`,()=>{A!==null&&(u.currentTime=A,A=null)});function M(e){b=e,T=performance.now()/1e3;let t=e===`sound`||e===`paused-sound`,n=e===`paused-muted`||e===`paused-sound`;f.setAttribute(`aria-pressed`,String(t)),f.setAttribute(`aria-label`,t?`Turn sound off`:`Turn sound on`),p.setAttribute(`aria-pressed`,String(n)),p.setAttribute(`aria-label`,n?`Resume captions`:`Pause captions`),p.setAttribute(`title`,n?`Resume captions`:`Pause captions`),G()}function N(){let e=performance.now()/1e3;if(b===`sound`){S=O(e),M(`muted`),u.pause();return}if(b===`paused-sound`){M(`paused-muted`);return}S>_[x].dur-.5&&(S=0),M(`sound`),j(x,S)}function P(){b===`sound`?(S=O(performance.now()/1e3),M(`paused-sound`),u.pause()):b===`muted`?M(`paused-muted`):b===`paused-sound`?(M(`sound`),j(x,S)):M(`muted`)}function F(e){let t=performance.now()/1e3;C[x]=k(t),w={from:I(t),to:w.to+e,at:t},x=n(w.to,v),S=C[x]=0,_.forEach((e,t)=>{if(e.node.setAttribute(`aria-hidden`,String(t!==x)),g){let n=e.node.querySelector(`.window`);n.tabIndex=t===x?0:-1,n.scrollTop=0}}
1),m.textContent=_[x].label,b===`sound`&&j(x,0),G()}let I=e=>g?w.to:t(w.from,w.to,r(e-w.at,9,.96));function L(t){h.style.width=`${((x+e(t/_[x].dur))/v*100).toFixed(2)}%`}function R(t,n){let i=_[t];if(g)return;let s=0;for(let e=1;e<i.lines.length&&i.lines[e].t[0]<=n;e++)s=e;s!==i.active&&(i.lines.forEach((e,t)=>{e.node.classList.toggle(`current`,t===s),t!==s&&e.words.forEach((t,n)=>{t.style.color=``,e.tint[n]=``})}),i.active=s);let c=i.lines[s];c.words.forEach((t,r)=>{let i=e((n-c.t[r])/.15),a=i>=1?``:i<=0?`var(--pending)`:`color-mix(in oklab, var(--ink) ${Math.round(i*100)}%, var(--pending))`;c.tint[r]!==a&&(t.style.color=a,c.tint[r]=a)});let l=i.lines[0].top;i.lines.forEach((e,t)=>{t>0&&(l+=(e.top-i.lines[t-1].top)*r(n-e.t[0]+a,11,.9))}),i.window.scrollTop=Math.max(0,l-o)}function z(t){let r=I(t),i=k(t);_.forEach((t,a)=>{let o=n(a-r+v/2,v)-v/2,s=e(1-Math.abs(o)*1.7);if(s<=0){t.node.style.visibility=`hidden`;return}t.node.style.visibility=``,t.node.style.transform=Math.abs(o)<.001?``:`translateY(${(o*280).toFixed(2)}px)`,t.node.style.opacity=s<1?s.toFixed(3):``,R(a,a===x?i:C[a])}),L(i)}let B=!1,V=!1,H=0,U=0;function W(){let t=performance.now()/1e3,n=e(t-H,0,.1);H=t,b===`muted`&&!g&&(S+=n,S>_[x].dur+i&&F(1)),z(t);let r=(g||b===`paused-muted`||b===`paused-sound`)&&t-Math.max(w.at,T,U)>1.5;B&&!r?requestAnimationFrame(W):V=!1}function G(){V||!B||!c.classList.contains(`live`)||(V=!0,H=U=performance.now()/1e3,requestAnimationFrame(W))}c.querySelector(`.next`).addEventListener(`click`,()=>F(1)),f.addEventListener(`click`,N),p.addEventListener(`click`,P),u.addEventListener(`pause`,()=>{u.paused&&!u.ended&&b===`sound`&&(S=u.currentTime,M(`muted`))}),u.addEventListener(`ended`,()=>{b===`sound`&&F(1)}),new ResizeObserver(()=>l.style.setProperty(`--k`,String(c.clientWidth/1080))).observe(c),new IntersectionObserver(([e])=>{B=e.isIntersecting,!B&&b===`sound`&&(S=u.currentTime,M(`muted`),u.pause()),G()},{threshold:.25}).observe(c),document.addEventListener(`visibilitychange`,()=>{document.hidden&&b===`sound`&&(S=u.currentTime,M(`muted`),u.pause())}),document.fonts.ready.then(()=>{c.classList.toggle(`still`,g),c.classList.add(`live`),g&&_.forEach((e,t)=>{e.node.querySelector(`.window`).tabIndex=t===x?0:-1}),y(),z(performance.now()/1e3),G()})}for(let e of document.querySelectorAll(`[data-hope-reel]`))c(e);
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.