PageSourceSearch

https://www.iu.org/build/assets/Card-i5tuVdd6.js

js iu.org collected 2026-09-24 09:20:32 UTC 8,700 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,r as n}from"./dist-V0wV9pPA.js";import{Ct as r,D as i,E as a,En as o,On as s,Ut as c,Yt as l,Zn as u,b as d,bt as f,g as p,k as m,mt as h,o as g,qt as _,tr as v,v as y,vn as b,wn as x,wt as S,y as C}from"./runtime-core.esm-bundler-DPmoNEl9.js";import{C as w,w as ee}from"./runtime-dom.esm-bundler-DSPAckZK.js";import{t as T}from"./IuStoryblokComponent-DwakwXM-.js";import{t as E}from"./AspectRatio-Cw7CQoaA.js";import{t as D}from"./Headline-C0L232__.js";import{n as O}from"./tracking-CUlrFEbe.js";import{t as k}from"./DynamicIcon-C8VHPWuh.js";import{t as A}from"./RichText-DcIsdUrI.js";import{t as j}from"./isEmpty-BjCz0clK.js";import{n as te,s as M}from"./button-D5_pHZWS.js";import{t as N}from"./Label-ClLiluTn.js";import{r as P}from"./Button-CEtZQUj7.js";import{i as ne}from"./tracking-DvEtHb3N.js";import{n as F,t as I}from"./wayfinder-Dp7PqxvV.js";import{t as L}from"./Image-DkzeRT_Z.js";import{t as R}from"./cloudinary-gjdUMiSH.js";import{t as re}from"./Video-hcdfOex7.js";import{a as ie,i as z,n as B,t as V}from"./useCard-DUHBDvQO.js";import{n as H,t as U}from"./useAiLabelOverlay-B2iPAE_J.js";import{a as W,i as G,r as ae}from"./CardSloped-BvMIVdFb.js";import{n as K,r as q,t as J}from"./card-BqNsK0Vg.js";import{t as Y}from"./ArrowRight-WChx8f9O.js";var oe={key:0,class:`m-0 text-sm font-normal text-gray-700 uppercase`},X=m({__name:`DefaultCard`,props:{blok:{},preTitle:{}},setup(e){let o=e,{isAnchorLink:c,isExternalLink:p,getHref:m,shouldBeClickable:b,handleCardClick:x}=z(o.blok),{isVideo:A}=ie(o.blok?.media),{aiIconUrl:F}=U(()=>o.blok.media),{props:I}=t(),{resolveHref:Y}=M(()=>I.page?.full_slug);return(e,t)=>{let M=r(`editable`);return h(),y(S(s(b)?s(p)||s(c)?`a`:s(n):`div`),{href:s(b)?s(m):void 0,target:s(b)&&s(p)?`_blank`:void 0,"aria-label":s(b)?`${o.blok.headline||`Card`}`:void 0,role:s(b)?`link`:`article`,tabindex:s(b)?0:void 0,"data-element-type":s(O).CARD,class:u([`group relative flex h-full w-full flex-col rounded-lg transition-all duration-200 ease-in-out focus-visible:shadow-lg focus-visible:outline-2 focus-visible:outline-offset-2 active:shadow-md lg:max-w-[600px] @lg:max-w-none`,{"cursor-pointer hover:shadow-lg focus-visible:shadow-lg focus-visible:outline-2 focus-visible:outline-offset-2 active:shadow-md sm:w-full md:w-full lg:w-full":s(b)}]),onClick:t[0]||=e=>s(b)&&s(c)?s(x):void 0,onKeydown:[t[1]||=w(e=>s(b)&&s(c)?s(x):void 0,[`enter`]),t[2]||=w(ee(e=>s(b)&&s(c)?s(x):void 0,[`prevent`]),[`space`])]},{default:_(()=>[i(s(W),{class:`group h-full pt-0`},{default:_(()=>[o.blok.media&&o.blok.label?(h(),y(N,{key:0,as:`span`,class:`absolute top-2 right-2 z-10`,color:o.blok.labelColor},{default:_(()=>[a(v(o.blok.label),1)]),_:1},8,[`color`])):C(``,!0),s(A)?(h(),y(re,{key:1,payload:o.blok.media,"poster-payload":o.blok.media,autoplay:o.blok?.autoplay,controls:!o.blok?.autoplay,loop:o.blok?.autoplay,muted:o.blok?.autoplay},null,8,[`payload`,`poster-payload`,`autoplay`,`controls`,`loop`,`muted`])):C(``,!0),o.blok.media?.filename&&!s(A)?(h(),y(s(E),{key:2,class:`relative w-full overflow-hidden`,ratio:s(V)(o.blok.imageRatio)},{default:_(()=>[i(L,{payload:o.blok.media,sizes:s(R),"aspect-ratio":s(B)(o.blok.imageRatio),"suppress-ai-label-overlay":``,class:`h-full w-full object-cover`},null,8,[`payload`,`sizes`,`aspect-ratio`]),s(F)?(h(),y(H,{key:0,src:s(F),class:`absolute right-1 bottom-1 z-10 h-[35px] w-[35px]`},null,8,[`src`])):C(``,!0)]),_:1},8,[`ratio`])):C(``,!0),o.blok.headline||o.preTitle?(h(),y(s(K),{key:3,class:`pt-6`},{default:_(()=>[i(s(J),null,{default:_(()=>[o.preTitle?(h(),d(`p`,oe,v(o.preTitle),1)):C(``,!0),o.blok.headline?(h(),y(D,{key:1,size:o.blok.headingLevel||`h3`,as:o.blok.headingLevel||`h3`},{default:_(()=>[a(v(o.blok.headline),1)]),_:1},8,[`size`,`as`])):C(``,!0)]),_:1})]),_:1})):C(``,!0),!s(j)(o.blok.content)||!s(j)(o.blok.footer)?(h(),y(s(G),{key:4,class:`flex-1`},{default:_(()=>[o.blok.content&&o.blok.content.length>0?(h(),y(s(q),{key:0,class:`pt-2`},{default:_(()=>[(h(!0),d(g,null,f(o.blok.content,e=>(h(),y(T,{blok:e,key:e._uid},null,8,[`blok`]))),128))]),_:1})):C(``,!0)]),_:1})):C(``,!0),s(j)(o.blok.footer)?C(``,!0):(h(),y(s(ae),{key:5,class:`mt-auto flex-col items-start gap-2 pt-8`},{default:_(()=>[(h(!0),d(g,null,f(o.blok.footer,e=>l((h(),d(`div`,{key:e._uid,class:u([`*:mb-0`,e.buttonType===`link`?``:`w-full *:w-full`])},[i(s(te),{variant:e.buttonType||`default`,disabled:e.disabled,"element-type":s(ne)(e.buttonType),href:s(P)(s(Y)(e),e.passQueryParameter),type:e.submit?`submit`:`button`,class:`text-pretty whitespace-break-spaces`},{default:_(()=>[e.iconBefore?(h(),y(k,{key:0,name:e.iconBefore},null,8,[`name`])):C(``,!0),a(` `+v(e.text)+` `,1),e.iconAfter?(h(),y(k,{key:1,name:e.iconAfter},null,8,[`name`])):C(``,!0)]),_:2},1032,[`variant`,`disabled`,`element-type`,`href`,`type`])],2)),[[M,e]])),128))]),_:1}))]),_:1})]),_:1},40,[`href`,`target`,`aria-label`,`role`,`tabindex`,`data-element-type`,`class`])}}}),Z=(e,t)=>({url:Z.url(e,t),method:`get`});Z.definition={methods:[`get`,`head`],url:`/api/preview/linked-story-preview/{story}`},Z.url=(e,t)=>
1{(typeof e==`string`||typeof e==`number`)&&(e={story:e}),typeof e==`object`&&!Array.isArray(e)&&`uuid`in e&&(e={story:e.uuid}),Array.isArray(e)&&(e={story:e[0]}),e=I(e);let n={story:typeof e.story==`object`?e.story.uuid:e.story};return Z.definition.url.replace(`{story}`,n.story.toString()).replace(/\/+$/,``)+F(t)},Z.get=(e,t)=>({url:Z.url(e,t),method:`get`}),Z.head=(e,t)=>({url:Z.url(e,t),method:`head`});var Q=e=>e.linkedStory?.id,se=e=>{let n=t(),r=b({}),i=p(()=>n.props.isInPreview);return c(()=>{let t=o(e);if(!i.value||!t.linkedStoryPreview)return;let n=Q(t);n&&(r.value[n]||fetch(Z(n).url).then(e=>{if(!e.ok)throw Error(`Failed to fetch linked story preview data`);return e.json()}).then(e=>{r.value={...r.value,[n]:e}}).catch(e=>{console.error(`Error fetching linked story preview data:`,e)}))}),{linkedStoryPreviewData:p(()=>{let t=o(e);if(!t.linkedStoryPreview)return null;let a=Q(t);return a?i.value?r.value[a]??null:(n.props.linkedStoryPreviews??{})[a]??null:null})}},ce=m({__name:`LinkedStoryPreviewCard`,props:{blok:{}},setup(e){let t=e,{isAnchorLink:r,getHref:o}=z(t.blok),{linkedStoryPreviewData:c}=se(x(()=>t.blok)),l=p(()=>t.blok.media?.filename?t.blok.media:c.value?.image),m=p(()=>t.blok.headline||c.value?.headline),b=p(()=>t.blok.content?.length||!!c.value?.description),{aiIconUrl:S}=U(l);return(e,p)=>(h(),y(s(n),{href:`${s(o)}`,"aria-label":`${m.value||`Card`}`,role:`link`,"data-element-type":s(O).CARD,class:`group relative flex h-full w-full cursor-pointer flex-col rounded-lg transition-all duration-200 ease-in-out hover:shadow-lg focus-visible:shadow-lg focus-visible:outline-2 focus-visible:outline-offset-2 active:shadow-md lg:max-w-[600px]`},{default:_(()=>[i(s(W),{class:`group h-full pt-0`},{default:_(()=>[l.value&&t.blok.label?(h(),y(N,{key:0,as:`span`,class:`absolute top-2 right-2 z-10`},{default:_(()=>[a(v(t.blok.label),1)]),_:1})):C(``,!0),l.value?.filename?(h(),y(s(E),{key:1,class:`relative w-full overflow-hidden`,ratio:s(V)(t.blok.imageRatio)},{default:_(()=>[i(L,{payload:l.value,sizes:s(R),"aspect-ratio":s(B)(t.blok.imageRatio),"suppress-ai-label-overlay":``,class:`h-full w-full object-cover`},null,8,[`payload`,`sizes`,`aspect-ratio`]),s(S)?(h(),y(H,{key:0,src:s(S),class:`absolute right-2 bottom-2 z-10 h-[35px] w-[35px]`},null,8,[`src`])):C(``,!0)]),_:1},8,[`ratio`])):C(``,!0),m.value?(h(),y(s(K),{key:2,class:`pt-6`},{default:_(()=>[i(s(J),{class:`flex items-start justify-between`},{default:_(()=>[i(D,{size:t.blok.headingLevel||`h3`,as:t.blok.headingLevel||`h3`},{default:_(()=>[a(v(m.value),1)]),_:1},8,[`size`,`as`]),i(Y,{class:u([{"rotate-90 group-hover:translate-y-1 group-active:translate-y-2":s(r),"group-hover:translate-x-1 group-active:translate-x-2":!s(r)},`h-6 w-6 shrink-0 fill-current transition-transform duration-200 sm:h-6 sm:w-6`]),"aria-hidden":`true`},null,8,[`class`])]),_:1})]),_:1})):C(``,!0),b.value?(h(),y(s(G),{key:3,class:`flex-1`},{default:_(()=>[i(s(q),{class:`pt-2`},{default:_(()=>[t.blok.content?.length?(h(!0),d(g,{key:0},f(t.blok.content,e=>(h(),y(T,{blok:e},null,8,[`blok`]))),256)):(h(),y(A,{key:1,doc:s(c)?.description},null,8,[`doc`]))]),_:1})]),_:1})):C(``,!0)]),_:1})]),_:1},8,[`href`,`aria-label`,`data-element-type`]))}}),le=m({__name:`Card`,props:{blok:{}},setup(e){let t=e,n=p(()=>!!(o(t.blok).linkedStoryPreview&&o(t.blok).linkedStory?.id));return(e,i)=>{let a=r(`editable`);return n.value?l((h(),y(ce,{key:0,blok:t.blok},null,8,[`blok`])),[[a,t.blok]]):l((h(),y(X,{key:1,blok:t.blok},null,8,[`blok`])),[[a,t.blok]])}}}),ue=e({default:()=>$}),$=le;export{ue as n,X as r,$ as t};

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.