1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[538],{5169:function(e,n,r){"use strict";n.Q4=void 0;var t=r(2768);Object.defineProperty(n,"Q4",{enumerable:!0,get:function(){return t.handleEditorFastRefresh}}),r(5826),r(7023)},2768:function(e,n,r){"use strict";var t=r(3454);Object.defineProperty(n,"__esModule",{value:!0}),n.getJssEditingSecret=n.handleEditorFastRefresh=n.getPublicUrl=void 0,r(7023),n.getPublicUrl=()=>{let e="https://www.pepsico.com";if(void 0===e){if(t.env.NETLIFY&&t.env.DEPLOY_URL)return t.env.DEPLOY_URL;if(t.env.VERCEL_URL)return`https://${t.env.VERCEL_URL}`;e="http://localhost:3000"}return e.replace(/\/$/,"")},n.handleEditorFastRefresh=(e=!1)=>{},n.getJssEditingSecret=()=>{let e=t.env.JSS_EDITING_SECRET;if(!e||0===e.length)throw Error("The JSS_EDITING_SECRET environment variable is missing or invalid.");return e}},7023:function(e,n,r){e.exports=r(8920)},5826:function(e,n,r){e.exports=r(8996)},7331:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[[...path]]",function(){return r(3394)}])},5019:function(e,n,r){"use strict";r.d(n,{Z:function(){return c}});var t=r(5893);r(7294);var i=r(9008),o=r.n(i),l=r(9567),d=r(4925),a=()=>null,s=r(9201);let u={"ee test page":{header:"headless-header",main:"headless-main",footer:"headless-footer"},default:{header:"Header",main:"Main",footer:"Footer"}};var c=e=>{var n,r,i,c;let{layoutData:v,headLinks:f}=e,{route:h}=v.sitecore,g=null==h?void 0:h.fields,m=(null==g?void 0:null===(i=g.PageBackground)||void 0===i?void 0:null===(r=i.fields)||void 0===r?void 0:null===(n=r.Value)||void 0===n?void 0:n.value)?"page-theme-".concat(g.PageBackground.fields.Value.value.toLocaleLowerCase()):"",{header:p,main:E,footer:x}=u[(null==h?void 0:null===(c=h.name)||void 0===c?void 0:c.toLowerCase())||"default"]||u.default;return(0,t.jsxs)("div",{id:"root",className:(0,d.cn)("relative flex flex-col min-h-dvh",m),children:[(0,t.jsx)(a,{}),(0,t.jsx)(o(),{children:f.map(e=>(0,t.jsx)("link",{rel:e.rel,href:e.href},e.href))}),(0,t.jsx)("header",{children:h&&(0,t.jsx)(l.V,{name:p,rendering:h})}),(0,t.jsx)("main",{className:"grow",children:h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.V,{name:"ArticleHeader",rendering:h}),(0,t.jsx)(l.V,{name:E,rendering:h}),(0,t.jsx)(l.V,{name:"ArticleFooter",rendering:h})]})}),(0,t.jsx)("footer",{"data-role":"main-footer",children:h&&(0,t.jsx)(l.V,{name:x,rendering:h})}),(0,t.jsx)(s.Z,{})]})}},9870:function(e,n,r){"use strict";var t=r(5893),i=r(9008),o=r.n(i);n.Z=()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o(),{children:(0,t.jsx)("title",{children:"404: NotFound"})}),(0,t.jsxs)("div",{style:{padding:10},children:[(0,t.jsx)("h1",{children:"Page not found"}),(0,t.jsx)("p",{children:"This page does not exist."}),(0,t.jsx)("a",{href:"/",children:"Go to the Home page"})]})]})},3394:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSG:function(){return f},injectBrandFeaturedOrder:function(){return h}});var t=r(5893),i=r(7294),o=r(9870),l=r(5019),d=r(8205),a=r(1201),s=r(5169),u=r(7051),c=r(3454);function v(e){return"DynamicProductGrid"===e.componentName}var f=!0;function h(e){var n,r,t,i,o,l;if(!c.env.BRANDS_FEATURED_ORDER||!(null==e?void 0:null===(r=e.sitecore)||void 0===r?void 0:null===(n=r.route)||void 0===n?void 0:n.placeholders))return;console.log("Start Injecting Brands Featured Order");let d=c.env.BRANDS_FEATURED_ORDER.split(",").map(e=>e.toLowerCase().trim()),a=e.sitecore.route.placeholders.Main;if(!Array.isArray(a)){console.log('Finished: "Main" placeholder not found or is not an array.');return}let s=a.filter(v);if(!s.length){console.log('Finished: No "DynamicProductGrid" components found.');return}for(let e of s){let n=null===(t=e.fields)||void 0===t?void 0:t.Brands;if(Array.isArray(n)){let e=n.filter(e=>{var n,r;return null==e?void 0:null===(r=e.fields)||void 0===r?void 0:null===(n=r.IsFeatured)||void 0===n?void 0:n.value});if(e.length>0)for(let n of(console.log("Detected ".concat(e.length," featured brands in a component.")),e)){if(!n.fields)continue;let e=null===(l=n.fields.Name)||void 0===l?void 0:null===(o=l.value)||void 0===o?void 0:null===(i=o.toLowerCase())||void 0===i?void 0:i.trim();if(!e)continue;let r=d.indexOf(e);-1!==r&&(n.fields.FeaturedOrder=r+1)}}}console.log("Finished Injecting Brands Featured Order")}n.default=e=>{var n,r,v,f,h,g;let{notFound:m,componentProps:p,layoutData:E,headLinks:x}=e;if((0,i.useEffect)(()=>{(0,s.Q4)()},[]),m||!E.sitecore.route)return(0,t.jsx)(o.Z,{});let _=E.sitecore.context.pageEditing;if(c.env.BRANDS_FEATURED_ORDER&&(null==E?void 0:null===(r=E.sitecore)||void 0===r?void 0:null===(n=r.route)||void 0===n?void 0:n.placeholders)){let e=c.env.BRANDS_FEATURED_ORDER.split(",").map(e=>e.toLowerCase());console.log("Start Injecting Brands Featured Order");let n=E.sitecore.route.placeholders.Main;
1if(Array.isArray(n)){let r=n.filter(e=>"DynamicProductGrid"===e.componentName);if(r&&r.length)for(let n=0;n<r.length;n++){let t=r[n].fields.Brands;if(Array.isArray(t)){let n=t.filter(e=>{var n,r;return null==e?void 0:null===(r=e.fields)||void 0===r?void 0:null===(n=r.IsFeatured)||void 0===n?void 0:n.value});console.log("Detected ".concat(n.length," featured brands"));for(let r=0;r<n.length;r++){let t=n[r],i=null==t?void 0:null===(g=t.fields)||void 0===g?void 0:null===(h=g.Name)||void 0===h?void 0:null===(f=h.value)||void 0===f?void 0:null===(v=f.toLowerCase())||void 0===v?void 0:v.trim(),o=e.indexOf(i);-1!=o&&(t.fields.FeaturedOrder={value:o+1})}}}}console.log("Finished Injecting Brands Featured Order")}return(0,t.jsx)(d.T5,{value:p,children:(0,t.jsx)(a.Qb,{componentFactory:u.w9.getComponentFactory({isEditing:_}),layoutData:E,children:(0,t.jsx)(l.Z,{layoutData:E,headLinks:x})})})}}},function(e){e.O(0,[802,894,183,51,888,774,179],function(){return e(e.s=7331)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.