@guardian/support-dotcom-components 7.5.0 → 7.6.2
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/dotcom/requests.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/lib/viewLog.d.ts.map +1 -1
- package/dist/shared/types/abTests/banner.d.ts +32 -0
- package/dist/shared/types/abTests/banner.d.ts.map +1 -1
- package/dist/shared/types/abTests/epic.d.ts +18 -0
- package/dist/shared/types/abTests/epic.d.ts.map +1 -1
- package/dist/shared/types/props/banner.d.ts +14 -0
- package/dist/shared/types/props/banner.d.ts.map +1 -1
- package/dist/shared/types/props/choiceCards.d.ts +13 -0
- package/dist/shared/types/props/choiceCards.d.ts.map +1 -1
- package/dist/shared/types/props/epic.d.ts +32 -0
- package/dist/shared/types/props/epic.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/dotcom/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,UAAU,CAAC,KAAK;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB,CAAC,KAAK;IACrC,IAAI,CAAC,EAAE;QACH,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,EAAE,YAAY,CAAC;KACtB,CAAC;CACL;
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/dotcom/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,UAAU,CAAC,KAAK;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB,CAAC,KAAK;IACrC,IAAI,CAAC,EAAE;QACH,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,EAAE,YAAY,CAAC;KACtB,CAAC;CACL;AAqCD,eAAO,MAAM,OAAO,YACP,MAAM,WACN,WAAW,KACrB,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAA4C,CAAC;AAErF,eAAO,MAAM,eAAe,YACf,MAAM,WACN,WAAW,KACrB,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAqD,CAAC;AAE9F,eAAO,MAAM,SAAS,YACT,MAAM,WACN,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAA8C,CAAC;AAEzF,eAAO,MAAM,iBAAiB,YACjB,MAAM,WACN,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAuD,CAAC;AAElG,eAAO,MAAM,SAAS,YACT,MAAM,WACN,aAAa,KACvB,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAA8C,CAAC"}
|
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())),S=e=>{if(e){const n=b(e);return p[n]}return"£"},h=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`${S(t)}${i[e][n].price}`}}},I={CURRENCY_SYMBOL:({countryCode:e})=>S(e),COUNTRY_NAME:({countryCode:e})=>h(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.object({product:se,label:e.string(),isDefault:e.boolean(),benefitsLabel:e.string().nullish(),benefits:e.array(oe),pill:le.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()}),Se=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()}),he=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:he,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"]),Pe=e.enum(["HasConsented","HasNotConsented","All"]),De=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",[De,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:Pe.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=>{if(URLSearchParams){const n=new URLSearchParams(window.location.search).get(`force-${e}`);if(n)return n}return null})(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,P as buildReminderFields,E as containsNonArticleCountPlaceholder,Fe as contributionTabFrequencies,b as countryCodeToCountryGroupId,u as countryGroupIdSchema,d as countryGroups,Se as epicPropsSchema,We as getBanner,h as getCountryName,Ye as getEpic,U as getEpicViewLog,Ze as getGutterLiveblog,$e as getHeader,Ve as getLiveblogEpic,S 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},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};
|
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:"$"},p=e=>Object.keys(u).find((t=>u[t].countries.includes(e??"")))||"International",z=e=>{if(e){const t=p(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[p(n)];if(o){return`${z(n)}${o[e][t].price}`}}},b={CURRENCY_SYMBOL:({countryCode:e})=>z(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"}))()},S=/%%.*?%%/g,h="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]),R=e.z.object({countLabel:e.z.string(),goalCopy:e.z.string().optional()}),B=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:R,name:P,tickerData:B.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"]),f=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()}),j=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:j.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()}),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:j.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:f,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:f,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:f,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()}),pe=e.z.object({image:j,bodyCopy:e.z.array(e.z.string()),cta:N.optional()});e.z.object({content:pe,tracking:f,countryCode:e.z.string().optional(),submitComponentEvent:e.z.any(),promoCodes:e.z.array(e.z.string()).nullish()});const ze=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"]),Se=e.z.enum(["SignedIn","SignedOut","All"]),he=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:Se.optional(),consentStatus:he.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(ze)}),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")])}),Re=(e,t,n)=>{const a=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(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[p(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(S)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=p,exports.countryGroupIdSchema=s,exports.countryGroups=u,exports.epicPropsSchema=ie,exports.getBanner=(e,t)=>Re("banner",e,t),exports.getCountryName=g,exports.getEpic=(e,t)=>Re("epic",e,t),exports.getEpicViewLog=e=>e.get(h)||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=z,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(p(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(h),n=t?JSON.parse(t).value:[];n.push({date:(new Date).getTime(),testId:e});const a={value:n.slice(-50)};localStorage.setItem(h,JSON.stringify(a))},exports.replaceNonArticleCountPlaceholders=(e,t,n)=>e?e.replace(S,(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.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewLog.d.ts","sourceRoot":"","sources":["../../../src/shared/lib/viewLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAU9D,UAAU,QAAQ;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,cAAc,iBAAkB,YAAY,KAAG,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"viewLog.d.ts","sourceRoot":"","sources":["../../../src/shared/lib/viewLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAU9D,UAAU,QAAQ;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,WAAW,GAAG,QAAQ,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,cAAc,iBAAkB,YAAY,KAAG,WAAW,GAAG,SAMzE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,KAAG,IAc5C,CAAC"}
|
|
@@ -363,6 +363,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
363
363
|
kind: "hex";
|
|
364
364
|
} | null | undefined;
|
|
365
365
|
}>>>;
|
|
366
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
366
367
|
}, "strip", z.ZodTypeAny, {
|
|
367
368
|
product: {
|
|
368
369
|
supportTier: "Contribution";
|
|
@@ -394,6 +395,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
394
395
|
kind: "hex";
|
|
395
396
|
} | null | undefined;
|
|
396
397
|
} | null | undefined;
|
|
398
|
+
destinationUrl?: string | null | undefined;
|
|
397
399
|
}, {
|
|
398
400
|
product: {
|
|
399
401
|
supportTier: "Contribution";
|
|
@@ -425,6 +427,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
425
427
|
kind: "hex";
|
|
426
428
|
} | null | undefined;
|
|
427
429
|
} | null | undefined;
|
|
430
|
+
destinationUrl?: string | null | undefined;
|
|
428
431
|
}>, "many">;
|
|
429
432
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
430
433
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -525,6 +528,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
525
528
|
kind: "hex";
|
|
526
529
|
} | null | undefined;
|
|
527
530
|
}>>>;
|
|
531
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
528
532
|
}, "strip", z.ZodTypeAny, {
|
|
529
533
|
product: {
|
|
530
534
|
supportTier: "Contribution";
|
|
@@ -556,6 +560,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
556
560
|
kind: "hex";
|
|
557
561
|
} | null | undefined;
|
|
558
562
|
} | null | undefined;
|
|
563
|
+
destinationUrl?: string | null | undefined;
|
|
559
564
|
}, {
|
|
560
565
|
product: {
|
|
561
566
|
supportTier: "Contribution";
|
|
@@ -587,6 +592,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
587
592
|
kind: "hex";
|
|
588
593
|
} | null | undefined;
|
|
589
594
|
} | null | undefined;
|
|
595
|
+
destinationUrl?: string | null | undefined;
|
|
590
596
|
}>, "many">>>;
|
|
591
597
|
}, "strip", z.ZodTypeAny, {
|
|
592
598
|
choiceCards: {
|
|
@@ -620,6 +626,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
620
626
|
kind: "hex";
|
|
621
627
|
} | null | undefined;
|
|
622
628
|
} | null | undefined;
|
|
629
|
+
destinationUrl?: string | null | undefined;
|
|
623
630
|
}[];
|
|
624
631
|
mobileChoiceCards?: {
|
|
625
632
|
product: {
|
|
@@ -652,6 +659,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
652
659
|
kind: "hex";
|
|
653
660
|
} | null | undefined;
|
|
654
661
|
} | null | undefined;
|
|
662
|
+
destinationUrl?: string | null | undefined;
|
|
655
663
|
}[] | null | undefined;
|
|
656
664
|
}, {
|
|
657
665
|
choiceCards: {
|
|
@@ -685,6 +693,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
685
693
|
kind: "hex";
|
|
686
694
|
} | null | undefined;
|
|
687
695
|
} | null | undefined;
|
|
696
|
+
destinationUrl?: string | null | undefined;
|
|
688
697
|
}[];
|
|
689
698
|
mobileChoiceCards?: {
|
|
690
699
|
product: {
|
|
@@ -717,6 +726,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
717
726
|
kind: "hex";
|
|
718
727
|
} | null | undefined;
|
|
719
728
|
} | null | undefined;
|
|
729
|
+
destinationUrl?: string | null | undefined;
|
|
720
730
|
}[] | null | undefined;
|
|
721
731
|
}>>>;
|
|
722
732
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -817,6 +827,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
817
827
|
kind: "hex";
|
|
818
828
|
} | null | undefined;
|
|
819
829
|
} | null | undefined;
|
|
830
|
+
destinationUrl?: string | null | undefined;
|
|
820
831
|
}[];
|
|
821
832
|
mobileChoiceCards?: {
|
|
822
833
|
product: {
|
|
@@ -849,6 +860,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
849
860
|
kind: "hex";
|
|
850
861
|
} | null | undefined;
|
|
851
862
|
} | null | undefined;
|
|
863
|
+
destinationUrl?: string | null | undefined;
|
|
852
864
|
}[] | null | undefined;
|
|
853
865
|
} | null | undefined;
|
|
854
866
|
promoCodes?: string[] | null | undefined;
|
|
@@ -949,6 +961,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
949
961
|
kind: "hex";
|
|
950
962
|
} | null | undefined;
|
|
951
963
|
} | null | undefined;
|
|
964
|
+
destinationUrl?: string | null | undefined;
|
|
952
965
|
}[];
|
|
953
966
|
mobileChoiceCards?: {
|
|
954
967
|
product: {
|
|
@@ -981,6 +994,7 @@ export declare const bannerVariantFromToolSchema: z.ZodObject<{
|
|
|
981
994
|
kind: "hex";
|
|
982
995
|
} | null | undefined;
|
|
983
996
|
} | null | undefined;
|
|
997
|
+
destinationUrl?: string | null | undefined;
|
|
984
998
|
}[] | null | undefined;
|
|
985
999
|
} | null | undefined;
|
|
986
1000
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1426,6 +1440,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1426
1440
|
kind: "hex";
|
|
1427
1441
|
} | null | undefined;
|
|
1428
1442
|
}>>>;
|
|
1443
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1429
1444
|
}, "strip", z.ZodTypeAny, {
|
|
1430
1445
|
product: {
|
|
1431
1446
|
supportTier: "Contribution";
|
|
@@ -1457,6 +1472,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1457
1472
|
kind: "hex";
|
|
1458
1473
|
} | null | undefined;
|
|
1459
1474
|
} | null | undefined;
|
|
1475
|
+
destinationUrl?: string | null | undefined;
|
|
1460
1476
|
}, {
|
|
1461
1477
|
product: {
|
|
1462
1478
|
supportTier: "Contribution";
|
|
@@ -1488,6 +1504,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1488
1504
|
kind: "hex";
|
|
1489
1505
|
} | null | undefined;
|
|
1490
1506
|
} | null | undefined;
|
|
1507
|
+
destinationUrl?: string | null | undefined;
|
|
1491
1508
|
}>, "many">;
|
|
1492
1509
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1493
1510
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1588,6 +1605,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1588
1605
|
kind: "hex";
|
|
1589
1606
|
} | null | undefined;
|
|
1590
1607
|
}>>>;
|
|
1608
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1591
1609
|
}, "strip", z.ZodTypeAny, {
|
|
1592
1610
|
product: {
|
|
1593
1611
|
supportTier: "Contribution";
|
|
@@ -1619,6 +1637,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1619
1637
|
kind: "hex";
|
|
1620
1638
|
} | null | undefined;
|
|
1621
1639
|
} | null | undefined;
|
|
1640
|
+
destinationUrl?: string | null | undefined;
|
|
1622
1641
|
}, {
|
|
1623
1642
|
product: {
|
|
1624
1643
|
supportTier: "Contribution";
|
|
@@ -1650,6 +1669,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1650
1669
|
kind: "hex";
|
|
1651
1670
|
} | null | undefined;
|
|
1652
1671
|
} | null | undefined;
|
|
1672
|
+
destinationUrl?: string | null | undefined;
|
|
1653
1673
|
}>, "many">>>;
|
|
1654
1674
|
}, "strip", z.ZodTypeAny, {
|
|
1655
1675
|
choiceCards: {
|
|
@@ -1683,6 +1703,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1683
1703
|
kind: "hex";
|
|
1684
1704
|
} | null | undefined;
|
|
1685
1705
|
} | null | undefined;
|
|
1706
|
+
destinationUrl?: string | null | undefined;
|
|
1686
1707
|
}[];
|
|
1687
1708
|
mobileChoiceCards?: {
|
|
1688
1709
|
product: {
|
|
@@ -1715,6 +1736,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1715
1736
|
kind: "hex";
|
|
1716
1737
|
} | null | undefined;
|
|
1717
1738
|
} | null | undefined;
|
|
1739
|
+
destinationUrl?: string | null | undefined;
|
|
1718
1740
|
}[] | null | undefined;
|
|
1719
1741
|
}, {
|
|
1720
1742
|
choiceCards: {
|
|
@@ -1748,6 +1770,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1748
1770
|
kind: "hex";
|
|
1749
1771
|
} | null | undefined;
|
|
1750
1772
|
} | null | undefined;
|
|
1773
|
+
destinationUrl?: string | null | undefined;
|
|
1751
1774
|
}[];
|
|
1752
1775
|
mobileChoiceCards?: {
|
|
1753
1776
|
product: {
|
|
@@ -1780,6 +1803,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1780
1803
|
kind: "hex";
|
|
1781
1804
|
} | null | undefined;
|
|
1782
1805
|
} | null | undefined;
|
|
1806
|
+
destinationUrl?: string | null | undefined;
|
|
1783
1807
|
}[] | null | undefined;
|
|
1784
1808
|
}>>>;
|
|
1785
1809
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -1880,6 +1904,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1880
1904
|
kind: "hex";
|
|
1881
1905
|
} | null | undefined;
|
|
1882
1906
|
} | null | undefined;
|
|
1907
|
+
destinationUrl?: string | null | undefined;
|
|
1883
1908
|
}[];
|
|
1884
1909
|
mobileChoiceCards?: {
|
|
1885
1910
|
product: {
|
|
@@ -1912,6 +1937,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
1912
1937
|
kind: "hex";
|
|
1913
1938
|
} | null | undefined;
|
|
1914
1939
|
} | null | undefined;
|
|
1940
|
+
destinationUrl?: string | null | undefined;
|
|
1915
1941
|
}[] | null | undefined;
|
|
1916
1942
|
} | null | undefined;
|
|
1917
1943
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2012,6 +2038,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2012
2038
|
kind: "hex";
|
|
2013
2039
|
} | null | undefined;
|
|
2014
2040
|
} | null | undefined;
|
|
2041
|
+
destinationUrl?: string | null | undefined;
|
|
2015
2042
|
}[];
|
|
2016
2043
|
mobileChoiceCards?: {
|
|
2017
2044
|
product: {
|
|
@@ -2044,6 +2071,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2044
2071
|
kind: "hex";
|
|
2045
2072
|
} | null | undefined;
|
|
2046
2073
|
} | null | undefined;
|
|
2074
|
+
destinationUrl?: string | null | undefined;
|
|
2047
2075
|
}[] | null | undefined;
|
|
2048
2076
|
} | null | undefined;
|
|
2049
2077
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2174,6 +2202,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2174
2202
|
kind: "hex";
|
|
2175
2203
|
} | null | undefined;
|
|
2176
2204
|
} | null | undefined;
|
|
2205
|
+
destinationUrl?: string | null | undefined;
|
|
2177
2206
|
}[];
|
|
2178
2207
|
mobileChoiceCards?: {
|
|
2179
2208
|
product: {
|
|
@@ -2206,6 +2235,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2206
2235
|
kind: "hex";
|
|
2207
2236
|
} | null | undefined;
|
|
2208
2237
|
} | null | undefined;
|
|
2238
|
+
destinationUrl?: string | null | undefined;
|
|
2209
2239
|
}[] | null | undefined;
|
|
2210
2240
|
} | null | undefined;
|
|
2211
2241
|
promoCodes?: string[] | null | undefined;
|
|
@@ -2352,6 +2382,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2352
2382
|
kind: "hex";
|
|
2353
2383
|
} | null | undefined;
|
|
2354
2384
|
} | null | undefined;
|
|
2385
|
+
destinationUrl?: string | null | undefined;
|
|
2355
2386
|
}[];
|
|
2356
2387
|
mobileChoiceCards?: {
|
|
2357
2388
|
product: {
|
|
@@ -2384,6 +2415,7 @@ export declare const bannerTestFromToolSchema: z.ZodObject<{
|
|
|
2384
2415
|
kind: "hex";
|
|
2385
2416
|
} | null | undefined;
|
|
2386
2417
|
} | null | undefined;
|
|
2418
|
+
destinationUrl?: string | null | undefined;
|
|
2387
2419
|
}[] | null | undefined;
|
|
2388
2420
|
} | null | undefined;
|
|
2389
2421
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,KAAK,EAAE,eA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AAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAAC"}
|
|
@@ -488,6 +488,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
488
488
|
kind: "hex";
|
|
489
489
|
} | null | undefined;
|
|
490
490
|
}>>>;
|
|
491
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
491
492
|
}, "strip", z.ZodTypeAny, {
|
|
492
493
|
product: {
|
|
493
494
|
supportTier: "Contribution";
|
|
@@ -519,6 +520,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
519
520
|
kind: "hex";
|
|
520
521
|
} | null | undefined;
|
|
521
522
|
} | null | undefined;
|
|
523
|
+
destinationUrl?: string | null | undefined;
|
|
522
524
|
}, {
|
|
523
525
|
product: {
|
|
524
526
|
supportTier: "Contribution";
|
|
@@ -550,6 +552,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
550
552
|
kind: "hex";
|
|
551
553
|
} | null | undefined;
|
|
552
554
|
} | null | undefined;
|
|
555
|
+
destinationUrl?: string | null | undefined;
|
|
553
556
|
}>, "many">;
|
|
554
557
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
555
558
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -650,6 +653,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
650
653
|
kind: "hex";
|
|
651
654
|
} | null | undefined;
|
|
652
655
|
}>>>;
|
|
656
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
653
657
|
}, "strip", z.ZodTypeAny, {
|
|
654
658
|
product: {
|
|
655
659
|
supportTier: "Contribution";
|
|
@@ -681,6 +685,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
681
685
|
kind: "hex";
|
|
682
686
|
} | null | undefined;
|
|
683
687
|
} | null | undefined;
|
|
688
|
+
destinationUrl?: string | null | undefined;
|
|
684
689
|
}, {
|
|
685
690
|
product: {
|
|
686
691
|
supportTier: "Contribution";
|
|
@@ -712,6 +717,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
712
717
|
kind: "hex";
|
|
713
718
|
} | null | undefined;
|
|
714
719
|
} | null | undefined;
|
|
720
|
+
destinationUrl?: string | null | undefined;
|
|
715
721
|
}>, "many">>>;
|
|
716
722
|
}, "strip", z.ZodTypeAny, {
|
|
717
723
|
choiceCards: {
|
|
@@ -745,6 +751,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
745
751
|
kind: "hex";
|
|
746
752
|
} | null | undefined;
|
|
747
753
|
} | null | undefined;
|
|
754
|
+
destinationUrl?: string | null | undefined;
|
|
748
755
|
}[];
|
|
749
756
|
mobileChoiceCards?: {
|
|
750
757
|
product: {
|
|
@@ -777,6 +784,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
777
784
|
kind: "hex";
|
|
778
785
|
} | null | undefined;
|
|
779
786
|
} | null | undefined;
|
|
787
|
+
destinationUrl?: string | null | undefined;
|
|
780
788
|
}[] | null | undefined;
|
|
781
789
|
}, {
|
|
782
790
|
choiceCards: {
|
|
@@ -810,6 +818,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
810
818
|
kind: "hex";
|
|
811
819
|
} | null | undefined;
|
|
812
820
|
} | null | undefined;
|
|
821
|
+
destinationUrl?: string | null | undefined;
|
|
813
822
|
}[];
|
|
814
823
|
mobileChoiceCards?: {
|
|
815
824
|
product: {
|
|
@@ -842,6 +851,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
842
851
|
kind: "hex";
|
|
843
852
|
} | null | undefined;
|
|
844
853
|
} | null | undefined;
|
|
854
|
+
destinationUrl?: string | null | undefined;
|
|
845
855
|
}[] | null | undefined;
|
|
846
856
|
}>>>;
|
|
847
857
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -1074,6 +1084,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1074
1084
|
kind: "hex";
|
|
1075
1085
|
} | null | undefined;
|
|
1076
1086
|
} | null | undefined;
|
|
1087
|
+
destinationUrl?: string | null | undefined;
|
|
1077
1088
|
}[];
|
|
1078
1089
|
mobileChoiceCards?: {
|
|
1079
1090
|
product: {
|
|
@@ -1106,6 +1117,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1106
1117
|
kind: "hex";
|
|
1107
1118
|
} | null | undefined;
|
|
1108
1119
|
} | null | undefined;
|
|
1120
|
+
destinationUrl?: string | null | undefined;
|
|
1109
1121
|
}[] | null | undefined;
|
|
1110
1122
|
} | null | undefined;
|
|
1111
1123
|
choiceCardAmounts?: {
|
|
@@ -1238,6 +1250,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1238
1250
|
kind: "hex";
|
|
1239
1251
|
} | null | undefined;
|
|
1240
1252
|
} | null | undefined;
|
|
1253
|
+
destinationUrl?: string | null | undefined;
|
|
1241
1254
|
}[];
|
|
1242
1255
|
mobileChoiceCards?: {
|
|
1243
1256
|
product: {
|
|
@@ -1270,6 +1283,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1270
1283
|
kind: "hex";
|
|
1271
1284
|
} | null | undefined;
|
|
1272
1285
|
} | null | undefined;
|
|
1286
|
+
destinationUrl?: string | null | undefined;
|
|
1273
1287
|
}[] | null | undefined;
|
|
1274
1288
|
} | null | undefined;
|
|
1275
1289
|
choiceCardAmounts?: {
|
|
@@ -1417,6 +1431,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1417
1431
|
kind: "hex";
|
|
1418
1432
|
} | null | undefined;
|
|
1419
1433
|
} | null | undefined;
|
|
1434
|
+
destinationUrl?: string | null | undefined;
|
|
1420
1435
|
}[];
|
|
1421
1436
|
mobileChoiceCards?: {
|
|
1422
1437
|
product: {
|
|
@@ -1449,6 +1464,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1449
1464
|
kind: "hex";
|
|
1450
1465
|
} | null | undefined;
|
|
1451
1466
|
} | null | undefined;
|
|
1467
|
+
destinationUrl?: string | null | undefined;
|
|
1452
1468
|
}[] | null | undefined;
|
|
1453
1469
|
} | null | undefined;
|
|
1454
1470
|
choiceCardAmounts?: {
|
|
@@ -1631,6 +1647,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1631
1647
|
kind: "hex";
|
|
1632
1648
|
} | null | undefined;
|
|
1633
1649
|
} | null | undefined;
|
|
1650
|
+
destinationUrl?: string | null | undefined;
|
|
1634
1651
|
}[];
|
|
1635
1652
|
mobileChoiceCards?: {
|
|
1636
1653
|
product: {
|
|
@@ -1663,6 +1680,7 @@ export declare const epicTestFromToolSchema: z.ZodObject<{
|
|
|
1663
1680
|
kind: "hex";
|
|
1664
1681
|
} | null | undefined;
|
|
1665
1682
|
} | null | undefined;
|
|
1683
|
+
destinationUrl?: string | null | undefined;
|
|
1666
1684
|
}[] | null | undefined;
|
|
1667
1685
|
} | null | undefined;
|
|
1668
1686
|
choiceCardAmounts?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/abTests/epic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQlD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9C,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBjC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -903,6 +903,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
903
903
|
kind: "hex";
|
|
904
904
|
} | null | undefined;
|
|
905
905
|
}>>>;
|
|
906
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
906
907
|
}, "strip", z.ZodTypeAny, {
|
|
907
908
|
product: {
|
|
908
909
|
supportTier: "Contribution";
|
|
@@ -934,6 +935,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
934
935
|
kind: "hex";
|
|
935
936
|
} | null | undefined;
|
|
936
937
|
} | null | undefined;
|
|
938
|
+
destinationUrl?: string | null | undefined;
|
|
937
939
|
}, {
|
|
938
940
|
product: {
|
|
939
941
|
supportTier: "Contribution";
|
|
@@ -965,6 +967,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
965
967
|
kind: "hex";
|
|
966
968
|
} | null | undefined;
|
|
967
969
|
} | null | undefined;
|
|
970
|
+
destinationUrl?: string | null | undefined;
|
|
968
971
|
}>, "many">;
|
|
969
972
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
970
973
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1065,6 +1068,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1065
1068
|
kind: "hex";
|
|
1066
1069
|
} | null | undefined;
|
|
1067
1070
|
}>>>;
|
|
1071
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1068
1072
|
}, "strip", z.ZodTypeAny, {
|
|
1069
1073
|
product: {
|
|
1070
1074
|
supportTier: "Contribution";
|
|
@@ -1096,6 +1100,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1096
1100
|
kind: "hex";
|
|
1097
1101
|
} | null | undefined;
|
|
1098
1102
|
} | null | undefined;
|
|
1103
|
+
destinationUrl?: string | null | undefined;
|
|
1099
1104
|
}, {
|
|
1100
1105
|
product: {
|
|
1101
1106
|
supportTier: "Contribution";
|
|
@@ -1127,6 +1132,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1127
1132
|
kind: "hex";
|
|
1128
1133
|
} | null | undefined;
|
|
1129
1134
|
} | null | undefined;
|
|
1135
|
+
destinationUrl?: string | null | undefined;
|
|
1130
1136
|
}>, "many">>>;
|
|
1131
1137
|
}, "strip", z.ZodTypeAny, {
|
|
1132
1138
|
choiceCards: {
|
|
@@ -1160,6 +1166,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1160
1166
|
kind: "hex";
|
|
1161
1167
|
} | null | undefined;
|
|
1162
1168
|
} | null | undefined;
|
|
1169
|
+
destinationUrl?: string | null | undefined;
|
|
1163
1170
|
}[];
|
|
1164
1171
|
mobileChoiceCards?: {
|
|
1165
1172
|
product: {
|
|
@@ -1192,6 +1199,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1192
1199
|
kind: "hex";
|
|
1193
1200
|
} | null | undefined;
|
|
1194
1201
|
} | null | undefined;
|
|
1202
|
+
destinationUrl?: string | null | undefined;
|
|
1195
1203
|
}[] | null | undefined;
|
|
1196
1204
|
}, {
|
|
1197
1205
|
choiceCards: {
|
|
@@ -1225,6 +1233,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1225
1233
|
kind: "hex";
|
|
1226
1234
|
} | null | undefined;
|
|
1227
1235
|
} | null | undefined;
|
|
1236
|
+
destinationUrl?: string | null | undefined;
|
|
1228
1237
|
}[];
|
|
1229
1238
|
mobileChoiceCards?: {
|
|
1230
1239
|
product: {
|
|
@@ -1257,6 +1266,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1257
1266
|
kind: "hex";
|
|
1258
1267
|
} | null | undefined;
|
|
1259
1268
|
} | null | undefined;
|
|
1269
|
+
destinationUrl?: string | null | undefined;
|
|
1260
1270
|
}[] | null | undefined;
|
|
1261
1271
|
}>>>;
|
|
1262
1272
|
promoCodes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -1430,6 +1440,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1430
1440
|
kind: "hex";
|
|
1431
1441
|
} | null | undefined;
|
|
1432
1442
|
} | null | undefined;
|
|
1443
|
+
destinationUrl?: string | null | undefined;
|
|
1433
1444
|
}[];
|
|
1434
1445
|
mobileChoiceCards?: {
|
|
1435
1446
|
product: {
|
|
@@ -1462,6 +1473,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1462
1473
|
kind: "hex";
|
|
1463
1474
|
} | null | undefined;
|
|
1464
1475
|
} | null | undefined;
|
|
1476
|
+
destinationUrl?: string | null | undefined;
|
|
1465
1477
|
}[] | null | undefined;
|
|
1466
1478
|
} | null | undefined;
|
|
1467
1479
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1635,6 +1647,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1635
1647
|
kind: "hex";
|
|
1636
1648
|
} | null | undefined;
|
|
1637
1649
|
} | null | undefined;
|
|
1650
|
+
destinationUrl?: string | null | undefined;
|
|
1638
1651
|
}[];
|
|
1639
1652
|
mobileChoiceCards?: {
|
|
1640
1653
|
product: {
|
|
@@ -1667,6 +1680,7 @@ export declare const bannerSchema: z.ZodObject<{
|
|
|
1667
1680
|
kind: "hex";
|
|
1668
1681
|
} | null | undefined;
|
|
1669
1682
|
} | null | undefined;
|
|
1683
|
+
destinationUrl?: string | null | undefined;
|
|
1670
1684
|
}[] | null | undefined;
|
|
1671
1685
|
} | null | undefined;
|
|
1672
1686
|
promoCodes?: string[] | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,KAAK,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBvB,CAAC"}
|
|
@@ -100,6 +100,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
100
100
|
kind: "hex";
|
|
101
101
|
} | null | undefined;
|
|
102
102
|
}>>>;
|
|
103
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
104
|
}, "strip", z.ZodTypeAny, {
|
|
104
105
|
product: {
|
|
105
106
|
supportTier: "Contribution";
|
|
@@ -131,6 +132,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
131
132
|
kind: "hex";
|
|
132
133
|
} | null | undefined;
|
|
133
134
|
} | null | undefined;
|
|
135
|
+
destinationUrl?: string | null | undefined;
|
|
134
136
|
}, {
|
|
135
137
|
product: {
|
|
136
138
|
supportTier: "Contribution";
|
|
@@ -162,6 +164,7 @@ declare const choiceCardSchema: z.ZodObject<{
|
|
|
162
164
|
kind: "hex";
|
|
163
165
|
} | null | undefined;
|
|
164
166
|
} | null | undefined;
|
|
167
|
+
destinationUrl?: string | null | undefined;
|
|
165
168
|
}>;
|
|
166
169
|
export type ChoiceCard = z.infer<typeof choiceCardSchema>;
|
|
167
170
|
export declare const choiceCardsSettings: z.ZodObject<{
|
|
@@ -264,6 +267,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
264
267
|
kind: "hex";
|
|
265
268
|
} | null | undefined;
|
|
266
269
|
}>>>;
|
|
270
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
271
|
}, "strip", z.ZodTypeAny, {
|
|
268
272
|
product: {
|
|
269
273
|
supportTier: "Contribution";
|
|
@@ -295,6 +299,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
295
299
|
kind: "hex";
|
|
296
300
|
} | null | undefined;
|
|
297
301
|
} | null | undefined;
|
|
302
|
+
destinationUrl?: string | null | undefined;
|
|
298
303
|
}, {
|
|
299
304
|
product: {
|
|
300
305
|
supportTier: "Contribution";
|
|
@@ -326,6 +331,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
326
331
|
kind: "hex";
|
|
327
332
|
} | null | undefined;
|
|
328
333
|
} | null | undefined;
|
|
334
|
+
destinationUrl?: string | null | undefined;
|
|
329
335
|
}>, "many">;
|
|
330
336
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
331
337
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -426,6 +432,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
426
432
|
kind: "hex";
|
|
427
433
|
} | null | undefined;
|
|
428
434
|
}>>>;
|
|
435
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
436
|
}, "strip", z.ZodTypeAny, {
|
|
430
437
|
product: {
|
|
431
438
|
supportTier: "Contribution";
|
|
@@ -457,6 +464,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
457
464
|
kind: "hex";
|
|
458
465
|
} | null | undefined;
|
|
459
466
|
} | null | undefined;
|
|
467
|
+
destinationUrl?: string | null | undefined;
|
|
460
468
|
}, {
|
|
461
469
|
product: {
|
|
462
470
|
supportTier: "Contribution";
|
|
@@ -488,6 +496,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
488
496
|
kind: "hex";
|
|
489
497
|
} | null | undefined;
|
|
490
498
|
} | null | undefined;
|
|
499
|
+
destinationUrl?: string | null | undefined;
|
|
491
500
|
}>, "many">>>;
|
|
492
501
|
}, "strip", z.ZodTypeAny, {
|
|
493
502
|
choiceCards: {
|
|
@@ -521,6 +530,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
521
530
|
kind: "hex";
|
|
522
531
|
} | null | undefined;
|
|
523
532
|
} | null | undefined;
|
|
533
|
+
destinationUrl?: string | null | undefined;
|
|
524
534
|
}[];
|
|
525
535
|
mobileChoiceCards?: {
|
|
526
536
|
product: {
|
|
@@ -553,6 +563,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
553
563
|
kind: "hex";
|
|
554
564
|
} | null | undefined;
|
|
555
565
|
} | null | undefined;
|
|
566
|
+
destinationUrl?: string | null | undefined;
|
|
556
567
|
}[] | null | undefined;
|
|
557
568
|
}, {
|
|
558
569
|
choiceCards: {
|
|
@@ -586,6 +597,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
586
597
|
kind: "hex";
|
|
587
598
|
} | null | undefined;
|
|
588
599
|
} | null | undefined;
|
|
600
|
+
destinationUrl?: string | null | undefined;
|
|
589
601
|
}[];
|
|
590
602
|
mobileChoiceCards?: {
|
|
591
603
|
product: {
|
|
@@ -618,6 +630,7 @@ export declare const choiceCardsSettings: z.ZodObject<{
|
|
|
618
630
|
kind: "hex";
|
|
619
631
|
} | null | undefined;
|
|
620
632
|
} | null | undefined;
|
|
633
|
+
destinationUrl?: string | null | undefined;
|
|
621
634
|
}[] | null | undefined;
|
|
622
635
|
}>;
|
|
623
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;AAuBtD,QAAA,MAAM,gBAAgB
|
|
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;AAuBtD,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,6 +337,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
337
337
|
kind: "hex";
|
|
338
338
|
} | null | undefined;
|
|
339
339
|
}>>>;
|
|
340
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
341
|
}, "strip", z.ZodTypeAny, {
|
|
341
342
|
product: {
|
|
342
343
|
supportTier: "Contribution";
|
|
@@ -368,6 +369,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
368
369
|
kind: "hex";
|
|
369
370
|
} | null | undefined;
|
|
370
371
|
} | null | undefined;
|
|
372
|
+
destinationUrl?: string | null | undefined;
|
|
371
373
|
}, {
|
|
372
374
|
product: {
|
|
373
375
|
supportTier: "Contribution";
|
|
@@ -399,6 +401,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
399
401
|
kind: "hex";
|
|
400
402
|
} | null | undefined;
|
|
401
403
|
} | null | undefined;
|
|
404
|
+
destinationUrl?: string | null | undefined;
|
|
402
405
|
}>, "many">;
|
|
403
406
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
404
407
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -499,6 +502,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
499
502
|
kind: "hex";
|
|
500
503
|
} | null | undefined;
|
|
501
504
|
}>>>;
|
|
505
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
502
506
|
}, "strip", z.ZodTypeAny, {
|
|
503
507
|
product: {
|
|
504
508
|
supportTier: "Contribution";
|
|
@@ -530,6 +534,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
530
534
|
kind: "hex";
|
|
531
535
|
} | null | undefined;
|
|
532
536
|
} | null | undefined;
|
|
537
|
+
destinationUrl?: string | null | undefined;
|
|
533
538
|
}, {
|
|
534
539
|
product: {
|
|
535
540
|
supportTier: "Contribution";
|
|
@@ -561,6 +566,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
561
566
|
kind: "hex";
|
|
562
567
|
} | null | undefined;
|
|
563
568
|
} | null | undefined;
|
|
569
|
+
destinationUrl?: string | null | undefined;
|
|
564
570
|
}>, "many">>>;
|
|
565
571
|
}, "strip", z.ZodTypeAny, {
|
|
566
572
|
choiceCards: {
|
|
@@ -594,6 +600,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
594
600
|
kind: "hex";
|
|
595
601
|
} | null | undefined;
|
|
596
602
|
} | null | undefined;
|
|
603
|
+
destinationUrl?: string | null | undefined;
|
|
597
604
|
}[];
|
|
598
605
|
mobileChoiceCards?: {
|
|
599
606
|
product: {
|
|
@@ -626,6 +633,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
626
633
|
kind: "hex";
|
|
627
634
|
} | null | undefined;
|
|
628
635
|
} | null | undefined;
|
|
636
|
+
destinationUrl?: string | null | undefined;
|
|
629
637
|
}[] | null | undefined;
|
|
630
638
|
}, {
|
|
631
639
|
choiceCards: {
|
|
@@ -659,6 +667,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
659
667
|
kind: "hex";
|
|
660
668
|
} | null | undefined;
|
|
661
669
|
} | null | undefined;
|
|
670
|
+
destinationUrl?: string | null | undefined;
|
|
662
671
|
}[];
|
|
663
672
|
mobileChoiceCards?: {
|
|
664
673
|
product: {
|
|
@@ -691,6 +700,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
691
700
|
kind: "hex";
|
|
692
701
|
} | null | undefined;
|
|
693
702
|
} | null | undefined;
|
|
703
|
+
destinationUrl?: string | null | undefined;
|
|
694
704
|
}[] | null | undefined;
|
|
695
705
|
}>>>;
|
|
696
706
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -923,6 +933,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
923
933
|
kind: "hex";
|
|
924
934
|
} | null | undefined;
|
|
925
935
|
} | null | undefined;
|
|
936
|
+
destinationUrl?: string | null | undefined;
|
|
926
937
|
}[];
|
|
927
938
|
mobileChoiceCards?: {
|
|
928
939
|
product: {
|
|
@@ -955,6 +966,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
955
966
|
kind: "hex";
|
|
956
967
|
} | null | undefined;
|
|
957
968
|
} | null | undefined;
|
|
969
|
+
destinationUrl?: string | null | undefined;
|
|
958
970
|
}[] | null | undefined;
|
|
959
971
|
} | null | undefined;
|
|
960
972
|
choiceCardAmounts?: {
|
|
@@ -1087,6 +1099,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
1087
1099
|
kind: "hex";
|
|
1088
1100
|
} | null | undefined;
|
|
1089
1101
|
} | null | undefined;
|
|
1102
|
+
destinationUrl?: string | null | undefined;
|
|
1090
1103
|
}[];
|
|
1091
1104
|
mobileChoiceCards?: {
|
|
1092
1105
|
product: {
|
|
@@ -1119,6 +1132,7 @@ export declare const variantSchema: z.ZodObject<{
|
|
|
1119
1132
|
kind: "hex";
|
|
1120
1133
|
} | null | undefined;
|
|
1121
1134
|
} | null | undefined;
|
|
1135
|
+
destinationUrl?: string | null | undefined;
|
|
1122
1136
|
}[] | null | undefined;
|
|
1123
1137
|
} | null | undefined;
|
|
1124
1138
|
choiceCardAmounts?: {
|
|
@@ -1469,6 +1483,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1469
1483
|
kind: "hex";
|
|
1470
1484
|
} | null | undefined;
|
|
1471
1485
|
}>>>;
|
|
1486
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1472
1487
|
}, "strip", z.ZodTypeAny, {
|
|
1473
1488
|
product: {
|
|
1474
1489
|
supportTier: "Contribution";
|
|
@@ -1500,6 +1515,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1500
1515
|
kind: "hex";
|
|
1501
1516
|
} | null | undefined;
|
|
1502
1517
|
} | null | undefined;
|
|
1518
|
+
destinationUrl?: string | null | undefined;
|
|
1503
1519
|
}, {
|
|
1504
1520
|
product: {
|
|
1505
1521
|
supportTier: "Contribution";
|
|
@@ -1531,6 +1547,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1531
1547
|
kind: "hex";
|
|
1532
1548
|
} | null | undefined;
|
|
1533
1549
|
} | null | undefined;
|
|
1550
|
+
destinationUrl?: string | null | undefined;
|
|
1534
1551
|
}>, "many">;
|
|
1535
1552
|
mobileChoiceCards: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1536
1553
|
product: z.ZodDiscriminatedUnion<"supportTier", [z.ZodObject<{
|
|
@@ -1631,6 +1648,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1631
1648
|
kind: "hex";
|
|
1632
1649
|
} | null | undefined;
|
|
1633
1650
|
}>>>;
|
|
1651
|
+
destinationUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1634
1652
|
}, "strip", z.ZodTypeAny, {
|
|
1635
1653
|
product: {
|
|
1636
1654
|
supportTier: "Contribution";
|
|
@@ -1662,6 +1680,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1662
1680
|
kind: "hex";
|
|
1663
1681
|
} | null | undefined;
|
|
1664
1682
|
} | null | undefined;
|
|
1683
|
+
destinationUrl?: string | null | undefined;
|
|
1665
1684
|
}, {
|
|
1666
1685
|
product: {
|
|
1667
1686
|
supportTier: "Contribution";
|
|
@@ -1693,6 +1712,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1693
1712
|
kind: "hex";
|
|
1694
1713
|
} | null | undefined;
|
|
1695
1714
|
} | null | undefined;
|
|
1715
|
+
destinationUrl?: string | null | undefined;
|
|
1696
1716
|
}>, "many">>>;
|
|
1697
1717
|
}, "strip", z.ZodTypeAny, {
|
|
1698
1718
|
choiceCards: {
|
|
@@ -1726,6 +1746,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1726
1746
|
kind: "hex";
|
|
1727
1747
|
} | null | undefined;
|
|
1728
1748
|
} | null | undefined;
|
|
1749
|
+
destinationUrl?: string | null | undefined;
|
|
1729
1750
|
}[];
|
|
1730
1751
|
mobileChoiceCards?: {
|
|
1731
1752
|
product: {
|
|
@@ -1758,6 +1779,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1758
1779
|
kind: "hex";
|
|
1759
1780
|
} | null | undefined;
|
|
1760
1781
|
} | null | undefined;
|
|
1782
|
+
destinationUrl?: string | null | undefined;
|
|
1761
1783
|
}[] | null | undefined;
|
|
1762
1784
|
}, {
|
|
1763
1785
|
choiceCards: {
|
|
@@ -1791,6 +1813,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1791
1813
|
kind: "hex";
|
|
1792
1814
|
} | null | undefined;
|
|
1793
1815
|
} | null | undefined;
|
|
1816
|
+
destinationUrl?: string | null | undefined;
|
|
1794
1817
|
}[];
|
|
1795
1818
|
mobileChoiceCards?: {
|
|
1796
1819
|
product: {
|
|
@@ -1823,6 +1846,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
1823
1846
|
kind: "hex";
|
|
1824
1847
|
} | null | undefined;
|
|
1825
1848
|
} | null | undefined;
|
|
1849
|
+
destinationUrl?: string | null | undefined;
|
|
1826
1850
|
}[] | null | undefined;
|
|
1827
1851
|
}>>>;
|
|
1828
1852
|
choiceCardAmounts: z.ZodOptional<z.ZodObject<{
|
|
@@ -2055,6 +2079,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2055
2079
|
kind: "hex";
|
|
2056
2080
|
} | null | undefined;
|
|
2057
2081
|
} | null | undefined;
|
|
2082
|
+
destinationUrl?: string | null | undefined;
|
|
2058
2083
|
}[];
|
|
2059
2084
|
mobileChoiceCards?: {
|
|
2060
2085
|
product: {
|
|
@@ -2087,6 +2112,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2087
2112
|
kind: "hex";
|
|
2088
2113
|
} | null | undefined;
|
|
2089
2114
|
} | null | undefined;
|
|
2115
|
+
destinationUrl?: string | null | undefined;
|
|
2090
2116
|
}[] | null | undefined;
|
|
2091
2117
|
} | null | undefined;
|
|
2092
2118
|
choiceCardAmounts?: {
|
|
@@ -2219,6 +2245,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2219
2245
|
kind: "hex";
|
|
2220
2246
|
} | null | undefined;
|
|
2221
2247
|
} | null | undefined;
|
|
2248
|
+
destinationUrl?: string | null | undefined;
|
|
2222
2249
|
}[];
|
|
2223
2250
|
mobileChoiceCards?: {
|
|
2224
2251
|
product: {
|
|
@@ -2251,6 +2278,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2251
2278
|
kind: "hex";
|
|
2252
2279
|
} | null | undefined;
|
|
2253
2280
|
} | null | undefined;
|
|
2281
|
+
destinationUrl?: string | null | undefined;
|
|
2254
2282
|
}[] | null | undefined;
|
|
2255
2283
|
} | null | undefined;
|
|
2256
2284
|
choiceCardAmounts?: {
|
|
@@ -2433,6 +2461,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2433
2461
|
kind: "hex";
|
|
2434
2462
|
} | null | undefined;
|
|
2435
2463
|
} | null | undefined;
|
|
2464
|
+
destinationUrl?: string | null | undefined;
|
|
2436
2465
|
}[];
|
|
2437
2466
|
mobileChoiceCards?: {
|
|
2438
2467
|
product: {
|
|
@@ -2465,6 +2494,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2465
2494
|
kind: "hex";
|
|
2466
2495
|
} | null | undefined;
|
|
2467
2496
|
} | null | undefined;
|
|
2497
|
+
destinationUrl?: string | null | undefined;
|
|
2468
2498
|
}[] | null | undefined;
|
|
2469
2499
|
} | null | undefined;
|
|
2470
2500
|
choiceCardAmounts?: {
|
|
@@ -2621,6 +2651,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2621
2651
|
kind: "hex";
|
|
2622
2652
|
} | null | undefined;
|
|
2623
2653
|
} | null | undefined;
|
|
2654
|
+
destinationUrl?: string | null | undefined;
|
|
2624
2655
|
}[];
|
|
2625
2656
|
mobileChoiceCards?: {
|
|
2626
2657
|
product: {
|
|
@@ -2653,6 +2684,7 @@ export declare const epicPropsSchema: z.ZodObject<{
|
|
|
2653
2684
|
kind: "hex";
|
|
2654
2685
|
} | null | undefined;
|
|
2655
2686
|
} | null | undefined;
|
|
2687
|
+
destinationUrl?: string | null | undefined;
|
|
2656
2688
|
}[] | null | undefined;
|
|
2657
2689
|
} | null | undefined;
|
|
2658
2690
|
choiceCardAmounts?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/props/epic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAY/D,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/support-dotcom-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.2",
|
|
4
4
|
"description": "Service to serve Reader Revenue components to dotcom",
|
|
5
5
|
"repository": "github:guardian/support-dotcom-components",
|
|
6
6
|
"author": "The Guardian",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"build-dotcom-types": "tsc --project tsconfig.types.json",
|
|
95
95
|
"publish-dry-run": "pnpm publish --dry-run",
|
|
96
96
|
"lint": "eslint .",
|
|
97
|
+
"prune-lint-suppressions": "pnpm lint --prune-suppressions",
|
|
97
98
|
"prettier:check": "prettier --check ./src",
|
|
98
99
|
"prettier:fix": "prettier --write ./src",
|
|
99
100
|
"test": "export stage=DEV; jest",
|