1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="0988e3d4-f4a3-48dc-b5c1-fa9204511034",e._sentryDebugIdIdentifier="sentry-dbid-0988e3d4-f4a3-48dc-b5c1-fa9204511034")}catch(Ea){}import{ca as e,cs as a,dh as t,cz as l,cf as n,ce as i,cF as r,ct as s,d0 as o,c7 as u,c1 as d,cx as p,cb as c,cv as m,gk as v,c$ as h,eE as y,cc as f,d6 as g,c4 as b,gQ as _,dn as C,gb as w,ga as k,gd as A,c3 as P,gh as E,cG as I,d1 as V,cu as S,cy as Z,cj as D,f7 as B,c2 as O,de as T,cO as N,dT as j,dU as M,gJ as x,gK as L,gt as H,b$ as U,ci as z,c9 as q}from"./index.061e774e.js";import{F,A as R,C as K,D as $,u as Y}from"./FormSection.759ba324.js";import{R as G,_ as W}from"./RadioOption.2bfa983d.js";import{b as J,c as Q,_ as X,a as ee,B as ae}from"./usePayment.4847ae55.js";import{P as te,O as le}from"./PaymentLinkExpiryDate.89e40499.js";import{B as ne}from"./Button.faf5a7c0.js";import{b as ie,u as re,c as se,p as oe,d as ue,g as de}from"./useCartStoreValue.1ba47e6c.js";import{C as pe}from"./CheckboxInput.abd2e98d.js";import{T as ce,p as me}from"./TextInput.34aac0c2.js";import{C as ve}from"./CardInput.33ca24cd.js";import"./TextTemplate.5b8ae812.js";import"./componentIndex.94bf6f1b.js";import"./injectOrThrow.032a19ae.js";import"./FinancingMessage.b077160a.js";import"./StripeUtils.40322978.js";import"./useFinancing.04068caf.js";import"./PayBright.80152b46.js";import"./formatCurrency.409e2a05.js";import"./campaign.7bfe87a4.js";import"./paymentLinkService.f69d5da2.js";const he={width:"30",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ye=[t('<g clip-path="url(#a)" fill="#141414"><path d="M5.58 19.644a10.78 10.78 0 0 1-1.832-5.549 10.744 10.744 0 0 1 1.344-5.68 11.102 11.102 0 0 1 4.14-4.207 11.485 11.485 0 0 1 5.766-1.548c2.03 0 4.023.535 5.767 1.548a11.103 11.103 0 0 1 4.139 4.208 10.743 10.743 0 0 1 1.344 5.68 10.78 10.78 0 0 1-1.831 5.548h3.152a13.346 13.346 0 0 0 1.413-6.699 13.397 13.397 0 0 0-2.1-6.525 13.854 13.854 0 0 0-5.088-4.712A14.289 14.289 0 0 0 15-.006c-2.377 0-4.716.59-6.794 1.714A13.853 13.853 0 0 0 3.119 6.42a13.398 13.398 0 0 0-2.101 6.525c-.12 2.314.366 4.62 1.413 6.7h3.148Z"></path><path d="M15.188 7.16c-2.05 0-4.41.942-5.692 1.937l1.169 2.4c1.027-.916 2.689-1.699 4.186-1.699 1.424 0 2.208.462 2.208 1.399 0 .624-.52.982-1.506 1.07-3.692.33-6.563 1.456-6.563 4.218C8.99 18.676 10.611 20 13.28 20a4.607 4.607 0 0 0 2.282-.6 4.457 4.457 0 0 0 1.658-1.641v1.883h3.328v-7.896c0-3.261-2.328-4.578-5.359-4.578v-.009Zm-.972 10.307c-1.067 0-1.668-.45-1.668-1.186 0-1.54 1.923-1.91 4.443-1.91 0 1.61-1.107 3.096-2.777 3.096h.002Z"></path></g><defs><clipPath id="a"><path fill="#fff" transform="translate(1)" d="M0 0h28v20H0z"></path></clipPath></defs>',2)];var fe={render:function(t,l){return e(),a("svg",he,ye)}};const ge={class:"submit-button"};var be=u(l({__name:"SubmitPaymentButton",emits:["click"],setup(t,{emit:l}){const u=l,{value:d}=ie("submitting"),{value:p}=re("cart/loading"),{isPaymentLinkMode:c}=J();return(t,l)=>(e(),a("div",ge,[n(ne,{"data-test":"place-order-button",disabled:r(d)||r(p),onClick:l[0]||(l[0]=e=>u("click"))},{default:i((()=>[r(d)?(e(),a(s,{key:0},[o("Processingâ¦")],64)):r(c)?(e(),a(s,{key:1},[o("Pay Now")],64)):(e(),a(s,{key:2},[o("Place Order")],64))])),_:1},8,["disabled"])]))}}),[["__scopeId","data-v-3eb8bc76"]]);const _e={class:"payment-method"},Ce={class:"payment-method-icons"};var we=u(l({__name:"PaymentAffirm",props:{active:{type:Boolean,required:!0},paymentTypeSubformElement:{type:null,required:!0}},emits:["placeOrderClick"],setup(t,{emit:l}){const u=t,g=l,b={alt:"Affirm",svg:fe},{isAffirmAvailable:_}=Q(),C=d((()=>_.value&&!!u.paymentTypeSubformElement));return(t,l)=>C.value?(e(),a(s,{key:0},[n(G,{value:r(v).AFFIRM},{default:i((()=>[p("div",_e,[l[1]||(l[1]=o(" Affirm ",-1)),p("span",Ce,[(e(),c(m(b.svg),{alt:b.alt},null,8,["alt"]))])])])),helpText:i((()=>[n(X,{class:"payment-financing"})])),_:1},8,["value"]),t.active?(e(),c(y,{key:0,to:t.paymentTypeSubformElement},[n(F,null,{default:i((()=>[n(h,{size:"display7",element:"p",class:"affirm-redirect-note"},{default:i((()=>l[2]||(l[2]=[o("You will be redirected to Affirmâs website to complete the payment.",-1)]))),_:1,__:[2]})])),_:1}),n(be,{onClick:l[0]||(l[0]=e=>g("placeOrderClick"))})],8,["to"])):f("",!0)],64)):f("",!0)}}),[["__scopeId","data-v-17b3105f"]]);const ke={width:"20",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ae=[p("path",{d:"M10.45 10.58V5.576h5c0 2.75-2.23 5.004-5 5.004Zm0 5.844v-5.042c2.77 0 5 2.253 5 5.003l-5 .039Zm-.807-5.844h-5a4.981 4.981 0 0 1 5-5.004v5.004Zm0 5.844c-2.77 0-5-2.254-5-5.004h5v5.004Zm8.154-11.917L10.066 0l-7.77 4.507a3.428 3.428 0 0 0-1.73 2.98v6.989c0 1.222.654 2.368 1.73 3.017L10.067 22l7.77-4.507c1.076-.611 1.73-1.757 1.73-3.017v-6.99c-.038-1.222-.692-2.368-1.77-2.98Z",fill:"#141414"},null,-1)];var Pe={render:function(t,l){return e(),a("svg",ke,Ae)}};const Ee={class:"payment-method"},Ie={class:"payment-method-icons"};var Ve=u(l({__name:"PaymentCreditKey",props:{active:{type:Boolean,required:!0},paymentTypeSubformElement:{type:null,required:!0}},emits:["placeOrderClick"],setup(t,{emit:l}){const u=t,g=l,b={alt:"CreditKey",svg:Pe},{isCreditKeyAvailable:_}=Q(),C=d((()=>_.value&&!!u.paymentTypeSubformElement));return(t,l)=>C.value?(e(),a(s,{key:0},[n(G,{value:r(v).CREDIT_KEY},{default:i((()=>[p("div",Ee,[l[1]||(l[1]=o(" CreditKey ",-1)),p("span",Ie,[(e(),c(m(b.svg),{alt:b.alt},null,8,["alt"]))])])])),helpText:i((()=>[n(X,{class:"payment-financing",showCreditKeyFinancingMessage:!0})])),_:1},8,["value"]),t.active?(e(),c(y,{key:0,to:t.paymentTypeSubformElement},[n(F,null,{default:i((()=>[n(h,{size:"display7",element:"p",class:"credit-key-redirect-note"},{default:i((()=>l[2]||(l[2]=[o("You will be redirected to CreditKey website to complete the payment.",-1)]))),_:1,__:[2]})])),_:1}),n(be,{onClick:l[0]||(l[0]=e=>g("placeOrderClick"))})],8,["to"])):f("",!0)],64)):f("",!0)}}),[["__scopeId","data-v-4fd7d25a"]]);const Se={width:"19",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ze=[p("path",{d:"M5.4 12.933c-.17.932-.844 5.273-1.043 6.5-.014.088-.048.122-.145.122H.592a.59.59 0 0 1-.586-.674L2.848.839a.985.985 0 0 1 .97-.82c7.389 0 8.01-.18 9.897.553 2.916 1.13 3.182 3.857 2.135 6.807-1.043 3.036-3.518 4.341-6.797 4.38-2.105.034-3.371-.34-3.653 1.174Zm11.92-6.98c-.088-.064-.122-.088-.146.062a11.35 11.35 0 0 1-.427 1.63c-1.936 5.521-7.301 5.04-9.92 5.04-.296 0-.49.16-.53.457-1.096 6.81-1.314 8.232-1.314 8.232-.049.345.17.626.514.626h3.08c.418 0 .762-.306.845-.723.034-.262-.054.296.698-4.429.224-1.067.694-.956 1.422-.956 3.444 0 6.132-1.397 6.932-5.447.315-1.689.223-3.464-1.
1154-4.493Z",fill:"#141414"},null,-1)];var De={render:function(t,l){return e(),a("svg",Se,Ze)}};let Be=null;class Oe{static async load(e,a){var t;if(!a)throw new Error("PaypalUtils.load requires Paypal client id configuration");const l=e===g.CA.id;if(!window.paypal||e!==Be){const n="buttons,funding-eligibility",i=l?"CAD":"USD";Be=e;const r=null!=(t=a.clientId)?t:b.VITE_PAYPAL_CLIENT_ID,s="capture";await _(`https://www.paypal.com/sdk/js?client-id=${r}&components=${n}&intent=${s}¤cy=${i}`)}return window.paypal}static createOrder(e,a,t){const l=t.filter((e=>Number.parseInt(e.id,10)===Number.parseInt(a.shippingRegionId,10)));l.length||console.warn("Could not determine shipping region for paypal checkout");const n=a.shippingCountryId===g.CA.id?"CA":"US",i={address_line_1:a.shippingAddress1,address_line_2:a.shippingAddress2,admin_area_2:a.shippingCity,admin_area_1:l.length?l[0].code:"CA",postal_code:a.shippingZip,country_code:n},r=a.same?{country_code:n}:{country_code:a.billingCountryId===g.CA.id?"CA":"US"},s=a.phone?a.phone.replace(/\D/g,""):void 0;return{payee:{email_address:"[email protected]"},payer:{name:{given_name:a.shippingFirstName,surname:a.shippingLastName},address:r,email_address:a.email?a.email:null,phone:s?{phone_type:"MOBILE",phone_number:{national_number:s}}:void 0},application_context:{shipping_preference:"SET_PROVIDED_ADDRESS"},purchase_units:[{shipping:{name:{full_name:`${a.shippingFirstName} ${a.shippingLastName}`},address:i},amount:{value:e.orderTotalLessCreditsCents/100,currency_code:e.countryId===g.CA.id?"CAD":"USD"}}]}}static async renderPaypalButton(e,a){return Oe.renderButton(e,a,window.paypal.FUNDING.PAYPAL)}static async renderCardButton(e,a){return Oe.renderButton(e,a,window.paypal.FUNDING.CARD)}static async renderButton(e,{onApprove:a,onAuth:t,onCancel:l,createOrder:n,onError:i},r){const s=window.paypal.Buttons({style:{height:40,color:r===window.paypal.FUNDING.PAYPAL?"gold":"black",shape:"pill",label:"checkout"},onApprove:a,onAuth:t,onCancel:l,onError:i,createOrder:n,fundingSource:r});return s.render(e),s}}const Te={props:{showCardButton:{default:!1,type:Boolean}},setup(){const{payment:e}=C(),{isPaymentLinkMode:a}=J();return{payment:e,isPaymentLinkMode:a}},data:()=>({loading:!1,hasRendered:!1}),computed:{...w("cart",["errors","cartInfo","checkoutInfo","shippingRegions","token","purchaseToken","checkoutHashKey"]),hideButtonOnCartError(){var e,a,t;return null!=(t=(null==(e=this.errors)?void 0:e["checkoutInfo.cartItems"])||(null==(a=this.errors)?void 0:a.checkoutError))&&t}},watch:{"checkoutInfo.shippingCountryId":{async handler(e){this.loading=!0,await Oe.load(e,this.payment.paypal),this.renderButton(),this.loading=!1}}},async mounted(){const e=this.isPaymentLinkMode?this.cartInfo.countryId:this.checkoutInfo.shippingCountryId;await Oe.load(e,this.payment.paypal),this.renderButton(),this.loading=!1},methods:{...k("cart",["checkoutPaypal","clearErrors","cancelCheckoutWithError","createPaypalOrder"]),...A("cart",["updateErrors","updateServerError"]),renderButton(){if(!this.$refs.buttonContainer)return;if(this.hasRendered)return;(this.showCardButton?Oe.renderCardButton:Oe.renderPaypalButton)(this.$refs.buttonContainer,{onApprove:(e,a)=>this.onApprove(e,a),onCancel:(e,a)=>this.onCancel(e,a),createOrder:(e,a)=>this.createOrder(e,a,!this.showCardButton),onError:e=>this.onError(e)}),this.hasRendered=!0},doesHaveErrors(){return this.errors&&Object.keys(this.errors).length},async onApprove(e){P.track("Paypal Payment Approved",{data:e}),await this.checkout(e)},async checkout(e){const a={orderId:e.orderID,authorizationId:null};await this.checkoutPaypal(a),this.doesHaveErrors()?P.track("Paypal Checkout Stopped",{data:e}):this.confirmPurchase()},confirmPurchase(){var e,a;this.isPaymentLinkMode&&this.checkoutHashKey?window.location=this.$router.resolve({name:"paymentLinkConfirmation",params:{checkoutHashKey:this.checkoutHashKey}}).href:window.location=this.$router.resolve({name:"confirmationPurchase",query:{cypher:null!=(e=this.purchaseToken)?e:void 0,checkoutHashKey:null!=(a=this.checkoutHashKey)?a:void 0}}).href},onCancel(e){P.track("Paypal Payment Cancelled",{data:e})},async createOrder(e,a){if(await E("temp.paypal.flow.orderid",!1)){const e=await this.createPaypalOrder();return P.track("Paypal Order Created",{orderID:e}),e}{const e=Oe.createOrder(this.cartInfo,this.checkoutInfo,this.shippingRegions);return P.track("Paypal Order Created",{order:e}),a.order.create(e)}},async onError(e){P.track("Paypal Payment Error",{message:e.message}),await this.cancelCheckoutWithError({errorMessage:"Your payment could not be processed by PayPal"}),await P.sentryCaptureError(e)}}},Ne={key:0,class:"loader tiny"},je={ref:"buttonContainer"};var Me=u(Te,[["render",function(t,l,n,i,r,s){return e(),a("div",{class:I(["paypal-button",{"payp
1al-button-wide":n.showCardButton,"hide-button":s.hideButtonOnCartError}])},[r.loading?(e(),a("div",Ne)):f("",!0),p("div",je,null,512)],2)}]]);const xe={class:"payment-method"},Le={class:"payment-method-icons"},He={class:"payment-button-margin"};var Ue=u(l({__name:"PaymentPayPal",props:{active:{type:Boolean,required:!0},paymentTypeSubformElement:{type:null,required:!0}},setup(t){const l=t,u={alt:"Paypal",svg:De},{isPayPalAvailable:h}=Q(),g=d((()=>h.value&&!!l.paymentTypeSubformElement));return(t,l)=>g.value?(e(),a(s,{key:0},[n(G,{value:r(v).PAYPAL},{default:i((()=>[p("div",xe,[l[0]||(l[0]=o(" PayPal ",-1)),p("span",Le,[(e(),c(m(u.svg),{alt:u.alt},null,8,["alt"]))])])])),_:1},8,["value"]),t.active?(e(),c(y,{key:0,to:t.paymentTypeSubformElement},[n(F,null,{default:i((()=>[p("div",He,[(e(),c(Me,{key:"paypal-button",showCardButton:!1}))])])),_:1})],8,["to"])):f("",!0)],64)):f("",!0)}}),[["__scopeId","data-v-1e56d162"]]);const ze={class:"label"},qe={class:"field-container"};var Fe=u(l({__name:"FieldWrapper",props:{label:{type:String,required:!0}},setup:t=>(t,l)=>(e(),a("span",ze,[n(h,{class:"label-text",weight:"bold",size:"display8","type-style":"as-typed"},{default:i((()=>[o(V(t.label),1)])),_:1}),p("div",qe,[S(t.$slots,"default",{},void 0,!0)])]))}),[["__scopeId","data-v-7735686a"]]);const Re={width:"29",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ke=[p("path",{d:"M2.928 22a2.357 2.357 0 0 1-2.357-2.357V2.357A2.357 2.357 0 0 1 2.928 0H26.5a2.357 2.357 0 0 1 2.357 2.357v.12h-3.708l-.834 2.336-.83-2.337h-4.773V5.58l-1.38-3.103h-3.86l-4.012 9.07h3.23v8.043h10.004l1.567-1.724 1.566 1.724h3.03v.054A2.358 2.358 0 0 1 26.5 22H2.928Zm21.342-5.696-2.072 2.273h-2.45l3.314-3.52-3.314-3.561h2.524l2.038 2.293 2.062-2.293h2.485l-3.34 3.54 3.34 3.541h-2.524l-2.063-2.273Zm4.587-3.295v4.09l-1.93-2.058 1.93-2.033Zm-13.18 3.938h4.076v1.63H13.76v-7.032h5.992v1.626h-4.076v1.1h3.972v1.586h-3.972v1.095-.005Zm11.28-11.364-1.813 4.94h-1.689l-1.807-4.925v4.926h-1.9V3.487h3.005l1.567 4.385 1.58-4.385h2.957v7.037h-1.9v-4.94Zm-9.96 3.531h-3.236l-.584 1.41h-2.111l3.064-7.037h2.514l3.109 7.037h-2.166l-.59
1-1.41Zm-1.62-3.884-.958 2.303h1.91l-.952-2.303Z",fill:"#141414"},null,-1)];var $e={render:function(t,l){return e(),a("svg",Re,Ke)}};const Ye={width:"30",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ge=[p("path",{d:"M12.628 2.352c-4.758 0-8.633 3.86-8.633 8.633 0 4.759 3.875 8.633 8.633 8.633 4.774 0 8.633-3.874 8.633-8.633a8.626 8.626 0 0 0-8.633-8.633Zm-1.959 13.73a5.456 5.456 0 0 1-3.506-5.097 5.491 5.491 0 0 1 3.506-5.112v10.21Zm3.919.015V5.873a5.491 5.491 0 0 1 3.506 5.112 5.491 5.491 0 0 1-3.506 5.112ZM26.786 0H3.215A2.358 2.358 0 0 0 .857 2.357v17.286A2.358 2.358 0 0 0 3.215 22h23.571a2.358 2.358 0 0 0 2.357-2.357V2.357A2.358 2.358 0 0 0 26.786 0Zm-9.738 20.429h-4.434c-5.216 0-9.517-4.2-9.517-9.34 0-5.628 4.301-9.518 9.517-9.518h4.434c5.156 0 9.856 3.89 9.856 9.517 0 5.142-4.7 9.34-9.856 9.34Z",fill:"#141414"},null,-1)];var We={render:function(t,l){return e(),a("svg",Ye,Ge)}};const Je={width:"29",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qe=[p("path",{d:"M25.698 8.058c0-.387-.27-.594-.766-.594h-.24v1.223h.23c.506 0 .776-.216.776-.629ZM26.07 0H2.5A2.358 2.358 0 0 0 .143 2.357v17.286A2.358 2.358 0 0 0 2.5 22H26.07a2.358 2.358 0 0 0 2.357-2.357V2.357A2.358 2.358 0 0 0 26.071 0Zm-2.166 6.821c1.11 0 2.598-.201 2.598 1.198 0 .619-.324 1.017-.918 1.14l1.267 1.689h-.962L24.8 9.237h-.109v1.61h-.785V6.822Zm-2.745.005h2.225v.687h-1.439v.894h1.39v.678h-1.39v1.09h1.439v.678H21.16V6.826Zm-3.373 0 1.075 2.71 1.09-2.71h.86l-1.744 4.135h-.422l-1.719-4.135h.86Zm-2.745-.147a2.19 2.19 0 1 1 0 4.38 2.189 2.189 0 0 1-2.19-2.19c0-1.213.982-2.19 2.19-2.19Zm-2.421.3v.932c-.987-.987-2.299-.23-2.299.933 0 1.228 1.35 1.89 2.299.943v.933c-1.459.702-3.109-.28-3.109-1.876 0-1.532 1.626-2.602 3.109-1.866Zm-4.774 3.255c.56 0 1.1-.751-.162-1.198-.736-.27-.992-.56-.992-1.115 0-1.14 1.503-1.542 2.441-.702l-.412.53c-.511-.57-1.223-.304-1.223.123 0 .216.132.339.604.506.894.324 1.159.614 1.159 1.257 0 1.449-1.906 1.836-2.78.555l.506-.486a.93.93 0 0 0 .86.53Zm-4.984.619H1.714V6.826h1.15c1.28 0 2.165.835 2.165 2.018 0 .909-.648 2.009-2.166 2.009Zm3.315 0h-.786V6.826h.786v4.027Zm20.679 8.839a.742.742 0 0 1-.737.737H6.428c9.311-1.749 18.794-6.836 20.429-7.858v7.121ZM3.78 7.838c-.255-.241-.57-.325-1.075-.325H2.5v2.662h.206c.506 0 .835-.098 1.075-.314.28-.256.437-.629.437-1.017a1.34 1.34 0 0 0-.437-1.006Z",fill:"#141414"},null,-1)];var Xe={render:function(t,l){return e(),a("svg",Je,Qe)}};const ea={width:"29",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},aa=[p("path",{d:"M24 18.528c0 .334-.226.575-.55.575-.334 0-.55-.256-.55-.575 0-.32.216-.574.55-.574.324 0 .55.255.55.574Zm-15.263-.574c-.348 0-.55.255-.55.574 0 .32.202.575.55.575.32 0 .536-.24.536-.575-.005-.32-.216-.574-.536-.574Zm5.77-.015c-.265 0-.427.172-.466.427h.938c-.044-.28-.216-.427-.471-.427Zm5.294.015c-.334 0-.535.255-.535.574 0 .32.201.575.535.575s.55-.24.55-.575c0-.32-.216-.574-.55-.574Zm5.2 1.281c0 .015.015.025.015.054 0 .015-.014.025-.014.054-.015.015-.015.025-.025.04-.015.014-.024.024-.054.024-.014.015-.024.015-.054.015-.015 0-.024 0-.054-.015-.015 0-.024-.015-.04-.024-.014-.015-.024-.025-.024-.04-.014-.024-.014-.039-.014-.054 0-.024 0-.039.014-.054 0-.024.015-.039.025-.054.015-.015.024-.015.04-.024.024-.015.038-.015.053-.015.025 0 .04 0 .054.015.025.014.04.014.054.024.015.01.01.03.025.054Zm-.107.069c.024 0 .024-.015.039-.015.015-.014.015-.024.015-.039s0-.025-.015-.04c-.015 0-.024-.014-.054-.014H24.8v.172h.04v-.069h.014l.055.069h.039l-.054-.064Zm3.678-16.947v17.286A2.358 2.358 0 0 1 26.215 22H2.643a2.358 2.358 0 0 1-2.357-2.357V2.357A2.358 2.358 0 0 1 2.643 0h23.572a2.358 2.358 0 0 1 2.357 2.357ZM3.429 9.213a6.804 6.804 0 0 0 6.801 6.8 6.847 6.847 0 0 0 3.757-1.134c-3.58-2.912-3.555-8.407 0-11.319a6.807 6.807 0 0 0-3.757-1.134C6.48 2.42 3.43 5.47 3.43 9.213Zm11 5.342c3.462-2.7 3.447-7.965 0-10.68-3.447 2.715-3.462 7.984 0 10.68Zm-6.988 3.747c0-.427-.28-.707-.722-.722-.226 0-.466.07-.628.32-.118-.202-.32-.32-.6-.32a.623.623 0 0 0-.52.266v-.216h-.403v1.802h.403c0-.928-.123-1.483.442-1.483.5 0 .403.5.403 1.483h.388c0-.899-.123-1.483.442-1.483.5 0 .402.49.402 1.483h.403v-1.13h-.01Zm2.205-.672h-.388v.216a.708.708 0 0 0-.575-.266c-.505 0-.893.403-.893.948 0 .55.388.948.893.948.256 0 .442-.093.575-.265v.226h.388v-1.808Zm1.989 1.257c0-.737-1.125-.403-1.125-.747 0-.28.585-.236.909-.054l.162-.319c-.462-.3-1.483-.295-1.483.403 0 .702 1.124.407 1.124.736 0 .31-.663.285-1.016.04l-.172.309c.55.373 1.6.295 1.6-.368Zm1.738.456-.108-.334c-.187.104-.599.216-.599-.201v-.815h.643v-.363h-.643v-.55h-.403v.55h-.373v.358h.373v.82c0 .864.85.707 1.11.535Zm.653-.658h1.35c0-.795-.363-1.11-.854-1.11-.52 0-.893.388-.893.948 0 1.007 1.11 1.174 1.66.698l-.187-.295c-.383.314-.963.285-1.076-.24Zm2.902-1.055c-.225-.099-.57-.089-.746.216v-.216h-.403v1.802h.403v-1.017c0-.57.467-.496.629-.412l.117-.373Zm.521.898c0-.56.57-.741 1.017-.412l.186-.32c-.57-.446-1.606-.2-1.606.737 0 .972 1.1 1.169 1.606.737l-.186-.32c-.452.32-1.017.128-1.017-.422Zm3.275-.898h-.402v.216c-.408
1-.54-1.468-.236-1.468.682 0 .943 1.1 1.213 1.468.683v.226h.402v-1.808Zm1.655 0c-.117-.06-.54-.143-.746.216v-.216h-.388v1.802h.388v-1.017c0-.54.442-.506.629-.412l.117-.373Zm1.98-.732h-.389v.948c-.402-.536-1.468-.25-1.468.682 0 .953 1.105 1.208 1.469.683v.226h.387v-2.54Zm.373-3.688v.226h.039v-.226h.093v-.04h-.226v.04h.094Zm.324 6.08c0-.025 0-.055-.015-.08-.015-.014-.024-.039-.04-.053-.014-.015-.039-.025-.053-.04-.025 0-.054-.014-.079-.014-.015 0-.04.014-.069.014a.257.257 0 0 0-.054.04c-.024.014-.039.039-.039.054-.015.024-.015.054-.015.078 0 .015 0 .04.015.069 0 .015.015.04.04.054a.17.17 0 0 0 .053.04c.025.014.054.014.07.014.024 0 .053 0 .078-.015.014-.014.039-.024.054-.039s.024-.04.039-.054c.015-.03.015-.054.015-.069Zm.157-6.124h-.069l-.078.171-.079-.171h-.069v.265h.04v-.201l.078.171h.054l.069-.171v.2h.054v-.264Zm.216-3.954c0-3.741-3.05-6.791-6.801-6.791a6.847 6.847 0 0 0-3.757 1.134c3.54 2.912 3.595 8.422 0 11.32a6.797 6.797 0 0 0 10.558-5.662Z",fill:"#141414"},null,-1)];var ta={render:function(t,l){return e(),a("svg",ea,aa)}};const la={width:"29",height:"22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},na=[p("path",{d:"M23.085 9.787s.373 1.827.457 2.21h-1.64c.162-.437.785-2.136.785-2.136-.01.014.163-.447.26-.732l.138.658Zm5.2-7.43v17.286A2.358 2.358 0 0 1 25.93 22H2.357A2.358 2.358 0 0 1 0 19.643V2.357A2.358 2.358 0 0 1 2.357 0H25.93a2.358 2.358 0 0 1 2.357 2.357ZM7.49 14.693l3.103-7.622H8.505l-1.93 5.206-.21-1.056-.688-3.506c-.113-.486-.462-.624-.894-.644H1.606l-.035.153a7.793 7.793 0 0 1 2.073.84l1.758 6.629h2.087Zm4.636.01 1.237-7.632h-1.974l-1.233 7.632h1.97Zm6.87-2.495c.01-.87-.52-1.532-1.655-2.077-.693-.349-1.115-.585-1.115-.943.01-.324.358-.658 1.134-.658a3.384 3.384 0 0 1 1.469.29l.177.083.27-1.65a4.904 4.904 0 0 0-1.768-.324c-1.95 0-3.32 1.041-3.33 2.524-.014 1.095.982 1.704 1.729 2.072.761.374 1.021.62 1.021.948-.01.51-.619.747-1.183.747-.786 0-1.208-.123-1.852-.408l-.26-.123-.275 1.714c.462.211 1.316.398 2.2.408 2.072.005 3.423-1.022 3.438-2.603Zm6.934 2.495L24.338 7.07H22.81c-.471 0-.83.138-1.031.634l-2.932 6.998h2.073s.338-.943.412-1.144h2.534c.059.27.236 1.144.236 1.144h1.827Z",fill:"#141414"},null,-1)];var ia={render:function(t,l){return e(),a("svg",la,na)}};const ra={class:"payment-method"},sa={class:"payment-method-icons"},oa={class:"form-grid-cols-2"};var ua=u(l({__name:"PaymentStripe",props:{active:{type:Boolean,required:!0},paymentTypeSubformElement:{type:null,required:!0},modelValue:{type:Object,required:!0},formGroup:{type:Object,required:!0}},emits:["update:modelValue","placeOrderClick"],setup(t,{emit:l}){const u=t,h=l,g=d((()=>!!u.paymentTypeSubformElement)),b=d({get:()=>u.modelValue,set:e=>h("update:modelValue",e)}),_=[{alt:"Visa",svg:ia},{alt:"Mastercard",svg:ta},{alt:"Amex",svg:$e},{alt:"Diners",svg:We},{alt:"Discover",svg:Xe}],{stripe:C,setStripeElement:w}=Q();function k(e){console.log("e",e)}return(t,l)=>g.value?(e(),a(s,{key:0},[n(G,{value:r(v).CC_STRIPE},{default:i((()=>[p("div",ra,[l[4]||(l[4]=o(" Credit Card ",-1)),p("span",sa,[(e(),a(s,null,Z(_,(e=>n(m(e.svg),{alt:e.alt},null,8,["alt"]))),64))])])])),_:1},8,["value"]),t.active?(e(),c(y,{key:0,to:t.paymentTypeSubformElement},[n(F,null,{default:i((()=>[p("div",oa,[n(ce,{modelValue:b.value.creditCardName.value,"onUpdate:modelValue":l[0]||(l[0]=e=>b.value.creditCardName.value=e),label:"Name on card","form-field":b.value.creditCardName},null,8,["modelValue","form-field"]),n(Fe,{label:"Card number"},{default:i((()=>[r(C)?(e(),c(ve,{key:0,stripe:r(C),"disable-line-height":!0,onChange:k,onStripeElementChanged:r(w)},null,8,["stripe","onStripeElementChanged"])):f("",!0)])),_:1})])])),_:1}),n(F,null,{default:i((()=>[n(pe,{modelValue:b.value.isBillingSameAsShipping.value,"onUpdate:modelValue":l[1]||(l[1]=e=>b.value.isBillingSameAsShipping.value=e),"form-field":b.value.isBillingSameAsShipping},{default:i((()=>l[5]||(l[5]=[o("Billing address same as shipping",-1)]))),_:1,__:[5]},8,["modelValue","form-field"]),!b.value.isBillingSameAsShipping.value&&b.value.billingAddress.value?(e(),c(R,{key:0,modelValue:b.value.billingAddress.value,"onUpdate:modelValue":l[2]||(l[2]=e=>b.value.billingAddress.value=e)},{"street-address-label":i((()=>l[6]||(l[6]=[o("Billing Street Address",-1)]))),_:1},8,["modelValue"])):f("",!0)])),_:1}),n(be,{onClick:l[3]||(l[3]=e=>h("placeOrderClick"))})],8,["to"])):f("",!0)],64)):f("",!0)}}),[["__scopeId","data-v-3b4ec3c9"]]);const da={class:"billing-contact-container"},pa={class:"form-grid-cols-2-name"};
1var ca=u(l({__name:"BillingContactInput",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(t,{emit:l}){const i=t,r=l,s=d({get:()=>i.modelValue,set:e=>r("update:modelValue",e)}),o=d({get:()=>({streetAddress1:s.value.streetAddress1,streetAddress2:s.value.streetAddress2,city:s.value.city,regionId:s.value.regionId,zip:s.value.zip,countryId:s.value.countryId}),set:e=>{s.value={...s.value,...e}}});return(t,l)=>(e(),a("div",da,[p("div",pa,[n(ce,{modelValue:s.value.firstName.value,"onUpdate:modelValue":l[0]||(l[0]=e=>s.value.firstName.value=e),"data-test":"billing-first-name-input",class:"input-first-name",label:"First Name",placeholder:"First Name",autocomplete:"given-name","form-field":s.value.firstName,maxlength:50},null,8,["modelValue","form-field"]),n(ce,{modelValue:s.value.lastName.value,"onUpdate:modelValue":l[1]||(l[1]=e=>s.value.lastName.value=e),"data-test":"billing-last-name-input",class:"input-last-name",label:"Last Name",placeholder:"Last Name",autocomplete:"family-name","form-field":s.value.lastName,maxlength:50},null,8,["modelValue","form-field"])]),n(R,{modelValue:o.value,"onUpdate:modelValue":l[2]||(l[2]=e=>o.value=e)},null,8,["modelValue"])]))}}),[["__scopeId","data-v-6db108f8"]]);var ma=u(l({__name:"PaymentStripePaymentElement",props:{elements:{type:[Object,null],required:!1,default:null},options:{type:Object,required:!1,default:()=>({})}},emits:["ready","focus","blur","change","loaderror","stripePaymentElementChanged"],setup(t,{expose:l,emit:n}){const i=t,r=n,s=D();let o;function u(){if(!i.elements)return;const e={layout:"tabs",...i.options};try{o=i.elements.create("payment",e),o.on("ready",(()=>r("ready"))),o.on("focus",(()=>r("focus"))),o.on("blur",(()=>r("blur"))),o.on("change",(e=>r("change",e))),o.on("loaderror",(e=>r("loaderror",e)))}catch(a){r("loaderror",{error:a})}}function d(){if(s.value&&o)try{o.mount(s.value),r("stripePaymentElementChanged",o)}catch(e){r("loaderror",{error:e})}}function p(){o&&(o.unmount(),o.destroy(),o=void 0),r("stripePaymentElementChanged",null)}return l({getStripeElement:function(){return o}}),B(u),O(d),T(p),N((()=>i.elements),(()=>{p(),u(),d()})),(t,l)=>(e(),a("div",{ref_key:"paymentElementDivEl",ref:s,class:"payment-element-root"},null,512))}}),[["__scopeId","data-v-7d676d3f"]]);const va={key:1},ha={key:2,class:"submit-button"};var ya=u(l({__name:"StripePaymentElementWrapper",props:j({shippingDetails:{type:Object,required:!0}},{modelValue:{type:Object,required:!0},modelModifiers:{}}),emits:j(["change","loaderror","stripeElementChanged","placeOrderClick"],["update:modelValue"]),setup(t,{emit:l}){const s=t,u=M(t,"modelValue"),p=l,m=D(null),v=D(!1),{stripe:h,setStripePaymentElement:y,setStripeElements:b,setSelectedPaymentMethod:_,isCreditKeyAvailable:C,isAffirmAvailable:w,selectedPaymentMethod:k}=Q(),{countryCode:A,total:E}=ee(),{isPaymentLinkMode:I,paymentLinkAmount:V}=J(),S=d((()=>I.value?V.value:E.value)),Z=d((()=>!!h.value&&U.value)),O=d((()=>{var e;return Z.value&&v.value&&(null!=(e=S.value)?e:0)>0||0===S.value})),T=d((()=>{var e,a;return null!=(a=null==(e=g.getCurrencyByCode(A.value))?void 0:e.toLowerCase())?a:""})),{customPaymentMethods:N}=function(e,a,t){return{customPaymentMethods:d((()=>{const l=[],n=e.value,i=se[n];i&&t.value&&l.push({id:i,options:{type:"static"}});const r=oe[n];r&&l.push({id:r,options:{type:"static"}});const s=ue[n];return s&&a.value&&l.push({id:s,options:{type:"static"}}),l}))}}(T,C,w),j=()=>{const e=L("--error-color"),a=L("--font-regular"),t=L("--font-bold"),l="14px",n=L("--grey-medium"),i=L("--grey-light"),r=L("--coral"),s="#141414";return{theme:"stripe",variables:{colorPrimary:"#2E2E2E",colorDanger:e,fontFamily:a,fontSizeBase:l},rules:{".Label":{fontFamily:t,fontWeight:"500",fontSize:l,color:s,marginBottom:"8px"},".Input":{borderRadius:"4px",boxShadow:"none",border:`1px solid ${i}`},".Input:focus":{boxShadow:`0 0 0 1px ${i}`,border:`1px solid ${n}`},".Error":{color:e},".Text":{fontFamily:a,fontWeight:"400",fontSize:l,color:s},".RadioIconOuter--checked":{stroke:r},".RadioIconInner--checked":{fill:r}}}},U=d((()=>{const e=h.value;if(!e||!S.value||S.value<=0)return null;const a={mode:"payment",fonts:[x()],currency:T.value,amount:S.value,paymentMethodCreation:"manual",customPaymentMethods:N.value,appearance:j()};return e.elements(a)})),z=d((()=>{var e,a,t,l,n,i,r,o,d,p,c,m,v;const{firstName:h,lastName:y,email:f,phone:b}
1=s.shippingDetails,_=null==(a=null==(e=u.value)?void 0:e.billingAddress)?void 0:a.value,{streetAddress1:C,streetAddress2:w,city:k,regionId:A,zip:P,countryId:E}=_||{};return{layout:{type:"accordion",defaultCollapsed:!1,radios:!0,spacedAccordionItems:!1},defaultValues:{billingDetails:{name:[null==(t=null==_?void 0:_.firstName)?void 0:t.value,null==(l=null==_?void 0:_.lastName)?void 0:l.value].filter(Boolean).join(" ")||[null==h?void 0:h.value,null==y?void 0:y.value].join(" ")||"",email:null!=(n=null==f?void 0:f.value)?n:"",phone:null!=(i=null==b?void 0:b.value)?i:"",address:{line1:null!=(r=null==C?void 0:C.value)?r:"",line2:null!=(o=null==w?void 0:w.value)?o:"",city:null!=(d=null==k?void 0:k.value)?d:"",state:null!=(p=null==A?void 0:A.value)?p:"",postal_code:null!=(c=null==P?void 0:P.value)?c:"",country:null!=(v=(null==E?void 0:E.value)&&(null==(m=g.getCountryById(Number.parseInt(E.value)))?void 0:m.code))?v:""}}}}}));function q(){v.value=!0}function R(e){var a;const t=null==(a=null==e?void 0:e.value)?void 0:a.type,l=de(t);m.value=l,_(t),p("change",e)}function K(e){P.sentryCaptureError(e),p("loaderror",e)}function $(e){y(e),b(U.value),e||(v.value=!1)}function Y(){p("placeOrderClick",H.STRIPE_PAYMENT_ELEMENT)}return B((()=>{var e;u.value&&!(null==(e=u.value.creditCardName)?void 0:e.value)&&(u.value.creditCardName.value="Article User")})),(t,l)=>(e(),a("div",null,[Z.value?(e(),c(ma,{key:0,elements:U.value,options:z.value,onReady:q,onChange:R,onLoaderror:K,onStripePaymentElementChanged:$},null,8,["elements","options"])):f("",!0),"card"===r(k)?(e(),a("div",va,[n(F,{class:"no-border-top"},{default:i((()=>[n(pe,{modelValue:u.value.isBillingSameAsShipping.value,"onUpdate:modelValue":l[0]||(l[0]=e=>u.value.isBillingSameAsShipping.value=e),"form-field":u.value.isBillingSameAsShipping},{default:i((()=>l[2]||(l[2]=[o("Billing address same as shipping",-1)]))),_:1,__:[2]},8,["modelValue","form-field"]),!u.value.isBillingSameAsShipping.value&&u.value.billingAddress.value?(e(),c(ca,{key:0,modelValue:u.value.billingAddress.value,"onUpdate:modelValue":l[1]||(l[1]=e=>u.value.billingAddress.value=e)},null,8,["modelValue"])):f("",!0)])),_:1})])):f("",!0),O.value?(e(),a("div",ha,["paypal"===m.value?(e(),c(Me,{key:"paypal-button",showCardButton:!1})):(e(),c(be,{key:1,onClick:Y}))])):f("",!0),n(te,{weight:"bold",size:"display8",class:"expire_date"})]))}}),[["__scopeId","data-v-0dbfbe26"]]);const fa={class:"form-container"};var ga=u(l({__name:"PaymentDetails",props:{modelValue:{type:Object,required:!0},formGroup:{type:Object,required:!0},shippingDetails:{type:Object,required:!0}},emits:["update:modelValue"],setup(t,{emit:l}){const u=t,m=l,y=D(null),f=d({get:()=>u.modelValue,set:e=>m("update:modelValue",e)}),{processCheckout:g}=Q(),{financing:b}=C(),_=d((()=>{var e;return null==(e=b.value)?void 0:e.stripePaymentElementEnabled})),w=U(),k=me();async function A(e){const a=await g(e);a&&(window.location.href=w.resolve(a).href),k.value=!1}return(t,l)=>(e(),a(s,null,[p("div",fa,[n(h,{weight:"bold",size:"display5",element:"h1",class:"title"},{default:i((()=>l[4]||(l[4]=[o("2. Payment",-1)]))),_:1,__:[4]}),n(le,{"is-use-store-credits":f.value.isUseStoreCredits,"onUpdate:isUseStoreCredits":l[0]||(l[0]=e=>f.value.isUseStoreCredits=e),"is-payment-credit-details":!0},null,8,["is-use-store-credits"]),_.value?(e(),c(ya,{key:0,modelValue:f.value,"onUpdate:modelValue":l[1]||(l[1]=e=>f.value=e),"shipping-details":t.shippingDetails,onPlaceOrderClick:A},null,8,["modelValue","shipping-details"])):(e(),c(F,{key:1},{default:i((()=>[n(W,{modelValue:f.value.paymentType.value,"onUpdate:modelValue":l[3]||(l[3]=e=>f.value.paymentType.value=e),"form-field":f.value.paymentType},{default:i((()=>[n(ua,{modelValue:f.value,"onUpdate:modelValue":l[2]||(l[2]=e=>f.value=e),active:f.value.paymentType.value===r(v).CC_STRIPE,"payment-type-subform-element":y.value,"form-group":t.formGroup,onPlaceOrderClick:A},null,8,["modelValue","active","payment-type-subform-element","form-group"]),n(Ue,{active:f.value.paymentType.value===r(v).PAYPAL,"payment-type-subform-element":y.value},null,8,["active","payment-type-subform-element"]),n(we,{active:f.value.paymentType.value===r(v).AFFIRM,"payment-type-subform-element":y.value,onPlaceOrderClick:A},null,8,["active","payment-type-subform-element"]),n(Ve,{active:f.value.paymentType.value===r(v).CREDIT_KEY,"payment-type-subform-element":y.value,onPlaceOrderClick:A},null,8,["active","payment-type-subform-element"])])),_:1},8,["modelValue","form-field"])])),_:1})),p("div",{ref_key:"paymentTypeFormElement",ref:y},null,512),n(K),(e(),c(z,null,{default:i((()=>[n($)])),_:1}))]),n(ae,{class:"buying-info-message-payment-details"})],64))}}),[["__scopeId","data-v-cac9da64"]]);const ba={class:"container"},_a={class:"header"},Ca={class:"info-container"},wa={class:"wrapper"},ka={class:"wrapper"};var Aa=u(l({__name:"ShippingSummary",props:{shippingDetails:{type:Object,required:!0}},setup(t){const{isPaymentLinkMode:l}=J(),u=t,m=d((()=>u.shippingDetails.shippingAddress.value.countryId.value)),v=d((()=>u.shippingDetails.shippingAddress.value.regionId.value)),{region:y}=Y(m,v);return(t,u)=>{var d;const m=q("router-link");return e(),a("div",ba,[p("div",_a,[n(h,{weight:"bold",size:"display5",element:"h3"},{default:i((()=>u[0]||(u[0]=[o("1. Shipping & Delivery",-1)]))),_:1,__:[0]}),r(l)?f("",!0):(e(),c(m,{key:0,class:"edit",to:{name:"checkoutShipping"}},{default:i((()=>u[1]||(u[1]=[o("Edit",-1)]))),_:1,__:[1]}))]),p("div",Ca,[p("div",wa,[n(h,{weight:"bold",size:"display8",element:"h4",class:"title"},{default:i((()=>u[2]||(u[2]=[o("Contact Details",-1)]))),_:1,__:[2]}),n(h,{weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.email.value),1)])),_:1}),n(h,{weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.phone.value)+" ",1),t.shippingDetails.phoneExtension.value?(e(),a(s,{key:0},[o("Ext."+V(t.shippingDetails.phoneExtension.value),1)],64)):f("",!0)])),_:1})]),p("div",ka,[n(h,{weight:"bold",size:"display8",element:"h4",class:"title"},{default:i((()=>u[3]||(u[3]=[o("Delivery Address",-1)]))),_:1,__:[3]}),t.shippingDetails.firstName.value||t.shippingDetails.lastName.value?(e(),c(h,{key:0,weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.firstName.value)+" "+V(t.shippingDetails.lastName.value),1)])),_:1})):f("",!0),p("address",null,[t.shippingDetails.shippingAddress.value.streetAddress1.value?(e(),c(h,{key:0,weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.shippingAddress.value.streetAddress1.value),1)])),_:1})):f("",!0),t.shippingDetails.shippingAddress.value.streetAddress2.value?(e(),c(h,{key:1,weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.shippingAddress.value.streetAddress2.value),1)])),_:1})):f("",!0),t.shippingDetails.shippingAddress.value.city.value||(null==(d=r(y))?void 0:d.code)?(e(),c(h,{key:2,weight:"regular",size:"display8",element:"p"},{default:i((()=>{var e;return[o(V(t.shippingDetails.shippingAddress.value.city.value)+", "+V(null==(e=r(y))?void 0:e.code),1)]})),_:1})):f("",!0),t.shippingDetails.shippingAddress.value.zip.value?(e(),c(h,{key:3,weight:"regular",size:"display8",element:"p"},{default:i((()=>[o(V(t.shippingDetails.shippingAddress.value.zip.value),1)])),_:1})):f("",!0)])])])])}}}),[["__scopeId","data-v-5efe09d4"]]);const Pa=l({__name:"CheckoutPaymentPage",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(t,{emit:l}){const i=t,r=l,s=d({get:()=>i.modelValue,set:e=>r("update:modelValue",e)});return(t,l)=>(e(),a("div",null,[n(Aa,{"shipping-details":s.value.shipping.value},null,8,["shipping-details"]),n(ga,{modelValue:s.value.payment.value,"onUpdate:modelValue":l[0]||(l[0]=e=>s.value.payment.value=e),"form-group":s.value.payment,"shipping-details":s.value.shipping.value},null,8,["modelValue","form-group","shipping-details"])]))}});
1export{Pa as default}; 2//# sourceMappingURL=CheckoutPaymentPage.36fddc13.js.map
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.