/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 25: /***/ ((__unused_webpack_module, exports) => { var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.dataLayerPush = void 0; exports.dataLayerPush = (_a = window === null || window === void 0 ? void 0 : window.dataLayerPush) !== null && _a !== void 0 ? _a : ((category, action, label, value = 0, interaction = false) => { window.dataLayer.push({ event: "customEvent", GAeventCategory: category, GAeventAction: action, GAeventLabel: label, GAeventValue: value, GAeventNonInteraction: interaction, }); }); /***/ }), /***/ 140: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.localeToSitePrivacyProtection = void 0; exports.getSitePrivacyProtection = getSitePrivacyProtection; exports.getConsentOverlayId = getConsentOverlayId; const isProd_1 = __webpack_require__(871); const locale_1 = __webpack_require__(780); exports.localeToSitePrivacyProtection = { "zh-tw": "Not Applicable", "zh-hk": "Not Applicable", "uk-ua": "Not Applicable", "tr-tr": "GDPR", "sv-se": "GDPR", "ro-ro": "GDPR", "pt-pt": "GDPR", "pt-br": "LGDP", "pl-pl": "GDPR", "no-no": "GDPR", "nl-nl": "GDPR", "nl-be": "GDPR", "ja-jp": "Not Applicable", "hu-hu": "GDPR", "hr-hr": "GDPR", "he-il": "GDPR", "fr-fr": "GDPR", "fr-ca": "Not Applicable", "fr-be": "GDPR", "fi-fi": "GDPR", "es-us": "CCPA", "es-pe": "Not Applicable", "es-mx": "Not Applicable", "es-es": "GDPR", "es-cl": "Not Applicable", "en-us": "CCPA", "en-ph": "AMA", "en-in": "Not Applicable", "en-gb": "GDPR", "en-ca": "Not Applicable", "en-ae": "AMA", "el-gr": "GDPR", "de-de": "GDPR", "de-ch": "GDPR", "de-at": "GDPR", "cs-cz": "GDPR", "ar-sa": "Not Applicable", }; function getSitePrivacyProtection() { return exports.localeToSitePrivacyProtection[locale_1.locale]; } const localeToConsentOverlayId = { "en-us": "0196aa43-efc1-7d6f-8e54-d1e0b04e18d7", "es-us": "0196aa2e-cc78-7455-9592-0f05026e9ef9", "uk-ua": "01967b8b-f087-78f5-880a-2530512a2020", "tr-tr": "01967b94-b936-7413-97e1-1f67f0037df4", "sv-se": "01967b97-774e-7206-95f5-e004a2808cd7", "ro-ro": "01967b9d-f314-7df7-b4af-ffd6daadf72d", "pt-pt": "01967ba4-b7aa-7cde-9ed2-154f102401bb", "pt-br": "01967ba9-6a4d-7391-9f46-953b622c4123", "pl-pl": "01967bbd-7f03-789a-bb54-62711a1a1a3e", "no-no": "01967bc2-98df-7615-a946-0dbf7e0d19ad", "nl-nl": "01967bc6-b6af-74d4-a462-a8929a88aa9b", "nl-be": "01967bea-4eab-75f4-801b-aaac7fa4506a", "hu-hu": "01967bef-51ec-761b-8101-99323fa0f850", "hr-hr": "01967bfd-1586-7ec9-b38d-480dc75618eb", "he-il": "01967c01-b319-7a2f-8462-d943269d2636", "fr-fr": "01967c06-2d83-7a9d-bcfa-19bf412fd2e2", "fr-ca": "01967c16-e5b0-7e99-8510-a69e3871024b", "fr-be": "01967c1b-54ce-749e-8921-3b735b4423ea", "fi-fi": "01967c1e-8ef5-7cc3-8007-af9490a60a30", "es-mx": "01967c22-48be-759f-8ce5-1ed91d31d265", "es-es": "01967c24-a525-7a5a-b539-027e23d69158", "en-ph": "01967c29-378a-76f1-82ea-42b9cc7b657b", "en-in": "01967c2d-dc4f-789d-a853-e3e143f06e6f", "en-gb": "01967c38-292d-7cbf-b47f-7bc2e103f66e", "en-ca": "01967c3a-66a8-7b66-bdf3-862fcc4c1383", }; function getConsentOverlayId() { const id = localeToConsentOverlayId[locale_1.locale]; if (!id) { return ""; } return `htmllang/${id}${isProd_1.isProd ? "" : "-test"}`; } /***/ }), /***/ 174: /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.productsQuizResults = productsQuizResults; function productsQuizResults() { const q = new URLSearchParams(location.search); const babyName = q.get("babyName"); document.querySelectorAll(".babyname").forEach(e => { e.textContent = babyName; }); } /***/ }), /***/ 232: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.configStage = void 0; const privacy_1 = __webpack_require__(140); exports.configStage = { gtmId: "GTM-N94XXFB", bvApiKey: "7d31728e0cd345b9b539c5202f8768f2", pgDataLayer: { cd: { dimension3: "anonymous" }, GTM: { BINPlatform: "", ConsentOverlay: "OneTrust", ConsentOverlayID: (0, privacy_1.getConsentOverlayId)(), FacebookConnectAppID: "1402968366699773", FacebookConnectLocale: "en_US", FacebookRemarketingID: "", GoogleAnalyticsBrand: "", GoogleAnalyticsGA4MeasurementID: "G-BNWM702CE7", GoogleAnalyticsLocal: "UA-38384539-1", GoogleAnalyticsOptimizeContainerID: "", GoogleAnalyticsReportingView: "68911582", GoogleAnalyticsSiteSpeedSampleRate: "high", Segment: "o5uhTRbeDPaMgJpYqG5qQ5iPTbFSdgTV", SiteBrand: "Pampers", SiteEnvironment: "Staging", SiteHost: "AZURE", SiteLanguage: "English", SiteLocalContainer: "GTM-NXVVJ4V", SitePlatform: "Multibrand.com", SitePrivacyProtection: (0, privacy_1.getSitePrivacyProtection)(), SiteStatus: "Live", SiteTechnicalAgency: "Proximity", SiteTouchpoint: "33259", SiteCurrency: "USD", }, user: { ID: "", type: "Unknown", sourceID: "1228", marketingProgramNbr: "128" }, content: { category: "Non Applicable", "sub-category": "Non Applicable", type: "Non Applicable" }, product: { segment: "non applicable", category: "non applicable", brand: "non applicable", "sub-brand": "non applicable", name: "non applicable", gtin: "non applicable", }, }, }; /***/ }), /***/ 508: /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.paths = void 0; exports.paths = { productsQuizResults: /\/en-us\/products\/quiz\/results\/.*/, productDetail: /\/en-us\/2025-products\/.*/, }; /***/ }), /***/ 555: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.hookUpGtmEvents = hookUpGtmEvents; const dataLayerPush_1 = __webpack_require__(25); function hookupGtmEventsForElement(el, suffix) { const category = el.getAttribute(`data-category${suffix}`); const action = el.getAttribute(`data-action${suffix}`); const label = el.getAttribute(`data-label${suffix}`); const labelSuffix = el.getAttribute(`data-label-suffix${suffix}`) || ""; // const label = `${label2 ?? ""}${labelSuffix ?? ""}` const labelSelected = el.getAttribute(`data-label-selected${suffix}`); const labelDeselected = el.getAttribute(`data-label-deselected${suffix}`); if (!category && !action && !label && !labelSelected && !labelDeselected) { return; } if (!category || !action || (!label && !labelSelected && !labelDeselected)) { console.warn("Missing data attributes on element", el); return; } el.addEventListener("click", e => { if (label) { (0, dataLayerPush_1.dataLayerPush)(category, action, `${label}${labelSuffix}`); } if (!labelSelected && !labelDeselected) { return; } const input = e.target; // Ignore double events from span and checkboxes if (!input.matches("input")) return; const checked = input.checked; if (labelSelected && checked) { (0, dataLayerPush_1.dataLayerPush)(category, action, `${labelSelected}${labelSuffix}`); } if (labelDeselected && !checked) { (0, dataLayerPush_1.dataLayerPush)(category, action, `${labelDeselected}${labelSuffix}`); } }); } function hookUpGtmEvents() { document.querySelectorAll(".js-event-click,[data-trigger=click]").forEach(el => { hookupGtmEventsForElement(el, ""); hookupGtmEventsForElement(el, "2"); }); } /***/ }), /***/ 613: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var _a, _b, _c; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.productDetail = productDetail; const api_1 = __webpack_require__(752); const starEmpty = (_a = document.querySelector("[data-fid=star-empty]")) === null || _a === void 0 ? void 0 : _a.src; const starHalf = (_b = document.querySelector("[data-fid=star-half]")) === null || _b === void 0 ? void 0 : _b.src; const starFull = (_c = document.querySelector("[data-fid=star-full]")) === null || _c === void 0 ? void 0 : _c.src; function productDetail() { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const productId = (_b = (_a = document.querySelector("[data-fid=product-id")) === null || _a === void 0 ? void 0 : _a.innerText) === null || _b === void 0 ? void 0 : _b.trim(); if (!productId) { return; } const res = yield api_1.api.getReviews({ productId }); console.log(res); const stats = res.Includes.Products[productId].ReviewStatistics; document.querySelectorAll("[data-fid=ratings-num]").forEach(el => { el.innerText = stats.TotalReviewCount.toString(); }); document.querySelectorAll("[data-fid=ratings-avg]").forEach(el => { el.innerText = stats.AverageOverallRating.toFixed(1); }); document.querySelectorAll("[data-fid=stars-rating]").forEach(el => { setStarsRating(el, stats.AverageOverallRating); }); document.querySelectorAll("[data-fid=avg-comfortable-fit]").forEach(el => { el.innerText = `${stats.SecondaryRatingsAverages.ComfortableFit.AverageRating.toFixed(1)} / 5`; }); document.querySelectorAll("[data-fid=avg-keeps-dry]").forEach(el => { el.innerText = `${stats.SecondaryRatingsAverages.KeepsDry.AverageRating.toFixed(1)} / 5`; }); document.querySelectorAll("[data-fid=avg-good-value]").forEach(el => { el.innerText = `${stats.SecondaryRatingsAverages.GoodValue.AverageRating.toFixed(1)} / 5`; }); document.querySelectorAll("[data-fid=avg-absorbency]").forEach(el => { el.innerText = `${stats.SecondaryRatingsAverages.Absorbency.AverageRating.toFixed(1)} / 5`; }); document.querySelectorAll("[data-fid=comfortable-fit-bar]").forEach(el => { el.style.width = `${stats.SecondaryRatingsAverages.ComfortableFit.AverageRating * 20}%`; }); document.querySelectorAll("[data-fid=keeps-dry-bar]").forEach(el => { el.style.width = `${stats.SecondaryRatingsAverages.KeepsDry.AverageRating * 20}%`; }); document.querySelectorAll("[data-fid=good-value-bar]").forEach(el => { el.style.width = `${stats.SecondaryRatingsAverages.GoodValue.AverageRating * 20}%`; }); document.querySelectorAll("[data-fid=absorbency-bar]").forEach(el => { el.style.width = `${stats.SecondaryRatingsAverages.Absorbency.AverageRating * 20}%`; }); for (let i = 0; i < 5; i++) { const rating = i + 1; const dist = (_c = stats.RatingDistribution.find(t => t.RatingValue === rating)) === null || _c === void 0 ? void 0 : _c.Count; const distPercent = dist ? (dist / stats.TotalReviewCount) * 100 : 0; document.querySelectorAll(`[data-fid='${rating}-star-bar']`).forEach(el => { el.style.width = `${distPercent}%`; }); document.querySelectorAll(`[data-fid=ratings-num-of-${rating}]`).forEach(el => { var _a; el.innerText = (_a = dist === null || dist === void 0 ? void 0 : dist.toString()) !== null && _a !== void 0 ? _a : "0"; }); } }); } function setStarsRating(el, rating) { if (!starEmpty || !starHalf || !starFull) { return; } const fullStars = Math.floor(rating); const halfStar = rating % 1 >= 0.5 ? 1 : 0; const images = Array.from(el.querySelectorAll(":scope > img")); for (let i = 0; i < 5; i++) { if (i < fullStars) { images[i].src = starFull; continue; } if (i <= fullStars && halfStar) { images[i].src = starHalf; continue; } images[i].src = starEmpty; } } /***/ }), /***/ 616: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.config = void 0; const configProd_1 = __webpack_require__(785); const configStage_1 = __webpack_require__(232); const isProd_1 = __webpack_require__(871); exports.config = isProd_1.isProd ? configProd_1.configProd : configStage_1.configStage; /***/ }), /***/ 707: /***/ (function(__unused_webpack_module, exports) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ax = ax; function ax(_a) { return __awaiter(this, arguments, void 0, function* ({ url, headers, method, data, params }) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const urlWithParams = params ? `${url}?${new URLSearchParams(params).toString()}` : url; const opts = { method: method !== null && method !== void 0 ? method : "GET", headers: Object.assign(Object.assign({}, (data ? { "Content-Type": "application/json" } : {})), headers), body: data ? JSON.stringify(data) : undefined, }; const res = yield fetch(urlWithParams, opts); const resData = yield res.json(); const { ok, status, statusText } = res; const res2 = { ok, status, statusText, data: resData }; return res2; }); } /***/ }), /***/ 752: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.api = void 0; const ax_1 = __webpack_require__(707); const config_1 = __webpack_require__(616); const locale_1 = __webpack_require__(780); class Api { getReviews(_a) { return __awaiter(this, arguments, void 0, function* ({ productId, Offset, limit }) { const params = { apiversion: "5.4", filter: `ProductId:${productId}`, Include: "Products", Stats: "Reviews", Offset: Offset !== null && Offset !== void 0 ? Offset : 0, limit: limit !== null && limit !== void 0 ? limit : 5, Sort: "SubmissionTime:desc", }; const url = "https://csapi.pg.com/brandbuilding/consumer/v1/pampersclub-bazaarvoice/data/reviews.json"; const res = yield (0, ax_1.ax)({ url, headers: { "Ocp-Apim-Subscription-Key": config_1.config.bvApiKey, locale: locale_1.locale, }, params, }); return res.data; }); } } exports.api = new Api(); /***/ }), /***/ 780: /***/ ((__unused_webpack_module, exports) => { var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.locale = void 0; exports.locale = ((_a = document.location.pathname.split("/")[1]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "en-us"; /***/ }), /***/ 785: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.configProd = void 0; const privacy_1 = __webpack_require__(140); exports.configProd = { gtmId: "GTM-N94XXFB", bvApiKey: "7d31728e0cd345b9b539c5202f8768f2", pgDataLayer: { cd: { dimension3: "anonymous" }, GTM: { BINPlatform: "", ConsentOverlay: "OneTrust", ConsentOverlayID: (0, privacy_1.getConsentOverlayId)(), FacebookConnectAppID: "1402968366699773", FacebookConnectLocale: "en_US", FacebookRemarketingID: "1159120190864559", FacebookStandardEvents: "true", GoogleAnalyticsBrand: "", GoogleAnalyticsGA4MeasurementID: "G-BNWM702CE7", GoogleAnalyticsLocal: "UA-1163687-7", GoogleAnalyticsOptimizeContainerID: "GTM-M2PDB53", GoogleAnalyticsReportingView: "64134122", GoogleAnalyticsSiteSpeedSampleRate: "high", Segment: "o5uhTRbeDPaMgJpYqG5qQ5iPTbFSdgTV", SiteBrand: "Pampers", SiteEnvironment: "Prod", SiteHost: "AZURE", SiteLanguage: "English", SiteLocalContainer: "GTM-KX4XFDH", SitePlatform: "Multibrand.com", SitePrivacyProtection: (0, privacy_1.getSitePrivacyProtection)(), SiteStatus: "Live", SiteTechnicalAgency: "Proximity", SiteTouchpoint: "33259", SiteCurrency: "USD", }, user: { ID: "", type: "Unknown", sourceID: "", marketingProgramNbr: "128" }, content: { category: "Non Applicable", "sub-category": "Non Applicable", type: "Non Applicable" }, product: { segment: "non applicable", category: "non applicable", brand: "non applicable", "sub-brand": "non applicable", name: "non applicable", gtin: "non applicable", }, }, }; /***/ }), /***/ 871: /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isProd = void 0; exports.isProd = ["www.pampers.com", "webflow.pampers.com", "baby.pampers.com"].includes(location.hostname) ? true : false; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). (() => { var exports = __webpack_exports__; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); const gtmEvents_1 = __webpack_require__(555); const paths_1 = __webpack_require__(508); const productDetail_1 = __webpack_require__(613); const productsQuizResults_1 = __webpack_require__(174); console.log("body4"); function body() { (0, gtmEvents_1.hookUpGtmEvents)(); const path = location.pathname; if (paths_1.paths.productsQuizResults.test(path)) { (0, productsQuizResults_1.productsQuizResults)(); } if (paths_1.paths.productDetail.test(path)) { (0, productDetail_1.productDetail)(); } } body(); })(); /******/ })() ;