import{p as R,f as p,a as o,c as G}from"./props-b4vEeO_8.js";import{J as w,G as ie,B as ae,F as l,I as u,C as m,k as s,N as ve,a3 as se,a4 as le,D as N}from"./runtime-C3rQLW--.js";import{i as ue}from"./lifecycle-F2p_Qkk3.js";import{c as he,d as xe}from"./create-runtime-stories-7AWWVphH.js";import{s as Y}from"./snippet-C5kbqVpq.js";import{i as v}from"./svelte-component-C8Ginrj8.js";import{a as me}from"./attributes-Cg6aLqN3.js";import{s as b}from"./style-DvJ3IcV1.js";import{B as z}from"./Block-D3Ui8rd-.js";import{G as Q}from"./GraphicBlock-uLJTqaY1.js";import{P as fe}from"./PaddingReset-_TGvg1_B.js";import{H as ee}from"./Headline-C-tkYFZ6.js";import{B as ye}from"./Byline-BhU2Zjcl.js";import{F as we}from"./FeaturePhoto-CKELMwR8.js";import{S as O}from"./SiteHeader-D-9D6sLa.js";import{V as be}from"./Video-yHzv19g_.js";import{b as oe}from"./size-DMdj3-I9.js";var ke=p('
'),Ae=p(' ',1),_e=p(' ',1),Te=p('');function D($,e){ae(e,!0);let f=R(e,"stacked",3,!0),A=R(e,"class",3,""),P=R(e,"hedSize",3,"normal"),_=R(e,"hedAlign",3,"center"),S=R(e,"hedWidth",3,"normal"),T=R(e,"authors",19,()=>[]),I=R(e,"width",3,"widest"),c=R(e,"embedded",3,!1);var y=Te(),r=u(y);let d;var a=u(r);{var i=h=>{z(h,{width:"fluid",class:"hero-headline background-hero fmt-0",children:(H,q)=>{var V=Ae(),C=m(V);ee(C,{get class(){return`${A()??""} !text-${_()??""}`},get width(){return S()},get section(){return e.section},get hedSize(){return P()},get hed(){return e.hed},get dek(){return e.dek}});var U=l(C,2),j=u(U);{var M=x=>{var k=G(),B=m(k);Y(B,()=>e.children),o(x,k)},J=x=>{var k=G(),B=m(k);{var F=E=>{Q(E,{get width(){return I()},role:"img",class:"my-0",textWidth:"normal",get notes(){return e.notes},get ariaDescription(){return e.ariaDescription},children:(X,vt)=>{var Z=ke();w(()=>b(Z,`background-image: url(${e.img??""})`)),o(X,Z)},$$slots:{default:!0}})};v(B,E=>{e.img&&E(F)},!0)}o(x,k)};v(j,x=>{e.children?x(M):x(J,!1)})}o(H,V)},$$slots:{default:!0}})};v(a,h=>{f()&&h(i)})}var t=l(a,2);{var n=h=>{z(h,{width:"fluid",class:"hero-headline inline-hero",children:(H,q)=>{var V=_e(),C=m(V);fe(C,{containerIsFluid:!0,children:(x,k)=>{ee(x,{get class(){return`${A()??""} !text-${_()??""}`},get width(){return S()},get section(){return e.section},get hedSize(){return P()},get hed(){return e.hed},get dek(){return e.dek}})},$$slots:{default:!0}});var U=l(C,2),j=u(U);{var M=x=>{var k=G(),B=m(k);Y(B,()=>e.children),o(x,k)},J=x=>{var k=G(),B=m(k);{var F=E=>{{let X=ve(()=>e.ariaDescription||"");we(E,{get width(){return I()},class:"my-0",get src(){return e.img},get caption(){return e.notes},get altText(){return s(X)}})}};v(B,E=>{e.img&&E(F)},!0)}o(x,k)};v(j,x=>{e.children?x(M):x(J,!1)})}o(H,V)},$$slots:{default:!0}})};v(t,h=>{f()===!1&&h(n)})}var g=l(r,2),K=u(g);{var ge=h=>{var H=G(),q=m(H);Y(q,()=>e.byline),o(h,H)},ce=h=>{var H=G(),q=m(H);{var V=C=>{ye(C,{get authors(){return T()},get publishTime(){return e.publishTime},get updateTime(){return e.updateTime},get getAuthorPage(){return e.getAuthorPage},get published(){return e.published},get updated(){return e.updated},align:"auto"})};v(q,C=>{(T().length>0||e.publishTime)&&C(V)},!0)}o(h,H)};v(K,h=>{e.byline?h(ge):h(ce,!1)})}w(h=>{b(y,`--heroHeight: ${c()?"850px":"100svh"}; display:contents;`),d=me(r,1,"hero-wrapper fmb-6 svelte-ecckzc",null,d,h)},[()=>({embedded:c()})]),o($,y),ie()}D.__docgen={data:[{name:"hed",visibility:"public",description:"Headline, parsed as an _inline_ markdown string in an `h1` element OR as a custom snippet.",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"union",type:[{kind:"type",type:"string",text:"string"},{kind:"function",text:"Snippet<[]>"}],text:"string | Snippet<[]>"},static:!1,readonly:!1},{name:"children",visibility:"public",description:"Optional snippet for a custom hero graphic, photo, etc.",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1},{name:"stacked",visibility:"public",description:"Set to `false` for inline hero media",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"true"},{name:"img",visibility:"public",description:"Path to the background hero image",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"ariaDescription",visibility:"public",description:"ARIA description, passed in as a markdown string.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"notes",visibility:"public",description:"Notes to the graphic, passed in as a markdown string.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"class",visibility:"public",description:"Add classes to the block tag to target it with custom CSS.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"hedSize",visibility:"public",description:"Headline size: small, normal, big, bigger, biggest",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"small",text:'"small"'},{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"big",text:'"big"'},{kind:"const",type:"string",value:"bigger",text:'"bigger"'},{kind:"const",type:"string",value:"biggest",text:'"biggest"'}],text:'"small" | "normal" | "big" | "bigger" | "biggest"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"hedAlign",visibility:"public",description:"Headline horizontal alignment: left, center, right",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"left",text:'"left"'},{kind:"const",type:"string",value:"center",text:'"center"'},{kind:"const",type:"string",value:"right",text:'"right"'}],text:'"left" | "center" | "right"'},static:!1,readonly:!1,defaultValue:'"center"'},{name:"hedWidth",visibility:"public",description:"Width of the headline: normal, wide, wider, widest",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'}],text:'"normal" | "wide" | "wider" | "widest"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"dek",visibility:"public",description:"Dek, parsed as a markdown string OR as a custom snippet.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"type",type:"string",text:"string"},{kind:"function",text:"Snippet<[]>"}],text:"string | Snippet<[]>"},static:!1,readonly:!1},{name:"section",visibility:"public",description:"Section title",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"authors",visibility:"public",description:"Array of author names, which will be slugified to create links to Reuters author pages",keywords:[],kind:"let",type:{kind:"type",type:"array",text:"string[]"},static:!1,readonly:!1,defaultValue:"[]"},{name:"publishTime",visibility:"public",description:"Publish time as a datetime string.",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"updateTime",visibility:"public",description:"Update time as a datetime string.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"width",visibility:"public",description:"Width of the hero graphic: normal, wide, wider, widest",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'}],text:'"normal" | "wide" | "wider" | "widest"'},static:!1,readonly:!1,defaultValue:'"widest"'},{name:"embedded",visibility:"public",description:"Set to true for embeds.",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"false"},{name:"getAuthorPage",visibility:"public",description:"Custom function that returns an author page URL.",keywords:[],kind:"let",type:{kind:"function",text:"(author: string) => string"},static:!1,readonly:!1},{name:"byline",visibility:"public",description:"Optional snippet for a custom byline.",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1},{name:"published",visibility:"public",description:"Optional snippet for a custom published dateline.",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1},{name:"updated",visibility:"public",description:"Optional snippet for a custom updated dateline.",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1}],name:"HeroHeadline.svelte"};const te=""+new URL("polar-DgpYaCWG.jpg",import.meta.url).href,Pe=""+new URL("eurovis-WPrXQJ_8.jpeg",import.meta.url).href,Se=""+new URL("CRASH_1-xs-Dbz0bL9L.jpeg",import.meta.url).href,He=""+new URL("CRASH_1-sm-yYc5Zrvl.jpeg",import.meta.url).href,Ce=""+new URL("CRASH_1-md-HofNiiOZ.jpeg",import.meta.url).href,Ie=""+new URL("CRASH_1-lg-C8JZiDcr.jpeg",import.meta.url).href,Re=""+new URL("CRASH_1-xl-BRel9Pbh.jpeg",import.meta.url).href,De=""+new URL("CRASH_1-xl_copy-UpEPShVt.jpeg",import.meta.url).href;var $e=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),Ve=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),Be=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),Ee=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),ze=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),Ge=p(' 2.21 pm
Steep drop from
27,025 feet
Typical path to
Guangzhou
'),Ne=p('
');function ne($){let e=le(void 0);var f=Ne(),A=u(f);{var P=t=>{var n=$e(),g=l(u(n),2);w(()=>b(g,`background-image: url(${Se});`)),o(t,n)};v(A,t=>{s(e)&&s(e)>=0&&s(e)<510&&t(P)})}var _=l(A,2);{var S=t=>{var n=Ve(),g=l(u(n),2);w(()=>b(g,`background-image: url(${He});`)),o(t,n)};v(_,t=>{s(e)&&s(e)>=510&&s(e)<660&&t(S)})}var T=l(_,2);{var I=t=>{var n=Be(),g=l(u(n),2);w(()=>b(g,`background-image: url(${Ce});`)),o(t,n)};v(T,t=>{s(e)&&s(e)>=660&&s(e)<930&&t(I)})}var c=l(T,2);{var y=t=>{var n=Ee(),g=l(u(n),2);w(()=>b(g,`background-image: url(${Ie});`)),o(t,n)};v(c,t=>{s(e)&&s(e)>=930&&s(e)<1200&&t(y)})}var r=l(c,2);{var d=t=>{var n=ze(),g=l(u(n),2);w(()=>b(g,`background-image: url(${Re});`)),o(t,n)};v(r,t=>{s(e)&&s(e)>=1200&&s(e)<1350&&t(d)})}var a=l(r,2);{var i=t=>{var n=Ge(),g=l(u(n),2);w(()=>b(g,`background-image: url(${De});`)),o(t,n)};v(a,t=>{s(e)&&s(e)>=1350&&t(i)})}oe(f,"clientWidth",t=>se(e,t)),o($,f)}ne.__docgen={version:3,name:"crash.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const Le=""+new URL("quake-map-top-xs-DW13fyLH.jpeg",import.meta.url).href,We=""+new URL("quake-map-top-sm-BxeF2VbG.jpeg",import.meta.url).href,qe=""+new URL("quake-map-top-md-kvIh_wQD.jpeg",import.meta.url).href,Oe=""+new URL("quake-map-top-lg-izACKuCR.jpeg",import.meta.url).href,Ke=""+new URL("quake-map-top-xl-7FmRtkZ1.jpeg",import.meta.url).href;var Ue=p(''),je=p(''),Me=p(''),Je=p(''),Fe=p(''),Xe=p('
');function re($){let e=le(void 0);var f=Xe(),A=u(f);{var P=a=>{var i=Ue(),t=l(u(i),2);w(()=>b(t,`background-image: url(${Le});`)),o(a,i)};v(A,a=>{s(e)&&s(e)>=0&&s(e)<510&&a(P)})}var _=l(A,2);{var S=a=>{var i=je(),t=l(u(i),2);w(()=>b(t,`background-image: url(${We});`)),o(a,i)};v(_,a=>{s(e)&&s(e)>=510&&s(e)<660&&a(S)})}var T=l(_,2);{var I=a=>{var i=Me(),t=l(u(i),2);w(()=>b(t,`background-image: url(${qe});`)),o(a,i)};v(T,a=>{s(e)&&s(e)>=660&&s(e)<1200&&a(I)})}var c=l(T,2);{var y=a=>{var i=Je(),t=l(u(i),2);w(()=>b(t,`background-image: url(${Oe});`)),o(a,i)};v(c,a=>{s(e)&&s(e)>=1200&&s(e)<1300&&a(y)})}var r=l(c,2);{var d=a=>{var i=Fe(),t=l(u(i),2);w(()=>b(t,`background-image: url(${Ke});`)),o(a,i)};v(r,a=>{s(e)&&s(e)>=1300&&a(d)})}oe(f,"clientWidth",a=>se(e,a)),o($,f)}re.__docgen={version:3,name:"quakemap.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const pe={title:"Components/Text elements/HeroHeadline",component:D,argTypes:{hedSize:{control:"select",options:["small","normal","big","bigger","biggest"]},hedWidth:{control:"select",options:["normal","wide","wider","widest"]},hedAlign:{control:"select",options:["left","center","right"]},width:{control:"select",options:["normal","wide","wider","widest"]}}},{Story:L}=xe();var Ye=p(" ",1),Qe=p(''),Ze=p(` `,1),et=p(` `,1),tt=p(" ",1),it=p('A visual guide to
EUROVISION
'),at=p(`Performers from 37 countries are coming together May 9-13 in
Liverpool, England, for the 67th annual Eurovision Song Contest. The
winner gets the trophy and their country gets the right to host next
year’s event, produced by the European Broadcasting Union (EBU).
`),st=p(` `,1),lt=p(" ",1);function de($,e){ae(e,!1),ue();var f=lt(),A=m(f);L(A,{name:"Photo hero",exportName:"PhotoHero",children:(c,y)=>{var r=Ye(),d=m(r);z(d,{width:"fluid",class:"chromatic-ignore",children:(i,t)=>{O(i,{})},$$slots:{default:!0}});var a=l(d,2);{let i=N(()=>new Date("2022-03-04").toISOString());D(a,{section:"World News",hed:"Reuters Graphics Interactive",dek:"The beginning of a beautiful page",authors:["Jane Doe","John Doe"],get publishTime(){return s(i)},get img(){return te},notes:"Photo by REUTERS",ariaDescription:"A photo of a polar bear"})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`
`}}});var P=l(A,2);L(P,{name:"Transparent header",exportName:"TransparentHeader",children:(c,y)=>{var r=Qe(),d=u(r);z(d,{width:"fluid",class:"chromatic-ignore",children:(i,t)=>{O(i,{})},$$slots:{default:!0}});var a=l(d,2);{let i=N(()=>new Date("2022-03-04").toISOString());D(a,{section:"World News",hed:"Reuters Graphics Interactive",dek:"The beginning of a beautiful page",authors:["Jane Doe","John Doe"],get publishTime(){return s(i)},get img(){return te},ariaDescription:"A photo of a polar bear"})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:``}}});var _=l(P,2);L(_,{name:"Ai2svelte hero",exportName:"Ai2svelteHero",children:(c,y)=>{var r=Ze(),d=m(r);z(d,{width:"fluid",class:"chromatic-ignore",children:(i,t)=>{O(i,{})},$$slots:{default:!0}});var a=l(d,2);{let i=N(()=>new Date("2022-06-24").toISOString());D(a,{hed:"Earthquake devastates Afghanistan",hedSize:"big",hedWidth:"wide",class:"custom-hero mb-0",authors:["Anand Katakam","Vijdan Mohammad Kawoosa","Adolfo Arranz","Wen Foo","Simon Scarr","Aman Bhargava","Jitesh Chowdhury","Manas Sharma","Aditi Bhandari"],get publishTime(){return s(i)},children:(t,n)=>{Q(t,{width:"widest",role:"figure",class:"my-0",ariaDescription:"Earthquake impact map",children:(g,K)=>{re(g)},$$slots:{default:!0}})},$$slots:{default:!0}})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`
`}}});var S=l(_,2);L(S,{name:"Video hero",exportName:"VideoHero",children:(c,y)=>{var r=et(),d=m(r);z(d,{width:"fluid",class:"chromatic-ignore",children:(i,t)=>{O(i,{})},$$slots:{default:!0}});var a=l(d,2);{let i=N(()=>new Date("2020-12-18").toISOString());D(a,{class:"video-hero",hed:"The conflict in Ethiopia",hedSize:"bigger",hedWidth:"wide",authors:["Aditi Bhandari ","David Lewis"],get publishTime(){return s(i)},children:(t,n)=>{be(t,{width:"widest",class:"my-0",showControls:!1,preloadVideo:"auto",playVideoWhenInView:!1,src:"https://vm.reuters.tv/9c72e/titlef2ac(425954_R21MP41500).mp4",poster:"https://www.reuters.com/resizer/vexYmtEuXKmfnsCbfS6jSMVbHms=/1080x0/filters:quality(80)/cloudfront-us-east-2.images.arcpublishing.com/reuters/VKJHKJEENVO4DASDND3VLHPV5Y.jpg",notes:"Drone footage from the Village 8 refugee camp in Sudan.",ariaDescription:"Aerial footage of people houses in refugee camp"})},$$slots:{default:!0}})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`
`}}});var T=l(S,2);L(T,{name:"Inline hero",exportName:"InlineHero",children:(c,y)=>{var r=tt(),d=m(r);z(d,{width:"fluid",class:"chromatic-ignore",children:(i,t)=>{O(i,{})},$$slots:{default:!0}});var a=l(d,2);{let i=N(()=>new Date("2020-01-01").toISOString());D(a,{stacked:!1,section:"Global news",hed:"The plunge from 29,000 feet",dek:"How China Eastern Airlines flight MU5735 went from an uneventful flight at cruising altitude to disaster in just minutes.",class:"mb-0",authors:["Simon Scarr","Vijdan Mohammad Kawoosa"],get publishTime(){return s(i)},children:(t,n)=>{Q(t,{width:"widest",role:"figure",class:"my-0",ariaDescription:"Earthquake impact map",notes:"Source: Satellite image from Google, Maxar Technologies, CNES/Airbus, Landsat/Copernicus",children:(g,K)=>{ne(g)},$$slots:{default:!0}})},$$slots:{default:!0}})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`
`}}});var I=l(T,2);L(I,{name:"Custom hed",exportName:"CustomHed",children:(c,y)=>{var r=st(),d=m(r);{const a=n=>{var g=it();o(n,g)},i=n=>{var g=at();o(n,g)};let t=N(()=>new Date("2023-05-11").toISOString());D(d,{class:"custom-hed",authors:["Prasanta Kumar Dutta","Dea Bankova","Aditi Bhandari","Anurag Rao"],get publishTime(){return s(t)},get img(){return Pe},getAuthorPage:n=>`mailto:${n.replace(" ","")}@example.com`,hed:a,dek:i,$$slots:{hed:!0,dek:!0}})}o(c,r)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:` {
return \`mailto:\${author.replace(' ', '')}@example.com\`;
}}
>
{#snippet hed()}
A visual guide to
EUROVISION
{/snippet}
{#snippet dek()}
Performers from 37 countries are coming together May 9-13 in
Liverpool, England, for the 67th annual Eurovision Song Contest. The
winner gets the trophy and their country gets the right to host next
year’s event, produced by the European Broadcasting Union (EBU).
{/snippet}
`}}}),o($,f),ie()}de.__docgen={version:3,name:"HeroHeadline.stories.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const W=he(de,pe),ot=["PhotoHero","TransparentHeader","Ai2svelteHero","VideoHero","InlineHero","CustomHed"],nt=W.PhotoHero,rt=W.TransparentHeader,pt=W.Ai2svelteHero,dt=W.VideoHero,gt=W.InlineHero,ct=W.CustomHed,Rt=Object.freeze(Object.defineProperty({__proto__:null,Ai2svelteHero:pt,CustomHed:ct,InlineHero:gt,PhotoHero:nt,TransparentHeader:rt,VideoHero:dt,__namedExportsOrder:ot,default:pe},Symbol.toStringTag,{value:"Module"}));export{pt as A,ct as C,Rt as H,gt as I,nt as P,rt as T,dt as V};