1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5812],{95812:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var s=r(37876),i=r(67031),n=r(37907),a=r(21875),l=r(87717),o=r(75219),c=r(50778),d=r(45836),x=r(86775),h=r(14232),p=r(20047),u=r(47641),m=r(69860),g=r(72489),f=r(91176),v=r(22570);let j=e=>{let{tripsList:t,tripsListType:r,headline:j,ctaLink:y,ctaText:A,colorSettings:w,sectionBackgroundColor:k,sectionFontColor:b,sectionAnchor:S,showAvatar:C,abridgedCard:I,showDepartureDate:z,departureId:E,wrapStyle:N,fixedTripList:_,whiteBackground:L}=e,R=(0,c.A)(),T=(0,d.A)(R.breakpoints.down("md")),[F,H]=(0,h.useState)(!1),[W,D]=(0,h.useState)([]),[P,q]=(0,h.useState)([]),[B,M]=(0,h.useState)(0),[X,G]=(0,x.A)({loop:!0,skipSnaps:!1}),J=(0,h.useRef)([]),[K,O]=(0,h.useState)(0),Q=T&&K>0;(0,h.useEffect)(()=>{if(!T)return void O(0);if(K||!(null==W?void 0:W.length))return;let e=!1,t=()=>{if(e)return;let t=J.current.reduce((e,t)=>t?Math.max(e,t.offsetHeight):e,0);t>0&&O(t)},r=()=>requestAnimationFrame(t),s=document.fonts;return(null==s?void 0:s.ready)?s.ready.then(r).catch(r):r(),()=>{e=!0}},[T,W,K]),(0,h.useEffect)(()=>{let e;if(!T)return;let t=()=>{clearTimeout(e),e=setTimeout(()=>O(0),150)};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),clearTimeout(e)}},[T]);let U=(0,h.useCallback)(e=>{G&&G.scrollTo(e)},[G]),V=(0,h.useCallback)(()=>{G&&M(G.selectedScrollSnap())},[G,M]);(0,h.useEffect)(()=>{G&&(V(),q(G.scrollSnapList()),G.on("select",V))},[G,q,V]);let Y=async()=>{H(!0);try{let e=(await Promise.all(t.filter(e=>e.tripId||e.p15_tripsid).map(e=>fetch("/api/trips/"+(e.tripId||e.p15_tripsid)).then(e=>e.json())))).map(e=>e.trip);D(e),H(!1)}catch(e){console.log(e),H(!1)}};(0,h.useEffect)(()=>{Y()},[]);let Z=j||!T&&y&&A?(0,s.jsxs)(a.A,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"flex-start"},justifyContent:{xs:"center",md:"space-between"},gap:"24px",mb:{xs:"32px",md:"50px"}},children:[j&&(0,s.jsx)(f.Ay,{textStyle:"h2",sx:{textAlign:{xs:"center",md:"left"},m:0},children:j}),!T&&y&&A&&(0,s.jsx)(u.Ay,{variant:"secondary",component:g.A,href:y,sx:{flexShrink:0,mt:{xs:0,md:"8px"}},children:A})]}):null,$=T&&y&&A?(0,s.jsx)(a.A,{sx:{display:"flex",justifyContent:"center",mt:"2rem"},children:(0,s.jsx)(u.Ay,{variant:"secondary",component:g.A,href:y,sx:{flexShrink:0},children:A})}):null;return F?(0,s.jsx)(a.A,{style:{background:L?p.k.white:"var(--paper)"},children:(0,s.jsxs)(a.A,{sx:{maxWidth:"1500px",mx:"auto","@media (max-width: 1500px)":{px:"var(--s-6)"}},children:[j&&(0,s.jsx)(a.A,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"flex-start"},justifyContent:{xs:"center",md:"space-between"},gap:"24px",mb:{xs:"32px",md:"50px"}},children:(0,s.jsx)(f.Ay,{textStyle:"h2",component:"h2",sx:{textAlign:{xs:"center",md:"left"},m:0},children:j})}),(0,s.jsx)(l.A,{container:!0,spacing:3*!T,children:T?(0,s.jsx)(l.A,{size:{xs:12,sm:6,md:4},children:(0,s.jsx)(o.A,{variant:"rectangular",width:"100%",height:500})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.A,{size:{xs:12,sm:6,md:4},children:(0,s.jsx)(o.A,{variant:"rectangular",width:"100%",height:500})}),(0,s.jsx)(l.A,{size:{xs:12,sm:6,md:4},children:(0,s.jsx)(o.A,{variant:"rectangular",width:"100%",height:500})}),(0,s.jsx)(l.A,{size:{xs:12,sm:6,md:4},children:(0,s.jsx)(o.A,{variant:"rectangular",width:"100%",height:500})})]})})]})}):(0,s.jsx)(a.A,{style:{background:L?p.k.white:"var(--paper)"},children:(0,s.jsx)(a.A,{id:S,sx:{maxWidth:"1500px",mx:"auto","@media (max-width: 1500px)":{px:"var(--s-6)"}},children:(0,s.jsxs)(a.A,{sx:{width:"100%"},children:[Z,N||W&&(null==W?void 0:W.length)<=3&&!T?(0,s.jsx)(l.A,{container:!0,spacing:3*!T,sx:{display:T?"block":"flex",alignItems:"stretch"},children:null==W?void 0:W.map((e,t)=>(0,s.jsx)(v.A,{isLoading:F,trip:e,index:t,threeCards:!T,tripsLength:null==W?void 0:W.length,avatar:C,departure:z,departureId:E},t))}):(0,s.jsxs)("div",{children:[(0,s.jsxs)(a.A,{sx:{overflow:"hidden",position:"relative","& .carouselNav":{opacity:0,pointerEvents:"none",transition:"opacity 0.2s ease"},"&:hover .carouselNav":{opacity:1,pointerEvents:"auto"}},children:[(0,s.jsx)(a.A,{className:"embla",ref:X,sx:{paddingBlock:"10px"},children:(0,s.jsx)("div",{style:{display:"flex",flexWrap:"nowrap",alignItems:T?"center":"stretch"},children:null==W?void 0:W.map((e,t)=>{let r=Q&&t===B,i=T?r?300:240:void 0;return(0,s.jsx)(l.A,{container:!0,ref:e=>{J.current[t]=e},style:{position:"relative",flex:"0 0 auto",width:T?"80%":"calc((100% - 48px) / 3)",marginRight:"24px",minHeight:Q?"".concat(K+60*!!r,"px"):void 0,transition:Q?"min-height 0.45s cubic-bezier(.22,.61,.36,1)":void 0},children:(0,s.jsx)(v.A,{isLoading:F,trip:e,index:t,threeCards:!T,avatar:C,departure:z,departureId:E,imageHeight:i,carousel:!0},t)},t)})})}),!T&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{className:"carouselNav",style:{position:"absolute",top:"50%",left:25,zIndex:99,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:p.k.white,border:"none",cursor:"pointer",height:30,width:30,borderRadius:"50%",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"},onClick:()=>G&&G.scrollPrev(),children:(0,s.jsx)(i.A,{sx:{cursor:"pointer",color:p.k.kg_onyx,opacity:.6,"&:hover":{opacity:1},fontSize:"0.8rem",transform:"translateX(2px)"}})}),(0,s.jsx)(a.A,{className:"carouselNav",style:{position:"absolute",top:"50%",right:15,zIndex:9,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:p.k.white,border:"none",cursor:"pointer",height:30,width:30,borderRadius:"50%",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"},onClick:()=>G&&G.scrollNext(),children:(0,s.jsx)(n.A,{sx:{cursor:"pointer",color:p.k.kg_onyx,opacity:.6,"&:hover":{opacity:1},fontSize:"0.8rem"}})})]})]}),((null==W?void 0:W.length)>3||T)&&(0,s.jsx)(m.A,{count:P.length,selected:B,onSelect:U,activeColor:p.k.kg_onyx,inactiveColor:p.k.disabled_graylight,sx:{mt:"2rem"}})]}),$]})})})}}}]);
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.