PageSourceSearch

https://www.imperfectfoods.com/_next/static/chunks/304.1e49e327b6918a76.js

js imperfectfoods.com collected 2026-09-24 17:13:45 UTC 14,023 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5e3d165f-f9a8-4543-9152-4bf75be35bb6",e._sentryDebugIdIdentifier="sentry-dbid-5e3d165f-f9a8-4543-9152-4bf75be35bb6")}()}catch(e){}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:cms-frontend":!0})}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[304],{5488:function(e,t,n){n.d(t,{v:function(){return _}});var i=n(7437);let l=(...e)=>(...t)=>{for(let n=0;n<e.length;n++){let i=e[n];if(i){let e=i(...t);if(null!=e)return e}}},r={listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",span:"span"},o={[r.listItem]:"listItem",[r.oListItem]:"oListItem",[r.list]:"list",[r.oList]:"oList"},a=e=>(t,n,i,l,r)=>{let a=e[o[t]||t];if(a)return a({type:t,node:n,text:i,children:l,key:r})};var d=n(2265);let s=()=>(++s.i).toString();s.i=0;let u=e=>{let t=f(e),n=[];for(let e=0;e<t.length;e++)n.push(h(t[e]));return{key:s(),children:n}},c=(e,t=[])=>({key:s(),type:e.type,text:"text"in e?e.text:void 0,node:e,children:t}),m=e=>c({type:r.span,text:e,spans:[]}),f=e=>{let t=e.slice(0);for(let e=0;e<t.length;e++){let n=t[e];if(n.type===r.listItem||n.type===r.oListItem){let i=[n];for(;t[e+1]&&t[e+1].type===n.type;)i.push(t[e+1]),t.splice(e,1);n.type===r.listItem?t[e]={type:r.list,items:i}:t[e]={type:r.oList,items:i}}}return t},h=e=>{if("text"in e)return c(e,p(e.spans,e));if("items"in e){let t=[];for(let n=0;n<e.items.length;n++)t.push(h(e.items[n]));return c(e,t)}return c(e)},p=(e,t,n)=>{if(!e.length)return[m(t.text)];let i=e.slice(0);i.sort((e,t)=>e.start-t.start||t.end-e.end);let l=[];for(let e=0;e<i.length;e++){let r=i[e],o=n&&n.start||0,a=r.start-o,d=r.end-o,s=t.text.slice(a,d),u=[];for(let t=e;t<i.length;t++){let e=i[t];e!==r&&(e.start>=r.start&&e.end<=r.end?(u.push(e),i.splice(t,1),t--):e.start<r.end&&e.end>r.start&&(u.push({...e,end:r.end}),i[t]={...e,start:r.end}))}0===e&&a>0&&l.push(m(t.text.slice(0,a)));let f={...r,text:s};l.push(c(f,p(u,{...t,text:s},r))),d<t.text.length&&l.push(m(t.text.slice(d,i[e+1]?i[e+1].start-o:void 0)))}return l},g=(e,t)=>v(u(e).children,t),v=(e,t)=>{let n=[];for(let i=0;i<e.length;i++){let l=e[i],r=t(l.type,l.node,l.text,v(l.children,t),l.key);null!=r&&n.push(r)}return n};var x=n(5297),w=n(9232);n(257);let y=e=>a({heading1:({children:e,key:t})=>(0,i.jsx)("h1",{children:e},t),heading2:({children:e,key:t})=>(0,i.jsx)("h2",{children:e},t),heading3:({children:e,key:t})=>(0,i.jsx)("h3",{children:e},t),heading4:({children:e,key:t})=>(0,i.jsx)("h4",{children:e},t),heading5:({children:e,key:t})=>(0,i.jsx)("h5",{children:e},t),heading6:({children:e,key:t})=>(0,i.jsx)("h6",{children:e},t),paragraph:({children:e,key:t})=>(0,i.jsx)("p",{children:e},t),preformatted:({node:e,key:t})=>(0,i.jsx)("pre",{children:e.text},t),strong:({children:e,key:t})=>(0,i.jsx)("strong",{children:e},t),em:({children:e,key:t})=>(0,i.jsx)("em",{children:e},t),listItem:({children:e,key:t})=>(0,i.jsx)("li",{children:e},t),oListItem:({children:e,key:t})=>(0,i.jsx)("li",{children:e},t),list:({children:e,key:t})=>(0,i.jsx)("ul",{children:e},t),oList:({children:e,key:t})=>(0,i.jsx)("ol",{children:e},t),image:({node:t,key:n})=>{let l=(0,i.jsx)("img",{src:t.url,alt:t.alt??void 0,"data-copyright":t.copyright?t.copyright:void 0});return(0,i.jsx)("p",{className:"block-img",children:t.linkTo?(0,i.jsx)(x.w,{linkResolver:e.linkResolver,internalComponent:e.internalLinkComponent,externalComponent:e.externalLinkComponent,field:t.linkTo,children:l}):l},n)}
1,embed:({node:e,key:t})=>(0,i.jsx)("div",{"data-oembed":e.oembed.embed_url,"data-oembed-type":e.oembed.type,"data-oembed-provider":e.oembed.provider_name,dangerouslySetInnerHTML:{__html:e.oembed.html??""}},t),hyperlink:({node:t,children:n,key:l})=>(0,i.jsx)(x.w,{field:t.data,linkResolver:e.linkResolver,internalComponent:e.internalLinkComponent,externalComponent:e.externalLinkComponent,children:n},l),label:({node:e,children:t,key:n})=>(0,i.jsx)("span",{className:e.data.label,children:t},n),span:({text:e,key:t})=>{let n=[],l=0;for(let t of e.split("\n"))l>0&&n.push((0,i.jsx)("br",{},`${l}__break`)),n.push((0,i.jsx)(d.Fragment,{children:t},`${l}__line`)),l++;return(0,i.jsx)(d.Fragment,{children:n},t)}});function b({linkResolver:e,field:t,fallback:n,components:r,externalLinkComponent:o,internalLinkComponent:s,...u}){return d.useMemo(()=>{if(!(0,w.qO)(t))return null!=n?(0,i.jsx)(i.Fragment,{children:n}):null;{let n=l("object"==typeof r?a(r):r,y({linkResolver:e,internalLinkComponent:s,externalLinkComponent:o})),u=g(t,(e,t,i,l,r)=>{let o=n(e,t,i,l,r);return d.isValidElement(o)&&null==o.key?d.cloneElement(o,{key:r}):o});return(0,i.jsx)(i.Fragment,{children:u})}},[t,s,o,r,e,n])}var j=n(7893);let _=function({components:e,...t}){let n=(0,j.i)(),r=l("object"==typeof e?a(e):e,"object"==typeof n.richTextComponents?a(n.richTextComponents):n.richTextComponents);return(0,i.jsx)(b,{components:r,internalLinkComponent:n.internalLinkComponent,externalLinkComponent:n.externalLinkComponent,...t})}},190:function(e,t,n){var i=n(7437),l=n(2265);n(2779);var r=n(7385);let o=[640,828,1080,1200,2048,3840],a=[.25,.5,.75],d=(e,t,n)=>{if(!e||!t||!n||0===n.length)return"";let i=e.join("/");return i?n.map(e=>"".concat(i,"/w_").concat(e,"/").concat(t," ").concat(e,"w")).join(", "):""};t.Z=e=>{var t,n,s,u;let{field:c,widths:m,width:f,height:h,...p}=e,g=(0,l.useMemo)(()=>{if(!(null==c?void 0:c.url))return!1;try{return new URL(c.url).pathname.toLowerCase().endsWith(".svg")}catch(e){return c.url.toLowerCase().includes(".svg")}},[c]),v=(0,l.useMemo)(()=>(0,r.$)(null==c?void 0:c.url),[c]),x=(0,l.useMemo)(()=>{var e;if(!c||g||!v)return"";let t=(null===(e=c.dimensions)||void 0===e?void 0:e.width)||0,n=m||o.filter(e=>e<=t);0===n.length&&t>0&&(n=[...new Set(n=[...a.map(e=>Math.round(t*e)),t])].sort((e,t)=>e-t));let i=[],l="";try{let e=new URL(v);l=(i=[e.protocol,"",e.host,...e.pathname.split("/").filter(Boolean)]).pop()||""}catch(e){return console.warn("Failed to parse final imgUrl for srcset generation:",e),""}return d(i,l,n)},[c,v,g,m]);if(!v)return null;if(g){let e=f||(null==c?void 0:null===(s=c.dimensions)||void 0===s?void 0:s.width),t=h||(null==c?void 0:null===(u=c.dimensions)||void 0===u?void 0:u.height);return(0,i.jsx)("img",{src:v,alt:(null==c?void 0:c.alt)||"",width:e,height:t,...p})}return(0,i.jsx)("img",{src:v,alt:(null==c?void 0:c.alt)||"",width:f||(null==c?void 0:null===(t=c.dimensions)||void 0===t?void 0:t.width),height:h||(null==c?void 0:null===(n=c.dimensions)||void 0===n?void 0:n.height),srcSet:x,...p})}},1052:function(e,t,n){n.r(t),n.d(t,{default:function(){return o}});var i=n(7437),l=n(9951),r=n(9826);function o(e){let{children:t,eventName:n="cta click",eventProperties:o={},...a}=e,{trackAmplitudeEvent:d}=(0,l.Z)();return(0,i.jsx)(r.PrismicNextLink,{...a,onClick:()=>d(n,{...o}),children:t})}},9461:function(e,t,n){n.d(t,{Lq:function(){return h},default:function(){return p}});var i=n(7437),l=n(2265),r=n(1013),o=n(9144),a=n(9087),d=n(5372),s=n(9061);let u=()=>{var e,t;let n=(0,d.jH)(window.location.search),i={...(0,d.pd)(n),user_agent:navigator.userAgent,referral_url:document.referrer,timestamp:+new Date,gclid:n.gclid,irclickid:n.irclickid,token:n.token,twclid:n.twclid,user_id:null===(t=window.dataLayer)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.customer_id},l=(0,s.G)();return l&&(i.referral_url=l),i},c=()=>"a55a37a212024ad62e933b63270830aa",m={defaultTracking:{attribution:!1,pageViews:!1,sessions:!0,formInteractions:!1,fileDownloads:!1}},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,o.j)(),i={pathname:window.location.pathname,domain:window.location.hostname,brand:"misfits"===n?"misfits_market":"imperfect_foods",url:window.location.href,is_CMS:!0};if(!e){console.warn("amplitude.track() was called without an event name. Will not send event to Amplitude.");return}r.track(e,{...i,...t})},h=(0,l.createContext)({});var p=e=>{let{children:t}=e,n=(0,l.useRef)(!1);return!function(){let e=(0,l.useRef)(!1),[t,n]=(0,a.fP)(["utm_params"]);(0,l.useEffect)(()=>
1{if(e.current)return;let t=u();if(t.utm_source||t.utm_medium||t.utm_campaign||t.utm_content||t.utm_term||t.irclickid||t.gclid||t.twclid||t.token||t.referral_url){let e=JSON.stringify(t),i="";window.location.hostname.endsWith(".misfitsmarket.com")?i=".misfitsmarket.com":window.location.hostname.endsWith(".imperfectfoods.com")&&(i=".imperfectfoods.com"),n("utm_params",e,{domain:i,maxAge:2419200}),localStorage.setItem("utm_params",e)}e.current=!0},[n])}(),(0,l.useEffect)(()=>{n.current||(window.amplitude=r,r.init(c(),m),n.current=!0)},[]),(0,i.jsx)(h.Provider,{value:{trackAmplitudeEvent:f},children:t})}},9144:function(e,t,n){n.d(t,{j:function(){return i}});function i(){return"imperfect"}},9061:function(e,t,n){n.d(t,{G:function(){return i}});function i(){var e,t,n;let i="";if("object"==typeof(null===(e=window)||void 0===e?void 0:e.optimizely)&&"function"==typeof window.optimizely.get){let e=window.optimizely.get("state"),l=null==e?void 0:null===(t=e.getRedirectInfo)||void 0===t?void 0:t.call(e);i=null!==(n=null==l?void 0:l.referrer)&&void 0!==n?n:""}return i}},5372:function(e,t,n){n.d(t,{SD:function(){return l},jH:function(){return i},pd:function(){return r}});let i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object.fromEntries([...new URLSearchParams(e.split("?")[1])])},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r(i(e))},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.keys(e).forEach(n=>{n.startsWith("utm_")&&(t[n]=e[n])}),t}},9951:function(e,t,n){var i=n(2265),l=n(9461);t.Z=()=>{let e=(0,i.useContext)(l.Lq);if(void 0===e)throw Error("useAmplitudeContext must be used within a AmplitudeContextProvider");return e}},3797:function(e,t,n){n.r(t);var i=n(7437),l=n(1487),r=n(1052),o=n(9715),a=n(1994),d=n(8491),s=n(190),u=n(7385);t.default=e=>{let{index:t,slice:n}=e,{variation:c,items:m,primary:f}=null!=n?n:{},{description:h,headline:p,mobile_image:g,desktop_image:v,image:x,cta_display:w,cta_destination_url:y,cta_text:b}=null!=f?f:{},j=o.BH(v)?v:x,_=o.BH(g)?g:x,k=0===m.filter(e=>{var t,n;return(null===(t=e.mobile_image)||void 0===t?void 0:t.url)||(null===(n=e.image)||void 0===n?void 0:n.url)}).length,L=e=>"".concat(n.slice_type,"_").concat(e,"_").concat(t);return(0,i.jsxs)("section",{"data-slice-type":n.slice_type,"data-slice-variation":c,className:"bg-cover bg-center bg-no-repeat p-20 md:p-60",style:{backgroundColor:(0,l.dF)({slice:n}),backgroundImage:o.BH(f.background_image)?"url(".concat((0,u.$)(f.background_image.url),")"):"none"},children:["Multiple"===f.primary_image_format&&m.length>0?(0,i.jsx)("ul",{className:(0,a.Z)("flex flex-col items-center justify-center gap-20 md:flex-row",{"mb-20":!k}),"data-test-id":L("image_grid"),children:m.map(e=>{var t,n,l;if(!(null===(t=e.mobile_image)||void 0===t?void 0:t.url)&&!(null===(n=e.desktop_image)||void 0===n?void 0:n.url)&&!(null===(l=e.image)||void 0===l?void 0:l.url))return;let r=o.BH(null==e?void 0:e.desktop_image)?null==e?void 0:e.desktop_image:null==e?void 0:e.image,a=o.BH(null==e?void 0:e.mobile_image)?null==e?void 0:e.mobile_image:null==e?void 0:e.image;return(0,i.jsxs)(i.Fragment,{children:[o.BH(a)&&(0,i.jsx)("li",{className:"max-w-[400px] md:hidden",children:(0,i.jsx)(s.Z,{field:a,fetchPriority:"low",width:null==a?void 0:a.dimensions.width,height:null==a?void 0:a.dimensions.height,loading:"lazy","data-test-id":L("mobile-image")})},null==a?void 0:a.url),o.BH(r)&&(0,i.jsx)("li",{className:"hidden max-w-[400px] md:block",children:(0,i.jsx)(s.Z,{field:r,fetchPriority:"low",width:null==r?void 0:r.dimensions.width,height:null==r?void 0:r.dimensions.height,loading:"lazy","data-test-id":L("desktop-image")})},null==r?void 0:r.url)]})})}):(0,i.jsxs)("div",{className:"flex justify-center",children:[o.BH(_)&&(0,i.jsx)(s.Z,{field:_,fetchPriority:"low",className:"md:hidden md:max-w-[400px]",width:null==_?void 0:_.dimensions.width,height:null==_?void 0:_.dimensions.height,loading:"lazy","data-test-id":L("mobile-image")}),o.BH(j)&&(0,i.jsx)(s.Z,{field:j,fetchPriority:"low",className:"hidden md:block md:max-w-[400px]",width:null==j?void 0:j.dimensions.width,height:null==j?void 0:j.dimensions.height,loading:"lazy","data-test-id":L("desktop-image")})]}),o.Nn(p)&&(0,i.jsx)("h2",{className:"text-heading-lg mb-10 text-center","data-test-id":L("heading"),children:p}),o.qO(h)&&(0,i.jsx)("div",{className:"mx-auto max-w-[800px] text-center","data-test-id":L("description"),children:(0,i.jsx)(d.Z,{body:h})}),o.Ys(w)&&w.startsWith("Button")&&(0,i.jsx)("div",{className:"mt-20 text-center font-grotesk-bold",children:(0,i.jsx)(r.default,{field:y,className:(0,a.Z)({"button-primary":"Button Primary"===w,"button-secondary":"Button Secondary"===w,"button-tertiary":"Button Tertiary"===w}),eventProperties:{element:"".concat(n.slice_type," slice"),slice_variation:n.variation,slice_index:t},"data-test-id":L("cta"),children:b})})]})}}
1,9715:function(e,t,n){n.d(t,{BH:function(){return r},Nn:function(){return d},Rx:function(){return a},Ys:function(){return s},p4:function(){return o},qO:function(){return l}});let i=e=>null!=e,l=e=>!!i(e)&&(1===e.length&&"text"in e[0]?!!e[0].text:!!e.length),r=e=>i(e)&&!!e.url,o=e=>i(e)&&("id"in e||"url"in e),a=i,d=e=>i(d)&&!!e,s=i}}]);

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.