PageSourceSearch

https://www.velocityfrequentflyer.com/etc.clientlibs/my-velocity/c…tableMembershipCard.65679cd99cf53b7c366d.js

js velocityfrequentflyer.com collected 2026-09-24 10:08:23 UTC 10,041 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkvff_my_velocity=self.webpackChunkvff_my_velocity||[]).push([[8135],{16505(e,i,t){t.r(i),t.d(i,{default:()=>B});var r=t(74848),s=t(96540),l=t(85371),n=t(72987),a=t(92816),o=t(96758),c=t(6961),d=t(77023),h=t(53546),m=t(49184),x=t(58673),f=t(85486),p=t(94050),g=t(17911),y=t(3848),j=t(57455),u=t(38092),b=t(42073),A=t(87571);const C=async e=>{const i=document.createElement("canvas");return i.width=120,i.height=120,A.Ay.toCanvas(i,{bcid:"azteccode",text:e,scale:3,height:10,includetext:!0,textxalign:"center"}),i.toDataURL("image/png",1)},v=l.vv.create({page:{fontFamily:"Helvetica"},viewer:{width:window.innerWidth,height:window.innerHeight},image:{width:80,height:80},cardDateContainer:{flexDirection:"row",alignItems:"center"},cardDateHeading:{fontSize:8,lineHeight:1,marginBottom:2},cardDate:{fontSize:8,lineHeight:1.1,fontFamily:"Helvetica-Bold"}}),w=(e,i,t,r,s)=>{if(e)return r&&s?e.find(e=>e[i]===t&&e[r]===s):e.find(e=>e[i]===t)},S=e=>j.c9.fromFormat(e,"yyyy-MM-dd").toFormat("dd-MMM-yyyy"),D=({printableMembershipCard:e,digitalCardInfo:i})=>{var t,s;const{title:n,description:a,instructions:o,importantInformation:c,velocityTierLogo:d,footer:h,velocityLogo:m,virginLogo:x}=e||{},{title:f,reviewDate:p,firstName:g,lastName:j,loungeMembershipExpiryDate:A,cardExpiryDate:D,membershipId:E,qrCode:M,tierLevel:P,user:B}=i||{},Y=(0,y.oN)(B||{}),N=f&&g&&j?`${(0,u.Zr)(f)} ${g} ${j}`:null,z=(0,u.FV)(E);let F=null==(t=w(d||[],"tierLevel",P||""))?void 0:t.logoPath;if(Y){const e=(0,y.Lq)(B),i=(0,y.xV)(B);F=null==(s=w(d||[],"tierLevel",e||"",i?"subTierLevel":void 0,"L"))?void 0:s.logoPath}return(0,r.jsx)(l.yo,{children:(0,r.jsx)(l.YW,{size:"A4",children:(0,r.jsxs)(l.Ss,{style:{margin:"10%",flexDirection:"column",rowGap:"16",position:"relative"},children:[(0,r.jsxs)(l.Ss,{style:{flexDirection:"row",justifyContent:"space-between"},children:[(0,r.jsxs)(l.Ss,{style:{flexDirection:"row",justifyContent:"flex-start"},children:[m&&(0,r.jsx)(l._V,{style:{width:67,height:26,marginRight:8},src:m}),x&&(0,r.jsx)(l._V,{style:{width:87,height:26},src:x})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},children:[N&&(0,r.jsx)(l.EY,{style:{fontSize:10,marginBottom:2},children:N}),z&&(0,r.jsxs)(l.EY,{style:{fontSize:14,fontFamily:"Helvetica-Bold"},children:["Membership: ",z]})]})]}),(0,r.jsx)(l.Ss,{style:{backgroundColor:"lightgrey",height:1}}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",rowGap:"6px"},children:[(0,r.jsx)(l.EY,{style:{fontSize:14,fontFamily:"Helvetica-Bold",marginTop:24},children:(0,b.A)(n,{firstName:g,lastName:j})}),(0,r.jsx)(l.EY,{style:{fontSize:9},children:a})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",rowGap:8},children:[(0,r.jsx)(l.EY,{style:{fontSize:11,fontFamily:"Helvetica-Bold"},children:null==o?void 0:o.title}),(0,r.jsx)(l.EY,{style:{fontSize:9},children:null==o?void 0:o.description})]}),(0,r.jsxs)(l.Ss,{style:{border:2,borderStyle:"dashed",position:"relative",zIndex:9999,flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",width:242,height:152,padding:8,margin:"40 auto"},children:[(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",rowGap:16,flexBasis:"50%"},children:[(0,r.jsxs)(l.Ss,{style:{flexDirection:"row",marginTop:8},children:[m&&(0,r.jsx)(l._V,{style:{width:43,height:16,marginRight:4},src:m}),x&&(0,r.jsx)(l._V,{style:{width:54,height:16},src:x})]}),(0,r.jsxs)(l.Ss,{children:[N&&(0,r.jsx)(l.EY,{style:{fontSize:10,marginBottom:2},children:N}),z&&(0,r.jsx)(l.EY,{style:{fontSize:14,fontFamily:"Helvetica-Bold"},children:z})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",rowGap:4},children:[D&&"R"!==P&&!Y&&(0,r.jsxs)(l.Ss,{style:v.cardDateContainer,children:[(0,r.jsx)(l.EY,{style:v.cardDateHeading,children:"Card exp: "}),(0,r.jsx)(l.EY,{style:v.cardDate,children:S(D)})]}),p&&!Y&&(0,r.jsxs)(l.Ss,{style:v.cardDateContainer,children:[(0,r.jsx)(l.EY,{style:v.cardDateHeading,children:"Review date: "}),(0,r.jsx)(l.EY,{style:v.cardDate,children:S(p)})]}),A&&(0,r.jsxs)(l.Ss,{style:v.cardDateContainer,children:[(0,r.jsx)(l.EY,{style:v.cardDateHeading,children:"Lounge expiry: "}),(0,r.jsx)(l.EY,{style:v.cardDate,children:S(A)})]})]})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",height:"100%",position:"relative"},children:[M&&(0,r.jsx)(l._V,{src:C(M),style:v.image}),F&&(0,r.jsx)(l._V,{style:{width:78,height:42,left:10,bottom:-8,zIndex:1,position:"absolute"},src:F})]})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column",rowGap:2},children:[(null==c?void 0:c.title)&&(0,r.jsxs)(l.Ss,{style:{fontFamily:"Helvetica-Bold",marginBottom:6,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[(0,r.jsx)(l.EY,{children:(0,r.jsx)(l._V,{style:{marginRight:2,height:12,width:12},src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEeSURBVHgBvVVtdcJAEJxGAQ6IAyLhJCDh6qAOSBVQCakCcECrgFZBggJwADtkD/LycnsQeMx78yO3u3Mf+xHgRZgI58KVsBYelbWu+Vjg28AahZbCXNgIf4Q7tc2ERcf2KaxgYKkn2Qid4Veoz1FjBrFQhxK3o4yJ+hFifVHfXeRjb42guTIGXn+PNpmX0xVGwCqxoVONj+Bcw8ZEaYEa60xP9p9wPigt/ApnFMyFfwnnCulbNNTK8GRkqjzF42AXNRTkdR0exzkXFPxG+44O4+FUY80PlgMffGMEVLCTsu3b2QUszAXuR5gBvm8oR4gmB0oQ5RUc4qAtjK+vrmFowHrdOUdbUqyC0ElTXBPAznmHJuIWeMR/ARwCg719AreQT8svTCEOAAAAAElFTkSuQmCC"})}),(0,r.jsxs)(l.EY,{style:{fontSize:10},children:[" ",null==c?void 0:c.title]})]}),(null==c?void 0:c.cardInfo)&&(null==c?void 0:c.cardInfo.map(e=>(0,r.jsx)(l.Ss,{style:{flexDirection:"row",flexWrap:"wrap"},children:(0,r.jsxs)(l.EY,{style:{fontSize:7},children:[(0,r.jsx)(l.EY,{style:{fontSize:7,fontFamily:"Helvetica-Bold"},children:e.title})," ",e.description]})}
1,e.title)))]}),(0,r.jsx)(l.Ss,{style:{backgroundColor:"lightgrey",height:1}}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"row",justifyContent:"space-between"},children:[(0,r.jsxs)(l.Ss,{children:[(0,r.jsx)(l.Ss,{style:{flexDirection:"row",flexWrap:"wrap"},children:(null==h?void 0:h.socialLinks)&&(null==h?void 0:h.socialLinks.map(e=>(0,r.jsxs)(l.Ss,{style:{flexDirection:"row",flexWrap:"wrap",marginRight:16},children:[(null==e?void 0:e.iconUrl)&&(0,r.jsx)(l._V,{style:{width:8,height:8,marginRight:4,backgroundColor:"grey"},src:e.iconUrl}),(null==e?void 0:e.title)&&(0,r.jsx)(l.EY,{style:{fontSize:7},children:e.title})]},e.title)))}),(0,r.jsx)(l.Ss,{children:(0,r.jsx)(l.EY,{style:{fontSize:7,marginTop:2},children:null==h?void 0:h.disclaimerText})})]}),(0,r.jsxs)(l.Ss,{style:{flexDirection:"column"},children:[(0,r.jsx)(l.EY,{style:{fontSize:7,fontFamily:"Helvetica-Bold",marginBottom:2},children:null==h?void 0:h.title}),(0,r.jsx)(l.EY,{style:{fontSize:7},children:null==h?void 0:h.url})]})]}),(0,r.jsx)(l.Ss,{})]})})})},E="src-features-PrintableMembershipCard-components-PrintDetail-PrintDetail_description",M=({title:e,description:i,errorMessages:t,ctaContainer:s,pdfHandler:l=()=>{},pdfLoadError:n=!1,pdfLoading:a=!1})=>{const{defaultErrorMessage:o}=t||{};return(0,r.jsxs)("div",{className:"src-features-PrintableMembershipCard-components-PrintDetail-PrintDetail_printInfoWrapper",children:[e&&(0,r.jsx)(f.A,{className:"src-features-PrintableMembershipCard-components-PrintDetail-PrintDetail_title",content:e}),i&&(0,r.jsx)(f.A,{className:E,content:i}),(0,u.C)(s)&&(0,r.jsx)(c.A,{title:s.ctaTitle,buttonType:s.ctaStyle,onClick:l,loading:a,disabled:a,children:s.ctaLabel},s.ctaLabel),n&&(0,r.jsxs)("div",{className:"src-features-PrintableMembershipCard-components-PrintDetail-PrintDetail_errorContainer",children:[(0,r.jsx)("p",{className:"src-features-PrintableMembershipCard-components-PrintDetail-PrintDetail_errorTitle",children:null==o?void 0:o.title}),(null==o?void 0:o.description)&&(0,r.jsx)(f.A,{className:E,content:null==o?void 0:o.description})]})]})},P="src-features-PrintableMembershipCard-PrintableMembershipCard_errorContainer",B=({title:e,description:i,ctaContainer:t,printableMembershipCard:j})=>{var u,b;const A=(0,g.A)(e=>e.user),C=(0,y.S_)(A),v=(0,y.ls)(A),w="V"===(0,y.Lq)(A),[S,E]=(0,s.useState)(),[B,Y]=(0,s.useState)(!1),[N,z]=(0,s.useState)(!1),{isShowing:F,toggle:R}=(0,p.A)(),V=(0,s.useCallback)(async()=>{try{z(!0),Y(!1);const e=await o.A.vffV2Api.get("/loyalty/v2/digital-cards");E({...e.data.data,user:A}),z(!1),R()}catch{z(!1),Y(!0)}},[R,A]);return(0,r.jsx)(d.A,{section:a.E.printableMembershipCard,children:(0,r.jsxs)("div",{className:"src-features-PrintableMembershipCard-PrintableMembershipCard_container",children:[!C&&v&&(0,r.jsx)(h.A,{content:"Sorry, we're having issues with our system.",className:P}),!C&&!v&&(0,r.jsx)("div",{className:"src-features-PrintableMembershipCard-PrintableMembershipCard_loadingContainer",children:(0,r.jsx)(m.A,{})}),C&&(0,r.jsxs)("div",{className:"src-features-PrintableMembershipCard-PrintableMembershipCard_componentContainer",children:[w&&(0,r.jsx)(h.A,{content:"You are not eligible to print a membership card. Please contact our customer service for more information.",className:P}),j&&!w&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M,{title:e,description:i,ctaContainer:t,pdfHandler:V,pdfLoading:N,pdfLoadError:B,errorMessages:null==j?void 0:j.errorMessages}),n.Bd&&F&&(0,r.jsx)(x.A,{onDismiss:R,"aria-label":"printable membership card modal",borderRadius:"small",children:(0,r.jsx)(l.TO,{style:{width:"720px",height:window.innerHeight},children:(0,r.jsx)(D,{printableMembershipCard:j,digitalCardInfo:S})})}),n.Fr&&F&&(0,r.jsx)(x.A,{onDismiss:R,"aria-label":"printable membership card modal",borderRadius:"small",children:(0,r.jsxs)("div",{className:"src-features-PrintableMembershipCard-PrintableMembershipCard_mobileContainer",children:[(0,r.jsx)(f.A,{className:"src-features-PrintableMembershipCard-PrintableMembershipCard_mobileDescription",content:j.mobileInfo.description}),(0,r.jsx)(l.XP,{document:(0,r.jsx)(D,{printableMembershipCard:j,digitalCardInfo:S}),fileName:"membershipcard.pdf",children:(0,r.jsx)(c.A,{buttonType:null==(u=j.mobileInfo)?void 0:u.ctaContainer.ctaType,children:null==(b=j.mobileInfo)?void 0:b.ctaContainer.ctaLabel})})]})})]})]})]})})}}}]);

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.