PageSourceSearch

https://worlddatalab.org/assets/news._slug-DuWAyuK-.js

js worlddatalab.org collected 2026-10-06 19:57:16 UTC 9,554 bytes, 1 lines download raw bytes

1import{f as h,s as p,N as f,j as e,L as d,g,r as m}from"./index-BWYGwfnM.js";import{R as x}from"./reveal-BCaO3sA6.js";const j="⁰¹²³⁴⁵⁶⁷⁸⁹",b=/([⁰¹²³⁴⁵⁶⁷⁸⁹]+)/g;function N(l){l.preventDefault();const i=document.getElementById("references");i&&(i.scrollIntoView({behavior:"smooth",block:"start"}),history.pushState(null,"","#references"))}function y(l,i){const o=l.match(/^\[([^\]]+)\]\(([^)]+)\)$/);if(o)return e.jsx("a",{href:o[2],target:"_blank",rel:"noreferrer",className:"text-primary underline decoration-primary/40 underline-offset-4 hover:decoration-primary",children:o[1]},i);const r=l.match(/^\*\*([^*]+)\*\*$/);if(r)return e.jsx("strong",{className:"font-semibold text-foreground",children:r[1]},i);const s=l.split(b);return s.length<=1?e.jsx("span",{children:l},i):e.jsx("span",{children:s.map((t,a)=>t?/^[⁰¹²³⁴⁵⁶⁷⁸⁹]+$/.test(t)?e.jsx("a",{href:"#references",onClick:N,className:"ml-0.5 align-super text-sm text-primary underline decoration-primary/40 underline-offset-2 hover:
1decoration-primary","aria-label":`Reference ${t.split("").map(n=>j.indexOf(n)).join("")}`,children:t},a):e.jsx("span",{children:t},a):null)},i)}function c(l){return l.split(/(\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*)/g).map((o,r)=>y(o,r))}function v({src:l,className:i,caption:o}){const r=m.useRef(null);return m.useEffect(()=>{if(!r.current)return;const s=document.createElement("script");return s.src="https://public.flourish.studio/resources/embed.js",s.async=!0,r.current.appendChild(s),()=>{s.remove()}},[l]),e.jsxs("figure",{className:"my-10",children:[e.jsx("div",{className:"w-full overflow-hidden rounded-xl border border-border bg-card",children:e.jsx("div",{ref:r,className:`flourish-embed ${i??""} [&_.flourish-credit]:hidden`,"data-src":l,children:e.jsx("noscript",{children:e.jsx("img",{src:`https://public.flourish.studio/${l}/thumbnail`,width:"100%",alt:"bar-chart-race visualization"})})})}),o&&e.jsx("figcaption",{className:"mt-3 text-sm text-muted-foreground",children:o})]})}function $(){const{article:l}=h.useLoaderData(),i=p(l.author),o=f.filter(r=>r.slug!==l.slug).slice(0,3);return e.jsxs("article",{children:[e.jsxs("header",{className:"relative overflow-hidden bg-[color:var(--color-lilac-800)] text-white",children:[e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("img",{src:l.image,alt:"","aria-hidden":"true",className:"h-full w-full object-cover opacity-40"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[color:var(--color-lilac-900)] via-[color:var(--color-lilac-800)]/80 to-[color:var(--color-lilac-700)]/40"})]}),e.jsxs("div",{className:"container-edit relative pt-40 pb-20",children:[e.jsx(d,{to:"/news",className:"text-sm text-[color:var(--color-lilac-100)] hover:text-white",children:"← Back to News & Webinars"}),e.jsxs("p",{className:"eyebrow mt-6 text-[color:var(--color-lilac-200)]",children:[l.type," · ",l.date]}),e.jsx("h1",{className:"mt-4 max-w-4xl font-display text-4xl leading-[1.05] text-white text-balance lg:text-6xl",children:l.title}),l.author&&e.jsxs("p",{className:"mt-5 text-sm text-[color:var(--color-lilac-100)]",children:["By"," ",i.length>0?i.map((r,s)=>{const t=g(r);return e.jsxs("span",{children:[s>0&&(s===i.length-1?" & ":", "),t?e.jsx(d,{to:"/authors/$slug",params:{slug:t.slug},className:"underline underline-offset-4 hover:text-white",children:r}):r]},r)}):l.author]})]})]}),e.jsx("div",{className:"container-edit -mt-10 relative z-10",children:e.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card shadow-2xl shadow-[color:var(--color-lilac-900)]/10",children:l.youtubeId?e.jsx("div",{className:"aspect-video w-full bg-black",children:e.jsx("iframe",{className:"h-full w-full",src:`https://www.youtube-nocookie.com/embed/${l.youtubeId}?rel=0`,title:l.title,loading:"lazy",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})}):l.videoUrl?e.jsx("div",{className:"aspect-video w-full bg-black",children:e.jsx("video",{className:"h-full w-full",src:l.videoUrl,poster:l.image,controls:!0,preload:"metadata",playsInline:!0})}):l.embedUrl?e.jsx("div",{className:"aspect-[16/9] w-full bg-card",children:e.jsx("iframe",{className:"h-full w-full",src:l.embedUrl,title:l.title,loading:"lazy",referrerPolicy:"strict-origin-when-cross-origin"})}):e.jsx("img",{src:l.image,alt:l.title,className:`aspect-[16/8] w-full bg-muted ${l.imageFit==="contain"?"object-contain":"object-cover"}`})})}),e.jsx("section",{className:"container-edit py-16 lg:py-24",children:e.jsxs("div",{className:"mx-auto max-w-3xl",children:[e.jsx("p",{className:"font-display text-2xl leading-snug text-foreground/90 lg:text-3xl",children:l.excerpt}),l.blocks?e.jsx("div",{className:"mt-10 space-y-6 text-lg leading-relaxed text-foreground/80",children:l.blocks.map((r,s)=>e.jsx(x,{delay:Math.min(s,8)*.04,children:r.kind==="h"?e.jsx("h2",{id:r.text.toLowerCase()==="references"?"references":void 0,className:"mt-12 font-display text-3xl leading-tight text-foreground",children:r.text}):r.kind==="p"?e.jsx("p",{children:c(r.text)}):r.kind==="ul"?e.jsx("ul",{className:"space-y-5 pl-5",children:r.items.map((t,a)=>e.jsx("li",{className:"list-disc marker:text-primary",children:c(t)},a))}):r.kind==="ol"?e.jsx("ol",{className:"space-y-5 pl-5",children:r.items.map((t,a)=>e.jsx("li",{className:"list-decimal marker:text-primary",children:c(t)},a))}):r.kind==="note"?e.jsx("p",{className:"text-sm italic text-muted-foreground",children:c(r.text)}):r.kind==="callout"?e.jsxs("div",{className:"rounded-xl border border-border bg-muted/40 p-6",children:[r.title&&e.jsx("p",{className:"font-display text-lg text-foreground",children:c(r.title)}),r.ordered?e.jsx("ol",{className:`space-y-4 pl-5 text-base ${r.title?"mt-4":""}`,children:r.items.map((t,a)=>e.jsx("li",{className:"list-decimal marker:text-primary",children:c(t)},a))}):e.jsx("ul",{className:`space-y-4 pl-5 text-base ${r.title?"mt-4":""}`,children:r.items.map((t,a)=>e.jsx("li",{className:"list-disc marker:text-primary",children:c(t)},a))})]}):r.kind==="stats"?e.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:r.items.map((t,a)=>e.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[e.jsx("p",{className:"font-display text-3xl text-primary",children:t.value}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t.label})]},a))}):r.kind==="table"?e.jsx("div",{className:"overflow-x-auto rounded-xl border border-border",children:e.jsxs("table",{className:"w-full border-collapse text-base",children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-muted/50 text-left",children:r.headers.map((t,a)=>e.jsx("th",{className:"px-4 py-3 text-sm font-semibold text-foreground",children:c(t)},a))})}),e.jsx("tbody",{children:r.rows.map((t,a)=>e.jsx("tr",{className:"border-t border-border",children:t.map((n,u)=>
1e.jsx("td",{className:"px-4 py-3 text-sm text-foreground/80",children:c(n)},u))},a))})]})}):r.kind==="embed"?e.jsx(v,{src:r.src,className:r.className,caption:r.caption}):e.jsxs("figure",{className:"my-10",children:[e.jsx("img",{src:r.src,alt:r.caption??"",loading:"lazy",className:"w-full rounded-xl border border-border bg-card"}),r.caption&&e.jsx("figcaption",{className:"mt-3 text-sm text-muted-foreground",children:r.caption})]})},s))}):e.jsx("div",{className:"mt-10 space-y-6 text-lg leading-relaxed text-foreground/80",children:l.body.map((r,s)=>e.jsxs(x,{delay:s*.04,children:[e.jsx("p",{children:r}),l.figures?.filter(t=>t.afterParagraph===s).map(t=>e.jsxs("figure",{className:"mt-8",children:[e.jsx("img",{src:t.src,alt:t.caption??"",loading:"lazy",className:"w-full rounded-xl border border-border bg-card"}),t.caption&&e.jsx("figcaption",{className:"mt-3 text-sm text-muted-foreground",children:t.caption})]},t.src))]},s))}),e.jsx("div",{className:"hairline my-12"}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(!l.blocks||l.cta==="Download brief")&&e.jsx("a",{href:l.originalUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-border px-5 py-2.5 text-sm font-medium text-foreground hover:border-primary hover:text-primary",children:l.cta==="Download brief"?"Download brief →":l.type==="podcast"?"Watch on YouTube →":l.type==="blog"?"Read full post on the WDL blog →":l.type==="webinar"?l.isClip?"Watch clip on YouTube →":"Open video file →":"View original on worlddatalab.org →"}),e.jsx(d,{to:"/contact",className:"text-sm font-medium text-primary hover:underline",children:"Get in touch with the team →"})]})]})}),e.jsx("section",{className:"bg-card border-t border-border",children:e.jsxs("div",{className:"container-edit py-20",children:[e.jsx("p",{className:"eyebrow",children:"Continue reading"}),e.jsx("div",{className:"mt-8 grid gap-8 md:grid-cols-3",children:o.map(r=>e.jsxs(d,{to:"/news/$slug",params:{slug:r.slug},className:"group block",children:[e.jsx("div",{className:"aspect-[4/3] overflow-hidden rounded-xl border border-border bg-muted",children:e.jsx("img",{src:r.image,alt:r.title,loading:"lazy",className:`h-full w-full transition-transform duration-700 group-hover:scale-105 ${r.imageFit==="contain"?"object-contain":"object-cover"}`})}),e.jsxs("p",{className:"eyebrow mt-4 text-xs",children:[r.type," · ",r.date]}),e.jsx("h3",{className:"mt-2 font-display text-xl group-hover:text-primary",children:r.title})]},r.slug))})]})})]})}export{$ as component};

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.