@guardian/support-dotcom-components 7.8.0 → 7.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/types/abTests/banner.d.ts +32 -32
- package/dist/shared/types/abTests/epic.d.ts +18 -18
- package/dist/shared/types/props/banner.d.ts +14 -14
- package/dist/shared/types/props/choiceCards.d.ts +13 -13
- package/dist/shared/types/props/choiceCards.d.ts.map +1 -1
- package/dist/shared/types/props/epic.d.ts +32 -32
- package/dist/shared/types/targeting/shared.d.ts +0 -5
- package/dist/shared/types/targeting/shared.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";const n="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",a=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},i=e=>e.get(n)||void 0,o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),r=(e,n={})=>(e.forEach((e=>{o.has(e)&&(n[e]=(n[e]??0)+1)})),n),s=(e,i,o)=>{const s=((e,n)=>{const i=a(new Date),o=e.get(t);if(o&&o.week===i){const a=o.articles[n]||0;return e.set(t,{week:i,articles:{...o.articles,[n]:a+1}}),a>0}return e.set(t,{week:i,articles:{[n]:1}}),!1})(e,i);if(!s){const t=a(new Date),i=e.get(n)||[],s=i[0];if(s?.week&&s.week===t)s.count+=1,s.tags=r(o,s.tags),e.set(n,i);else{i.unshift({week:t,count:1,tags:r(o,{})});const a=t-365,s=i.filter((e=>e.week>=a));e.set(n,s)}}},l=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],u=e.enum(l),c=e.object({targetedCountryGroups:e.array(u),targetedCountryCodes:e.array(e.string()).optional()}).optional(),d={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},g={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},p={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},m={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},b=e=>Object.keys(d).find((n=>d[n].countries.includes(e??"")))||"International",C=(e,n=[],t=[])=>0===n.length&&0===t.length||!!e&&(!!n.includes(b(e.toUpperCase()))||t.includes(e.toUpperCase())),h=e=>{if(e){const n=b(e);return p[n]}return"£"},S=e=>{if(e)return g[e]},y=e=>e.includes("subscribe/weekly/checkout"),A=(e,n)=>{if(n){const t=(e=>d[b(e)].supportRegionId)(n);if(t&&!y(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},T=(e,n,t,a)=>{if(a){const i=a[b(t)];if(i){return`${h(t)}${i[e][n].price}`}}},I={CURRENCY_SYMBOL:({countryCode:e})=>h(e),COUNTRY_NAME:({countryCode:e})=>S(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>T("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>T("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>T("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>T("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},N=(e,n,t)=>e?e.replace(M,(e=>{const a=e.substring(2,e.length-2),i=I[a];if(i){const e=i({countryCode:n,prices:t});if(e)return e}return e})):"",M=/%%.*?%%/g,E=e=>{const n=e.match(M)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},G="gu.contributions.views",U=e=>e.get(G)??void 0,B=e=>{const n=localStorage.getItem(G),t=n?JSON.parse(n).value:[];t.push({date:(new Date).getTime(),testId:e});const a={value:t.slice(-50)};localStorage.setItem(G,JSON.stringify(a))},R=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},D=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),i=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${i}-${t}-01`,reminderLabel:`${a} ${i}`}},P=new Date("2023-12-31"),L=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<R(e.getFullYear()),w=(e,n=new Date)=>{return"US"===e&&L(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(R(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=R(e.getFullYear())&&e<P)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):D(n);var t},O=e.object({text:e.string(),baseUrl:e.string()});let k=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.nativeEnum(k);const f=e.object({type:e.literal(k.Custom),cta:O}),j=e.object({type:e.literal(k.ContributionsReminder)}),K=e.discriminatedUnion("type",[f,j]),F=e.object({countLabel:e.string(),goalCopy:e.string().optional()}),v=e.object({total:e.number(),goal:e.number()}),H=e.enum(["US","AU","global"]),Y=e.object({currencySymbol:e.string(),copy:F,name:H,tickerData:v.optional()}),V=e.object({for52Weeks:e.number(),forTargetedWeeks:e.number()}),W=e.enum(["for52Weeks","forTargetedWeeks"]),Z=e.object({type:e.literal("above"),copy:e.string().optional(),countType:W.optional()}),$=e.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),x=e.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),_=e.object({abTestName:e.string(),abTestVariant:e.string(),campaignCode:e.string(),componentType:x,products:e.array($).nullish(),labels:e.array(e.string()).nullish(),ophanPageId:e.string(),platformId:e.string(),referrerUrl:e.string()}),J=e.object({mainUrl:e.string(),mobileUrl:e.string().optional(),tabletUrl:e.string().optional(),desktopUrl:e.string().optional(),leftColUrl:e.string().optional(),wideUrl:e.string().optional(),altText:e.string()}),Q=e.object({name:e.string(),description:e.string().optional(),headshot:J.optional()}),z=/^[0-9A-F]{2}$/,q=e.string().refine((e=>z.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),X=e.object({r:q,g:q,b:q,kind:e.literal("hex")}),ee=e.object({mobileUrl:e.string(),tabletUrl:e.string(),desktopUrl:e.string(),altText:e.string(),kind:e.literal("Image")}),ne=e.object({buttonColour:X.nullish(),buttonTextColour:X.nullish(),buttonBorderColour:X.nullish(),buttonSelectColour:X.nullish(),buttonSelectTextColour:X.nullish(),buttonSelectBorderColour:X.nullish(),kind:e.literal("ChoiceCards")}),te=e.discriminatedUnion("kind",[ee,ne]),ae=e.object({visual:te.nullish(),colours:e.object({basic:e.object({background:X,bodyText:X})})}),ie=e=>`#${e.r}${e.g}${e.b}`,oe=e.object({copy:e.string()}),re=e.union([e.literal("Monthly"),e.literal("Annual")]),se=e.discriminatedUnion("supportTier",[e.object({supportTier:e.literal("Contribution"),ratePlan:re}),e.object({supportTier:e.literal("SupporterPlus"),ratePlan:re}),e.object({supportTier:e.literal("OneOff")})]),le=e.object({copy:e.string(),textColour:X.nullish(),backgroundColour:X.nullish()}),ue=e.object({product:se,label:e.string(),isDefault:e.boolean(),benefitsLabel:e.string().nullish(),benefits:e.array(oe),pill:le.nullish(),destinationUrl:e.string().nullish()}),ce=e.object({choiceCards:e.array(ue),mobileChoiceCards:e.array(ue).nullish()}),de=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),ge=e.object({reminderCta:e.string(),reminderLabel:e.string(),reminderPeriod:e.string()}),pe=e.enum(["ONE_OFF","MONTHLY","ANNUAL"]),me=e.object({testName:e.string(),variantName:e.string(),defaultContributionType:pe,displayContributionType:pe.array(),amountsCardData:e.object({ONE_OFF:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),MONTHLY:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),ANNUAL:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()})})}),be=e.object({newsletterId:e.string(),successDescription:e.string()}),Ce=e.object({name:e.string(),heading:e.string().optional(),paragraphs:e.array(e.string()),highlightedText:e.string().optional(),tickerSettings:Y.optional(),cta:O.optional(),secondaryCta:K.optional(),newsletterSignup:be.optional(),image:J.optional(),showReminderFields:ge.optional(),separateArticleCount:Z.optional(),promoCodes:e.array(e.string()).nullish(),maxViews:de.optional(),showSignInLink:e.boolean().optional(),bylineWithImage:Q.optional(),showChoiceCards:e.boolean().optional(),choiceCardsSettings:ce.nullish(),choiceCardAmounts:me.optional(),defaultChoiceCardFrequency:pe.optional()}),he=e.object({variant:Ce,tracking:_,countryCode:e.string().nullish(),articleCounts:V,onReminderOpen:e.any().nullish(),fetchEmail:e.any().nullish(),submitComponentEvent:e.any().nullish(),openCmp:e.any().nullish(),hasConsentForArticleCount:e.boolean().nullish(),stage:e.string().nullish()}),Se=e.enum(["contributions","subscriptions","signIn","abandonedBasket"]),ye=e.object({heading:e.string().optional(),messageText:e.string().optional(),paragraphs:e.array(e.string()).optional(),mobileMessageText:e.string().optional(),highlightedText:e.string().optional(),cta:O.optional(),secondaryCta:K.optional()}),Ae=e.object({tracking:_,bannerChannel:Se,content:ye.nullish(),mobileContent:ye.nullish(),countryCode:e.string().nullish(),isSupporter:e.boolean().nullish(),tickerSettings:Y.nullish(),submitComponentEvent:e.any(),articleCounts:V,hasOptedOutOfArticleCount:e.boolean().nullish(),fetchEmail:e.any().nullish(),separateArticleCount:e.boolean().nullish(),design:ae.nullish(),choiceCardsSettings:ce.nullish(),promoCodes:e.array(e.string()).nullish()}),Te=e.object({heading:e.string(),subheading:e.string(),primaryCta:O.optional(),secondaryCta:O.optional(),benefits:e.array(e.string()).optional()}),Ie=e.object({content:Te,tracking:_,mobileContent:Te.optional(),countryCode:e.string().optional(),submitComponentEvent:e.any(),numArticles:e.number().optional(),promoCodes:e.array(e.string()).nullish()}),Ne=e.object({image:J,bodyCopy:e.array(e.string()),cta:O.optional()});e.object({content:Ne,tracking:_,countryCode:e.string().optional(),submitComponentEvent:e.any(),promoCodes:e.array(e.string()).nullish()});const Me=e.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),Ee=e.enum(["new","guest","current"]),Ge=e.enum(["Epic","EpicAMP","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),Ue=e.enum(["Live","Draft","Archived"]),Be=e.enum(["Mobile","Desktop","All","iOS","Android"]),Re=e.enum(["SignedIn","SignedOut","All"]),De=e.enum(["HasConsented","HasNotConsented","All"]),Pe=e.object({name:e.literal("ABTest")}),Le=e.object({name:e.literal("EpsilonGreedyBandit"),epsilon:e.number(),sampleCount:e.number().optional()}),we=e.object({name:e.literal("Roulette"),sampleCount:e.number().optional()}),Oe=e.intersection(e.discriminatedUnion("name",[Pe,Le,we]),e.object({testName:e.string().optional()})),ke=e.object({channel:Ge,name:e.string(),status:Ue,priority:e.number(),controlProportionSettings:e.object({proportion:e.number(),offset:e.number()}).optional(),deviceType:Be.optional(),signedInStatus:Re.optional(),consentStatus:De.optional(),methodologies:Oe.array().optional()}),fe=e.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),je=e.object({minViews:e.number(),maxViews:e.number().optional(),periodInWeeks:e.number(),tagIds:e.array(e.string()).optional()});e.object({userType:e.array(Ee),product:e.array(Me)}),e.object({tagIds:e.array(e.string()),sectionIds:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSectionIds:e.array(e.string())});const Ke=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),Fe=["ONE_OFF","MONTHLY","ANNUAL"];ke.extend({name:e.string(),status:Ue,locations:e.array(u).optional(),regionTargeting:c.optional(),tagIds:e.array(e.string()),sections:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSections:e.array(e.string()),alwaysAsk:e.boolean(),maxViews:Ke.optional(),userCohort:fe,hasCountryName:e.boolean(),highPriority:e.boolean(),useLocalViewLog:e.boolean(),articlesViewedSettings:je.optional(),priority:e.number(),variants:Ce.array()});const ve=e.object({amount:e.union([e.number(),e.literal("other")]),billingPeriod:e.union([e.literal("ONE_OFF"),e.literal("MONTHLY"),e.literal("ANNUAL")]),product:e.union([e.literal("Contribution"),e.literal("SupporterPlus"),e.literal("PremiumTier"),e.literal("DailyEdition"),e.literal("GuardianWeekly"),e.literal("Paper"),e.literal("PaperAndDigital")]),region:e.union([e.literal("uk"),e.literal("us"),e.literal("au"),e.literal("eu"),e.literal("int"),e.literal("nz"),e.literal("ca")])}),He=(e,n,t)=>{const a=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))},Ye=(e,n)=>He("epic",e,n),Ve=(e,n)=>He("liveblog-epic",e,n),We=(e,n)=>He("banner",e,n),Ze=(e,n)=>He("gutter-liveblog",e,n),$e=(e,n)=>He("header",e,n);export{l as CountryGroupId,k as SecondaryCtaType,ve as abandonedBasketSchema,A as addRegionIdToSupportUrl,Ae as bannerSchema,D as buildReminderFields,E as containsNonArticleCountPlaceholder,Fe as contributionTabFrequencies,b as countryCodeToCountryGroupId,u as countryGroupIdSchema,d as countryGroups,he as epicPropsSchema,We as getBanner,S as getCountryName,Ye as getEpic,U as getEpicViewLog,Ze as getGutterLiveblog,$e as getHeader,Ve as getLiveblogEpic,h as getLocalCurrencySymbol,w as getReminderFields,i as getWeeklyArticleHistory,Ie as headerPropsSchema,ie as hexColourToString,C as inTargetedCountry,s as incrementWeeklyArticleCount,y as isGWCheckoutUrl,m as isoCurrencyToCurrencySymbol,B as logEpicView,N as replaceNonArticleCountPlaceholders,c as targetedRegionsSchema};
|
|
1
|
+
import{z as e}from"zod";const n="gu.history.weeklyArticleCount",t="gu.history.articleCountsThisWeek",a=e=>{const n=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(n-1))/864e5},i=e=>e.get(n)||void 0,o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),r=(e,n={})=>(e.forEach((e=>{o.has(e)&&(n[e]=(n[e]??0)+1)})),n),s=(e,i,o)=>{const s=((e,n)=>{const i=a(new Date),o=e.get(t);if(o&&o.week===i){const a=o.articles[n]||0;return e.set(t,{week:i,articles:{...o.articles,[n]:a+1}}),a>0}return e.set(t,{week:i,articles:{[n]:1}}),!1})(e,i);if(!s){const t=a(new Date),i=e.get(n)||[],s=i[0];if(s?.week&&s.week===t)s.count+=1,s.tags=r(o,s.tags),e.set(n,i);else{i.unshift({week:t,count:1,tags:r(o,{})});const a=t-365,s=i.filter((e=>e.week>=a));e.set(n,s)}}},l=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],u=e.enum(l),c=e.object({targetedCountryGroups:e.array(u),targetedCountryCodes:e.array(e.string()).optional()}).optional(),d={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},g={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},p={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},m={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},b=e=>Object.keys(d).find((n=>d[n].countries.includes(e??"")))||"International",C=(e,n=[],t=[])=>0===n.length&&0===t.length||!!e&&(!!n.includes(b(e.toUpperCase()))||t.includes(e.toUpperCase())),h=e=>{if(e){const n=b(e);return p[n]}return"£"},S=e=>{if(e)return g[e]},y=e=>e.includes("subscribe/weekly/checkout"),A=(e,n)=>{if(n){const t=(e=>d[b(e)].supportRegionId)(n);if(t&&!y(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,((e,n,a)=>`${n}/${t.toLowerCase()}/${a}`))}return e},T=(e,n,t,a)=>{if(a){const i=a[b(t)];if(i){return`${h(t)}${i[e][n].price}`}}},I={CURRENCY_SYMBOL:({countryCode:e})=>h(e),COUNTRY_NAME:({countryCode:e})=>S(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:n})=>T("Digisub","Monthly",e,n),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:n})=>T("Digisub","Annual",e,n),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:n})=>T("GuardianWeekly","Monthly",e,n),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:n})=>T("GuardianWeekly","Annual",e,n),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},N=(e,n,t)=>e?e.replace(M,(e=>{const a=e.substring(2,e.length-2),i=I[a];if(i){const e=i({countryCode:n,prices:t});if(e)return e}return e})):"",M=/%%.*?%%/g,E=e=>{const n=e.match(M)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!n&&n.length>0},G="gu.contributions.views",U=e=>e.get(G)??void 0,B=e=>{const n=localStorage.getItem(G),t=n?JSON.parse(n).value:[];t.push({date:(new Date).getTime(),testId:e});const a={value:t.slice(-50)};localStorage.setItem(G,JSON.stringify(a))},R=e=>{const n=(e=>{const n=new Date(e,10,1).getDay();return new Date(e,10,22+(11-n)%7)})(e);return n.setDate(n.getDate()+5),n},P=(e=new Date)=>{const n=(e=>{const n=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+n),e})(e),t=(n.getMonth()+1).toString().padStart(2,"0"),a=n.toLocaleString("default",{month:"long"}),i=n.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${i}-${t}-01`,reminderLabel:`${a} ${i}`}},D=new Date("2023-12-31"),L=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<R(e.getFullYear()),w=(e,n=new Date)=>{return"US"===e&&L(n)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${t=n.getFullYear()}-${(R(t).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${t}`}:"US"===e&&(e=>e>=R(e.getFullYear())&&e<D)(n)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(n.getFullYear()):P(n);var t},O=e.object({text:e.string(),baseUrl:e.string()});let k=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.nativeEnum(k);const f=e.object({type:e.literal(k.Custom),cta:O}),j=e.object({type:e.literal(k.ContributionsReminder)}),K=e.discriminatedUnion("type",[f,j]),F=e.object({countLabel:e.string(),goalCopy:e.string().optional()}),v=e.object({total:e.number(),goal:e.number()}),H=e.enum(["US","AU","global"]),Y=e.object({currencySymbol:e.string(),copy:F,name:H,tickerData:v.optional()}),V=e.object({for52Weeks:e.number(),forTargetedWeeks:e.number()}),W=e.enum(["for52Weeks","forTargetedWeeks"]),Z=e.object({type:e.literal("above"),copy:e.string().optional(),countType:W.optional()}),$=e.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),x=e.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),_=e.object({abTestName:e.string(),abTestVariant:e.string(),campaignCode:e.string(),componentType:x,products:e.array($).nullish(),labels:e.array(e.string()).nullish(),ophanPageId:e.string(),platformId:e.string(),referrerUrl:e.string()}),J=e.object({mainUrl:e.string(),mobileUrl:e.string().optional(),tabletUrl:e.string().optional(),desktopUrl:e.string().optional(),leftColUrl:e.string().optional(),wideUrl:e.string().optional(),altText:e.string()}),Q=e.object({name:e.string(),description:e.string().optional(),headshot:J.optional()}),z=/^[0-9A-F]{2}$/,q=e.string().refine((e=>z.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),X=e.object({r:q,g:q,b:q,kind:e.literal("hex")}),ee=e.object({mobileUrl:e.string(),tabletUrl:e.string(),desktopUrl:e.string(),altText:e.string(),kind:e.literal("Image")}),ne=e.object({buttonColour:X.nullish(),buttonTextColour:X.nullish(),buttonBorderColour:X.nullish(),buttonSelectColour:X.nullish(),buttonSelectTextColour:X.nullish(),buttonSelectBorderColour:X.nullish(),kind:e.literal("ChoiceCards")}),te=e.discriminatedUnion("kind",[ee,ne]),ae=e.object({visual:te.nullish(),colours:e.object({basic:e.object({background:X,bodyText:X})})}),ie=e=>`#${e.r}${e.g}${e.b}`,oe=e.object({copy:e.string()}),re=e.union([e.literal("Monthly"),e.literal("Annual")]),se=e.discriminatedUnion("supportTier",[e.object({supportTier:e.literal("Contribution"),ratePlan:re}),e.object({supportTier:e.literal("SupporterPlus"),ratePlan:re}),e.object({supportTier:e.literal("OneOff")})]),le=e.object({copy:e.string(),textColour:X.nullish(),backgroundColour:X.nullish()}),ue=e.union([e.literal("LandingPage"),e.literal("Checkout")]),ce=e.object({product:se,label:e.string(),isDefault:e.boolean(),benefitsLabel:e.string().nullish(),benefits:e.array(oe),pill:le.nullish(),destination:ue.nullish()}),de=e.object({choiceCards:e.array(ce),mobileChoiceCards:e.array(ce).nullish()}),ge=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),pe=e.object({reminderCta:e.string(),reminderLabel:e.string(),reminderPeriod:e.string()}),me=e.enum(["ONE_OFF","MONTHLY","ANNUAL"]),be=e.object({testName:e.string(),variantName:e.string(),defaultContributionType:me,displayContributionType:me.array(),amountsCardData:e.object({ONE_OFF:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),MONTHLY:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()}),ANNUAL:e.object({amounts:e.array(e.number()),defaultAmount:e.number(),hideChooseYourAmount:e.boolean().optional()})})}),Ce=e.object({newsletterId:e.string(),successDescription:e.string()}),he=e.object({name:e.string(),heading:e.string().optional(),paragraphs:e.array(e.string()),highlightedText:e.string().optional(),tickerSettings:Y.optional(),cta:O.optional(),secondaryCta:K.optional(),newsletterSignup:Ce.optional(),image:J.optional(),showReminderFields:pe.optional(),separateArticleCount:Z.optional(),promoCodes:e.array(e.string()).nullish(),maxViews:ge.optional(),showSignInLink:e.boolean().optional(),bylineWithImage:Q.optional(),showChoiceCards:e.boolean().optional(),choiceCardsSettings:de.nullish(),choiceCardAmounts:be.optional(),defaultChoiceCardFrequency:me.optional()}),Se=e.object({variant:he,tracking:_,countryCode:e.string().nullish(),articleCounts:V,onReminderOpen:e.any().nullish(),fetchEmail:e.any().nullish(),submitComponentEvent:e.any().nullish(),openCmp:e.any().nullish(),hasConsentForArticleCount:e.boolean().nullish(),stage:e.string().nullish()}),ye=e.enum(["contributions","subscriptions","signIn","abandonedBasket"]),Ae=e.object({heading:e.string().optional(),messageText:e.string().optional(),paragraphs:e.array(e.string()).optional(),mobileMessageText:e.string().optional(),highlightedText:e.string().optional(),cta:O.optional(),secondaryCta:K.optional()}),Te=e.object({tracking:_,bannerChannel:ye,content:Ae.nullish(),mobileContent:Ae.nullish(),countryCode:e.string().nullish(),isSupporter:e.boolean().nullish(),tickerSettings:Y.nullish(),submitComponentEvent:e.any(),articleCounts:V,hasOptedOutOfArticleCount:e.boolean().nullish(),fetchEmail:e.any().nullish(),separateArticleCount:e.boolean().nullish(),design:ae.nullish(),choiceCardsSettings:de.nullish(),promoCodes:e.array(e.string()).nullish()}),Ie=e.object({heading:e.string(),subheading:e.string(),primaryCta:O.optional(),secondaryCta:O.optional(),benefits:e.array(e.string()).optional()}),Ne=e.object({content:Ie,tracking:_,mobileContent:Ie.optional(),countryCode:e.string().optional(),submitComponentEvent:e.any(),numArticles:e.number().optional(),promoCodes:e.array(e.string()).nullish()}),Me=e.object({image:J,bodyCopy:e.array(e.string()),cta:O.optional()});e.object({content:Me,tracking:_,countryCode:e.string().optional(),submitComponentEvent:e.any(),promoCodes:e.array(e.string()).nullish()});const Ee=e.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),Ge=e.enum(["new","guest","current"]),Ue=e.enum(["Epic","EpicAMP","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),Be=e.enum(["Live","Draft","Archived"]),Re=e.enum(["Mobile","Desktop","All","iOS","Android"]),Pe=e.enum(["SignedIn","SignedOut","All"]),De=e.enum(["HasConsented","HasNotConsented","All"]),Le=e.object({name:e.literal("ABTest")}),we=e.object({name:e.literal("EpsilonGreedyBandit"),epsilon:e.number(),sampleCount:e.number().optional()}),Oe=e.object({name:e.literal("Roulette"),sampleCount:e.number().optional()}),ke=e.intersection(e.discriminatedUnion("name",[Le,we,Oe]),e.object({testName:e.string().optional()})),fe=e.object({channel:Ue,name:e.string(),status:Be,priority:e.number(),controlProportionSettings:e.object({proportion:e.number(),offset:e.number()}).optional(),deviceType:Re.optional(),signedInStatus:Pe.optional(),consentStatus:De.optional(),methodologies:ke.array().optional()}),je=e.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),Ke=e.object({minViews:e.number(),maxViews:e.number().optional(),periodInWeeks:e.number(),tagIds:e.array(e.string()).optional()});e.object({userType:e.array(Ge),product:e.array(Ee)}),e.object({tagIds:e.array(e.string()),sectionIds:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSectionIds:e.array(e.string())});const Fe=e.object({maxViewsCount:e.number(),maxViewsDays:e.number(),minDaysBetweenViews:e.number()}),ve=["ONE_OFF","MONTHLY","ANNUAL"];fe.extend({name:e.string(),status:Be,locations:e.array(u).optional(),regionTargeting:c.optional(),tagIds:e.array(e.string()),sections:e.array(e.string()),excludedTagIds:e.array(e.string()),excludedSections:e.array(e.string()),alwaysAsk:e.boolean(),maxViews:Fe.optional(),userCohort:je,hasCountryName:e.boolean(),highPriority:e.boolean(),useLocalViewLog:e.boolean(),articlesViewedSettings:Ke.optional(),priority:e.number(),variants:he.array()});const He=e.object({amount:e.union([e.number(),e.literal("other")]),billingPeriod:e.union([e.literal("ONE_OFF"),e.literal("MONTHLY"),e.literal("ANNUAL")]),product:e.union([e.literal("Contribution"),e.literal("SupporterPlus"),e.literal("PremiumTier"),e.literal("DailyEdition"),e.literal("GuardianWeekly"),e.literal("Paper"),e.literal("PaperAndDigital")]),region:e.union([e.literal("uk"),e.literal("us"),e.literal("au"),e.literal("eu"),e.literal("int"),e.literal("nz"),e.literal("ca")])}),Ye=(e,n,t)=>{const a=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e);return fetch(`${n}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((n=>{if(!n.ok)throw Error(n.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${n.status}`);return n})).then((e=>e.json()))},Ve=(e,n)=>Ye("epic",e,n),We=(e,n)=>Ye("liveblog-epic",e,n),Ze=(e,n)=>Ye("banner",e,n),$e=(e,n)=>Ye("gutter-liveblog",e,n),xe=(e,n)=>Ye("header",e,n);export{l as CountryGroupId,k as SecondaryCtaType,He as abandonedBasketSchema,A as addRegionIdToSupportUrl,Te as bannerSchema,P as buildReminderFields,E as containsNonArticleCountPlaceholder,ve as contributionTabFrequencies,b as countryCodeToCountryGroupId,u as countryGroupIdSchema,d as countryGroups,Se as epicPropsSchema,Ze as getBanner,S as getCountryName,Ve as getEpic,U as getEpicViewLog,$e as getGutterLiveblog,xe as getHeader,We as getLiveblogEpic,h as getLocalCurrencySymbol,w as getReminderFields,i as getWeeklyArticleHistory,Ne as headerPropsSchema,ie as hexColourToString,C as inTargetedCountry,s as incrementWeeklyArticleCount,y as isGWCheckoutUrl,m as isoCurrencyToCurrencySymbol,B as logEpicView,N as replaceNonArticleCountPlaceholders,c as targetedRegionsSchema};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zod");const t="gu.history.weeklyArticleCount",n="gu.history.articleCountsThisWeek",a=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),r=(e,t={})=>(e.forEach((e=>{o.has(e)&&(t[e]=(t[e]??0)+1)})),t),i=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],s=e.z.enum(i),l=e.z.object({targetedCountryGroups:e.z.array(s),targetedCountryCodes:e.z.array(e.z.string()).optional()}).optional(),u={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},c={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},z=e=>Object.keys(u).find((t=>u[t].countries.includes(e??"")))||"International",p=e=>{if(e){const t=z(e);return d[t]}return"£"},g=e=>{if(e)return c[e]},m=e=>e.includes("subscribe/weekly/checkout"),C=(e,t,n,a)=>{if(a){const o=a[z(n)];if(o){return`${p(n)}${o[e][t].price}`}}},b={CURRENCY_SYMBOL:({countryCode:e})=>p(e),COUNTRY_NAME:({countryCode:e})=>g(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>C("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>C("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>C("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>C("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},h=/%%.*?%%/g,S="gu.contributions.views",y=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},A=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.toLocaleString("default",{month:"long"}),o=t.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${o}-${n}-01`,reminderLabel:`${a} ${o}`}},T=new Date("2023-12-31"),I=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<y(e.getFullYear()),N=e.z.object({text:e.z.string(),baseUrl:e.z.string()});let M=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.z.nativeEnum(M);const E=e.z.object({type:e.z.literal(M.Custom),cta:N}),G=e.z.object({type:e.z.literal(M.ContributionsReminder)}),U=e.z.discriminatedUnion("type",[E,G]),B=e.z.object({countLabel:e.z.string(),goalCopy:e.z.string().optional()}),R=e.z.object({total:e.z.number(),goal:e.z.number()}),P=e.z.enum(["US","AU","global"]),L=e.z.object({currencySymbol:e.z.string(),copy:B,name:P,tickerData:R.optional()}),D=e.z.object({for52Weeks:e.z.number(),forTargetedWeeks:e.z.number()}),w=e.z.enum(["for52Weeks","forTargetedWeeks"]),O=e.z.object({type:e.z.literal("above"),copy:e.z.string().optional(),countType:w.optional()}),k=e.z.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),x=e.z.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),j=e.z.object({abTestName:e.z.string(),abTestVariant:e.z.string(),campaignCode:e.z.string(),componentType:x,products:e.z.array(k).nullish(),labels:e.z.array(e.z.string()).nullish(),ophanPageId:e.z.string(),platformId:e.z.string(),referrerUrl:e.z.string()}),f=e.z.object({mainUrl:e.z.string(),mobileUrl:e.z.string().optional(),tabletUrl:e.z.string().optional(),desktopUrl:e.z.string().optional(),leftColUrl:e.z.string().optional(),wideUrl:e.z.string().optional(),altText:e.z.string()}),F=e.z.object({name:e.z.string(),description:e.z.string().optional(),headshot:f.optional()}),v=/^[0-9A-F]{2}$/,K=e.z.string().refine((e=>v.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),H=e.z.object({r:K,g:K,b:K,kind:e.z.literal("hex")}),V=e.z.object({mobileUrl:e.z.string(),tabletUrl:e.z.string(),desktopUrl:e.z.string(),altText:e.z.string(),kind:e.z.literal("Image")}),Y=e.z.object({buttonColour:H.nullish(),buttonTextColour:H.nullish(),buttonBorderColour:H.nullish(),buttonSelectColour:H.nullish(),buttonSelectTextColour:H.nullish(),buttonSelectBorderColour:H.nullish(),kind:e.z.literal("ChoiceCards")}),W=e.z.discriminatedUnion("kind",[V,Y]),Z=e.z.object({visual:W.nullish(),colours:e.z.object({basic:e.z.object({background:H,bodyText:H})})}),$=e.z.object({copy:e.z.string()}),_=e.z.union([e.z.literal("Monthly"),e.z.literal("Annual")]),J=e.z.discriminatedUnion("supportTier",[e.z.object({supportTier:e.z.literal("Contribution"),ratePlan:_}),e.z.object({supportTier:e.z.literal("SupporterPlus"),ratePlan:_}),e.z.object({supportTier:e.z.literal("OneOff")})]),Q=e.z.object({copy:e.z.string(),textColour:H.nullish(),backgroundColour:H.nullish()}),q=e.z.object({product:J,label:e.z.string(),isDefault:e.z.boolean(),benefitsLabel:e.z.string().nullish(),benefits:e.z.array($),pill:Q.nullish(),destinationUrl:e.z.string().nullish()}),X=e.z.object({choiceCards:e.z.array(q),mobileChoiceCards:e.z.array(q).nullish()}),ee=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()}),te=e.z.object({reminderCta:e.z.string(),reminderLabel:e.z.string(),reminderPeriod:e.z.string()}),ne=e.z.enum(["ONE_OFF","MONTHLY","ANNUAL"]),ae=e.z.object({testName:e.z.string(),variantName:e.z.string(),defaultContributionType:ne,displayContributionType:ne.array(),amountsCardData:e.z.object({ONE_OFF:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),MONTHLY:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),ANNUAL:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()})})}),oe=e.z.object({newsletterId:e.z.string(),successDescription:e.z.string()}),re=e.z.object({name:e.z.string(),heading:e.z.string().optional(),paragraphs:e.z.array(e.z.string()),highlightedText:e.z.string().optional(),tickerSettings:L.optional(),cta:N.optional(),secondaryCta:U.optional(),newsletterSignup:oe.optional(),image:f.optional(),showReminderFields:te.optional(),separateArticleCount:O.optional(),promoCodes:e.z.array(e.z.string()).nullish(),maxViews:ee.optional(),showSignInLink:e.z.boolean().optional(),bylineWithImage:F.optional(),showChoiceCards:e.z.boolean().optional(),choiceCardsSettings:X.nullish(),choiceCardAmounts:ae.optional(),defaultChoiceCardFrequency:ne.optional()}),ie=e.z.object({variant:re,tracking:j,countryCode:e.z.string().nullish(),articleCounts:D,onReminderOpen:e.z.any().nullish(),fetchEmail:e.z.any().nullish(),submitComponentEvent:e.z.any().nullish(),openCmp:e.z.any().nullish(),hasConsentForArticleCount:e.z.boolean().nullish(),stage:e.z.string().nullish()}),se=e.z.enum(["contributions","subscriptions","signIn","abandonedBasket"]),le=e.z.object({heading:e.z.string().optional(),messageText:e.z.string().optional(),paragraphs:e.z.array(e.z.string()).optional(),mobileMessageText:e.z.string().optional(),highlightedText:e.z.string().optional(),cta:N.optional(),secondaryCta:U.optional()}),ue=e.z.object({tracking:j,bannerChannel:se,content:le.nullish(),mobileContent:le.nullish(),countryCode:e.z.string().nullish(),isSupporter:e.z.boolean().nullish(),tickerSettings:L.nullish(),submitComponentEvent:e.z.any(),articleCounts:D,hasOptedOutOfArticleCount:e.z.boolean().nullish(),fetchEmail:e.z.any().nullish(),separateArticleCount:e.z.boolean().nullish(),design:Z.nullish(),choiceCardsSettings:X.nullish(),promoCodes:e.z.array(e.z.string()).nullish()}),ce=e.z.object({heading:e.z.string(),subheading:e.z.string(),primaryCta:N.optional(),secondaryCta:N.optional(),benefits:e.z.array(e.z.string()).optional()}),de=e.z.object({content:ce,tracking:j,mobileContent:ce.optional(),countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),numArticles:e.z.number().optional(),promoCodes:e.z.array(e.z.string()).nullish()}),ze=e.z.object({image:f,bodyCopy:e.z.array(e.z.string()),cta:N.optional()});e.z.object({content:ze,tracking:j,countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),promoCodes:e.z.array(e.z.string()).nullish()});const pe=e.z.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),ge=e.z.enum(["new","guest","current"]),me=e.z.enum(["Epic","EpicAMP","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),Ce=e.z.enum(["Live","Draft","Archived"]),be=e.z.enum(["Mobile","Desktop","All","iOS","Android"]),he=e.z.enum(["SignedIn","SignedOut","All"]),Se=e.z.enum(["HasConsented","HasNotConsented","All"]),ye=e.z.object({name:e.z.literal("ABTest")}),Ae=e.z.object({name:e.z.literal("EpsilonGreedyBandit"),epsilon:e.z.number(),sampleCount:e.z.number().optional()}),Te=e.z.object({name:e.z.literal("Roulette"),sampleCount:e.z.number().optional()}),Ie=e.z.intersection(e.z.discriminatedUnion("name",[ye,Ae,Te]),e.z.object({testName:e.z.string().optional()})),Ne=e.z.object({channel:me,name:e.z.string(),status:Ce,priority:e.z.number(),controlProportionSettings:e.z.object({proportion:e.z.number(),offset:e.z.number()}).optional(),deviceType:be.optional(),signedInStatus:he.optional(),consentStatus:Se.optional(),methodologies:Ie.array().optional()}),Me=e.z.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),Ee=e.z.object({minViews:e.z.number(),maxViews:e.z.number().optional(),periodInWeeks:e.z.number(),tagIds:e.z.array(e.z.string()).optional()});e.z.object({userType:e.z.array(ge),product:e.z.array(pe)}),e.z.object({tagIds:e.z.array(e.z.string()),sectionIds:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSectionIds:e.z.array(e.z.string())});const Ge=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()});Ne.extend({name:e.z.string(),status:Ce,locations:e.z.array(s).optional(),regionTargeting:l.optional(),tagIds:e.z.array(e.z.string()),sections:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSections:e.z.array(e.z.string()),alwaysAsk:e.z.boolean(),maxViews:Ge.optional(),userCohort:Me,hasCountryName:e.z.boolean(),highPriority:e.z.boolean(),useLocalViewLog:e.z.boolean(),articlesViewedSettings:Ee.optional(),priority:e.z.number(),variants:re.array()});const Ue=e.z.object({amount:e.z.union([e.z.number(),e.z.literal("other")]),billingPeriod:e.z.union([e.z.literal("ONE_OFF"),e.z.literal("MONTHLY"),e.z.literal("ANNUAL")]),product:e.z.union([e.z.literal("Contribution"),e.z.literal("SupporterPlus"),e.z.literal("PremiumTier"),e.z.literal("DailyEdition"),e.z.literal("GuardianWeekly"),e.z.literal("Paper"),e.z.literal("PaperAndDigital")]),region:e.z.union([e.z.literal("uk"),e.z.literal("us"),e.z.literal("au"),e.z.literal("eu"),e.z.literal("int"),e.z.literal("nz"),e.z.literal("ca")])}),Be=(e,t,n)=>{const a=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e);return fetch(`${t}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))};exports.CountryGroupId=i,exports.SecondaryCtaType=M,exports.abandonedBasketSchema=Ue,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>u[z(e)].supportRegionId)(t);if(n&&!m(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,((e,t,a)=>`${t}/${n.toLowerCase()}/${a}`))}return e},exports.bannerSchema=ue,exports.buildReminderFields=A,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(h)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=z,exports.countryGroupIdSchema=s,exports.countryGroups=u,exports.epicPropsSchema=ie,exports.getBanner=(e,t)=>Be("banner",e,t),exports.getCountryName=g,exports.getEpic=(e,t)=>Be("epic",e,t),exports.getEpicViewLog=e=>e.get(S)??void 0,exports.getGutterLiveblog=(e,t)=>Be("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Be("header",e,t),exports.getLiveblogEpic=(e,t)=>Be("liveblog-epic",e,t),exports.getLocalCurrencySymbol=p,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&I(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(y(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=y(e.getFullYear())&&e<T)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):A(t);var n},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.headerPropsSchema=de,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(z(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,o,i)=>{const s=((e,t)=>{const o=a(new Date),r=e.get(n);if(r&&r.week===o){const a=r.articles[t]||0;return e.set(n,{week:o,articles:{...r.articles,[t]:a+1}}),a>0}return e.set(n,{week:o,articles:{[t]:1}}),!1})(e,o);if(!s){const n=a(new Date),o=e.get(t)||[],s=o[0];if(s?.week&&s.week===n)s.count+=1,s.tags=r(i,s.tags),e.set(t,o);else{o.unshift({week:n,count:1,tags:r(i,{})});const a=n-365,s=o.filter((e=>e.week>=a));e.set(t,s)}}},exports.isGWCheckoutUrl=m,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=localStorage.getItem(S),n=t?JSON.parse(t).value:[];n.push({date:(new Date).getTime(),testId:e});const a={value:n.slice(-50)};localStorage.setItem(S,JSON.stringify(a))},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(h,(e=>{const a=e.substring(2,e.length-2),o=b[a];if(o){const e=o({countryCode:t,prices:n});if(e)return e}return e})):"",exports.targetedRegionsSchema=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("zod");const t="gu.history.weeklyArticleCount",n="gu.history.articleCountsThisWeek",a=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business","tone/recipes","sport/sport","football/football","sport/olympic-games","sport/olympic-games-2024","tracking/commissioningdesk/uk-investigations"]),r=(e,t={})=>(e.forEach((e=>{o.has(e)&&(t[e]=(t[e]??0)+1)})),t),i=["GBPCountries","UnitedStates","AUDCountries","EURCountries","International","NZDCountries","Canada"],s=e.z.enum(i),l=e.z.object({targetedCountryGroups:e.z.array(s),targetedCountryCodes:e.z.array(e.z.string()).optional()}).optional(),u={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},c={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},z=e=>Object.keys(u).find((t=>u[t].countries.includes(e??"")))||"International",p=e=>{if(e){const t=z(e);return d[t]}return"£"},g=e=>{if(e)return c[e]},m=e=>e.includes("subscribe/weekly/checkout"),C=(e,t,n,a)=>{if(a){const o=a[z(n)];if(o){return`${p(n)}${o[e][t].price}`}}},b={CURRENCY_SYMBOL:({countryCode:e})=>p(e),COUNTRY_NAME:({countryCode:e})=>g(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>C("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>C("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>C("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>C("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},h=/%%.*?%%/g,S="gu.contributions.views",y=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},A=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.toLocaleString("default",{month:"long"}),o=t.getFullYear();return{reminderCta:`Remind me in ${a}`,reminderPeriod:`${o}-${n}-01`,reminderLabel:`${a} ${o}`}},T=new Date("2023-12-31"),I=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<y(e.getFullYear()),N=e.z.object({text:e.z.string(),baseUrl:e.z.string()});let M=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});e.z.nativeEnum(M);const E=e.z.object({type:e.z.literal(M.Custom),cta:N}),G=e.z.object({type:e.z.literal(M.ContributionsReminder)}),U=e.z.discriminatedUnion("type",[E,G]),B=e.z.object({countLabel:e.z.string(),goalCopy:e.z.string().optional()}),R=e.z.object({total:e.z.number(),goal:e.z.number()}),P=e.z.enum(["US","AU","global"]),L=e.z.object({currencySymbol:e.z.string(),copy:B,name:P,tickerData:R.optional()}),D=e.z.object({for52Weeks:e.z.number(),forTargetedWeeks:e.z.number()}),w=e.z.enum(["for52Weeks","forTargetedWeeks"]),O=e.z.object({type:e.z.literal("above"),copy:e.z.string().optional(),countType:w.optional()}),k=e.z.enum(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),x=e.z.enum(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),j=e.z.object({abTestName:e.z.string(),abTestVariant:e.z.string(),campaignCode:e.z.string(),componentType:x,products:e.z.array(k).nullish(),labels:e.z.array(e.z.string()).nullish(),ophanPageId:e.z.string(),platformId:e.z.string(),referrerUrl:e.z.string()}),f=e.z.object({mainUrl:e.z.string(),mobileUrl:e.z.string().optional(),tabletUrl:e.z.string().optional(),desktopUrl:e.z.string().optional(),leftColUrl:e.z.string().optional(),wideUrl:e.z.string().optional(),altText:e.z.string()}),F=e.z.object({name:e.z.string(),description:e.z.string().optional(),headshot:f.optional()}),v=/^[0-9A-F]{2}$/,K=e.z.string().refine((e=>v.test(e)),(e=>({message:`"${e}" is not a valid hex value`}))),H=e.z.object({r:K,g:K,b:K,kind:e.z.literal("hex")}),V=e.z.object({mobileUrl:e.z.string(),tabletUrl:e.z.string(),desktopUrl:e.z.string(),altText:e.z.string(),kind:e.z.literal("Image")}),Y=e.z.object({buttonColour:H.nullish(),buttonTextColour:H.nullish(),buttonBorderColour:H.nullish(),buttonSelectColour:H.nullish(),buttonSelectTextColour:H.nullish(),buttonSelectBorderColour:H.nullish(),kind:e.z.literal("ChoiceCards")}),W=e.z.discriminatedUnion("kind",[V,Y]),Z=e.z.object({visual:W.nullish(),colours:e.z.object({basic:e.z.object({background:H,bodyText:H})})}),$=e.z.object({copy:e.z.string()}),_=e.z.union([e.z.literal("Monthly"),e.z.literal("Annual")]),J=e.z.discriminatedUnion("supportTier",[e.z.object({supportTier:e.z.literal("Contribution"),ratePlan:_}),e.z.object({supportTier:e.z.literal("SupporterPlus"),ratePlan:_}),e.z.object({supportTier:e.z.literal("OneOff")})]),Q=e.z.object({copy:e.z.string(),textColour:H.nullish(),backgroundColour:H.nullish()}),q=e.z.union([e.z.literal("LandingPage"),e.z.literal("Checkout")]),X=e.z.object({product:J,label:e.z.string(),isDefault:e.z.boolean(),benefitsLabel:e.z.string().nullish(),benefits:e.z.array($),pill:Q.nullish(),destination:q.nullish()}),ee=e.z.object({choiceCards:e.z.array(X),mobileChoiceCards:e.z.array(X).nullish()}),te=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()}),ne=e.z.object({reminderCta:e.z.string(),reminderLabel:e.z.string(),reminderPeriod:e.z.string()}),ae=e.z.enum(["ONE_OFF","MONTHLY","ANNUAL"]),oe=e.z.object({testName:e.z.string(),variantName:e.z.string(),defaultContributionType:ae,displayContributionType:ae.array(),amountsCardData:e.z.object({ONE_OFF:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),MONTHLY:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()}),ANNUAL:e.z.object({amounts:e.z.array(e.z.number()),defaultAmount:e.z.number(),hideChooseYourAmount:e.z.boolean().optional()})})}),re=e.z.object({newsletterId:e.z.string(),successDescription:e.z.string()}),ie=e.z.object({name:e.z.string(),heading:e.z.string().optional(),paragraphs:e.z.array(e.z.string()),highlightedText:e.z.string().optional(),tickerSettings:L.optional(),cta:N.optional(),secondaryCta:U.optional(),newsletterSignup:re.optional(),image:f.optional(),showReminderFields:ne.optional(),separateArticleCount:O.optional(),promoCodes:e.z.array(e.z.string()).nullish(),maxViews:te.optional(),showSignInLink:e.z.boolean().optional(),bylineWithImage:F.optional(),showChoiceCards:e.z.boolean().optional(),choiceCardsSettings:ee.nullish(),choiceCardAmounts:oe.optional(),defaultChoiceCardFrequency:ae.optional()}),se=e.z.object({variant:ie,tracking:j,countryCode:e.z.string().nullish(),articleCounts:D,onReminderOpen:e.z.any().nullish(),fetchEmail:e.z.any().nullish(),submitComponentEvent:e.z.any().nullish(),openCmp:e.z.any().nullish(),hasConsentForArticleCount:e.z.boolean().nullish(),stage:e.z.string().nullish()}),le=e.z.enum(["contributions","subscriptions","signIn","abandonedBasket"]),ue=e.z.object({heading:e.z.string().optional(),messageText:e.z.string().optional(),paragraphs:e.z.array(e.z.string()).optional(),mobileMessageText:e.z.string().optional(),highlightedText:e.z.string().optional(),cta:N.optional(),secondaryCta:U.optional()}),ce=e.z.object({tracking:j,bannerChannel:le,content:ue.nullish(),mobileContent:ue.nullish(),countryCode:e.z.string().nullish(),isSupporter:e.z.boolean().nullish(),tickerSettings:L.nullish(),submitComponentEvent:e.z.any(),articleCounts:D,hasOptedOutOfArticleCount:e.z.boolean().nullish(),fetchEmail:e.z.any().nullish(),separateArticleCount:e.z.boolean().nullish(),design:Z.nullish(),choiceCardsSettings:ee.nullish(),promoCodes:e.z.array(e.z.string()).nullish()}),de=e.z.object({heading:e.z.string(),subheading:e.z.string(),primaryCta:N.optional(),secondaryCta:N.optional(),benefits:e.z.array(e.z.string()).optional()}),ze=e.z.object({content:de,tracking:j,mobileContent:de.optional(),countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),numArticles:e.z.number().optional(),promoCodes:e.z.array(e.z.string()).nullish()}),pe=e.z.object({image:f,bodyCopy:e.z.array(e.z.string()),cta:N.optional()});e.z.object({content:pe,tracking:j,countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),promoCodes:e.z.array(e.z.string()).nullish()});const ge=e.z.enum(["Contribution","SupporterPlus","GuardianWeekly","Paper"]),me=e.z.enum(["new","guest","current"]),Ce=e.z.enum(["Epic","EpicAMP","EpicAppleNews","EpicLiveblog","Banner1","Banner2","Header","GutterLiveblog"]),be=e.z.enum(["Live","Draft","Archived"]),he=e.z.enum(["Mobile","Desktop","All","iOS","Android"]),Se=e.z.enum(["SignedIn","SignedOut","All"]),ye=e.z.enum(["HasConsented","HasNotConsented","All"]),Ae=e.z.object({name:e.z.literal("ABTest")}),Te=e.z.object({name:e.z.literal("EpsilonGreedyBandit"),epsilon:e.z.number(),sampleCount:e.z.number().optional()}),Ie=e.z.object({name:e.z.literal("Roulette"),sampleCount:e.z.number().optional()}),Ne=e.z.intersection(e.z.discriminatedUnion("name",[Ae,Te,Ie]),e.z.object({testName:e.z.string().optional()})),Me=e.z.object({channel:Ce,name:e.z.string(),status:be,priority:e.z.number(),controlProportionSettings:e.z.object({proportion:e.z.number(),offset:e.z.number()}).optional(),deviceType:he.optional(),signedInStatus:Se.optional(),consentStatus:ye.optional(),methodologies:Ne.array().optional()}),Ee=e.z.enum(["AllExistingSupporters","AllNonSupporters","Everyone","PostAskPauseSingleContributors"]),Ge=e.z.object({minViews:e.z.number(),maxViews:e.z.number().optional(),periodInWeeks:e.z.number(),tagIds:e.z.array(e.z.string()).optional()});e.z.object({userType:e.z.array(me),product:e.z.array(ge)}),e.z.object({tagIds:e.z.array(e.z.string()),sectionIds:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSectionIds:e.z.array(e.z.string())});const Ue=e.z.object({maxViewsCount:e.z.number(),maxViewsDays:e.z.number(),minDaysBetweenViews:e.z.number()});Me.extend({name:e.z.string(),status:be,locations:e.z.array(s).optional(),regionTargeting:l.optional(),tagIds:e.z.array(e.z.string()),sections:e.z.array(e.z.string()),excludedTagIds:e.z.array(e.z.string()),excludedSections:e.z.array(e.z.string()),alwaysAsk:e.z.boolean(),maxViews:Ue.optional(),userCohort:Ee,hasCountryName:e.z.boolean(),highPriority:e.z.boolean(),useLocalViewLog:e.z.boolean(),articlesViewedSettings:Ge.optional(),priority:e.z.number(),variants:ie.array()});const Be=e.z.object({amount:e.z.union([e.z.number(),e.z.literal("other")]),billingPeriod:e.z.union([e.z.literal("ONE_OFF"),e.z.literal("MONTHLY"),e.z.literal("ANNUAL")]),product:e.z.union([e.z.literal("Contribution"),e.z.literal("SupporterPlus"),e.z.literal("PremiumTier"),e.z.literal("DailyEdition"),e.z.literal("GuardianWeekly"),e.z.literal("Paper"),e.z.literal("PaperAndDigital")]),region:e.z.union([e.z.literal("uk"),e.z.literal("us"),e.z.literal("au"),e.z.literal("eu"),e.z.literal("int"),e.z.literal("nz"),e.z.literal("ca")])}),Re=(e,t,n)=>{const a=(e=>new URLSearchParams(window.location.search).get(`force-${e}`))(e);return fetch(`${t}/${e}${a?`?force=${a}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))};exports.CountryGroupId=i,exports.SecondaryCtaType=M,exports.abandonedBasketSchema=Be,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const n=(e=>u[z(e)].supportRegionId)(t);if(n&&!m(e))return e.replace(/(support\.theguardian\.com)\/(contribute-in-epic|contribute|subscribe|checkout)/,((e,t,a)=>`${t}/${n.toLowerCase()}/${a}`))}return e},exports.bannerSchema=ce,exports.buildReminderFields=A,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(h)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=z,exports.countryGroupIdSchema=s,exports.countryGroups=u,exports.epicPropsSchema=se,exports.getBanner=(e,t)=>Re("banner",e,t),exports.getCountryName=g,exports.getEpic=(e,t)=>Re("epic",e,t),exports.getEpicViewLog=e=>e.get(S)??void 0,exports.getGutterLiveblog=(e,t)=>Re("gutter-liveblog",e,t),exports.getHeader=(e,t)=>Re("header",e,t),exports.getLiveblogEpic=(e,t)=>Re("liveblog-epic",e,t),exports.getLocalCurrencySymbol=p,exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&I(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${n=t.getFullYear()}-${(y(n).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${n}`}:"US"===e&&(e=>e>=y(e.getFullYear())&&e<T)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):A(t);var n},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.headerPropsSchema=ze,exports.hexColourToString=e=>`#${e.r}${e.g}${e.b}`,exports.inTargetedCountry=(e,t=[],n=[])=>0===t.length&&0===n.length||!!e&&(!!t.includes(z(e.toUpperCase()))||n.includes(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,o,i)=>{const s=((e,t)=>{const o=a(new Date),r=e.get(n);if(r&&r.week===o){const a=r.articles[t]||0;return e.set(n,{week:o,articles:{...r.articles,[t]:a+1}}),a>0}return e.set(n,{week:o,articles:{[t]:1}}),!1})(e,o);if(!s){const n=a(new Date),o=e.get(t)||[],s=o[0];if(s?.week&&s.week===n)s.count+=1,s.tags=r(i,s.tags),e.set(t,o);else{o.unshift({week:n,count:1,tags:r(i,{})});const a=n-365,s=o.filter((e=>e.week>=a));e.set(t,s)}}},exports.isGWCheckoutUrl=m,exports.isoCurrencyToCurrencySymbol={GBP:"£",USD:"$",AUD:"$",EUR:"€",NZD:"NZ$",CAD:"CA$"},exports.logEpicView=e=>{const t=localStorage.getItem(S),n=t?JSON.parse(t).value:[];n.push({date:(new Date).getTime(),testId:e});const a={value:n.slice(-50)};localStorage.setItem(S,JSON.stringify(a))},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(h,(e=>{const a=e.substring(2,e.length-2),o=b[a];if(o){const e=o({countryCode:t,prices:n});if(e)return e}return e})):"",exports.targetedRegionsSchema=l;
|
|
@@ -363,7 +363,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
363
363
|
kind: "hex";
|
|
364
364
|
} | null | undefined;
|
|
365
365
|
}>>>;
|
|
366
|
-
|
|
366
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
367
367
|
}, "strip", z.ZodTypeAny, {
|
|
368
368
|
product: {
|
|
369
369
|
supportTier: "Contribution";
|
|
@@ -395,7 +395,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
395
395
|
kind: "hex";
|
|
396
396
|
} | null | undefined;
|
|
397
397
|
} | null | undefined;
|
|
398
|
-
|
|
398
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
399
399
|
}, {
|
|
400
400
|
product: {
|
|
401
401
|
supportTier: "Contribution";
|
|
@@ -427,7 +427,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
427
427
|
kind: "hex";
|
|
428
428
|
} | null | undefined;
|
|
429
429
|
} | null | undefined;
|
|
430
|
-
|
|
430
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
431
431
|
}>, "many">;
|
|
432
432
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
433
433
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -528,7 +528,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
528
528
|
kind: "hex";
|
|
529
529
|
} | null | undefined;
|
|
530
530
|
}>>>;
|
|
531
|
-
|
|
531
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
532
532
|
}, "strip", z.ZodTypeAny, {
|
|
533
533
|
product: {
|
|
534
534
|
supportTier: "Contribution";
|
|
@@ -560,7 +560,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
560
560
|
kind: "hex";
|
|
561
561
|
} | null | undefined;
|
|
562
562
|
} | null | undefined;
|
|
563
|
-
|
|
563
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
564
564
|
}, {
|
|
565
565
|
product: {
|
|
566
566
|
supportTier: "Contribution";
|
|
@@ -592,7 +592,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
592
592
|
kind: "hex";
|
|
593
593
|
} | null | undefined;
|
|
594
594
|
} | null | undefined;
|
|
595
|
-
|
|
595
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
596
596
|
}>, "many">>>;
|
|
597
597
|
}, "strip", z.ZodTypeAny, {
|
|
598
598
|
choiceCards: {
|
|
@@ -626,7 +626,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
626
626
|
kind: "hex";
|
|
627
627
|
} | null | undefined;
|
|
628
628
|
} | null | undefined;
|
|
629
|
-
|
|
629
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
630
630
|
}[];
|
|
631
631
|
mobileChoiceCards?: {
|
|
632
632
|
product: {
|
|
@@ -659,7 +659,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
659
659
|
kind: "hex";
|
|
660
660
|
} | null | undefined;
|
|
661
661
|
} | null | undefined;
|
|
662
|
-
|
|
662
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
663
663
|
}[] | null | undefined;
|
|
664
664
|
}, {
|
|
665
665
|
choiceCards: {
|
|
@@ -693,7 +693,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
693
693
|
kind: "hex";
|
|
694
694
|
} | null | undefined;
|
|
695
695
|
} | null | undefined;
|
|
696
|
-
|
|
696
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
697
697
|
}[];
|
|
698
698
|
mobileChoiceCards?: {
|
|
699
699
|
product: {
|
|
@@ -726,7 +726,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
726
726
|
kind: "hex";
|
|
727
727
|
} | null | undefined;
|
|
728
728
|
} | null | undefined;
|
|
729
|
-
|
|
729
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
730
730
|
}[] | null | undefined;
|
|
731
731
|
}>>>;
|
|
732
732
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -827,7 +827,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
827
827
|
kind: "hex";
|
|
828
828
|
} | null | undefined;
|
|
829
829
|
} | null | undefined;
|
|
830
|
-
|
|
830
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
831
831
|
}[];
|
|
832
832
|
mobileChoiceCards?: {
|
|
833
833
|
product: {
|
|
@@ -860,7 +860,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
860
860
|
kind: "hex";
|
|
861
861
|
} | null | undefined;
|
|
862
862
|
} | null | undefined;
|
|
863
|
-
|
|
863
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
864
864
|
}[] | null | undefined;
|
|
865
865
|
} | null | undefined;
|
|
866
866
|
promoCodes?: string[] | null | undefined;
|
|
@@ -961,7 +961,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
961
961
|
kind: "hex";
|
|
962
962
|
} | null | undefined;
|
|
963
963
|
} | null | undefined;
|
|
964
|
-
|
|
964
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
965
965
|
}[];
|
|
966
966
|
mobileChoiceCards?: {
|
|
967
967
|
product: {
|
|
@@ -994,7 +994,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
994
994
|
kind: "hex";
|
|
995
995
|
} | null | undefined;
|
|
996
996
|
} | null | undefined;
|
|
997
|
-
|
|
997
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
998
998
|
}[] | null | undefined;
|
|
999
999
|
} | null | undefined;
|
|
1000
1000
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1440,7 +1440,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1440
1440
|
kind: "hex";
|
|
1441
1441
|
} | null | undefined;
|
|
1442
1442
|
}>>>;
|
|
1443
|
-
|
|
1443
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
1444
1444
|
}, "strip", z.ZodTypeAny, {
|
|
1445
1445
|
product: {
|
|
1446
1446
|
supportTier: "Contribution";
|
|
@@ -1472,7 +1472,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1472
1472
|
kind: "hex";
|
|
1473
1473
|
} | null | undefined;
|
|
1474
1474
|
} | null | undefined;
|
|
1475
|
-
|
|
1475
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1476
1476
|
}, {
|
|
1477
1477
|
product: {
|
|
1478
1478
|
supportTier: "Contribution";
|
|
@@ -1504,7 +1504,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1504
1504
|
kind: "hex";
|
|
1505
1505
|
} | null | undefined;
|
|
1506
1506
|
} | null | undefined;
|
|
1507
|
-
|
|
1507
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1508
1508
|
}>, "many">;
|
|
1509
1509
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1510
1510
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1605,7 +1605,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1605
1605
|
kind: "hex";
|
|
1606
1606
|
} | null | undefined;
|
|
1607
1607
|
}>>>;
|
|
1608
|
-
|
|
1608
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
1609
1609
|
}, "strip", z.ZodTypeAny, {
|
|
1610
1610
|
product: {
|
|
1611
1611
|
supportTier: "Contribution";
|
|
@@ -1637,7 +1637,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1637
1637
|
kind: "hex";
|
|
1638
1638
|
} | null | undefined;
|
|
1639
1639
|
} | null | undefined;
|
|
1640
|
-
|
|
1640
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1641
1641
|
}, {
|
|
1642
1642
|
product: {
|
|
1643
1643
|
supportTier: "Contribution";
|
|
@@ -1669,7 +1669,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1669
1669
|
kind: "hex";
|
|
1670
1670
|
} | null | undefined;
|
|
1671
1671
|
} | null | undefined;
|
|
1672
|
-
|
|
1672
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1673
1673
|
}>, "many">>>;
|
|
1674
1674
|
}, "strip", z.ZodTypeAny, {
|
|
1675
1675
|
choiceCards: {
|
|
@@ -1703,7 +1703,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1703
1703
|
kind: "hex";
|
|
1704
1704
|
} | null | undefined;
|
|
1705
1705
|
} | null | undefined;
|
|
1706
|
-
|
|
1706
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1707
1707
|
}[];
|
|
1708
1708
|
mobileChoiceCards?: {
|
|
1709
1709
|
product: {
|
|
@@ -1736,7 +1736,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1736
1736
|
kind: "hex";
|
|
1737
1737
|
} | null | undefined;
|
|
1738
1738
|
} | null | undefined;
|
|
1739
|
-
|
|
1739
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1740
1740
|
}[] | null | undefined;
|
|
1741
1741
|
}, {
|
|
1742
1742
|
choiceCards: {
|
|
@@ -1770,7 +1770,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1770
1770
|
kind: "hex";
|
|
1771
1771
|
} | null | undefined;
|
|
1772
1772
|
} | null | undefined;
|
|
1773
|
-
|
|
1773
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1774
1774
|
}[];
|
|
1775
1775
|
mobileChoiceCards?: {
|
|
1776
1776
|
product: {
|
|
@@ -1803,7 +1803,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1803
1803
|
kind: "hex";
|
|
1804
1804
|
} | null | undefined;
|
|
1805
1805
|
} | null | undefined;
|
|
1806
|
-
|
|
1806
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1807
1807
|
}[] | null | undefined;
|
|
1808
1808
|
}>>>;
|
|
1809
1809
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -1904,7 +1904,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1904
1904
|
kind: "hex";
|
|
1905
1905
|
} | null | undefined;
|
|
1906
1906
|
} | null | undefined;
|
|
1907
|
-
|
|
1907
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1908
1908
|
}[];
|
|
1909
1909
|
mobileChoiceCards?: {
|
|
1910
1910
|
product: {
|
|
@@ -1937,7 +1937,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1937
1937
|
kind: "hex";
|
|
1938
1938
|
} | null | undefined;
|
|
1939
1939
|
} | null | undefined;
|
|
1940
|
-
|
|
1940
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1941
1941
|
}[] | null | undefined;
|
|
1942
1942
|
} | null | undefined;
|
|
1943
1943
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2038,7 +2038,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2038
2038
|
kind: "hex";
|
|
2039
2039
|
} | null | undefined;
|
|
2040
2040
|
} | null | undefined;
|
|
2041
|
-
|
|
2041
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2042
2042
|
}[];
|
|
2043
2043
|
mobileChoiceCards?: {
|
|
2044
2044
|
product: {
|
|
@@ -2071,7 +2071,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2071
2071
|
kind: "hex";
|
|
2072
2072
|
} | null | undefined;
|
|
2073
2073
|
} | null | undefined;
|
|
2074
|
-
|
|
2074
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2075
2075
|
}[] | null | undefined;
|
|
2076
2076
|
} | null | undefined;
|
|
2077
2077
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2202,7 +2202,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2202
2202
|
kind: "hex";
|
|
2203
2203
|
} | null | undefined;
|
|
2204
2204
|
} | null | undefined;
|
|
2205
|
-
|
|
2205
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2206
2206
|
}[];
|
|
2207
2207
|
mobileChoiceCards?: {
|
|
2208
2208
|
product: {
|
|
@@ -2235,7 +2235,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2235
2235
|
kind: "hex";
|
|
2236
2236
|
} | null | undefined;
|
|
2237
2237
|
} | null | undefined;
|
|
2238
|
-
|
|
2238
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2239
2239
|
}[] | null | undefined;
|
|
2240
2240
|
} | null | undefined;
|
|
2241
2241
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2382,7 +2382,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2382
2382
|
kind: "hex";
|
|
2383
2383
|
} | null | undefined;
|
|
2384
2384
|
} | null | undefined;
|
|
2385
|
-
|
|
2385
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2386
2386
|
}[];
|
|
2387
2387
|
mobileChoiceCards?: {
|
|
2388
2388
|
product: {
|
|
@@ -2415,7 +2415,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2415
2415
|
kind: "hex";
|
|
2416
2416
|
} | null | undefined;
|
|
2417
2417
|
} | null | undefined;
|
|
2418
|
-
|
|
2418
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2419
2419
|
}[] | null | undefined;
|
|
2420
2420
|
} | null | undefined;
|
|
2421
2421
|
promoCodes?: string[] | null | undefined;
|
|
@@ -488,7 +488,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
488
488
|
kind: "hex";
|
|
489
489
|
} | null | undefined;
|
|
490
490
|
}>>>;
|
|
491
|
-
|
|
491
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
492
492
|
}, "strip", z.ZodTypeAny, {
|
|
493
493
|
product: {
|
|
494
494
|
supportTier: "Contribution";
|
|
@@ -520,7 +520,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
520
520
|
kind: "hex";
|
|
521
521
|
} | null | undefined;
|
|
522
522
|
} | null | undefined;
|
|
523
|
-
|
|
523
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
524
524
|
}, {
|
|
525
525
|
product: {
|
|
526
526
|
supportTier: "Contribution";
|
|
@@ -552,7 +552,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
552
552
|
kind: "hex";
|
|
553
553
|
} | null | undefined;
|
|
554
554
|
} | null | undefined;
|
|
555
|
-
|
|
555
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
556
556
|
}>, "many">;
|
|
557
557
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
558
558
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -653,7 +653,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
653
653
|
kind: "hex";
|
|
654
654
|
} | null | undefined;
|
|
655
655
|
}>>>;
|
|
656
|
-
|
|
656
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
657
657
|
}, "strip", z.ZodTypeAny, {
|
|
658
658
|
product: {
|
|
659
659
|
supportTier: "Contribution";
|
|
@@ -685,7 +685,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
685
685
|
kind: "hex";
|
|
686
686
|
} | null | undefined;
|
|
687
687
|
} | null | undefined;
|
|
688
|
-
|
|
688
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
689
689
|
}, {
|
|
690
690
|
product: {
|
|
691
691
|
supportTier: "Contribution";
|
|
@@ -717,7 +717,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
717
717
|
kind: "hex";
|
|
718
718
|
} | null | undefined;
|
|
719
719
|
} | null | undefined;
|
|
720
|
-
|
|
720
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
721
721
|
}>, "many">>>;
|
|
722
722
|
}, "strip", z.ZodTypeAny, {
|
|
723
723
|
choiceCards: {
|
|
@@ -751,7 +751,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
751
751
|
kind: "hex";
|
|
752
752
|
} | null | undefined;
|
|
753
753
|
} | null | undefined;
|
|
754
|
-
|
|
754
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
755
755
|
}[];
|
|
756
756
|
mobileChoiceCards?: {
|
|
757
757
|
product: {
|
|
@@ -784,7 +784,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
784
784
|
kind: "hex";
|
|
785
785
|
} | null | undefined;
|
|
786
786
|
} | null | undefined;
|
|
787
|
-
|
|
787
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
788
788
|
}[] | null | undefined;
|
|
789
789
|
}, {
|
|
790
790
|
choiceCards: {
|
|
@@ -818,7 +818,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
818
818
|
kind: "hex";
|
|
819
819
|
} | null | undefined;
|
|
820
820
|
} | null | undefined;
|
|
821
|
-
|
|
821
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
822
822
|
}[];
|
|
823
823
|
mobileChoiceCards?: {
|
|
824
824
|
product: {
|
|
@@ -851,7 +851,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
851
851
|
kind: "hex";
|
|
852
852
|
} | null | undefined;
|
|
853
853
|
} | null | undefined;
|
|
854
|
-
|
|
854
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
855
855
|
}[] | null | undefined;
|
|
856
856
|
}>>>;
|
|
857
857
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -1084,7 +1084,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1084
1084
|
kind: "hex";
|
|
1085
1085
|
} | null | undefined;
|
|
1086
1086
|
} | null | undefined;
|
|
1087
|
-
|
|
1087
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1088
1088
|
}[];
|
|
1089
1089
|
mobileChoiceCards?: {
|
|
1090
1090
|
product: {
|
|
@@ -1117,7 +1117,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1117
1117
|
kind: "hex";
|
|
1118
1118
|
} | null | undefined;
|
|
1119
1119
|
} | null | undefined;
|
|
1120
|
-
|
|
1120
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1121
1121
|
}[] | null | undefined;
|
|
1122
1122
|
} | null | undefined;
|
|
1123
1123
|
choiceCardAmounts?: {
|
|
@@ -1250,7 +1250,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1250
1250
|
kind: "hex";
|
|
1251
1251
|
} | null | undefined;
|
|
1252
1252
|
} | null | undefined;
|
|
1253
|
-
|
|
1253
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1254
1254
|
}[];
|
|
1255
1255
|
mobileChoiceCards?: {
|
|
1256
1256
|
product: {
|
|
@@ -1283,7 +1283,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1283
1283
|
kind: "hex";
|
|
1284
1284
|
} | null | undefined;
|
|
1285
1285
|
} | null | undefined;
|
|
1286
|
-
|
|
1286
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1287
1287
|
}[] | null | undefined;
|
|
1288
1288
|
} | null | undefined;
|
|
1289
1289
|
choiceCardAmounts?: {
|
|
@@ -1431,7 +1431,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1431
1431
|
kind: "hex";
|
|
1432
1432
|
} | null | undefined;
|
|
1433
1433
|
} | null | undefined;
|
|
1434
|
-
|
|
1434
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1435
1435
|
}[];
|
|
1436
1436
|
mobileChoiceCards?: {
|
|
1437
1437
|
product: {
|
|
@@ -1464,7 +1464,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1464
1464
|
kind: "hex";
|
|
1465
1465
|
} | null | undefined;
|
|
1466
1466
|
} | null | undefined;
|
|
1467
|
-
|
|
1467
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1468
1468
|
}[] | null | undefined;
|
|
1469
1469
|
} | null | undefined;
|
|
1470
1470
|
choiceCardAmounts?: {
|
|
@@ -1647,7 +1647,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1647
1647
|
kind: "hex";
|
|
1648
1648
|
} | null | undefined;
|
|
1649
1649
|
} | null | undefined;
|
|
1650
|
-
|
|
1650
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1651
1651
|
}[];
|
|
1652
1652
|
mobileChoiceCards?: {
|
|
1653
1653
|
product: {
|
|
@@ -1680,7 +1680,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1680
1680
|
kind: "hex";
|
|
1681
1681
|
} | null | undefined;
|
|
1682
1682
|
} | null | undefined;
|
|
1683
|
-
|
|
1683
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1684
1684
|
}[] | null | undefined;
|
|
1685
1685
|
} | null | undefined;
|
|
1686
1686
|
choiceCardAmounts?: {
|
|
@@ -903,7 +903,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
903
903
|
kind: "hex";
|
|
904
904
|
} | null | undefined;
|
|
905
905
|
}>>>;
|
|
906
|
-
|
|
906
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
907
907
|
}, "strip", z.ZodTypeAny, {
|
|
908
908
|
product: {
|
|
909
909
|
supportTier: "Contribution";
|
|
@@ -935,7 +935,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
935
935
|
kind: "hex";
|
|
936
936
|
} | null | undefined;
|
|
937
937
|
} | null | undefined;
|
|
938
|
-
|
|
938
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
939
939
|
}, {
|
|
940
940
|
product: {
|
|
941
941
|
supportTier: "Contribution";
|
|
@@ -967,7 +967,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
967
967
|
kind: "hex";
|
|
968
968
|
} | null | undefined;
|
|
969
969
|
} | null | undefined;
|
|
970
|
-
|
|
970
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
971
971
|
}>, "many">;
|
|
972
972
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
973
973
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1068,7 +1068,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1068
1068
|
kind: "hex";
|
|
1069
1069
|
} | null | undefined;
|
|
1070
1070
|
}>>>;
|
|
1071
|
-
|
|
1071
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
1072
1072
|
}, "strip", z.ZodTypeAny, {
|
|
1073
1073
|
product: {
|
|
1074
1074
|
supportTier: "Contribution";
|
|
@@ -1100,7 +1100,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1100
1100
|
kind: "hex";
|
|
1101
1101
|
} | null | undefined;
|
|
1102
1102
|
} | null | undefined;
|
|
1103
|
-
|
|
1103
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1104
1104
|
}, {
|
|
1105
1105
|
product: {
|
|
1106
1106
|
supportTier: "Contribution";
|
|
@@ -1132,7 +1132,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1132
1132
|
kind: "hex";
|
|
1133
1133
|
} | null | undefined;
|
|
1134
1134
|
} | null | undefined;
|
|
1135
|
-
|
|
1135
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1136
1136
|
}>, "many">>>;
|
|
1137
1137
|
}, "strip", z.ZodTypeAny, {
|
|
1138
1138
|
choiceCards: {
|
|
@@ -1166,7 +1166,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1166
1166
|
kind: "hex";
|
|
1167
1167
|
} | null | undefined;
|
|
1168
1168
|
} | null | undefined;
|
|
1169
|
-
|
|
1169
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1170
1170
|
}[];
|
|
1171
1171
|
mobileChoiceCards?: {
|
|
1172
1172
|
product: {
|
|
@@ -1199,7 +1199,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1199
1199
|
kind: "hex";
|
|
1200
1200
|
} | null | undefined;
|
|
1201
1201
|
} | null | undefined;
|
|
1202
|
-
|
|
1202
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1203
1203
|
}[] | null | undefined;
|
|
1204
1204
|
}, {
|
|
1205
1205
|
choiceCards: {
|
|
@@ -1233,7 +1233,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1233
1233
|
kind: "hex";
|
|
1234
1234
|
} | null | undefined;
|
|
1235
1235
|
} | null | undefined;
|
|
1236
|
-
|
|
1236
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1237
1237
|
}[];
|
|
1238
1238
|
mobileChoiceCards?: {
|
|
1239
1239
|
product: {
|
|
@@ -1266,7 +1266,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1266
1266
|
kind: "hex";
|
|
1267
1267
|
} | null | undefined;
|
|
1268
1268
|
} | null | undefined;
|
|
1269
|
-
|
|
1269
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1270
1270
|
}[] | null | undefined;
|
|
1271
1271
|
}>>>;
|
|
1272
1272
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -1440,7 +1440,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1440
1440
|
kind: "hex";
|
|
1441
1441
|
} | null | undefined;
|
|
1442
1442
|
} | null | undefined;
|
|
1443
|
-
|
|
1443
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1444
1444
|
}[];
|
|
1445
1445
|
mobileChoiceCards?: {
|
|
1446
1446
|
product: {
|
|
@@ -1473,7 +1473,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1473
1473
|
kind: "hex";
|
|
1474
1474
|
} | null | undefined;
|
|
1475
1475
|
} | null | undefined;
|
|
1476
|
-
|
|
1476
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1477
1477
|
}[] | null | undefined;
|
|
1478
1478
|
} | null | undefined;
|
|
1479
1479
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1647,7 +1647,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1647
1647
|
kind: "hex";
|
|
1648
1648
|
} | null | undefined;
|
|
1649
1649
|
} | null | undefined;
|
|
1650
|
-
|
|
1650
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1651
1651
|
}[];
|
|
1652
1652
|
mobileChoiceCards?: {
|
|
1653
1653
|
product: {
|
|
@@ -1680,7 +1680,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1680
1680
|
kind: "hex";
|
|
1681
1681
|
} | null | undefined;
|
|
1682
1682
|
} | null | undefined;
|
|
1683
|
-
|
|
1683
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1684
1684
|
}[] | null | undefined;
|
|
1685
1685
|
} | null | undefined;
|
|
1686
1686
|
promoCodes?: string[] | null | undefined;
|
|
@@ -100,7 +100,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
100
100
|
kind: "hex";
|
|
101
101
|
} | null | undefined;
|
|
102
102
|
}>>>;
|
|
103
|
-
|
|
103
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
104
104
|
}, "strip", z.ZodTypeAny, {
|
|
105
105
|
product: {
|
|
106
106
|
supportTier: "Contribution";
|
|
@@ -132,7 +132,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
132
132
|
kind: "hex";
|
|
133
133
|
} | null | undefined;
|
|
134
134
|
} | null | undefined;
|
|
135
|
-
|
|
135
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
136
136
|
}, {
|
|
137
137
|
product: {
|
|
138
138
|
supportTier: "Contribution";
|
|
@@ -164,7 +164,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
164
164
|
kind: "hex";
|
|
165
165
|
} | null | undefined;
|
|
166
166
|
} | null | undefined;
|
|
167
|
-
|
|
167
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
168
168
|
}>;
|
|
169
169
|
export type ChoiceCard = z.infer<typeof choiceCardSchema>;
|
|
170
170
|
export declare const choiceCardsSettings: z.ZodObject<{
|
|
@@ -267,7 +267,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
267
267
|
kind: "hex";
|
|
268
268
|
} | null | undefined;
|
|
269
269
|
}>>>;
|
|
270
|
-
|
|
270
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
271
271
|
}, "strip", z.ZodTypeAny, {
|
|
272
272
|
product: {
|
|
273
273
|
supportTier: "Contribution";
|
|
@@ -299,7 +299,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
299
299
|
kind: "hex";
|
|
300
300
|
} | null | undefined;
|
|
301
301
|
} | null | undefined;
|
|
302
|
-
|
|
302
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
303
303
|
}, {
|
|
304
304
|
product: {
|
|
305
305
|
supportTier: "Contribution";
|
|
@@ -331,7 +331,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
331
331
|
kind: "hex";
|
|
332
332
|
} | null | undefined;
|
|
333
333
|
} | null | undefined;
|
|
334
|
-
|
|
334
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
335
335
|
}>, "many">;
|
|
336
336
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
337
337
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -432,7 +432,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
432
432
|
kind: "hex";
|
|
433
433
|
} | null | undefined;
|
|
434
434
|
}>>>;
|
|
435
|
-
|
|
435
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
436
436
|
}, "strip", z.ZodTypeAny, {
|
|
437
437
|
product: {
|
|
438
438
|
supportTier: "Contribution";
|
|
@@ -464,7 +464,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
464
464
|
kind: "hex";
|
|
465
465
|
} | null | undefined;
|
|
466
466
|
} | null | undefined;
|
|
467
|
-
|
|
467
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
468
468
|
}, {
|
|
469
469
|
product: {
|
|
470
470
|
supportTier: "Contribution";
|
|
@@ -496,7 +496,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
496
496
|
kind: "hex";
|
|
497
497
|
} | null | undefined;
|
|
498
498
|
} | null | undefined;
|
|
499
|
-
|
|
499
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
500
500
|
}>, "many">>>;
|
|
501
501
|
}, "strip", z.ZodTypeAny, {
|
|
502
502
|
choiceCards: {
|
|
@@ -530,7 +530,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
530
530
|
kind: "hex";
|
|
531
531
|
} | null | undefined;
|
|
532
532
|
} | null | undefined;
|
|
533
|
-
|
|
533
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
534
534
|
}[];
|
|
535
535
|
mobileChoiceCards?: {
|
|
536
536
|
product: {
|
|
@@ -563,7 +563,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
563
563
|
kind: "hex";
|
|
564
564
|
} | null | undefined;
|
|
565
565
|
} | null | undefined;
|
|
566
|
-
|
|
566
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
567
567
|
}[] | null | undefined;
|
|
568
568
|
}, {
|
|
569
569
|
choiceCards: {
|
|
@@ -597,7 +597,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
597
597
|
kind: "hex";
|
|
598
598
|
} | null | undefined;
|
|
599
599
|
} | null | undefined;
|
|
600
|
-
|
|
600
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
601
601
|
}[];
|
|
602
602
|
mobileChoiceCards?: {
|
|
603
603
|
product: {
|
|
@@ -630,7 +630,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
630
630
|
kind: "hex";
|
|
631
631
|
} | null | undefined;
|
|
632
632
|
} | null | undefined;
|
|
633
|
-
|
|
633
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
634
634
|
}[] | null | undefined;
|
|
635
635
|
}>;
|
|
636
636
|
export type ChoiceCardsSettings = z.infer<typeof choiceCardsSettings>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choiceCards.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/choiceCards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,cAAc,+DAAuD,CAAC;AAC5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"choiceCards.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/choiceCards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,cAAc,+DAAuD,CAAC;AAC5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAyBtD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQpB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -337,7 +337,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
337
337
|
kind: "hex";
|
|
338
338
|
} | null | undefined;
|
|
339
339
|
}>>>;
|
|
340
|
-
|
|
340
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
341
341
|
}, "strip", z.ZodTypeAny, {
|
|
342
342
|
product: {
|
|
343
343
|
supportTier: "Contribution";
|
|
@@ -369,7 +369,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
369
369
|
kind: "hex";
|
|
370
370
|
} | null | undefined;
|
|
371
371
|
} | null | undefined;
|
|
372
|
-
|
|
372
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
373
373
|
}, {
|
|
374
374
|
product: {
|
|
375
375
|
supportTier: "Contribution";
|
|
@@ -401,7 +401,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
401
401
|
kind: "hex";
|
|
402
402
|
} | null | undefined;
|
|
403
403
|
} | null | undefined;
|
|
404
|
-
|
|
404
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
405
405
|
}>, "many">;
|
|
406
406
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
407
407
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -502,7 +502,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
502
502
|
kind: "hex";
|
|
503
503
|
} | null | undefined;
|
|
504
504
|
}>>>;
|
|
505
|
-
|
|
505
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
507
|
product: {
|
|
508
508
|
supportTier: "Contribution";
|
|
@@ -534,7 +534,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
534
534
|
kind: "hex";
|
|
535
535
|
} | null | undefined;
|
|
536
536
|
} | null | undefined;
|
|
537
|
-
|
|
537
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
538
538
|
}, {
|
|
539
539
|
product: {
|
|
540
540
|
supportTier: "Contribution";
|
|
@@ -566,7 +566,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
566
566
|
kind: "hex";
|
|
567
567
|
} | null | undefined;
|
|
568
568
|
} | null | undefined;
|
|
569
|
-
|
|
569
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
570
570
|
}>, "many">>>;
|
|
571
571
|
}, "strip", z.ZodTypeAny, {
|
|
572
572
|
choiceCards: {
|
|
@@ -600,7 +600,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
600
600
|
kind: "hex";
|
|
601
601
|
} | null | undefined;
|
|
602
602
|
} | null | undefined;
|
|
603
|
-
|
|
603
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
604
604
|
}[];
|
|
605
605
|
mobileChoiceCards?: {
|
|
606
606
|
product: {
|
|
@@ -633,7 +633,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
633
633
|
kind: "hex";
|
|
634
634
|
} | null | undefined;
|
|
635
635
|
} | null | undefined;
|
|
636
|
-
|
|
636
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
637
637
|
}[] | null | undefined;
|
|
638
638
|
}, {
|
|
639
639
|
choiceCards: {
|
|
@@ -667,7 +667,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
667
667
|
kind: "hex";
|
|
668
668
|
} | null | undefined;
|
|
669
669
|
} | null | undefined;
|
|
670
|
-
|
|
670
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
671
671
|
}[];
|
|
672
672
|
mobileChoiceCards?: {
|
|
673
673
|
product: {
|
|
@@ -700,7 +700,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
700
700
|
kind: "hex";
|
|
701
701
|
} | null | undefined;
|
|
702
702
|
} | null | undefined;
|
|
703
|
-
|
|
703
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
704
704
|
}[] | null | undefined;
|
|
705
705
|
}>>>;
|
|
706
706
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -933,7 +933,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
933
933
|
kind: "hex";
|
|
934
934
|
} | null | undefined;
|
|
935
935
|
} | null | undefined;
|
|
936
|
-
|
|
936
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
937
937
|
}[];
|
|
938
938
|
mobileChoiceCards?: {
|
|
939
939
|
product: {
|
|
@@ -966,7 +966,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
966
966
|
kind: "hex";
|
|
967
967
|
} | null | undefined;
|
|
968
968
|
} | null | undefined;
|
|
969
|
-
|
|
969
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
970
970
|
}[] | null | undefined;
|
|
971
971
|
} | null | undefined;
|
|
972
972
|
choiceCardAmounts?: {
|
|
@@ -1099,7 +1099,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
1099
1099
|
kind: "hex";
|
|
1100
1100
|
} | null | undefined;
|
|
1101
1101
|
} | null | undefined;
|
|
1102
|
-
|
|
1102
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1103
1103
|
}[];
|
|
1104
1104
|
mobileChoiceCards?: {
|
|
1105
1105
|
product: {
|
|
@@ -1132,7 +1132,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
1132
1132
|
kind: "hex";
|
|
1133
1133
|
} | null | undefined;
|
|
1134
1134
|
} | null | undefined;
|
|
1135
|
-
|
|
1135
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1136
1136
|
}[] | null | undefined;
|
|
1137
1137
|
} | null | undefined;
|
|
1138
1138
|
choiceCardAmounts?: {
|
|
@@ -1483,7 +1483,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1483
1483
|
kind: "hex";
|
|
1484
1484
|
} | null | undefined;
|
|
1485
1485
|
}>>>;
|
|
1486
|
-
|
|
1486
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
1487
1487
|
}, "strip", z.ZodTypeAny, {
|
|
1488
1488
|
product: {
|
|
1489
1489
|
supportTier: "Contribution";
|
|
@@ -1515,7 +1515,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1515
1515
|
kind: "hex";
|
|
1516
1516
|
} | null | undefined;
|
|
1517
1517
|
} | null | undefined;
|
|
1518
|
-
|
|
1518
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1519
1519
|
}, {
|
|
1520
1520
|
product: {
|
|
1521
1521
|
supportTier: "Contribution";
|
|
@@ -1547,7 +1547,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1547
1547
|
kind: "hex";
|
|
1548
1548
|
} | null | undefined;
|
|
1549
1549
|
} | null | undefined;
|
|
1550
|
-
|
|
1550
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1551
1551
|
}>, "many">;
|
|
1552
1552
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1553
1553
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1648,7 +1648,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1648
1648
|
kind: "hex";
|
|
1649
1649
|
} | null | undefined;
|
|
1650
1650
|
}>>>;
|
|
1651
|
-
|
|
1651
|
+
destination: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"LandingPage">, z.ZodLiteral<"Checkout">]>>>;
|
|
1652
1652
|
}, "strip", z.ZodTypeAny, {
|
|
1653
1653
|
product: {
|
|
1654
1654
|
supportTier: "Contribution";
|
|
@@ -1680,7 +1680,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1680
1680
|
kind: "hex";
|
|
1681
1681
|
} | null | undefined;
|
|
1682
1682
|
} | null | undefined;
|
|
1683
|
-
|
|
1683
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1684
1684
|
}, {
|
|
1685
1685
|
product: {
|
|
1686
1686
|
supportTier: "Contribution";
|
|
@@ -1712,7 +1712,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1712
1712
|
kind: "hex";
|
|
1713
1713
|
} | null | undefined;
|
|
1714
1714
|
} | null | undefined;
|
|
1715
|
-
|
|
1715
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1716
1716
|
}>, "many">>>;
|
|
1717
1717
|
}, "strip", z.ZodTypeAny, {
|
|
1718
1718
|
choiceCards: {
|
|
@@ -1746,7 +1746,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1746
1746
|
kind: "hex";
|
|
1747
1747
|
} | null | undefined;
|
|
1748
1748
|
} | null | undefined;
|
|
1749
|
-
|
|
1749
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1750
1750
|
}[];
|
|
1751
1751
|
mobileChoiceCards?: {
|
|
1752
1752
|
product: {
|
|
@@ -1779,7 +1779,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1779
1779
|
kind: "hex";
|
|
1780
1780
|
} | null | undefined;
|
|
1781
1781
|
} | null | undefined;
|
|
1782
|
-
|
|
1782
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1783
1783
|
}[] | null | undefined;
|
|
1784
1784
|
}, {
|
|
1785
1785
|
choiceCards: {
|
|
@@ -1813,7 +1813,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1813
1813
|
kind: "hex";
|
|
1814
1814
|
} | null | undefined;
|
|
1815
1815
|
} | null | undefined;
|
|
1816
|
-
|
|
1816
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1817
1817
|
}[];
|
|
1818
1818
|
mobileChoiceCards?: {
|
|
1819
1819
|
product: {
|
|
@@ -1846,7 +1846,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1846
1846
|
kind: "hex";
|
|
1847
1847
|
} | null | undefined;
|
|
1848
1848
|
} | null | undefined;
|
|
1849
|
-
|
|
1849
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
1850
1850
|
}[] | null | undefined;
|
|
1851
1851
|
}>>>;
|
|
1852
1852
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -2079,7 +2079,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2079
2079
|
kind: "hex";
|
|
2080
2080
|
} | null | undefined;
|
|
2081
2081
|
} | null | undefined;
|
|
2082
|
-
|
|
2082
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2083
2083
|
}[];
|
|
2084
2084
|
mobileChoiceCards?: {
|
|
2085
2085
|
product: {
|
|
@@ -2112,7 +2112,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2112
2112
|
kind: "hex";
|
|
2113
2113
|
} | null | undefined;
|
|
2114
2114
|
} | null | undefined;
|
|
2115
|
-
|
|
2115
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2116
2116
|
}[] | null | undefined;
|
|
2117
2117
|
} | null | undefined;
|
|
2118
2118
|
choiceCardAmounts?: {
|
|
@@ -2245,7 +2245,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2245
2245
|
kind: "hex";
|
|
2246
2246
|
} | null | undefined;
|
|
2247
2247
|
} | null | undefined;
|
|
2248
|
-
|
|
2248
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2249
2249
|
}[];
|
|
2250
2250
|
mobileChoiceCards?: {
|
|
2251
2251
|
product: {
|
|
@@ -2278,7 +2278,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2278
2278
|
kind: "hex";
|
|
2279
2279
|
} | null | undefined;
|
|
2280
2280
|
} | null | undefined;
|
|
2281
|
-
|
|
2281
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2282
2282
|
}[] | null | undefined;
|
|
2283
2283
|
} | null | undefined;
|
|
2284
2284
|
choiceCardAmounts?: {
|
|
@@ -2461,7 +2461,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2461
2461
|
kind: "hex";
|
|
2462
2462
|
} | null | undefined;
|
|
2463
2463
|
} | null | undefined;
|
|
2464
|
-
|
|
2464
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2465
2465
|
}[];
|
|
2466
2466
|
mobileChoiceCards?: {
|
|
2467
2467
|
product: {
|
|
@@ -2494,7 +2494,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2494
2494
|
kind: "hex";
|
|
2495
2495
|
} | null | undefined;
|
|
2496
2496
|
} | null | undefined;
|
|
2497
|
-
|
|
2497
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2498
2498
|
}[] | null | undefined;
|
|
2499
2499
|
} | null | undefined;
|
|
2500
2500
|
choiceCardAmounts?: {
|
|
@@ -2651,7 +2651,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2651
2651
|
kind: "hex";
|
|
2652
2652
|
} | null | undefined;
|
|
2653
2653
|
} | null | undefined;
|
|
2654
|
-
|
|
2654
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2655
2655
|
}[];
|
|
2656
2656
|
mobileChoiceCards?: {
|
|
2657
2657
|
product: {
|
|
@@ -2684,7 +2684,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2684
2684
|
kind: "hex";
|
|
2685
2685
|
} | null | undefined;
|
|
2686
2686
|
} | null | undefined;
|
|
2687
|
-
|
|
2687
|
+
destination?: "LandingPage" | "Checkout" | null | undefined;
|
|
2688
2688
|
}[] | null | undefined;
|
|
2689
2689
|
} | null | undefined;
|
|
2690
2690
|
choiceCardAmounts?: {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { purchaseInfoProduct, purchaseInfoUser } from '../purchaseInfo';
|
|
3
|
-
import type { BannerTargeting } from './banner';
|
|
4
|
-
import type { EpicTargeting } from './epic';
|
|
5
|
-
import type { GutterTargeting } from './gutter';
|
|
6
3
|
export type TagCounts = Record<string, number>;
|
|
7
4
|
export type WeeklyArticleLog = {
|
|
8
5
|
week: number;
|
|
@@ -23,8 +20,6 @@ export interface PurchaseInfo {
|
|
|
23
20
|
userType: purchaseInfoUser;
|
|
24
21
|
product: purchaseInfoProduct;
|
|
25
22
|
}
|
|
26
|
-
export declare const pageIdsOfInterest: Set<string>;
|
|
27
|
-
export declare const hideSRMessagingForInfoPageIds: (targeting: BannerTargeting | EpicTargeting | GutterTargeting) => boolean;
|
|
28
23
|
export declare const abandonedBasketSchema: z.ZodObject<{
|
|
29
24
|
amount: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"other">]>;
|
|
30
25
|
billingPeriod: z.ZodUnion<[z.ZodLiteral<"ONE_OFF">, z.ZodLiteral<"MONTHLY">, z.ZodLiteral<"ANNUAL">]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/targeting/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/targeting/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAuBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/support-dotcom-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "Service to serve Reader Revenue components to dotcom",
|
|
5
5
|
"repository": "github:guardian/support-dotcom-components",
|
|
6
6
|
"author": "The Guardian",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"prettier": "^3.0.0",
|
|
46
46
|
"rollup": "^2.79.2",
|
|
47
47
|
"rollup-plugin-external-globals": "^0.13.0",
|
|
48
|
-
"rollup-plugin-filesize": "^
|
|
48
|
+
"rollup-plugin-filesize": "^10.0.0",
|
|
49
49
|
"rollup-plugin-peer-deps-external": "^2.2.3",
|
|
50
50
|
"rollup-plugin-terser": "^7.0.2",
|
|
51
51
|
"ts-jest": "^29.1.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@guardian/libs": "22.0.1",
|
|
64
|
-
"@guardian/ophan-tracker-js": "2.
|
|
64
|
+
"@guardian/ophan-tracker-js": "2.6.1",
|
|
65
65
|
"@aws-sdk/client-s3": "^3.835.0",
|
|
66
66
|
"@aws-sdk/client-dynamodb": "^3.835.0",
|
|
67
67
|
"@aws-sdk/lib-dynamodb": "^3.835.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@guardian/libs": "^22.0.0",
|
|
84
|
-
"@guardian/ophan-tracker-js": "
|
|
84
|
+
"@guardian/ophan-tracker-js": "2.6.1",
|
|
85
85
|
"zod": "^3.22.4"
|
|
86
86
|
},
|
|
87
87
|
"packageManager": "pnpm@8.15.7",
|