1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/client-eUF_7oWP.js","assets/main-D3YWLS5m.js","assets/main-DzIiWRck.css","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/data-collector-Ece0JIbp.js","assets/hosted-fields-D5SAly1T.js","assets/dropin-C7FrYCGR.js"])))=>i.map(i=>d[i]); 2import{a as je}from"./main-D3YWLS5m.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as i}from"./loadcontainer-PzAIb_Sc.js";import{g as sl}from"./getBookingReference-CIxwDjyn.js";import{a as vt,r as J}from"./bookingutils-eyVfbJAh.js";import{s as W}from"./toast-CLSQraIx.js";import{A as al}from"./index-BApgSYvf.js";import{f as rl}from"./format-B1iYEDvr.js";import"./toastr-bNSR7Tgz.js";function gt(o){W(o)}async function jt(o,m,j="POST"){try{const v=await(await fetch(o,{method:j,headers:{"Content-Type":"application/json"},body:JSON.stringify(m)})).json();return!v.isSuccess&&v.message?(gt(v.message),null):v}catch(y){const v=y instanceof Error?y.message:"Request failed";return gt(v),null}}function nl(o,m){o.isSuccess&&(m?o.script?vt(o,m):m():J(o))}async function Be(o,m,j="POST",y){const v=await jt(o,m,j);return v&&nl(v,y),v}async function il(o,m,j){const y=await jt(o,m);if(!y)return null;if(!y.isSuccess)return y;const v=y.data,we=!!(v!=null&&v.hidePayment),O=m.bookingReference;return we&&O&&(j!=null&&j.onHidePaymentRedirect)?vt(y,()=>j.onHidePaymentRedirect(O)):J(y),y}async function ol(o,m){return Be(o,m)}async function dl(o,m){return Be(o,m)}async function yt(o,m,j){return Be(o,m,"POST",j==null?void 0:j.onGtmComplete)}function Fe(o){if(!o)return 0;const m=String(o).replace(/[^0-9.]/g,"");return parseFloat(m)||0}function Ve(o){if(typeof window>"u")return;const m=typeof window.__confirmationUrl=="string"?window.__confirmationUrl:"/checkout/confirmation";window.location.href=`${m}?r=${o}`}const wl=({initialCheckoutData:o,paymentOptions:m,countries:j=[],reasons:y=[],checkoutApiUrls:v=null,title:we="Checkout",items:O=[],addons:te=[],date:be=null,time:Ne=null,onBackToCart:He,onContinueToPayment:Ce,cartUrl:$e="/cart",labels:Pe,afterPayHelpLabel:wt})=>{var ft,mt;const Z=wt??((mt=(ft=Pe==null?void 0:Pe.otherLabels)==null?void 0:ft.find(t=>t.key==="afterpayhelp"))==null?void 0:mt.label)??null,u=v??{apiPaymentUrl:"/api/checkout/payment",apiPaymentCheckUrl:"/api/checkout/payment/check",apiPaymentConfirmUrl:"/api/checkout/payment/confirm",apiCheckoutUrl:"/api/checkout/checkout",apiCheckGiftcardUrl:"/api/checkout/checkgiftcard",apiCheckPromocodeUrl:"/api/checkout/checkpromocode",apiCheckRemoveGiftcardUrl:"/api/checkout/removegiftcard"},[r,bt]=i.useState(()=>{const t=o==null?void 0:o.data,s=t==null?void 0:t.Customer;return{firstName:"",lastName:"",email:"",confirmEmail:"",phone:"",country:"",postcode:"",reasonForClimb:(s==null?void 0:s.reason)??"",termsAccepted:!1,giftVoucherCode:"",promotionalCode:""}}),[Se,Nt]=i.useState(!1),[Te,Ct]=i.useState(!1),[Pt,Ye]=i.useState(!1),De=i.useRef(null),[_,St]=i.useState(!1),[G,ze]=i.useState(!1),[w,Qe]=i.useState(null),[p]=i.useState(()=>sl()),[q,Ae]=i.useState(""),[h,le]=i.useState(null),[K,We]=i.useState(!1),[ke,L]=i.useState(!1),[Tt,At]=i.useState(""),[kt,_t]=i.useState(""),[H,se]=i.useState(""),[Je,_e]=i.useState(""),[$,Lt]=i.useState(null),[Le,Et]=i.useState(!1),[Rt,E]=i.useState(!1),[Ze,Ke]=i.useState(!1),[Ee,F]=i.useState(null),[Xe,ae]=i.useState(!1),[Re,Me]=i.useState(null),[et,re]=i.useState(null),ne=i.useRef(null),tt=i.useRef(null),lt=i.useRef(null),st=i.useRef(null),at=i.useRef(null),Ie=i.useRef(null),Ue=i.useRef(null),V=i.useRef(null),Mt=80,It=500,{items:P,addons:Oe,date:Ge,time:rt,dateStr:ie,timeStr:oe,orderTotal:cl,orderTotalStr:Ut,afterPayHtml:qe,credit:nt,hidePayment:it,sections:R,paymentOptionsList:Ot,promocodes:de,giftcards:B,editUrl:fl,productCode:ot}=i.useMemo(()=>{var ht;const t=et??(o==null?void 0:o.data);if(!((ht=t==null?void 0:t.ParentSections)==null?void 0:ht.length)){const k=O.reduce((U,x)=>U+x.price*x.quantity,0),z=te.reduce((U,x)=>U+x.price*x.quantity,0),Q=k+z;return{items:O.map(U=>({...U,label:U.type})),addons:te,date:be,time:Ne,dateStr:null,timeStr:null,orderTotal:Q,orderTotalStr:`$${Q.toFixed(2)}`,afterPayHtml:null,credit:null,sections:[],paymentOptionsList:m??[],editUrl:null,productC
2ode:null}}const a=[],l=[];let d=null,n=null,f=null,c=null;for(const k of t.ParentSections){const z=k.Title??"Experience";for(const Q of k.Sections??[]){const U=Q.Title??z;for(const x of Q.Products??[]){x.Date&&(d=x.Date),x.Time&&(n=x.Time),x.EditUrl&&(f=x.EditUrl),x.Code&&c==null&&(c=x.Code);const tl=(x.Pax??[]).filter(b=>b.Qty>0).map(b=>({name:b.Name,qty:b.Qty,amount:b.Amount}));a.push({sectionTitle:U,productTitle:x.Title,date:x.Date,time:x.Time,note:Q.Note,duration:x.Duration,pax:tl});for(const b of x.Pax??[])if(b.Qty>0){const ll=Fe(b.Amount);l.push({type:(b.Name||"adult").toLowerCase().includes("child")?"child":(b.Name||"adult").toLowerCase().includes("concession")?"concession":(b.Name||"adult").toLowerCase().includes("infant")?"infant":"adult",quantity:b.Qty,price:ll,label:b.Name||"Adult"})}}}}const g=t.PaymentTotal??t.Total??null,A=g?Fe(g):l.reduce((k,z)=>k+z.price*z.quantity,0),C=g??`$${A.toFixed(2)}`,S=t.AfterPay??null,T=(t==null?void 0:t.Credit)??null,D=!!(t!=null&&t.hidePayment),ut=m??t.PaymentOptions??[],xt=(t==null?void 0:t.Promocodes)??[],pt=(t==null?void 0:t.Giftcards)??[];return{items:l.length?l:O.map(k=>({...k,label:k.type})),addons:te,date:be,time:n??Ne,dateStr:d??null,timeStr:n??null,orderTotal:A,orderTotalStr:C,afterPayHtml:S,credit:T,hidePayment:D,sections:a,paymentOptionsList:Array.isArray(ut)?ut:[],promocodes:Array.isArray(xt)?xt:[],giftcards:Array.isArray(pt)?pt:[],editUrl:f,productCode:c}},[et,o,O,te,be,Ne,m]),Gt=typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dt=Ot.filter(t=>Gt||t.Code!=="ApplePay"),ce=t=>t==="PayPal"||t==="GooglePlay"||t==="GooglePay"||t==="ApplePay";i.useEffect(()=>{if(!(R!=null&&R.length)&&!(P!=null&&P.length)){delete window.__getAbandonBookingState;return}return window.__getAbandonBookingState=()=>{var t;return{productCode:ot??null,selectedDate:ie??null,selectedTimeSlot:oe??null,selectedPax:P!=null&&P.length?P.map(s=>({code:s.type.toUpperCase(),quantity:s.quantity,title:s.label})):null,promotionCode:((t=r.promotionalCode)==null?void 0:t.trim())||null,agentReference:null}},()=>{delete window.__getAbandonBookingState}},[R==null?void 0:R.length,P,ie,oe,ot,r.promotionalCode]),i.useEffect(()=>{const t=De.current;if(!t||!Z)return;const s=a=>{a.target.closest("a")&&(a.preventDefault(),Ye(!0))};return t.addEventListener("click",s),()=>t.removeEventListener("click",s)},[Z]),i.useEffect(()=>{J(o??void 0)},[o==null?void 0:o.script]);const qt=P.reduce((t,s)=>t+s.price*s.quantity,0),Ft=Oe.reduce((t,s)=>t+s.price*s.quantity,0),Vt=qt+Ft,Bt=Ut??`$${Vt.toFixed(2)}`,N=(t,s)=>{bt(a=>({...a,[t]:s}))},X=i.useCallback(()=>({firstName:r.firstName.trim(),lastName:r.lastName.trim(),email:r.email.trim(),phone:r.phone.trim(),country:r.country.trim(),postcode:r.postcode.trim(),reason:r.reasonForClimb.trim()||void 0}),[r]),Ht=async()=>{var t;if(St(!0),!!el){if(u.apiCheckoutUrl&&p){L(!0);const s=(B??[]).map(d=>d.Code).filter(d=>!!d),a=await il(u.apiCheckoutUrl,{bookingReference:p,customer:X(),promotionCode:((t=r.promotionalCode)==null?void 0:t.trim())||void 0,giftcardCodes:s.length>0?s:void 0},{onHidePaymentRedirect:Ve});if(L(!1),!(a!=null&&a.isSuccess))return;const l=a==null?void 0:a.data;if(l&&re(d=>{var c,g;const n=d??(o==null?void 0:o.data);if(!n)return l;const f={...n,...l};return!((c=f.ParentSections)!=null&&c.length)&&((g=n.ParentSections)!=null&&g.length)&&(f.ParentSections=n.ParentSections),f.Total==null&&n.Total!=null&&(f.Total=n.Total),f.SubTotal==null&&n.SubTotal!=null&&(f.SubTotal=n.SubTotal),f}),l!=null&&l.hidePayment&&p)return}ze(!0),Ce==null||Ce(r)}},$t=()=>{ze(!1),Qe(null),le(null),Ae(""),se(""),_e("")},Yt=async t=>{if(!(!u.apiCheckRemoveGiftcardUrl||!p))try{const a=await(await fetch(u.apiCheckRemoveGiftcardUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookingReference:p,giftcardCodes:[t]})})).json().catch(()=>({}));a!=null&&a.isSuccess&&(a!=null&&a.data)?(J(a),re(a.data),F(null)):W((a==null?void 0:a.message)??"Could not remove gift voucher / redemption.")}catch{W("Could not remove gift voucher / redemption.")}},Dt=async()=>{var s;const t=(s=r.giftVoucherCode)==null?void 0:s.trim();if(!t||!u.apiCheckGiftcardUrl||!p){F({type:"error",text:"Please enter a gift voucher / redemption code."});return}F(null),Ke(!0);try{const l=await(await fetch(u.apiCheckGiftcardUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookingReference:p,giftcardCodes:[t]})}
2)).json().catch(()=>({}));l!=null&&l.isSuccess?(J(l),F({type:"success",text:(l==null?void 0:l.message)??"Gift voucher / redemption applied."}),l!=null&&l.data&&re(l.data)):F({type:"error",text:(l==null?void 0:l.message)??"Could not apply gift voucher / redemption."})}catch{F({type:"error",text:"Could not apply gift voucher / redemption."})}finally{Ke(!1)}},zt=async()=>{var s;const t=(s=r.promotionalCode)==null?void 0:s.trim();if(!t||!u.apiCheckPromocodeUrl||!p){W("Please enter a promotional code.");return}Me(null),ae(!0);try{const l=await(await fetch(u.apiCheckPromocodeUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookingReference:p,promotionCode:t})})).json().catch(()=>({}));l!=null&&l.isSuccess?(J(l),Me({type:"success",text:(l==null?void 0:l.message)??"Promo code applied."}),l!=null&&l.data&&re(l.data)):(ae(!1),W((l==null?void 0:l.message)??"Could not apply promotional code."))}catch{ae(!1),W("Could not apply promotional code.")}finally{ae(!1)}};i.useEffect(()=>{if(!G||!Ie.current||typeof window>"u")return;const t=Ie.current.getBoundingClientRect().top+window.scrollY-Mt,s=window.scrollY,a=t-s,l=performance.now();function d(n){const f=n-l,c=Math.min(f/It,1),g=c<.5?4*c*c*c:1-Math.pow(-2*c+2,3)/2;window.scrollTo(0,s+a*g),c<1&&requestAnimationFrame(d)}requestAnimationFrame(d)},[G]);const Qt=i.useCallback(async t=>{var d;const s=t.Code??t.Name??"";if(!s||!u.apiPaymentUrl||!p)return;We(!0),le(null),Ae(""),se(""),_e("");const a=(B??[]).map(n=>n.Code).filter(n=>!!n),l=await ol(u.apiPaymentUrl,{bookingReference:p,customer:X(),selectedPaymentOption:s,promotionCode:((d=r.promotionalCode)==null?void 0:d.trim())||void 0,giftcardCodes:a.length>0?a:void 0});We(!1),!(!(l!=null&&l.isSuccess)||!l.data)&&(l.data.cartData&&le(l.data.cartData),l.data.token&&(t.TypeCode==="BRAINTREE"?Ae(l.data.token):t.TypeCode==="ZIPPAY"||t.TypeCode==="AFTERPAY"?se(l.data.token):l.data.isQr&&(_e(l.data.qrImage??""),se(l.data.token))))},[u.apiPaymentUrl,p,X,r.promotionalCode,B]),Wt=t=>{const s=t.Code??t.optionGuid??t.Name??"";!s||w!==null&&(t.Code===w||t.optionGuid===w||(t.Name??"")===w)||(Qe(s),Qt(t))};i.useEffect(()=>{if(w!=="CreditCard"||!q||!tt.current||!lt.current||!st.current||!at.current)return;let t=!0;return(async()=>{try{const s=(await je(async()=>{const{default:d}=await import("./client-eUF_7oWP.js").then(n=>n.c);return{default:d}},__vite__mapDeps([0,1,2,3]))).default,a=(await je(async()=>{const{default:d}=await import("./data-collector-Ece0JIbp.js").then(n=>n.d);return{default:d}},__vite__mapDeps([4,1,2,3]))).default,l=(await je(async()=>{const{default:d}=await import("./hosted-fields-D5SAly1T.js").then(n=>n.h);return{default:d}},__vite__mapDeps([5,1,2,3]))).default;s.create({authorization:q},(d,n)=>{if(d||!n||!t)return;a.create({client:n},(c,g)=>{!c&&g&&At(g.deviceData||"")});const f={client:n,fields:{number:{selector:"#cc-num",placeholder:"Card number"},expirationDate:{selector:"#cc-exp",placeholder:"MM / YY"},cvv:{selector:"#cc-cvv",placeholder:"CVV"}}};l.create(f,(c,g)=>{if(c||!g||!t)return;ne.current=g,g.on("cardTypeChange",C=>{var S;((S=C.cards)==null?void 0:S.length)===1&&["visa","master-card","american-express"].includes(C.cards[0].type)&&(_t(C.cards[0].type),u.apiPaymentCheckUrl&&p&&dl(u.apiPaymentCheckUrl,{bookingReference:p,selectedPaymentOption:"CreditCard",creditCardType:C.cards[0].type}).then(T=>{var D;return((D=T==null?void 0:T.data)==null?void 0:D.cartData)&&le(T.data.cartData)}))})})})}catch{}})(),()=>{t=!1;const s=ne.current;s!=null&&s.teardown&&s.teardown(),ne.current=null}},[q,w,u.apiPaymentCheckUrl,p]);const ct=ce(w);i.useEffect(()=>{if(!ct||!q||!Ue.current){!ct&&V.current&&(V.current.teardown(),V.current=null,E(!1));return}E(!1);const t=Ue.current;if(!t)return;const s=(h==null?void 0:h.PaymentTotal)!=null?String(Fe(h.PaymentTotal).toFixed(2)):"0.00",a=w==="GooglePlay"||w==="GooglePay",l=w==="ApplePay",d=u.googlePayMerchantId??"";let n=!0;return(async()=>{try{const f=(await je(async()=>{const{default:S}=await import("./dropin-C7FrYCGR.js").then(T=>T.d);return{default:S}},__vite__mapDeps([6,1,2,3]))).default;t.innerHTML="";const c={authorization:q,container:t,card:!1};if(l)c.applePay={displayName:"BridgeMuseum",paymentRequest:{total:{label:"BridgeMuseum",amount:s}}};else if(a&&d)c.googlePay={googlePayVersion:2,merchantId:d,transactionInfo:{totalPriceStatus:"FINAL",totalPrice:s,currencyCode:"AU
2D"}};else if(a){E(!1);return}else c.paypal={flow:"checkout",amount:s,currency:"AUD"};const{err:g,instance:A}=await new Promise(S=>{f.create(c,(T,D)=>S({err:T,instance:D}))});if(g||!A||!n){A&&typeof A.teardown=="function"&&A.teardown(),E(!1);return}const C=A;V.current=C,E(C.isPaymentMethodRequestable()),C.on("paymentMethodRequestable",({paymentMethodIsSelected:S}={})=>{E(!!S)}),C.on("noPaymentMethodRequestable",()=>{E(!1)})}catch{}})(),()=>{n=!1;const f=V.current;f!=null&&f.teardown&&(f.teardown(),V.current=null),E(!1)}},[q,w,h==null?void 0:h.PaymentTotal,u.googlePayMerchantId]);const Jt=async t=>{var l;const s=t.Code??t.Name??"",a=t.TypeCode??"";if(!(!u.apiPaymentConfirmUrl&&a!=="AFTERPAY"&&a!=="ZIPPAY")){if(a==="AFTERPAY"||a==="ZIPPAY"){H&&(a==="ZIPPAY"?window.location.href=H:typeof window.AfterPay<"u"?(window.AfterPay.initialize({countryCode:"AU"}),window.AfterPay.redirect({token:H})):window.location.href=H);return}if(a==="WECHAT"||a==="ALIPAYPP"){H&&(window.location.href=H);return}if(a==="BRAINTREE"&&ce(s)){const d=V.current,n=u.apiPaymentConfirmUrl;if(!d||!n)return;L(!0),d.requestPaymentMethod((f,c)=>{if(f||!c){L(!1);return}yt(n,{bookingReference:p,customer:X(),selectedPaymentOption:s,nonce:c.nonce,deviceData:c.deviceData},{onGtmComplete:()=>Ve(p)}).finally(()=>{L(!1)})});return}if(a==="BRAINTREE"&&s==="CreditCard"){Et(!0);const d=ne.current;if(!d)return;const n=(l=d.getState)==null?void 0:l.call(d);if(n&&Lt(n),n&&Object.values(n.fields||{}).some(f=>!f.isValid))return;L(!0),d.tokenize((f,c)=>{if(f||!c||!u.apiPaymentConfirmUrl){L(!1);return}yt(u.apiPaymentConfirmUrl,{bookingReference:p,customer:X(),selectedPaymentOption:s,nonce:c.nonce,deviceData:c.deviceData||Tt,creditCardType:kt},{onGtmComplete:()=>Ve(p)}).finally(()=>{L(!1)})})}}},Zt=()=>{He?He():$e&&(window.location.href=$e)},Kt=t=>t?rl(t,"EEEE dd MMMM yyyy"):"",Xt=t=>({adult:"Adult",child:"Child",concession:"Concession",infant:"Infant"})[t]||t,fe=r.country.trim(),ee=/^au(\s|$)/i.test(fe)||/australia/i.test(fe),el=r.firstName.trim()!==""&&r.lastName.trim()!==""&&r.email.trim()!==""&&r.confirmEmail.trim()!==""&&r.email===r.confirmEmail&&r.ph
2one.trim()!==""&&fe!==""&&(!ee||r.postcode.trim()!=="")&&r.termsAccepted,me=_&&r.firstName.trim()==="",ue=_&&r.lastName.trim()==="",xe=_&&r.email.trim()==="",pe=_&&(r.confirmEmail.trim()===""||r.email!==r.confirmEmail),he=_&&r.phone.trim()==="",ge=_&&fe==="",ye=_&&ee&&r.postcode.trim()==="",ve=_&&!r.termsAccepted,Y="bg-white border w-full min-h-[48px] px-4 py-0 rounded-[4px] text-[#363945] text-[16px] font-light leading-[1.75] placeholder:text-[#363945] focus:outline-none border-[#dadada] focus:border-[#00064f]",M={borderColor:"#dc2626"},I={color:"#dc2626",fontSize:"0.875rem"};return e.jsx("div",{className:"min-h-screen pt-6 pb-12 lg:pt-16 lg:px-12 lg:pb-[100px]",children:e.jsx("div",{className:"container mx-auto",children:e.jsxs("div",{className:"flex flex-col gap-8 lg:gap-10 items-end max-w-[900px] mx-auto w-full",children:[e.jsx("div",{className:"border-b-[3px] border-[#00064f] pb-4 lg:pb-6 flex lg:items-center lg:justify-center relative w-full",children:e.jsx("h1",{className:"h1 text-[#00064f]",children:we})}),e.jsxs("div",{ref:Ie,className:"bg-white flex flex-col gap-6 items-end p-5 lg:p-8 w-full rounded",children:[!G&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"h4 text-[#00064f]",children:"Your order"}),e.jsx("button",{onClick:Zt,className:"o-btn o-btn--secondary o-btn--md",children:"Back to cart"})]}),e.jsx("div",{className:"bg-[#dadada] h-px w-full"}),R.length>0?R.map((t,s)=>e.jsxs("div",{className:"flex flex-col gap-[16px] items-start w-full",children:[e.jsx("h4",{className:"h6 text-[#00064f]",children:t.sectionTitle}),e.jsxs("div",{className:"flex flex-col gap-[8px] items-start w-full",children:[t.pax.map((a,l)=>e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8 flex-wrap lg:flex-nowrap",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:a.name})}),e.jsx("div",{className:"flex lg:flex-1 flex-col font-light justify-end text-[#363945] order-2 lg:order-0 w-full lg:w-auto",children:e.jsxs("p",{className:"leading-[1.75]",children:["Qty: ",a.qty]})}),e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] text-right whitespace-nowrap flex-1 lg:flex-none",children:e.jsx("div",{className:"leading-[1.75]",dangerouslySetInnerHTML:{__html:a.amount}})})]},l)),t.date&&e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:"Museum Date"})}),e.jsx("div",{className:"flex flex-1 flex-col font-light justify-end text-[#363945]",children:e.jsx("p",{className:"leading-[1.75]",children:t.date})})]}),t.time&&e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:"Time"})}),e.jsx("div",{className:"flex flex-1 flex-col font-light justify-end text-[#363945]",children:e.jsx("p",{className:"leading-[1.75]",children:t.time})})]}),t.note&&e.jsx("div",{className:"flex items-start w-full text-[18px] min-h-8",children:e.jsx("div",{className:"flex flex-1 flex-col font-light justify-end text-[#363945]",children:e.jsx("p",{className:"leading-[1.75]",children:t.note})})})]})]},s)):e.jsxs("div",{className:"flex flex-col gap-[16px] items-start w-full",children:[e.jsx("h4",{className:"h6 text-[#00064f]",children:"General Visit"}),e.jsxs("div",{className:"flex flex-col gap-[8px] items-start w-full",children:[P.map(t=>e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8 flex-wrap lg:flex-nowrap",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:t.label||Xt(t.type)})}),e.jsx("div",{className:"flex lg:flex-1 flex-col font-light justify-end text-[#363945] order-2 lg:order-0 w-full lg:w-auto",children:e.jsxs("p",{className:"leading-[1.75]",children:["Qty: ",t.quantity]})}),e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] text-right whitespace-nowrap flex-1 lg:flex-none",children:e.jsxs("p",{className:"leading-[1.75]",children:["$",(t.price*t.quantity).toFixed(2)]})})]},`${t.type}-${t.label}`)),(ie||Ge)&&e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:"Museum Date"})}),e.jsx("div",{className:"flex flex-1 flex-col font-light justify-end text-[#363945]",children:e.jsx("p",{className:"leading-[1.75]",children:ie??(Ge?Kt(Ge):"")})})]}),(oe||rt)&&e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:"Time"})}),e.jsx("div",{className:"flex flex-1 flex-col font-light justify-end text-[#363945]",children:e.jsx("p",{className:"leading-[1.75]",children:oe??String(rt)})})]})]})]}),e.jsx("div",{className:"bg-[#dadada] h-px w-full"}),Oe.length>0&&e.jsxs("div",{className:"flex flex-col gap-[16px] items-start w-full",children:[e.jsx("h4",{className:"h6 text-[#00064f]",children:"Add ons"}),e.jsx("div",{className:"flex flex-col gap-[8px] items-start w-full",children:Oe.map(t=>e.jsxs("div",{className:"flex items-start w-full text-[18px] min-h-8 flex-wrap lg:flex-nowrap",children:[e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] w-[170px] lg:w-[260px]",children:e.jsx("p",{className:"leading-[1.75]",children:t.name})}),e.jsx("div",{className:"flex lg:flex-1 flex-col font-light justify-end text-[#363945] order-2 lg:order-0 w-full lg:w-auto",children:e.jsxs("p",{className:"leading-[1.75]",children:["Qty: ",t.quantity]})}),e.jsx("div",{className:"flex flex-col font-bold justify-end text-[#00064f] text-right whitespace-nowrap flex-1 lg:flex-none",children:e.jsxs("p",{className:"leading-[1.75]",children:["$",(t.price*t.quantity).toFixed(2)]})})]},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h4",{className:"h6 text-[#00064f]",children:"Gift voucher / redemption code"}),e.jsx("button",{onClick:()=>Nt(!Se),className:"bg-[rgba(0,0,0,0.05)] flex items-center justify-center w-8 h-8 hover:bg-[rgba(0,0,0,0.1)] transition-colors",children:Se?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M5 13v-2h14v2z"})}):e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M11 13H5v-2h6V5h2v6h6v2h-6v6h-2z"})})})]}),Se&&e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex gap-2 w-full items-stretch",children:[e.jsx("input",{type:"text",placeholder:"Enter gift voucher co
2de",value:r.giftVoucherCode,onChange:t=>{N("giftVoucherCode",t.target.value),F(null)},className:"bg-white border border-[#dadada] flex-1 min-h-[48px] px-4 py-0 rounded-[4px] text-[#363945] text-[16px] font-light leading-[1.75] placeholder:text-[#363945] focus:outline-none focus:border-[#00064f]",disabled:Ze}),e.jsx("button",{type:"button",onClick:Dt,disabled:Ze,className:"o-btn o-btn--secondary o-btn--md shrink-0 self-center disabled:opacity-50 disabled:cursor-not-allowed gap-2",children:"Apply"})]}),Ee&&e.jsx("div",{className:`text-[14px] leading-[1.5] ${Ee.type==="success"?"":"text-[#dc2626]"}`,role:"alert",children:e.jsx("span",{dangerouslySetInnerHTML:{__html:Ee.text}})})]}),((B==null?void 0:B.length)??0)>0&&e.jsxs("div",{className:"w-full border-t border-[#dadada] pt-3 mt-1",children:[e.jsx("p",{className:"text-[#363945] text-[14px] font-bold leading-[1.5] mb-2",children:"Applied gift vouchers / redemptions"}),e.jsx("div",{className:"flex flex-col gap-2",children:(B??[]).map((t,s)=>e.jsxs("div",{className:"flex items-center justify-between w-full flex-wrap gap-y-1 gap-x-2",children:[e.jsxs("span",{className:"text-[#363945] text-[14px] leading-[1.5]",children:[e.jsx("span",{dangerouslySetInnerHTML:{__html:t.Description??"Gift voucher / Redemption"}}),t.Code&&e.jsxs("span",{className:"text-[#00064f] font-bold uppercase",children:[" (",t.Code,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.AmountStr!=null&&e.jsxs("span",{className:"text-[#00064f] font-bold text-[14px] leading-[1.5]",children:["-",t.AmountStr!=null?e.jsx("span",{dangerouslySetInnerHTML:{__html:t.AmountStr}}):""]}),u.apiCheckRemoveGiftcardUrl&&e.jsx("button",{type:"button",onClick:()=>Yt(t.Code??""),className:"text-[#363945] hover:text-[#00064f] p-1 rounded focus:outline-none focus:ring-2 focus:ring-[#00064f]","aria-label":`Remove gift voucher ${t.Code??""}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]},t.Code??s))})]}),e.jsx("div",{className:"bg-[#00064f] h-[3px] w-full"}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h4",{className:"h6 text-[#00064f]",children:"Promotional code"}),e.jsx("button",{type:"button",onClick:()=>Ct(!Te),className:"bg-[rgba(0,0,0,0.05)] flex items-center justify-center w-8 h-8 hover:bg-[rgba(0,0,0,0.1)] transition-colors",children:Te?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M5 13v-2h14v2z"})}):e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M11 13H5v-2h6V5h2v6h6v2h-6v6h-2z"})})})]}),Te&&e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex gap-2 w-full items-stretch",children:[e.jsx("input",{type:"text",placeholder:"Enter promotional code",value:r.promotionalCode,onChange:t=>{N("promotionalCode",t.target.value),Me(null)},className:"bg-white border border-[#dadada] flex-1 min-h-[48px] px-4 py-0 rounded-[4px] text-[#363945] text-[16px] font-light leading-[1.75] placeholder:text-[#363945] focus:outline-none focus:border-[#00064f]",disabled:Xe}),e.jsx("button",{type:"button",onClick:zt,disabled:Xe,className:"o-btn o-btn--secondary o-btn--md shrink-0 self-center disabled:opacity-50 disabled:cursor-not-allowed gap-2",children:"Apply"})]}),Re&&e.jsx("div",{className:`text-[14px] leading-[1.5] ${Re.type==="success"?"":"text-[#dc2626]"}`,role:"alert",children:e.jsx("span",{dangerouslySetInnerHTML:{__html:Re.text}})})]}),((de==null?void 0:de.length)??0)>0&&e.jsxs("div",{className:"w-full border-t border-[#dadada] pt-3 mt-1",children:[e.jsx("p",{className:"text-[#363945] text-[14px] font-bold leading-[1.5] mb-2",children:"Applied promotional codes"}),e.jsx("div",{className:"flex flex-col gap-2",children:(de??[]).map((t,s)=>e.jsxs("div",{className:"flex items-center justify-between w-full flex-wrap gap-y-1",children:[e.jsxs("span",{className:"text-[#363945] text-[14px] leading-[1.5]",children:[t.Description??"Promo code",t.Code&&e.jsxs("span",{className:"text-[#00064f] font-bold uppercase",children:[" (",t.Code,")"]})]}),t.AmountStr!=null&&e.jsxs("span",{className:"text-[#00064f] font-bold text-[14px] leading-[1.5]",children:["-",t.AmountStr!=null?e.jsx("span",{dangerouslySetInnerHTML:{__html:t.AmountStr}}):""]})]},t.Code??s))})]}),e.jsx("div",{className:"bg-[#00064f] h-[3px] w-full"}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"flex shrink-0 flex-col justify-end text-[#00064f]",children:e.jsxs("div",{children:[e.jsx("span",{className:"h5 leading-[1.5]",children:"Order total"}),e.jsx("span",{className:"ml-1 text-[14px] leading-[1.75]",children:"(Inc GST)"})]})}),e.jsx("div",{className:"flex flex-col justify-end text-[#00064f] text-right",children:e.jsx("p",{className:"h5 leading-[1.5]",dangerouslySetInnerHTML:{__html:Bt}})})]}),nt&&e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"flex shrink-0 text-[#00064f] text-[16px] leading-[1.75] font-bold",children:e.jsx("span",{children:"Credit"})}),e.jsx("div",{className:"flex flex-col justify-end font-bold text-[#00064f] text-right text-[16px]",children:e.jsx("span",{dangerouslySetInnerHTML:{__html:nt}})})]}),e.jsxs("div",{className:"text-right w-full lg:w-auto",children:[(qe||!(o!=null&&o.data))&&e.jsx("div",{className:"text-[14px] text-right mt-4 text-[#363945] font-light leading-[1.75]",children:e.jsx("div",{className:"inline-flex items-center",children:qe&&e.jsxs(e.Fragment,{children:[e.jsx("span",{dangerouslySetInnerHTML:{__html:qe}}),e.jsx("img",{src:"/www_shared/assets/img/paymentlogo-afterpay-horizontal.png",alt:"",className:"ml-2 inline-block max-w-[106px] align-middle"}),Z&&e.jsx("div",{ref:De,className:"js-leavebooking-ignored inline-block ml-3 align-middle [&_a]:cursor-pointer [&_a]:underline",dangerouslySetInnerHTML:{__html:Z}})]})})}),Z&&Pt&&e.jsx(al,{onClose:()=>Ye(!1)})]}),e.jsxs("div",{className:"flex flex-col gap-[24px] items-start w-full border-t-[3px] border-[#00064f] pt-6",children:[e.jsx("h2",{className:"h4 text-[#00064f]",children:"Your details"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-[24px] items-start w-full",children:[e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"text",placeholder:"First name*",value:r.firstName,onChange:t=>N("firstName",t.target.value),className:Y,style:me?M:void 0,"aria-invalid":me,"aria-describedby":me?"firstName-error":void 0}),me&&e.jsx("p",{id:"firstName-error",style:I,role:"alert",children:"First name is required"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"text",placeholder:"Last name*",value:r.lastName,onChange:t=>N("lastName",t.target.value),className:Y,style:ue?M:void 0,"aria-invalid":ue,"aria-describedby":ue?"lastName-error":void 0}),ue&&e.jsx("p",{id:"lastName-error",style:I,role:"alert",children:"Last name is required"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"email",placeholder:"Email*",value:r.email,onChange:t=>N("email",t.target.value),className:Y,style:xe?M:void 0,"aria-invalid":xe,"aria-describedby":xe?"email-error":void 0}),xe&&e.jsx("p",{id:"email-error",style:I,role:"alert",children:"Email is required"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"email",placeholder:"Confirm email*",value:r.confirmEmail,onChange:t=>N("confirmEmail",t.target.value),className:Y,style:pe?M:void 0,"aria-invalid":pe,"aria-describedby":pe?"confirmEmail-error":void 0}),pe&&e.jsx("p",{id:"confirmEmail-error",style:I,role:"alert",children:r.confirmEmail.trim()===""?"Confirm email is required":"Emails do not match"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"tel",placeholder:"Phone*",value:r.phone,onChange:t=>N("phone",t.target.value),className:Y,style:he?M:void 0,"aria-invalid":he,"aria-describedby":he?"phone-error":void 0}),he&&e.jsx("p",{id:"phone-error",style:I,role:"alert",children:"Phone is required"})]}),e.jsxs("div",{className:"flex flex-col gap-[8px] items-start",children:[e.jsxs("div",{className:"relative bg-white border flex items-center justify-between w-full min-h-[48px] py-0 rounded-[4px] border-[#dadada]",style:ge?M:void 0,children:[e.jsxs("select",{value:r.country,onChange:t=>N("country",t.target.value),className:"flex-1 min-w-0 pl-4 pr-10 py-2 text-[#363945] text-[16px] font-light leading-[1.75] focus:outline-none bg-transparent appearance-none cursor-pointer","aria-label":"Country","aria-required":"true","aria-invalid":ge,"aria-describedby":ge?"country-error":void 0,children:[e.jsx("option",{value:"",children:"Country*"}),Array.isArray(j)&&j.filter(t=>t.show!==!1).map(t=>e.jsx("option",{value:t.key??t.name??"",children:t.name??t.key??""},t.key??t.id??t.name))]}),e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0 pointer-events-none absolute right-4 top-1/2 -translate-y-1/2",children:e.jsx("path",{d:"M6 9L12 15L18 9",stroke:"#00064f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),ge&&e.jsx("p",{id:"country-error",style:I,role:"alert",children:"Country is required"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("input",{type:"text",placeholder:ee?"Postcode*":"Postcode",value:r.postcode,onChange:t=>N("postcode",t.target.value),className:Y,style:ye?M:void 0,"aria-required":ee,"aria-label":ee?"Postcode (required for Australia)":"Postcode","aria-invalid":ye,"aria-describedby":ye?"postcode-error":void 0}),ye&&e.jsx("p",{id:"postcode-error",style:I,role:"alert",children:"Postcode is required for Australia"})]}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("label",{htmlFor:"reason",className:"text-[#00064f] text-[16px] font-bold leading-[1.75] sr-only",children:"Reason for Visit"}),e.jsxs("div",{className:"relative bg-white border border-[#dadada] flex items-center justify-between w-full min-h-[48px] py-0 rounded-[4px]",children:[e.jsxs("select",{id:"reason",value:r.reasonForClimb,onChange:t=>N("reasonForClimb",t.target.value),className:"flex-1 min-w-0 pl-4 pr-10 py-2 text-[#363945] text-[16px] font-light leading-[1.75] focus:outline-none bg-transparent appearance-none cursor-pointer","aria-label":"Reason for Visit",children:[e.jsx("option",{value:"",children:"Reason for Visit"}),Array.isArray(y)&&y.filter(t=>t.show!==!1).map(t=>e.jsx("option",{value:t.key??"",children:t.name??t.key??""},t.key??t.name))]}),e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0 pointer-events-none absolute right-4 top-1/2 -translate-y-1/2",children:e.jsx("path",{d:"M6 9L12 15L18 9",stroke:"#00064f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsxs("div",{className:"flex gap-2 relative w-full",children:[e.jsx("input",{type:"checkbox",id:"terms",checked:r.termsAccepted,onChange:t=>N("termsAccepted",t.target.checked),className:"absolute left-0 w-6 h-6 opacity-0 cursor-pointer z-[1]","aria-invalid":ve,"aria-describedby":ve?"terms-error":void 0}),e.jsx("span",{className:`absolute top-0.5 left-0 w-6 h-6 flex items-center justify-center border shrink-0 pointer-events-none ${r.termsAccepted?"bg-[#00064f] border-[#00064f]":"bg-white border-[#dadada]"}
2`,style:ve&&!r.termsAccepted?M:void 0,"aria-hidden":!0,children:r.termsAccepted&&e.jsx("svg",{width:"12",height:"10",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 4L4 7L9 1",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),e.jsxs("label",{htmlFor:"terms",className:"text-[#363945] text-[16px] font-light leading-[1.75] cursor-pointer pl-8",children:["I have read and agree to the"," ",e.jsx("a",{href:"/terms",className:"js-leavebooking-ignored text-[#00064f] underline",target:"_blank",rel:"noopener noreferrer",children:"Terms and Conditions"}),"*"]})]}),ve&&e.jsx("p",{id:"terms-error",style:{...I,paddingLeft:"2rem"},role:"alert",children:"Please tick the checkbox"})]})]}),e.jsx("button",{type:"button",onClick:Ht,disabled:ke,className:"o-btn o-btn--primary o-btn--lg o-btn--icon-right w-full lg:w-auto",children:e.jsxs(e.Fragment,{children:[it?"Confirm and Pay":"Continue to payment",e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M9 18L15 12L9 6",stroke:"#00064f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})})]}),G&&e.jsxs("button",{type:"button",onClick:$t,className:"o-btn o-btn--tertiary o-btn--icon-right o-btn--sm self-center",children:["Edit your details",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M8 7.20016L4.93333 10.2668L4 9.3335L8 5.3335L12 9.3335L11.0667 10.2668L8 7.20016Z",fill:"#00064F"})})]}),!it&&dt.length>0&&e.jsxs("div",{className:`flex flex-col gap-[24px] items-start w-full border-t-[3px] border-[#00064f] pt-6 transition-opacity ${G?"opacity-100":"opacity-40 pointer-events-none"}`,children:[e.jsx("h2",{className:"h4 text-[#00064f]",children:"Payment options"}),e.jsx("div",{className:"flex flex-col gap-[16px] items-start w-full",id:"paymentoptions",children:dt.map(t=>{var a,l,d,n,f,c;t.Code??t.optionGuid??t.Name;const s=w!=null&&(t.Code===w||t.optionGuid===w||(t.Name??"")===w);return e.jsxs("div",{className:"w-full flex flex-col gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>G&&Wt(t),disabled:!G,className:"flex-wrap lg:flex-nowrap bg-white border border-[#dadada] flex gap-y-1 gap-x-2 lg:gap-y-2 lg:gap-x-2 items-center min-h-[56px] p-4 lg:px-6 lg:py-3 rounded w-full text-left cursor-pointer hover:border-[#00064f] hover:bg-[#fafafa] disabled:cursor-default disabled:hover:border-[#dadada] disabled:hover:bg-white focus:outline-none transition-colors",children:[e.jsx("div",{className:"flex gap-2 items-center relative shrink-0",children:e.jsx("div",{className:`w-5 h-5 border rounded-full flex items-center justify-center flex-shrink-0 ${s?"border-[#00064f] bg-[#00064f]":"border-[#dadada] bg-[#f2f2f2]"}`,children:s&&e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",className:"text-white",children:e.jsx("path",{d:"M2 6L5 9L10 3",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),e.jsxs("div",{className:"flex flex-1 lg:items-center lg:gap-2 min-w-0",children:[e.jsx("p",{className:"text-[#00064f] text-[18px] font-bold leading-[1.75]",children:t.Name??t.Code??"Payment"}),t.SurchargeStr&&e.jsx("p",{className:"text-[#363945] text-[12px] font-light leading-[1.75] hidden lg:block",dangerouslySetInnerHTML:{__html:t.SurchargeStr}})]}),t.Logo&&e.jsx("div",{className:"w-[35px] h-[24px] lg:w-[70px] lg:h-[48px] border border-[#dadada] rounded-[6px] bg-white flex items-center justify-center shrink-0 overflow-hidden",children:e.jsx("img",{src:t.Logo,alt:t.Name??"",className:"max-w-full max-h-full object-contain"})}),t.SurchargeStr&&e.jsx("p",{className:"text-[#363945] text-[12px] font-light leading-[1.75] block lg:hidden w-full",dangerouslySetInnerHTML:{__html:t.SurchargeStr}})]}),s&&e.jsxs("div",{className:"border border-[#dadada] rounded-[4px] p-4 w-full bg-[#fafafa]",children:[K&&e.jsx("div",{className:"flex items-center justify-center py-8","aria-label":"Loading payment method",children:e.jsx("div",{className:"w-10 h-10 border-2 border-[#00064f] border-t-transparent roun
2ded-full animate-spin"})}),!K&&t.TypeCode==="BRAINTREE"&&t.Code==="CreditCard"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-4 mb-4",children:[e.jsxs("div",{className:"sm:col-span-12",children:[e.jsx("div",{id:"cc-num",ref:tt,className:"h-[56px] border border-[#dadada] rounded-[4px] px-3 py-2 bg-white"}),Le&&$&&!((l=(a=$.fields)==null?void 0:a.number)!=null&&l.isValid)&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:"Please enter a valid card number"})]}),e.jsxs("div",{className:"sm:col-span-8",children:[e.jsx("div",{id:"cc-exp",ref:lt,className:"h-[56px] border border-[#dadada] rounded-[4px] px-3 py-2 bg-white"}),Le&&$&&!((n=(d=$.fields)==null?void 0:d.expirationDate)!=null&&n.isValid)&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:"Valid expiry required"})]}),e.jsxs("div",{className:"sm:col-span-4",children:[e.jsx("div",{id:"cc-cvv",ref:st,className:"h-[56px] border border-[#dadada] rounded-[4px] px-3 py-2 bg-white"}),Le&&$&&!((c=(f=$.fields)==null?void 0:f.cvv)!=null&&c.isValid)&&e.jsx("p",{className:"text-red-600 text-sm mt-1",children:"Valid CVV required"})]})]}),e.jsx("div",{id:"device-data",ref:at,className:"hidden"})]}),!K&&h&&e.jsxs("div",{className:"mb-4",children:[h.Total!=null&&e.jsxs("div",{className:"flex justify-between text-[#00064f] mb-1",children:[e.jsx("span",{children:"Order total"}),e.jsx("span",{dangerouslySetInnerHTML:{__html:h.Total}})]}),h.SurchargeLabel!=null&&h.Surcharge!=null&&e.jsxs("div",{className:"flex justify-between text-[#00064f] mb-1",children:[e.jsx("span",{children:h.SurchargeLabel}),e.jsx("span",{dangerouslySetInnerHTML:{__html:h.Surcharge}})]}),h.PaymentTotal!=null&&e.jsxs("div",{className:"flex justify-between text-[#00064f] font-bold mt-2 border-t border-[#dadada] pt-2",children:[e.jsx("span",{children:"Total due (Inc GST)"}),e.jsx("span",{dangerouslySetInnerHTML:{__html:h.PaymentTotal}})]}),h.AfterPay!=null&&t.TypeCode==="AFTERPAY"&&e.jsx("p",{className:"text-[#363945] text-sm mt-2",dangerouslySetInnerHTML:{__html:h.AfterPay}})]}),!K&&t.TypeCode==="BRAINTREE"&&ce(t.Code)&&e.jsx("div",{ref:Ue,className:"checkout-braintree-dropin text-right","aria-label":t.Code==="PayPal"?"PayPal checkout":t.Code==="ApplePay"?"Apple Pay checkout":"Google Pay checkout"}),!K&&(t.TypeCode==="BRAINTREE"||h)&&e.jsxs(e.Fragment,{children:[Je&&(t.TypeCode==="WECHAT"||t.TypeCode==="ALIPAYPP")&&e.jsxs("div",{className:"mb-4 flex flex-col items-center",children:[e.jsx("img",{src:`data:image/png;base64,${Je}`,alt:"QR Code",className:"max-w-[120px] max-h-[120px]"}),e.jsx("p",{className:"text-[#363945] text-sm mt-2",children:"Scan with your app to pay"})]}),(!(t.TypeCode==="BRAINTREE"&&ce(t.Code))||Rt)&&e.jsx("div",{className:"text-right",children:e.jsx("button",{type:"button",onClick:()=>Jt(t),disabled:ke||t.TypeCode==="BRAINTREE"&&t.Code==="CreditCard"&&!q,className:"o-btn o-btn--primary o-btn--lg",children:ke?"Processing...":"Confirm and Pay"})})]})]})]},t.optionGuid??t.Code??t.Name??Math.random())})})]})]})]})})})};export{wl as default};
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.