1import{o as h,a9 as a,a6 as o,ai as l,a8 as c,bz as p}from"./BPlt5jNJ.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="71181605-5637-445d-a5c7-a32b92219553",e._sentryDebugIdIdentifier="sentry-dbid-71181605-5637-445d-a5c7-a32b92219553")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}const s=e=>!!e,u={name:"NewsletterInputLabel",props:{optin:{type:Object,default:()=>{}},index:{type:Number,default:0},primaryProgramType:{type:String,default:""},hasOnlyPrh:{type:Boolean,default:!1},isSweepstakes:{type:Boolean,default:!1},isGiftWithPurchase:{type:Boolean,default:!1},hasDownloadable:{type:Boolean,default:!1},primaryOptin:{type:Object,default:()=>{}},optins:{type:Array,default:()=>[]}},computed:{constants(){return this.$store.state.constants.constants},label(){let e,t,i;const r=this.optin.program_type;if(e=this.optin.label_text,t=null,i="general",(r==="genre"||r==="author")&&this.hasOnlyPrh&&!this.isSweepstakes&&(this.hasDownloadable||this.isGiftWithPurchase?i="general":i="prh"),r==="internal"&&(this.constants.Newsletter.divisionalAuthorPrograms.includes(this.optin.program_id)?(i="author",t=this.optin.display_name?this.optin.display_name:this.optin.label_text,this.optin.program_name?e=this.optin.program_name:e=this.optin.preference_text):this.constants.Newsletter.divisionalPreferencePrograms.includes(this.optin.program_id)||this.constants.Newsletter.additionalPreferencePrograms.includes(this.optin.program_id)?(e=this.optin.preference_text,t=this.optin.display_name?this.optin.display_name:this.optin.label_text,i=t=="PRH Audio"?"audio":"genre"):this.optin.display_name&&(e=this.optin.display_name)),this.optin.translations?.[this.$i18n.locale]&&(e=this.optin.translations[this.$i18n.locale]),s(this.optin?.customOverride?.customText))return this.optin.customOverride.customText;if(this.optin.program_type==="internal"&&!e)return this.$t("labels.internal.general",{value:t});const n=this.constants.Newsletter.brightlyPrograms;return r==="brightly"&&this.optin.preference_id&&this.optin.preference_id!==n.storytime.preferenceId&&(i="preference",(this.onlyBrightlyOptinsPresent&&this.primaryOptin.program_id===n.general.programId&&!this.primaryOptin.preference_id||this.primaryOptin.program_id===n.storytime.programId&&this.primaryOptin.preference_id===n.storytime.preferenceId)&&(i="simple")),this.optin.program_id===n.goodnight.programId&&this.optin.preference_id===n.goodnight.preferenceId&&(i="goodnight"),!this.primaryOptin?.translations?.[this.$i18n.locale]&&(s(this.optin?.customOverride?.adminCustomText?.primary)||s(this.optin?.customOverride?.adminCustomText?.secondary))?this.optin.customOverride.adminCustomText?.secondary||this.optin.customOverride.adminCustomText?.primary:this.$t(`labels.${r}.${i}`,{value:e,program:t})},onlyBrightlyOptinsPresent(){return!this.optins.filter(e=>e.program_type!=="brightly").length}}},m=["innerHTML"],y={key:0},f=["href"];function g(e,t,i,r,n,d){return p(),a("span",null,[o("span",{class:"leading-extra-tight",innerHTML:d.label},null,8,m),i.optin.customOverride&&i.optin.customOverride.customPrivacyPolicy&&i.optin.customOverride.customPrivacyPolicy!==""?(p(),a("span",y,[t[0]||(t[0]=l(" (",-1)),o("a",{href:i.optin.customOverride.customPrivacyPolicy,target:"_blank"},"Privacy Policy",8,f),t[1]||(t[1]=l(") ",-1))])):c("",!0)])}const b=Object.assign(h(u,[["render",g]]),{__name:"NewsletterInputLabel"});export{b 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.