PageSourceSearch

https://multiplesclerosis.net/_nuxt/CeJCG0WW.js

js multiplesclerosis.net collected 2026-10-02 08:07:10 UTC 11,183 bytes, 1 lines download raw bytes

1import{_ as f,o as i,c as d,n as y,aT as T,aU as B,e as n,q as r,ap as _,aV as g,m as W,aW as C,a as o,w as l,b as p,t as x,aX as O,aj as F,P as I,ad as H,l as M}from"./Bv6rD22K.js";import{p as P,_ as L}from"./CCxC4gXk.js";import{_ as j,a as E}from"./DhxosPtj.js";import{_ as N}from"./B7hmZjMN.js";import{_ as R}from"./CXJsqkHJ.js";const A={name:"SiteMasthead",props:{siteName:{type:String,default:""}},computed:{theSiteName(){return this.siteName||this.$site.name},cleanedSiteName(){return this.theSiteName.split(".")[0].toLowerCase()},mastheadSrc(){return`/common/logo/masthead/${this.cleanedSiteName}.svg`}}},D=["src","alt"];function U(e,a,t,h,m,s){return i(),d("img",{src:s.mastheadSrc,alt:s.theSiteName,class:y(["masthead",`masthead--${e.$site.prefix}`]),"data-test-id":"masthead-image"},null,10,D)}const V=Object.assign(f(A,[["render",U],["__scopeId","data-v-6b394d4a"]]),{__name:"SiteMasthead"}),q={name:"PostTeaserImage",props:{post:{type:Object,required:!0},postTitle:{type:String,default:""},responsiveImages:{type:Boolean,default:!1},featuredImageSize:{type:String,default:null},secondaryImageSize:{type:String,default:null},loading:{type:String,default:"lazy"},showVideoOverlay:{type:Boolean,default:!1}},data(){return{WindowWidthLandscapeTabletUp:900}},computed:{...W(C,["windowWidth"]),hasFeaturedImage(){return!!this.post.featuredMedia&&!!this.post.featuredMedia[0]},hasSecondaryImage(){return!!this.post.secondaryImg&&!!this.post.secondaryImg[0]},featuredImageWidth(){if(!this.hasFeaturedImage)return null;const e=this.post.featuredMedia[0];return e[`width${this.featuredImageSize}`]||e.widthFullSize},featuredImageHeight(){if(!this.hasFeaturedImage)return null;const e=this.post.featuredMedia[0];return e[`height${this.featuredImageSize}`]||e.heightFullSize},featuredImage(){const e=this.post.featuredMedia[0],a=e[`url${this.featuredImageSize}`];return a&&g(a)?a:e.url},secondaryImageWidth(){if(!this.hasSecondaryImage)return null;const e=this.post.secondaryImg[0];return e[`width${this.secondaryImageSize}`]||e[`width${this.featuredImageSize}`]||e.widthFullSize},secondaryImageHeight(){if(!this.hasSecondaryImage)return null;const e=this.post.secondaryImg[0];return e[`height${this.secondaryImageSize}`]||e[`height${this.featuredImageSize}`]||e.heightFullSize},secondaryImage(){if(!this.hasSecondaryImage)return null;const e=this.post.secondaryImg[0],a=e[`url${this.secondaryImageSize||this.featuredImageSize}`];if(a&&g(a))return a;const t=e.url;return g(t)?t:""},imageAlt(){return this.hasSecondaryImage&&this.hasSecondaryImage.alt?this.hasSecondaryImage.alt:this.hasFeaturedImage&&this.hasFeaturedImage.alt?this.hasFeaturedImage.alt:`${this.postTitle} image`},teaserImageWidth(){return this.hasFeaturedImage?this.featuredImageWidth:this.secondaryImageWidth},teaserImageHeight(){return this.hasFeaturedImage?this.featuredImageHeight:this.secondaryImageHeight},teaserImageUrl(){return this.hasFeaturedImage?this.featuredImage:this.secondaryImage},teaserImageAspectRatio(){if(!this.windowWidth)return null;const e=!!this.teaserImageHeight&&!!this.teaserImageWidth;if(!this.responsiveImages&&!e)return null;const a=e?`${this.teaserImageHeight/this.teaserImageWidth*100}%`:null;if(!this.responsiveImages)return a;const h=!!this.secondaryImageHeight&&!!this.secondaryImageWidth?`${this.secondaryImageHeight/this.secondaryImageWidth*100}%`:null;return this.windowWidth>this.WindowWidthLandscapeTabletUp?h:a}},methods:{toWebp:B,handleErrorOnImageSource:T}},Z=["media","srcset"],X=["media","srcset"],G=["srcset"],J=["src","alt","loading","width","height"],K={key:0,class:"post-teaser-image__video-overlay","aria-hidden":"true"};function Q(e,a,t,h,m,s){return i(),d("div",{class:"post-teaser-image",style:_({paddingBottom:s.teaserImageAspectRatio})},[n("picture",null,[t.responsiveImages?(i(),d("source",{key:0,type:"image/webp",media:`(min-width: ${m.WindowWidthLandscapeTabletUp}px)`,srcset:s.toWebp(s.secondaryImage)},null,8,Z)):r("",!0),t.responsiveImages?(i(),d("source",{key:1,type:"image/jpeg",media:`(min-width: ${m.WindowWidthLandscapeTabletUp}px)`,srcset:s.secondaryImage},null,8,X)):r("",!0),n("source",{type:"image/webp",srcset:s.toWebp(s.teaserImageUrl)},null,8,G),n("img",{src:s.teaserImageUrl,alt:s.imageAlt,loading:t.loading,width:s.teaserImageWidth,height:s.teaserImageHeight,class:"post-teaser-image__image",onError:a[0]||(a[0]=(...c)=>s.handleErrorOnImageSource&&s.handleErrorOnImageSource(...c))},null,40,J)]),t.showVideoOverlay&&t.post.videoOverlay?(i(),d("span",K,[...a[1]||(a[1]=[n("svg",{class:"post-teaser-image__video-badge",viewBox:"0 0 100 100",focusable:"false"},[n("path",{"fill-rule":"evenodd",d:"M50 0A50 50 0 1 1 50 100A50 50 0 1 1 50 0ZM40 30L72 50L40 70Z"})],-1)])])):r("",!0)],4)}const Y=Object.assign(f(q,[["render",Q],["__scopeId","data-v-e5124d8b"]]),{__name:"PostTeaserImage"}),$={name:"PostTeaser",mixins:[P],props:{post:{type:Object,required:!0},responsiveImages:{type:Boolean,default:!1},showVideoOverlay:{type:Boolean,default:!1}
1,showBookmarkType:{type:Boolean,default:!1},makeHeadingH3:{type:Boolean,default:!1},contentType:{type:String,default:""},showMasthead:{type:Boolean,default:!1},showHomepageEngagementLabel:{type:Boolean,default:!1},featuredImageSize:{type:String,default:null},secondaryImageSize:{type:String,default:null},loading:{type:String,default:"lazy"}},computed:{displayOptions(){return this.post.options?this.post.options:{showImage:!0,showSummary:!0,showByLine:!["sponsored_article","journai"].includes(this.post.type),showEngagement:!0}},showUserByline(){return this.post.author&&this.displayOptions.showByLine},showReadTime(){return this.displayOptions.showReadTime&&this.post.wordCount>0},isCrossPublished(){return this.post?.crossPublishedSites?.length>0},isOriginalSite(){return!this.post.originalSite||this.post.originalSite===this.$site.prefix},showEngagement(){return this.displayOptions.showEngagement&&M.engagementTypes.includes(this.post.type)&&this.isOriginalSite&&!this.hasChildSiteTeasers},addEllipses(){return!this.post.excerpt&&!/\.\.\.$/.test(this.summaryContent)},isSearchResult(){return(this._.provides[I]||this.$route).name==="search"},summaryContent(){return this.displayOptions.summary||this.post.excerpt||this.post.excerptFromContent||this.post.content},summary(){return this.summaryContent===null?"":this.isSearchResult?`...${this.summaryContent}${this.addEllipses?"...":""}`:!this.post.excerpt&&/([^\.]+)(\.{1}$)/.test(this.summaryContent)?`${this.summaryContent}..`:this.addEllipses?`${this.summaryContent}...`:this.summaryContent},hasFeaturedImage(){return!!this.post.featuredMedia&&!!this.post.featuredMedia[0]},hasSecondaryImage(){return!!this.post.secondaryImg&&!!this.post.secondaryImg[0]},shouldShowImage(){return!this.hasFeaturedImage&&!this.hasSecondaryImage?!1:this.displayOptions.showImage},postTitle(){return this.isSponsoredArticle?`Sponsored: ${this.post.title}`:this.post.title},isSponsoredArticle(){return this.post.type==="sponsored_article"},dynamicClasses(){const e=[`post-teaser--${H(this.post.type)}`];return this.post.status==="draft"&&e.push("post-teaser--draft"),this.post.options&&Object.keys(this.post.o
1ptions).includes("floatText")&&e.push(`post-teaser--${this.post.options.floatText}`),this.hasLegacyRatioImage&&e.push("post-teaser--legacy-image"),e},styleObject(){return this.post.options&&this.post.options.textColor?{color:this.post.options.textColor}:{}},showBookmarkButton(){const e=["quiz","sponsored_article","journai"],a=["cas"];return!(e.includes(this.post.type)||(this._.provides[I]||this.$route).name==="home"&&a.includes(this.post.type))},hasLegacyRatioImage(){let e,a;if(this.hasFeaturedImage?([e]=this.post.featuredMedia,a=this.featuredImageSize||"FullSize"):this.hasSecondaryImage&&([e]=this.post.secondaryImg,a=this.secondaryImageSize||this.featuredImageSize||"FullSize"),!e)return!1;const t=e[`height${a}`];return e[`width${a}`]>=t*3},showCrossPublishing(){return this.post?.crossPublishedSites?.length>0},allSitesForPost(){return this.post?[this.post.originalSite,...this.post.crossPublishedSites]:[]}}},ee={key:1,class:"post-teaser__bookmark-type"},te={key:2,class:"post-teaser__homepage-engagement-label","data-test-id":"post-teaser-homepage-engagement-label"},se={class:"post-teaser__content"},ae=["innerHTML"],ie=["innerHTML"];function re(e,a,t,h,m,s){const c=Y,u=O,S=V,w=L,k=j,b=E,v=N,z=R;return i(),d("article",{class:y(["post-teaser",s.dynamicClasses]),"data-test-id":"post-teaser"},[s.shouldShowImage?(i(),o(u,{key:0,to:e.link,class:"post-teaser__image-link link link--unstyled"},{default:l(()=>[p(c,{ref:"teaserImage",post:t.post,"post-title":s.postTitle,"responsive-images":t.responsiveImages,"featured-image-size":t.featuredImageSize,"secondary-image-size":t.secondaryImageSize,loading:t.loading,"show-video-overlay":t.showVideoOverlay},null,8,["post","post-title","responsive-images","featured-image-size","secondary-image-size","loading","show-video-overlay"])]),_:1},8,["to"])):r("",!0),t.showBookmarkType?(i(),d("p",ee,x(t.contentType),1)):r("",!0),t.showHomepageEngagementLabel?(i(),d("span",te,"Featured story ")):r("",!0),n("div",se,[t.showMasthead?(i(),o(u,{key:0,to:e.link,exact:"",class:"post-teaser__masthead-link link link--unstyled"},{default:l(()=>[p(S,{"site-name":t.post.siteName,class:"masthead--teaser"},null,8,["site-name"])]),_:1},8,["to"])):r("",!0),s.showCrossPublishing?(i(),o(w,{key:1,prefixes:s.allSitesForPost,"post-path":t.post.permalink,"original-site":t.post.originalSite},null,8,["prefixes","post-path","original-site"])):r("",!0),(i(),o(F(t.makeHeadingH3?"h3":"h2"),{class:"post-teaser__heading heading--3","data-test-id":"post-teaser-heading"},{default:l(()=>[p(u,{to:e.link,class:"post-teaser__heading-link link link--unstyled",style:_(s.styleObject)},{default:l(()=>[n("span",{innerHTML:s.postTitle},null,8,ae)]),_:1},8,["to","style"])]),_:1})),s.displayOptions.showSummary&&s.summary?(i(),o(u,{key:2,to:e.link,class:"post-teaser__summary-link link--unstyled"},{default:l(()=>[n("p",{class:"post-teaser__summary",style:_(s.styleObject)},[n("span",{innerHTML:s.summary},null,8,ie)],4)]),_:1},8,["to"])):r("",!0),s.showReadTime?(i(),o(k,{key:3,"word-count":t.post.wordCount,"post-type":t.post.type},null,8,["word-count","post-type"])):r("",!0),s.showUserByline||s.showBookmarkButton?(i(),d("div",{key:4,class:y(["post-teaser__footer",{"post-teaser__footer--is-last":!s.showEngagement}])},[s.showUserByline?(i(),o(b,{key:0,user:t.post.author,"display-tooltip":!s.isSponsoredArticle,"show-user-avatar":!s.isSponsoredArticle,"post-type":t.post.type,"word-count":t.post.wordCount,"is-cross-published":s.isCrossPublished,"original-site":t.post.originalSite},null,8,["user","display-tooltip","show-user-avatar","post-type","word-count","is-cross-published","original-site"])):r("",!0),s.showBookmarkButton?(i(),o(v,{key:1,bookmarkable:t.post},null,8,["bookmarkable"])):r("",!0)],2)):r("",!0),s.showEngagement?(i(),o(z,{key:5,"object-type":t.post.type,"the-object":t.post,"comment-count":t.post.commentCount},null,8,["object-type","the-object","comment-count"])):r("",!0)])],2)}const me=Object.assign(f($,[["render",re],["__scopeId","data-v-afffc7f8"]]),{__name:"PostTeaser"});export{me as P,V as _};

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.