PageSourceSearch

https://agora.gentlemenoftheroad.com/_next/static/chunks/747-200ba0027c379c49.js

js gentlemenoftheroad.com collected 2026-10-02 09:57:33 UTC 30,621 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[747],{18788:(e,t,r)=>{r.d(t,{o:()=>m});var o=r(26514),l=r(75834),a=r(77535),i=r(86780),n=r(57355),s=r(99518),d=r(59285),c=r.n(d);let y=e=>{let{width:t=18,height:r=14,color:l="#252525",style:a}=e;return(0,o.jsx)(c(),{width:t,height:r,viewBox:"0 0 18 14",fill:"none",style:a,children:(0,o.jsx)(d.Path,{d:"M18 3.00744L7.00218 14.0049L0 7.00254L3.00726 3.99528L7.00218 7.99056L14.9927 0L18 3.00744Z",fill:l})})},h=a.A.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flex:1},checkboxRoot:{borderRadius:4,width:n.Kz.XL,height:n.Kz.XL,alignItems:"center",justifyContent:"center",marginRight:n.Kz.M,borderColor:n.Jy.midGrey,borderWidth:2,backgroundColor:n.Jy.veryLightGrey},checkboxRootDark:{backgroundColor:n.Jy.white,borderColor:"transparent"},checkboxRootFocused:{borderColor:n.Jy.black,borderWidth:4},checkboxRootError:{borderColor:n.Jy.errorRed,borderWidth:4},checkedIcon:{width:18,height:14}}),u={...a.A.absoluteFillObject,height:"100%",margin:0,padding:0,width:"100%",cursor:"pointer",opacity:0},m=l.forwardRef((e,t)=>{let{checked:r,labelComponent:a,labelText:d,id:c,onChange:m,error:b,onFocus:p,dark:x,textStyle:f}=e,[g,J]=(0,l.useState)(r),[j,w]=(0,l.useState)(!1);return(0,o.jsxs)(i.A,{style:h.container,children:[(0,o.jsxs)(i.A,{style:[h.checkboxRoot,x&&h.checkboxRootDark,b&&h.checkboxRootError,j&&h.checkboxRootFocused],children:[g&&(0,o.jsx)(y,{width:18,height:14}),(0,o.jsx)("input",{type:"checkbox",style:u,defaultChecked:r,id:c,onChange:e=>{m(e.target.checked),J(e.target.checked)},onFocus:()=>{w(!0),p&&p()},onBlur:()=>w(!1),ref:t})]}),(0,o.jsxs)("label",{htmlFor:c,children:[a&&(0,o.jsx)(a,{}),d&&(0,o.jsx)(s.E,{color:x?n.Jy.white:n.Jy.black,size:n.s.XS,bold:x,style:f,children:d})]})]})});m.displayName="CheckBox"},34130:(e,t,r)=>{r.d(t,{Q:()=>N});var o=r(26514),l=r(47977),a=r.n(l),i=r(3453),n=r(79117),s=r(66720),d=r(2125),c=r(75834),y=r(61525),h=r(57355),u=r(84924),m=r(26963),b=r(50812),p=r(61904),x=r(70096),f=r(87931),g=r(64826);let J=e=>{var t,r;let{handlePaymentMethodAdded:l,showSetDefault:a=!0,themeColor:i}=e,{stripePromise:n}=(0,m.ib)(),[s,d]=(0,c.useState)(null),[h,J]=(0,c.useState)(!1),{t:j}=(0,y.Bd)(["forms","common"]),[w,{data:v}]=(0,b.n_)(f.tT,{onError:()=>{d(j("forms:formErrors.generic"))}});(0,c.useEffect)(()=>{var e,t;(null==v||null==(t=v.attachPaymentMethod)||null==(e=t.errors)?void 0:e.length)&&d(v.attachPaymentMethod.message)},[null==v||null==(t=v.attachPaymentMethod)?void 0:t.errors]);let[k,{data:C,startPolling:M,stopPolling:S}]=(0,b._l)(x.N8,{ssr:!1,onError:()=>{d(j("forms:formErrors.generic")),J(!1)}});(0,c.useEffect)(()=>{var e,t;let r=null==C||null==(e=C.paymentMethodStatus)?void 0:e.status;switch(r&&"pending"!==r&&(S(),J(!1)),r){case"attached":d(null),(null==C||null==(t=C.paymentMethodStatus)?void 0:t.stripePaymentMethodId)&&l(C.paymentMethodStatus.stripePaymentMethodId);break;case"failed":d(j("forms:formErrors.generic"));break;case"card_declined":d(j("forms:paymentMethod.cardDeclined"));break;case"expired_card":d(j("forms:paymentMethod.expiredCard"));break;case"incorrect_cvc":d(j("forms:paymentMethod.incorrectCsv"));break;case"incorrect_number":d(j("forms:paymentMethod.incorrectNumber"));break;case"duplicate":d(j("forms:paymentMethod.duplicate"));break;case"pending":M(1e3)}},[null==C||null==(r=C.paymentMethodStatus)?void 0:r.status]);let E=async(e,t,r)=>{if(d(null),e&&t){var o,l,a;let i=await (null==r?void 0:r.createPaymentMethod({type:"card",card:e,billing_details:{address:{line1:t.line1,postal_code:t.postal_code,country:t.country},name:t.name}}));if(null==i?void 0:i.error)throw Error(i.error.message||j("forms:formErrors.generic"));if(null==i||null==(o=i.paymentMethod)?void 0:o.id){let e=i.paymentMethod.id,r=await w({variables:{input:{paymentMethodId:e,setDefault:t.checkboxValue}}});if((null==r||null==(a=r.data)||null==(l=a.attachPaymentMethod)?void 0:l.success)==!0)J(!0),k({variables:{paymentMethodId:e}});else throw Error(j("forms:formErrors.generic"))}else throw Error(j("forms:formErrors.generic"))}else throw Error(j("forms:formErrors.generic"))};return(0,o.jsx)(u.Elements,{stripe:n,options:g.b,children:(0,o.jsx)(p.k,{brandColor:i,buttonText:j("common:paymentMethods.addCardButton"),fatalErrorMessage:null,checkboxLabel:j("common:paymentMethods.setDefault"),showCheckbox:a,onSubmit:E,errorMessage:s,customFormSubmitting:h})})};var j=r(79554),w=r(4580),v=r(77535),k=r(86780),C=r(42927),M=r(99518),S=r(32137),E=r(59285);let L=v.A.create({paymentMethod:{padding:h.Kz.M,borderRadius:4,borderWidth:2,borderColor:h.Jy.lightGrey,marginBottom:h.Kz.XS,display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",cursor:"pointer"},paymentMethodActive:{borderColor:h.Jy.black},paymentMethodExpired:{cursor:"default",borderColor:h.Jy.notificationRed},paymentMethodExpiredText:{color:h.Jy.notificationRed},addNewCard:{display:"flex",alignItems:"center",flexDirection:"row"},rightArrow:{width:15,height:16,marginRight:4},loading:{backgroundColor:h.Jy.notificationRed,height:18,width:18,padding:5,borderRadius:15,justifyContent:"center"},icon:{alignSelf:"center",borderWidth:2,borderColor:h.Jy.lightGrey,borderRadius:10,marginLeft:18,height:20,width:20}}),A=e=>{let{paymentMethods:t,selected:r,handleSelectedPaymentMethod:l,handleAddNewCard:a,handleRemoveCard:i,expiredText:n,addNewCardText:s}=e;return(0,o.jsxs)(k.A,{children:[(0,o.jsx)(k.A,{children:t&&t.map(e=>(0,o.jsx)(k.A,{children:e.expired?(0,o.jsxs)(k.A,{style:[L.paymentMethod,L.paymentMethodExpired],children:[(0,o.jsx)(M.E,{bold:!0,size:h.s.XS,style:[L.paymentMethodExpiredText],children:e.label}),(0,o.jsx)(M.E,{size:h.s.XS,style:[L.paymentMethodExpiredText,{flex:1,marginLeft:4}],children:n}),(0,o.jsx)(S.d,{onPress:()=>{e.loading=!0,i&&i(e)},accessibilityRole:"button",accessibilityLabel:"Remove card",disabled:e.loading,children:e.loading?(0,o.jsx)(k.A,{style:[L.loading],children:(0,o.jsx)(C.A,{size:10,
1color:h.Jy.white})}):(0,o.jsxs)(E.Svg,{width:18,height:18,viewBox:"0 0 18 18",fill:"none",children:[(0,o.jsx)(E.Circle,{cx:9,cy:9,r:9,fill:h.Jy.notificationRed}),(0,o.jsx)(E.Path,{d:"M6 6l6 6M12 6l-6 6",stroke:"#fff"})]})})]}):(0,o.jsx)(S.d,{onPress:()=>{l&&l(e)},accessibilityRole:"button",children:r.value==e.value?(0,o.jsxs)(k.A,{style:[L.paymentMethod,L.paymentMethodActive],children:[(0,o.jsx)(M.E,{bold:!0,size:h.s.XS,textProps:{testID:"payment-method-label"},style:{flex:1},children:e.label}),(0,o.jsx)(M.E,{size:h.s.XS,children:e.secondaryLabel}),(0,o.jsx)(E.Svg,{width:20,height:20,fill:"none",viewBox:"0 0 20 20",style:{marginLeft:18},children:(0,o.jsx)(E.Path,{d:"M10 0C4.47 0 0 4.47 0 10s4.47 10 10 10 10-4.47 10-10S15.53 0 10 0zm4.839 7.926l-5.922 5.899a.91.91 0 01-.645.276.872.872 0 01-.645-.276L4.7 10.922a.918.918 0 010-1.314.918.918 0 011.314 0l2.258 2.258 5.253-5.253a.918.918 0 011.314 0c.345.369.345.968 0 1.313z",fill:"#000"})})]}):(0,o.jsxs)(k.A,{style:L.paymentMethod,children:[(0,o.jsx)(M.E,{bold:!0,size:h.s.XS,style:{flex:1},children:e.label}),(0,o.jsx)(M.E,{size:h.s.XS,children:e.secondaryLabel}),(0,o.jsx)(k.A,{style:L.icon})]},e.value)})},e.value))}),(0,o.jsx)(w.X,{size:"XS"}),(0,o.jsx)(k.A,{children:(0,o.jsxs)(S.d,{onPress:()=>{a&&a()},style:L.addNewCard,children:[(0,o.jsx)(E.Svg,{style:L.rightArrow,viewBox:"0 0 50 50",children:(0,o.jsx)(E.Path,{fill:"#828282",d:"M37.059 12.98a1.996 1.996 0 00-1.899 1.176 1.998 1.998 0 00.371 2.203L41.676 23H3a1.988 1.988 0 00-1.754.992 1.982 1.982 0 000 2.016A1.988 1.988 0 003 27h38.676l-6.145 6.64a2.003 2.003 0 001.016 3.336 2.003 2.003 0 001.922-.617L48.973 25 38.469 13.64a2.006 2.006 0 00-1.41-.66z"})}),(0,o.jsx)(M.E,{bold:!0,size:h.s.XS,color:h.Jy.notificationGrey,children:s})]})})]})};var z=r(93260);let N=e=>{let t,{themeColor:r,onPaymentMethodConfirmed:l,focusCardButton:u=!1,addCardButton:m=!1,handlePaymentMethodSelect:p,buttonText:g,dark:v=!1,labelText:k,onSubmit:C,noPaymentMethodsCallback:M,tourId:S=null,fatalErrorMessage:E,progressBarColor:L,hiddenLabel:N,onDarkBackground:_,brandColor:I}=e,{t:R}=(0,y.Bd)(),[X,V]=(0,c.useState)(!1),[P,B]=(0,c.useState)(!1),[F,G]=(0,c.useState)([]),[T,D]=(0,c.useState)(m),[Z,W]=(0,c.useState)(""),[H,q]=(0,c.useState)(R("paymentMethods.formTitle")),[K,O]=(0,c.useState)(),[Y,Q]=(0,c.useState)(""),[U,$]=(0,c.useState)(),[ee,et]=(0,c.useState)(!1),[er,eo]=(0,c.useState)(!1),{isDesktop:el}=(0,d.Gu)();(0,c.useEffect)(()=>{if(!E&&ee){let e=setTimeout(()=>{eo(!0)},3e3);return()=>clearTimeout(e)}},[E,ee]),S&&(t={tourId:S});let{data:ea,refetch:ei}=(0,b.IT)(x.tp,{variables:t,ssr:!1}),[en]=(0,b.n_)(f.NC,{onError:()=>{G([R("forms:formErrors.generic")])}});(0,c.useEffect)(()=>{E?G([E]):G([])},[E]),(0,c.useEffect)(()=>{if(null==ea?void 0:ea.paymentMethods){var e;if(null==ea||null==(e=ea.paymentMethods)?void 0:e.length){W(R("paymentMethods.confirmCardButton"));let e=null==ea?void 0:ea.paymentMethods.map(e=>{let t="".concat(e.cardType," *").concat(e.cardLast4);t=t[0].toUpperCase()+t.slice(1);let r=e.billingName,o=new Date;o.setFullYear(parseInt(e.expiryYear),parseInt(e.expiryMonth),0),o.setHours(24,0,0,0);let l=!1;return o<new Date&&(l=!0),{label:t,secondaryLabel:r,value:e.stripePaymentMethodId,expired:l}});Y?$(e.find(e=>e.value===Y)):$(e[0]),O(e)}else M&&M(),$(void 0),O([]),W(R("paymentMethods.openCardFormButton"))}},[null==ea?void 0:ea.paymentMethods]);let es=()=>{K&&(null==K?void 0:K.length)>0?(p&&p(),D(!1)):V(!0)},ed=e=>{Q(e),ei(),B(!1),V(!1),l&&l()},ec=e=>{$(e),V(!1)},ey=()=>{q(R("paymentMethods.formTitle")),B(!0)},eh=()=>{V(!1),B(!1)},eu=async()=>{et(!0);try{U&&(await C(U.value),l&&l())}catch(e){et(!1),e instanceof Error&&G([e.message])}},em=async e=>{var t,r,o,l,a,i,n;let s=await en({variables:{paymentMethodId:e.value}});(null==s||null==(r=s.data)||null==(t=r.detachPaymentMethod)?void 0:t.success)===!0?(E||G([]),ei()):(null==s||null==(a=s.data)||null==(l=a.detachPaymentMethod)||null==(o=l.errors)?void 0:o.length)&&G([null==s||null==(n=s.data)||null==(i=n.detachPaymentMethod)?void 0:i.message])};return(0,o.jsxs)(o.Fragment,{children:[T?(0,o.jsxs)(o.Fragment,{children:[u?(0,o.jsx)(s.ND,{themeColor:r,onPress:es,children:Z}):(0,o.jsx)(s.eN,{onPress:es,dark:!0,children:Z}),","]}):ea&&U&&(0,o.jsxs)("div",{className:a().dynamic([["cff3fc21c92f8f6f",[I,h.Jy.white]]]),children:[(0,o.jsx)(j.M,{selectedValue:U,labelText:k,dark:v,id:"paymentMethodSelector",labelSize:h.s.S,labelSpacing:h.Kz.M,onClick:()=>{E||G([]),q(R("paymentMethods.title")),V(!0)},errors:F,expiredText:R("paymentMethods.expired"),hiddenLabel:N,onDarkBackgroun
1d:_}),(0,o.jsx)(w.X,{size:"M"}),(0,o.jsx)(z.b,{themeColor:r,loading:!E&&ee,onPress:eu,disabled:U.expired||!!E,dark:v,progressBarColor:L,children:g}),(0,o.jsx)(w.X,{size:"XS"}),er&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.X,{size:"XS"}),(0,o.jsx)("div",{className:a().dynamic([["cff3fc21c92f8f6f",[I,h.Jy.white]]])+" loading-text",children:R("common:loaderPaymentProcessing")})]})]}),X&&!el&&(0,o.jsx)(n.S,{title:H,accessibilityLabelledByID:"card-form-title",accessibilityLabelledBy:"card-form-title",closeButtonLabel:R("closeModal"),onClose:eh,children:!P&&K&&U?(0,o.jsx)(A,{paymentMethods:K,selected:U,handleSelectedPaymentMethod:ec,handleAddNewCard:ey,handleRemoveCard:em,expiredText:R("paymentMethods.expired"),addNewCardText:R("paymentMethods.addNewCard")}):(0,o.jsx)(J,{themeColor:r,handlePaymentMethodAdded:ed,showSetDefault:!!(null==K?void 0:K.length)})}),X&&el&&(0,o.jsx)(i.a,{accessibilityLabelledByID:"card-form-title",accessibilityLabelledBy:"card-form-title",title:H,closeButtonLabel:R("closeModal"),onClose:eh,children:!P&&K&&U?(0,o.jsx)(A,{paymentMethods:K,selected:U,handleSelectedPaymentMethod:ec,handleAddNewCard:ey,handleRemoveCard:em,expiredText:R("paymentMethods.expired"),addNewCardText:R("paymentMethods.addNewCard")}):(0,o.jsx)(J,{themeColor:I,handlePaymentMethodAdded:ed,showSetDefault:!!(null==K?void 0:K.length)})}),(0,o.jsx)(a(),{id:"cff3fc21c92f8f6f",dynamic:[I,h.Jy.white],children:".loading-text.__jsx-style-dynamic-selector{text-align:center;background-color:".concat(I,";color:").concat(h.Jy.white,";border-radius:5px;padding:8px 12px;font-size:13px;line-height:20px;letter-spacing:-0.02 * 13px;font-weight:700}")})]})}},37809:(e,t,r)=>{r.d(t,{_:()=>s});var o=r(26514),l=r(47977),a=r.n(l),i=r(96456),n=r.n(i);r(75834);let s=e=>{let{testId:t,target:r,onClick:l,children:i,themeColor:s,isBold:d,...c}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n(),{...c,href:e.href||"",legacyBehavior:!0,children:(0,o.jsx)("a",{"data-testid":t,target:r||"_self",onClick:l,className:a().dynamic([["b91851ff231cff5b",[s,d&&"bold"]]]),children:i})}),(0,o.jsx)(a(),{id:"b91851ff231cff5b",dynamic:[s,d&&"bold"],children:"a.__jsx-style-dynamic-selector{color:".concat(s,";text-decoration:none;font-weight:").concat(d&&"bold","}")})]})}},49978:(e,t,r)=>{r.d(t,{n:()=>l});var o=r(75834);let l=()=>{let[e,t]=(0,o.useState)("undefined"==typeof navigator||"boolean"!=typeof navigator.onLine||navigator.onLine),r=()=>t(!0),l=()=>t(!1);return(0,o.useEffect)(()=>(window.addEventListener("online",r),window.addEventListener("offline",l),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",l)}),[]),e}},61904:(e,t,r)=>{r.d(t,{k:()=>R});var o=r(26514),l=r(47977),a=r.n(l),i=r(75834),n=r(92263),s=r(93260),d=r(61525),c=r(16318),y=r(84924),h=r(66405),u=r(54681),m=r(99113),b=r(4580),p=r(57355),x=r(99518),f=r(67849),g=r(46206),J=r(77535),j=r(86780),w=r(5148),v=r(13347),k=r(86358),C=r.n(k),M=r
1(87259),S=r(26380);let E=C().customList("countryCode","{countryNameEn}"),L=Object.keys(E).map(e=>({value:e,label:E[e]})).sort((e,t)=>e.label.localeCompare(t.label)),A="web"===g.A.OS?{cursor:"pointer"}:{},z=J.A.create({fieldContainer:{height:142},topInput:{backgroundColor:p.Jy.white,borderColor:p.Jy.midGrey,borderWidth:1,borderTopLeftRadius:4,borderTopRightRadius:4,flexDirection:"row",alignItems:"center"},topInputFocused:{backgroundColor:p.Jy.white,...w.c5,borderColor:p.Jy.black,borderWidth:2,margin:-1,zIndex:1},middleInput:{backgroundColor:p.Jy.white,borderLeftWidth:1,borderRightWidth:1,borderColor:p.Jy.midGrey},middleInputFocused:{backgroundColor:p.Jy.white,...w.c5,borderColor:p.Jy.black,borderWidth:2,borderLeftWidth:2,borderRightWidth:2,marginHorizontal:-1,marginVertical:-2,zIndex:1},bottomInput:{backgroundColor:p.Jy.white,borderColor:p.Jy.midGrey,borderWidth:1,borderBottomLeftRadius:4,borderBottomRightRadius:4},bottomInputFocused:{backgroundColor:p.Jy.white,...w.c5,borderColor:p.Jy.black,borderWidth:2,margin:-1,zIndex:1},picker:{opacity:0,...J.A.absoluteFillObject,width:"100%",...A}}),N=e=>{let{getText:{legend:t,countryLabel:r,firstLineLabel:l,postcodeLabel:a},onCountryChange:n,countryValue:s,onFirstLineChange:d,onPostCodeChange:c,labelColor:y,errors:h=[]}=e,[u,m]=(0,i.useState)(null),[g,J]=(0,i.useState)({line1:!1,postcode:!1,country:!1});return(0,i.useEffect)(()=>{J({...g,country:!!s})},[s]),(0,o.jsxs)(j.A,{children:[(0,o.jsx)(x.E,{size:p.s.XS,color:y,bold:!0,children:t}),(0,o.jsx)(b.X,{size:"XS"}),(0,o.jsxs)(j.A,{style:z.fieldContainer,children:[(0,o.jsxs)(j.A,{style:[z.topInput,w.R7.textInput,!g.country&&w.R7.textInputEmpty,"country"===u&&z.topInputFocused],children:[(0,o.jsx)(j.A,{style:{flex:1},children:s?(0,o.jsx)(x.E,{bold:!0,children:E[s]}):(0,o.jsx)(x.E,{bold:!0,color:p.Jy.midGrey,children:r})}),(0,o.jsx)(S.D3,{width:12,height:9}),(0,o.jsxs)(M.A,{selectedValue:s,style:[w.R7.textInput,z.picker],accessibilityLabel:r,onValueChange:e=>{n(e)},onFocus:()=>{m("country")},onBlur:()=>{m(null)},children:[(0,o.jsx)(M.A.Item,{label:""}),L.map(e=>{let{label:t,value:r}=e;return(0,o.jsx)(M.A.Item,{value:r,label:t},r)})]})]}),(0,o.jsx)(v.d,{style:[w.R7.textInput,z.middleInput,"line1"===u&&z.middleInputFocused,!g.line1&&w.R7.textInputEmpty],autoComplete:"address-line1",accessibilityLabel:l,placeholder:l,placeholderTextColor:p.Jy.midGrey,onFocus:()=>m("line1"),onBlur:()=>m(null),onChangeText:e=>{d(e),J({...g,line1:!!e})}}),(0,o.jsx)(v.d,{style:[w.R7.textInput,z.bottomInput,"postcode"===u&&z.bottomInputFocused,!g.postcode&&w.R7.textInputEmpty],autoComplete:"postal-code",accessibilityLabel:a,placeholder:a,placeholderTextColor:p.Jy.midGrey,onFocus:()=>m("postcode"),onBlur:()=>m(null),onChangeText:e=>{c(e),J({...g,postcode:!!e})}})]}),h.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.X,{size:"XS"}),(0,o.jsx)(f.V,{errors:h})]})]})};var _=r(18788);let I={base:{fontSize:p.s.M.fontSize+"px",letterSpacing:p.s.M.letterSpacing+"px",fontFamily:p.Db.INTER,fontWeight:"bold","::placeholder":{color:p.Jy.midGrey}}},R=e=>{var t,r,l,g,J,j,w,v,k;let{fatalErrorMessage:C,buttonText:M,onSubmit:S,errorMessage:E,customFormSubmitting:L,checkboxLabel:A,showCheckbox:z,labelColor:R,dark:X=!1,progressBarColor:V,brandColor:P,extraInfoText:B}=e,{t:F}=(0,d.Bd)(["ticketing","forms"]),G=c.Ik({name:c.Yj().required(F("forms:fieldErrors.name.required")),line1:c.Yj().required(F("forms:fieldErrors.line1.required")),postal_code:c.Yj().required(F("forms:fieldErrors.postal_code.required")),country:c.Yj().required(F("forms:fieldErrors.country.required")),cardNumber:c.zM().required(F("forms:fieldErrors.cardNumber.required")),expiry:c.zM().required(F("forms:fieldErrors.expiry.required")),cvc:c.zM().required(F("forms:fieldErrors.cvc.required"))}),T=(0,y.useStripe)(),D=(0,y.useElements)(),[Z,W]=(0,i.useState)(""),[H,q]=(0,i.useState)(!1),[K,O]=(0,i.useState)(!1),[Y,Q]=(0,i.useState)(null),[U,$]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!C&&H){let e=setTimeout(()=>{O(!0)},3e3);return()=>clearTimeout(e)}},[C,H]);let[ee,et]=(0,i.useState)({cardNumber:{empty:!0,complete:!1},expiry:{empty:!0,complete:!1},cvc:{empty:!0,complete:!1}}),{register:er,setValue:eo,watch:el,handleSubmit:ea,formState:ei,getValues:en,clearErrors:es}=(0,h.mN)({resolver:(0,u.t)(G),defaultValues:{checkboxValue:!0}}),{errors:ed}=ei,ec=el("country");(0,i.useEffect)(()=>{er("name"),er("line1"),er("postal_code"),er("country"),er("cardNumber"),er("expiry"),er("cvc"),er("checkboxValue")},[er]),(0,i.useEffect)(()=>{ed&&Object.keys(ed).length&&W(F("forms:formErrors.validation"))},[ed,F]),(0,i.useEffect)(()=>{(async()=>{var e,t,r;if(D&&y.CardNumberElement&&(null==ee||null==(e=ee.cardNumber)?void 0:e.complete)){let e=D.getElement(y.CardNumberElement);if(Q(e),e){let o=await (null==T?void 0:T.createPaymentMethod({type:"card",card:e})),l=null==o||null==(r=o.paymentMethod)||null==(t=r.card)?void 0:t.country;l&&(eo("country",l),es("country"))}}else Y&&Q(null)})()},[ee]),(0,i.useEffect)(()=>{H&&Y&&async function(){try{await S(Y,en(),T)}catch(e){q(!1),e instanceof Error&&W(e.message)}}()},[Y,H]),(0,i.useEffect)(()=>{void 0!==L&&!1===L&&q(!1)},[L]);let ey={legend:F("ticketing:billingAddress"),countryLabel:F("ticketing:billingCountry"),firstLineLabel:F("ticketing:billingFirstLine"),postcodeLabel:F("ticketing:billingPostcode")},eh=ea(()=>{!function(e){return e.cardNumber.complete&&e.cvc.complete&&e.expiry.complete}(ee)?W(F("ticketing:missingPaymentDetails")):(W(""),q(!0))}),eu=Object.keys({cardNumber:null==ed||null==(t=ed.cardNumber)?void 0:t.message,expiry:null==ed||null==(r=ed.expiry)?void 0:r.message,cvc:null==ed||null==(l=ed.cvc)?void 0:l.message}).map(e=>{var t;return null==(t=ed[e])?void 0:t.message}).filter(e=>!!e);return(0,o.jsxs)("form",{onSubmit:()=>eh(),"data-testid":"payment-form",className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]]),children:[(Z||C||E)&&(0,o.jsxs)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" form-message",children:[(0,o.jsx)(m.C,{children:Z||C||E}),(0,o.jsx)(b.X,{size:"XS"})]}),(0,o.jsx)(x.H2,{bold:!0,size:p.s.XS,color:R,children:F("ticketing:cardDetail
1s")}),(0,o.jsx)(b.X,{size:"XS"}),(0,o.jsx)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" "+"input-container card-number ".concat("cardNumber"===U?"card-number--focused":""," ").concat((null==(g=ee.cardNumber)?void 0:g.empty)?"input-container--empty":""),children:(0,o.jsx)(y.CardNumberElement,{options:{style:I},onChange:e=>{et({...ee,cardNumber:e}),eo("cardNumber",e.complete),e.complete&&es("cardNumber")},onFocus:()=>{$("cardNumber")},onBlur:()=>{$(null)},id:"credit-card-number"})}),(0,o.jsxs)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" input-row",children:[(0,o.jsx)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" "+"input-container expiry ".concat("expiry"===U?"expiry--focused":""," ").concat((null==(J=ee.expiry)?void 0:J.empty)?"input-container--empty":""),children:(0,o.jsx)(y.CardExpiryElement,{options:{style:I},onChange:e=>{et({...ee,expiry:e}),eo("expiry",e.complete),e.complete&&es("expiry")},onFocus:()=>{$("expiry")},onBlur:()=>{$(null)},id:"credit-card-expiry"})}),(0,o.jsx)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" "+"input-container cvc ".concat("cvc"===U?"cvc--focused":""," ").concat((null==(j=ee.cvc)?void 0:j.empty)?"input-container--empty":""),children:(0,o.jsx)(y.CardCvcElement,{options:{style:I},onChange:e=>{et({...ee,cvc:e}),eo("cvc",e.complete),e.complete&&es("cvc")},onFocus:()=>{$("cvc")},onBlur:()=>{$(null)},id:"credit-card-cvc"})})]}),eu.length>1&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.X,{size:"XS"}),(0,o.jsx)(f.V,{errors:eu})]}),(0,o.jsx)(b.X,{size:"L"}),(0,o.jsx)(n.ks,{themeColor:P,labelText:F("ticketing:nameOnCard"),id:"payment-name",errors:ed.name&&[ed.name.message],onChangeText:e=>{eo("name",e),es("name")},dark:X}),(0,o.jsx)(b.X,{size:"L"}),(0,o.jsx)(N,{errors:[null==ed||null==(w=ed.country)?void 0:w.message,null==ed||null==(v=ed.postal_code)?void 0:v.message,null==ed||null==(k=ed.line1)?void 0:k.message].filter(e=>e),getText:ey,onCountryChange:e=>{eo("country",e),es("country")},countryValue:ec,onFirstLineChange:e=>{eo("line1",e),es("line1")},onPostCodeChange:e=>{eo("postal_code",e),es("postal_code")},labelColor:R||p.Jy.black}),z&&A&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.X,{size:"M"}),(0,o.jsx)(_.o,{checked:!0,id:"save-payment-details",name:"save-payment-details",labelComponent:()=>(0,o.jsx)(x.E,{color:R||p.Jy.black,size:p.s.XS,bold:!0,children:A}),onChange:e=>eo("checkboxValue",e)})]}),(0,o.jsx)(b.X,{size:"M"}),(0,o.jsx)(s.b,{loading:!C&&H,onPress:()=>eh(),disabled:!!C,themeColor:X?P:p.Jy.black,dark:X,progressBarColor:V,children:M}),!!B&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.X,{size:"M"}),(0,o.jsx)(x.E,{size:p.s.XS,bold:!0,color:p.Jy.white,style:{display:"flex",justifyContent:"center",textAlign:"center"},children:B})]}),K&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.X,{size:"XS"}),(0,o.jsx)("div",{className:a().dynamic([["5beb980fe8ad4b2b",[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white]]])+" loading-text",children:F("common:loaderPaymentProcessing")})]}),(0,o.jsx)(a(),{id:"5beb980fe8ad4b2b",dynamic:[p.Jy.midGrey,p.Jy.veryLightGrey,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,p.Jy.black,p.Jy.white,p.Jy.white,p.Jy.black,P,p.Jy.white],children:".input-row.__jsx-style-dynamic-selector{display:flex}.input-container.__jsx-style-dynamic-selector{border:1px solid ".concat(p.Jy.midGrey,";padding:12px 18px;flex:1 0 auto}.input-container--empty.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.veryLightGrey,"}.card-number.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-bottom:none;border-radius:4px 4px 0 0}.card-number--focused.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-color:").concat(p.Jy.black,";border-width:2px;border-bottom:2px solid ").concat(p.Jy.black,";margin:-1px;margin-bottom:-2px;position:relative}.expiry.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-bottom-left-radius:4px;border-right:none}.expiry--focused.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-color:").concat(p.Jy.black,";border-width:2px;border-right:2px solid ").concat(p.Jy.black,";margin:-1px;margin-right:-2px;position:relative}.cvc.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-bottom-right-radius:4px}.cvc--focused.__jsx-style-dynamic-selector{background-color:").concat(p.Jy.white,";border-color:").concat(p.Jy.black,";border-width:2px;margin:-1px;position:relative}.loading-text.__jsx-style-dynamic-selector{text-align:center;background-color:").concat(P,";color:").concat(p.Jy.white,";border-radius:5px;padding:8px 12px;font-size:13px;line-height:20px;letter-spacing:-0.02 * 13px;font-weight:700}")})]})}},64826:(e,t,r)=>{r.d(t,{b:()=>o});let o={fonts:[{cssSrc:"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap"}]}},67849:(e,t,r)=>{r.d(t,{V:()=>d});var o=r(26514);r(75834);var l=r(77535),a=r(86780),i=r(99518),n=r(57355);let s=l.A.create({errorView:{backgroundColor:n.Jy.errorRed,borderRadius:4,paddingVertical:n.Kz.XS-2,paddingHorizontal:n.Kz.S,flexDirection:"row"}}),d=e=>{let{errors:t}=e;
1return(0,o.jsxs)(a.A,{style:s.errorView,children:[(0,o.jsxs)(i.E,{size:n.s.S,style:{marginRight:5},children:["\uD83D\uDE44"," "]}),(0,o.jsx)(a.A,{children:t.map(e=>(0,o.jsx)(i.E,{color:n.Jy.white,size:n.s.XS,children:e},e))})]})}},84539:(e,t,r)=>{r.d(t,{A:()=>a});var o=r(61525);let l="i18n:",a=()=>{let{t:e}=(0,o.Bd)("forms");return t=>t.startsWith(l)?e(t.substr(l.length)):t}},87636:(e,t,r)=>{r.d(t,{A:()=>l});var o=r(26514);r(75834);let l=e=>{let{fillColor:t}=e;return(0,o.jsxs)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 34",width:150,height:34,fill:t,children:[(0,o.jsx)("title",{children:"Powered by Stripe - white"}),(0,o.jsx)("path",{d:"M146,0H3.73A3.73,3.73,0,0,0,0,3.73V30.27A3.73,3.73,0,0,0,3.73,34H146a4,4,0,0,0,4-4V4A4,4,0,0,0,146,0Zm3,30a3,3,0,0,1-3,3H3.73A2.74,2.74,0,0,1,1,30.27V3.73A2.74,2.74,0,0,1,3.73,1H146a3,3,0,0,1,3,3Z"}),(0,o.jsx)("path",{d:"M17.07,11.24h-4.3V22h1.92V17.84h2.38c2.4,0,3.9-1.16,3.9-3.3S19.47,11.24,17.07,11.24Zm-.1,5H14.69v-3.3H17c1.38,0,2.11.59,2.11,1.65S18.35,16.19,17,16.19Z"}),(0,o.jsx)("path",{d:"M25.1,14a3.77,3.77,0,0,0-3.8,4.09,3.81,3.81,0,1,0,7.59,0A3.76,3.76,0,0,0,25.1,14Zm0,6.67c-1.22,0-2-1-2-2.58s.76-2.58,2-2.58,2,1,2,2.58S26.31,20.66,25.1,20.66Z"}),(0,o.jsx)("polygon",{points:"36.78 19.35 35.37 14.13 33.89 14.13 32.49 19.35 31.07 14.13 29.22 14.13 31.59 22.01 33.15 22.01 34.59 16.85 36.03 22.01 37.59 22.01 39.96 14.13 38.18 14.13 36.78 19.35"}),(0,o.jsx)("path",{d:"M44,14a3.83,3.83,0,0,0-3.75,4.09,3.79,3.79,0,0,0,3.83,4.09A3.47,3.47,0,0,0,47.49,20L46,19.38a1.78,1.78,0,0,1-1.83,1.26A2.12,2.12,0,0,1,42,18.47h5.52v-.6C47.54,15.71,46.32,14,44,14Zm-1.93,3.13A1.92,1.92,0,0,1,44,15.5a1.56,1.56,0,0,1,1.69,1.62Z"}),(0,o.jsx)("path",{d:"M50.69,15.3V14.13h-1.8V22h1.8V17.87a1.89,1.89,0,0,1,2-2,4.68,4.68,0,0,1,.66,0v-1.8c-.14,0-.3,0-.51,0A2.29,2.29,0,0,0,50.69,15.3Z"}),(0,o.jsx)("path",{d:"M57.48,14a3.83,3.83,0,0,0-3.75,4.09,3.79,3.79,0,0,0,3.83,4.09A3.47,3.47,0,0,0,60.93,20l-1.54-.59a1.78,1.78,0,0,1-1.83,1.26,2.12,2.12,0,0,1-2.1-2.17H61v-.6C61,15.71,59.76,14,57.48,14Zm-1.93,3.13a1.92,1.92,0,0,1,1.92-1.62,1.56,1.56,0,0,1,1.69,1.62Z"}),(0,o.jsx)("path",{d:"M67.56,15a2.85,2.85,0,0,0-2.26-1c-2.21,0-3.47,1.85-3.47,4.09s1.26,4.09,3.47,4.09a2.82,2.82,0,0,0,2.26-1V22h1.8V11.24h-1.8Zm0,3.35a2,2,0,0,1-2,2.28c-1.31,0-2-1-2-2.52s.7-2.52,2-2.52c1.11,0,2,.81,2,2.29Z"}),(0,o.jsx)("path",{d:"M79.31,14A2.88,2.88,0,0,0,77,15V11.24h-1.8V22H77v-.83a2.86,2.86,0,0,0,2.27,1c2.2,0,3.46-1.86,3.46-4.09S81.51,14,79.31,14ZM79,20.6a2,2,0,0,1-2-2.28v-.47c0-1.48.84-2.29,2-2.29,1.3,0,2,1,2,2.52S80.25,20.6,79,20.6Z"}),(0,o.jsx)("path",{d:"M86.93,19.66,85,14.13H83.1L86,21.72l-.3.74a1,1,0,0,1-1.14.79,4.12,4.12,0,0,1-.6,0v1.51a4.62,4.62,0,0,0,.73.05,2.67,2.67,0,0,0,2.78-2l3.24-8.62H88.82Z"}),(0,o.jsx)("path",{d:"M125,12.43a3,3,0,0,0-2.13.87l-.14-.69h-2.39V25.53l2.72-.59V21.81a3,3,0,0,0,1.93.7c1.94,0,3.72-1.59,3.72-5.11C128.71,14.18,126.91,12.43,125,12.43Zm-.65,7.63a1.61,1.61,0,0,1-1.28-.52l0-4.11a1.64,1.64,0,0,1,1.3-.55c1,0,1.68,1.13,1.68,2.58S125.36,20.06,124.35,20.06Z"}),(0,o.jsx)("path",{d:"M133.73,12.43c-2.62,0-4.21,2.26-4.21,5.11,0,3.37,1.88,5.08,4.56,5.08a6.12,6.12,0,0,0,3-.73V19.64a5.79,5.79,0,0,1-2.7.62c-1.08,0-2-.39-2.14-1.7h5.38c0-.15,0-.74,0-1C137.71,14.69,136.35,12.43,133.73,12.43Zm-1.47,4.07c0-1.26.77-1.79,1.45-1.79s1.4.53,1.4,1.79Z"}),(0,o.jsx)("path",{d:"M113,13.36l-.17-.82h-2.32v9.71h2.68V15.67a1.87,1.87,0,0,1,2.05-.58V12.54A1.8,1.8,0,0,0,113,13.36Z"}),(0,o.jsx)("path",{d:"M99.46,15.46c0-.44.36-.61.93-.61a5.9,5.9,0,0,1,2.7.72V12.94a7,7,0,0,0-2.7-.51c-2.21,0-3.68,1.18-3.68,3.16,0,3.1,4.14,2.6,4.14,3.93,0,.52-.44.69-1,.69a6.78,6.78,0,0,1-3-.9V22a7.38,7.38,0,0,0,3,.64c2.26,0,3.82-1.15,3.82-3.16C103.62,16.12,99.46,16.72,99.46,15.46Z"}),(0,o.jsx)("path",{d:"M107.28,10.24l-2.65.58v8.93a2.77,2.77,0,0,0,2.82,2.87,4.16,4.16,0,0,0,1.91-.37V20c-.35.15-2.06.66-2.06-1V15h2.06V12.66h-2.06Z"}),(0,o.jsx)("polygon",{points:"116.25 11.7 118.98 11.13 118.98 8.97 116.25 9.54 116.25 11.7"}),(0,o.jsx)("rect",{x:"116.25",y:"12.61",width:"2.73",height:"9.64"})]})}},92263:(e,t,r)=>{r.d(t,{ks:()=>i,yL:()=>n});var o=r(26514);r(75834);var l=r(5148),a=r(84539);let i=e=>{let t=(0,a.A)();return(0,o.jsx)(l.ks,{...e,formatError:t})},n=e=>{let t=(0,a.A)();return(0,o.jsx)(l.yL,{...e,formatError:t})}},93260:(e,t,r)=>{r.d(t,{b:()=>n});var o=r(26514);r(75834);var l=r(66720),a=r(49978),i=r(61525);let n=e=>
1{let{children:t,onPress:r,dark:n,loading:s,disabled:d,themeColor:c,buttonRef:y,loadingText:h,progressBarColor:u}=e,m=(0,a.n)(),{t:b}=(0,i.Bd)("forms");return(0,o.jsx)(l.pS,{onPress:r,loadingText:h||b("buttons.loadingMessage"),offlineMessage:b("buttons.offlineMessage"),dark:n,offline:!m,loading:s,disabled:d,themeColor:c,buttonRef:y,progressBarColor:u,children: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.