1import p from"./BmS-C8MV.js";import g from"./0_vQQRPo.js";import w from"./DRV_W4r5.js";import _ from"./CI4xBK7j.js";import{o as B,a9 as d,a6 as f,c8 as C,bq as P,bp as b,a8 as s,a7 as m,F as c,aj as i,cI as h,cC as x,bQ as O,bz as a}from"./BPlt5jNJ.js";import{u as E}from"./CmqXGKza.js";try{let l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new l.Error().stack;t&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[t]="af0a9c88-f39c-4d24-a5be-56a2e2d0a578",l._sentryDebugIdIdentifier="sentry-dbid-af0a9c88-f39c-4d24-a5be-56a2e2d0a578")}catch{}{let l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};l._sentryModuleMetadata=l._sentryModuleMetadata||{},l._sentryModuleMetadata[new l.Error().stack]=Object.assign({},l._sentryModuleMetadata[new l.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}const U=[{value:"amazon",label:"Amazon"},{value:"apple_books",label:"Apple Books"},{value:"audible",label:"Audible"},{value:"barnes_and_noble",label:"Barnes & Noble"},{value:"books_a_million",label:"Books a Million"},{value:"bookshop",label:"Bookshop"},{value:"google_playstore",label:"Google Playstore"},{value:"hudson_booksellers",label:"Hudson Booksellers"},{value:"penguin_random_house",label:"Penguin Random House"},{value:"powells",label:"Powells"},{value:"target",label:"Target"},{value:"walmart",label:"Walmart"},{value:"other",label:"Other"}],q={name:"NewsletterAltForm",components:{BaseError:p,BaseFormInput:g,EditableButton:_,BaseFormSelect:w},inject:{headingUtils:{default:()=>({h2LevelTag:"h3",h2LevelStyleClass:""})}},props:{modelValue:{type:Object,default:()=>{}},editable:{type:Boolean,default:!1},isPrimaryB2B:{type:Boolean,default:!1},addMailingAddress:{type:Boolean,default:!1},hasOptinChecked:{type:Boolean,default:!1},isDownloadable:{type:Boolean,default:!1},isGiftWithPurchase:{type:Boolean,default:!1},secondaryOptinComputedCssClasses:{type:Object,default:()=>{}},optinComputedCssClasses:{type:Object,default:()=>{}},optinComputedCssVars:{type:Object,default:()=>{}},inputContainerClasses:{type:Object,default:()=>{}},emailCssClasses:{type:Object,default:()=>{}},buttonClasses:{type:Object,default:()=>{}},formResponse:{type:Object,default:()=>{}},module:{type:Object,default:()=>{}},hasError:{type:Function,default:()=>{}}},emits:["show-panel"],data(){return{stateOptions:E,retailerOptions:U,form:this.modelValue}},computed:{h2LevelTag(){return this.headingUtils.h2LevelTag.value||this.headingUtils.h2LevelTag},h2LevelStyleClass(){return this.headingUtils.h2LevelStyleClass.value||this.headingUtils.h2LevelStyleClass},todayIso(){return new Date().toISOString().split("T")[0]},minDatePreviousYear(){return`${new Date().getFullYear()-1}-01-01`},buttonText(){return this.hasOptinChecked?this.$t("download-sign-up-button"):this.$t("download-button")},isPublic(){return this.$store.getters.isPublic},displayFormFields(){return!this.isDownloadable||this.hasOptinChecked||!this.isPublic||this.isDownloadable&&this.isGiftWithPurchase},displayNames(){const l=this.module.content.form_names.meta.display;return this.isGiftWithPurchase?this.addMailingAddress&&this.module.content.fulfillmentType==="manual":l},displayDropdown(){const l=this.module.content.custom_dropdown.meta.display&&this.module.content.custom_dropdown.options.length>1;return this.isGiftWithPurchase?l&&this.module.content.fulfillmentType==="manual":l}},watch:{modelValue(l){this.form=l}},created(){this.form.fields.custom_dropdown_header=this.module.content.custom_dropdown.header}},M={key:0,class:"relative"},D={class:"grid grid-cols-1 @sm:grid-cols-2 gap-6 @sm:gap-4 items-start mb-6"};function G(l,t,e,T,o,u){const V=p,n=g,y=w,v=_,k=O("panel");return a(),d("div",null,[!e.isDownloadable||e.isDownloadable&&e.isGiftWithPurchase?(a(),d("div",M,[f("div",{class:b(["secondary-heading leading-extra-tight max-w-560 mt-2 mb-4 text-left mx-auto",[e.optinComputedCssClasses]]),style:P(e.optinComputedCssVars)},C(e.isGiftWithPurchase?l.$t("enter-your-information"):l.$t("enter-your-information-sweepstakes")),7)])):s("",!0),e.hasError("server")?(a(),m(V,{key:1,"error-message":e.hasError("server"),class:b(["align-top",{"mx-auto":e.module.content.settings.alignment==="center"}])},null,8,["error-message","class"])):s("",!0),f("div",{class:b([e.inputContainerClasses,"flex w-full @md:max-w-700 max-w-full pb-1"])},[f("div",{class:b(["block w-full",{"m-auto max-w-560":e.module.content.settings.alignment==="center"}])},[u.displayFormFields?(a(),d(c,{key:0},[i(n,{modelValue:o.form.fields.email,"onUpdate:modelValue":t[0]||(t[0]=r=>o.form.fields.email=r),class:"mb-6",type:"email",name:"form[email]",label:l.$t("form.labels.email.text"),inputmode:"email",required:"",error:e.hasError("email"),"show-required":!e.isPrimaryB2B&&e.addMailingAddress},null,8,["modelValue","label","error","show-required"]),e.isGiftWithPurchase?(a(),d(c,{key:0},[i(y,{modelValue:o.form.fields.retailer,"onUpdate:modelValue":t[1]||(t[1]=r=>o.form.fields.retailer=r),options:o.retailerOptions,name:"form[retailer]",label:l.$t("form.labels.retailer.text"),class:"mb-6",error:e.hasError("retailer")},null,8,["modelValue","options","label","error"]),o.form.fields.retailer==="other"?(a(),m(n,{key:0,modelValue:o.form.fields.other_retailer,"onUpdate:modelValue":t[2]||(t[2]=r=>o.form.fields.other_retailer=r),type:"text",name:"form[other_retailer]",label:l.$t("form.labels.other_retailer.text"),class:"mb-6",error:e.hasError("other_retailer")},null,8,["modelValue","label","error"])):s("",!0),o.form.fields.retailer!=="apple_books"?(a(),m(n,{key:1,modelValue:o.form.fields.transaction_number,"onUpdate:modelValue":t[3]||(t[3]=r=>o.form.fields.transaction_number=r),type:"text",name:"form[transaction_number]","data-test":"form[transaction-number]",label:l.$t("form.labels.transaction_number.text"),inputmode:"text",class:"mb-6",error:e.hasError("transaction_number")},null,8,["modelValue","label","error"])):s("",!0),o.form.fields.retailer=="apple_books"?(a(),m(n,{key:2,modelValue:o.form.fields.purchase_date,"onUpdate:modelValue":t[4]||(t[4]=r=>o.form.fields.purchase_date=r),type:"date",name:"form[purchase_date]","data-test":"form[purchase-date]",label:l.$t("form.labels.purchase_date.text"),class:"mb-6",error:e.hasError("purchase_date"),max:u.todayIso,min:u.minDatePreviousYear},null,8,["modelValue","label","error","max","min"])):s("",!0)],64)):s("",!0),e.module.content.form_store.meta.display?(a(),m(n,{key:1,modelValue:o.form.fields.store,"onUpdate:modelValue":t[5]||(t[5]=r=>o.form.fields.store=r),type:"text",name:"form[store]",label:l.$t("form.labels.store.text"),required:e.isPrimaryB2B,class:"mb-6",error:e.hasError("store")},null,8,["modelValue","label","required","error"])):s("",!0),u.displayNames?(a(),d(c,{key:2},[i(n,{modelValue:o.form.fields.first_name,"onUpdate:modelValue":t[6]||(t[6]=r=>o.form.fields.first_name=r),type:"text",name:"form[first_name]",label:l.$t("form.labels.first_name.text"),required:e.isPrimaryB2B||e.addMailingAddress&&e.module.component!=="GiftWithPurchase",class:"mb-6",error:e.hasError("first_name")},null,8,["modelValue","label","required","error"]),i(n,{modelValue:o.form.fields.last_name,"onUpdate:modelValue":t[7]||(t[7]=r=>o.form.fields.last_name=r),type:"text",name:"form[last_name]",label:l.$t("form.labels.last_name.text"),required:e.isPrimaryB2B||e.addMailingAddress&&e.module.component!=="GiftWithPurchase",class:"mb-6",error:e.hasError("last_name")},null,8,["modelValue","label","required","error"])],64)):s("",!0),e.addMailingAddress?(a(),d(c,{key:3},[i(n,{modelValue:o.form.fields.address,"onUpdate:modelValue":t[8]||(t[8]=r=>o.form.fields.address=r),type:"text",name:"form[address]",label:l.$t("form.labels.address.text"),required:e.module.component!=="GiftWithPurchase",class:"mb-6",error:e.hasError("address")},null,8,["modelValue","label","required","error"]),f("div",D,[i(n,{modelValue:o.form.fields.city,"onUpdate:modelValue":t[9]||(t[9]=r=>o.form.fields.city=r),type:"text",name:"form[city]",label:l.$t("form.labels.city.text"),required:e.module.component!=="GiftWithPurchase",error:e.hasError("city")},null,8,["modelValue","label","required","error"]),i(y,{modelValue:o.form.fields.state,"onUpdate:modelValue":t[10]||(t[10]=r=>o.form.fields.state=r),options:o.stateOptions,name:"form[state]",label:l.$t("form.labels.state.text"),required:e.module.component!=="GiftWithPurchase",error:e.hasError("state")},null,8,["modelValue","options","label","required","error"])])],64)):s("",!0),e.module.content.form_zip_code.meta.display?(a(),m(n,{key:4,modelValue:o.form.fields.zip_code,"onUpdate:modelValue":t[11]||(t[11]=r=>o.form.fields.zip_code=r),type:"text",name:"form[zip_code]",label:l.$t("form.labels.zip_code.text"),required:e.isPrimaryB2B||e.addMailingAddress&&e.module.component!=="GiftWithPurchase",class:"mb-6",error:e.hasError("zip_code")},null,8,["modelValue","label","required","error"])):s("",!0),u.displayDropdown?(a(),d(c,{key:5},[h(f("input",{"onUpdate:modelValue":t[12]||(t[12]=r=>o.form.fields.custom_dropdown_header=r),type:"hidden",name:"form[custom_dropdown_header]"},null,512),[[x,o.form.fields.custom_dropdown_header]]),i(y,{modelValue:o.form.fields.custom_dropdown,"onUpdate:modelValue":t[13]||(t[13]=r=>o.form.fields.custom_dropdown=r),options:e.module.content.custom_dropdown.options,name:"form[custom_dropdown]",label:e.module.content.custom_dropdown.header,required:e.module.component!=="GiftWithPurchase",class:"mb-6",error:e.hasError("custom_dropdown")},null,8,["modelValue","options","label","required","error"])],64)):s("",!0)],64)):s("",!0),e.isDownloadable&&!e.isGiftWithPurchase?h((a(),m(v,{key:1,modelValue:e.module.content.button,"onUpdate:modelValue":t[14]||(t[14]=r=>
1e.module.content.button=r),type:e.hasOptinChecked?"submit":"a",link:e.module.content.cta.link,class:b(["min-h-12 flex-shrink-0 mb-2",e.buttonClasses]),editable:e.editable,disabled:o.form.submitting,theme:{meta:{button:e.module.content.button}},text:u.buttonText,"data-test":"newsletter-submit-download"},null,8,["modelValue","type","link","editable","class","disabled","theme","text"])),[[k,{component:"ButtonStyle",context:"SignUp"}]]):s("",!0)],2)],2)])}const F=Object.assign(B(q,[["render",G]]),{__name:"NewsletterAltForm"}),N=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));export{F as N,N as a,U as r};
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.