PageSourceSearch

https://www.greenchef.com/_next/static/chunks/pages/creator-market…/[orderId]-0da7425e9b50af71.js

js greenchef.com collected 2026-09-24 08:40:13 UTC 16,600 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43242],{817698:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/creator-marketplace/order-confirmation/[orderId]",function(){return r(661515)}])},553911:function(e,t,r){"use strict";var n=r(687800),o=r(827378),i=r(72344),a=r(727650),l=r(497249),c=r(165218),s=r.n(c)()(function(){return Promise.resolve().then(r.bind(r,72344))},{loadableGenerated:{webpack:()=>[null]},ssr:!1});t.Z=function(e){var t,r,c=e.hasMarkdown,u=e.copy,d=e.markdownOptions,f=e.noSSR,m=e.allowedAttrs,y=e.config,p=(0,l.T)(),g="string"==typeof u?u.replace(/[ \t]{9,}/g," ".repeat(8)):u,v=(0,a.sanitize)(g,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({ADD_ATTR:void 0===m?[]:m},void 0===y?{}:y),r=r={RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t));return((0,o.useEffect)(function(){if((u||"")!==v){var e=p.startSpan("sanitize-content-libray");e.setAttributes({"sanitize-content-libray":!0,"sanitize-error-detected":u!==v,"sanitize-message":"HTML content has been sanitized. Please check the content to ensure it is safe.","sanitize-original-content":u,"sanitize-sanitized-content":v}),e.end()}},[u,v,p]),c)?f?(0,n.tZ)(s,{options:d,children:v}):(0,n.tZ)(i.default,{options:d,children:v}):(0,n.tZ)("div",{dangerouslySetInnerHTML:{__html:v}})}},529553:function(e,t,r){"use strict";r.d(t,{o:function(){return i}});var n=r(841999);function o(){return void 0!==window.sessionStorage&&"undefined"!=typeof Storage}var i={getItem:function(e){if(!o())return null;try{var t=window.sessionStorage.getItem(e);return null===t?null:String(t)}catch(t){return(0,n.Vp)(t,"PlainStringSessionStorage.getItem",{key:e},"plainStringGetItem"),null}},setItem:function(e,t){if(o())try{window.sessionStorage.setItem(e,String(t))}catch(t){(0,n.Vp)(t,"PlainStringSessionStorage.setItem",{key:e},"plainStringSetItem");try{var r=(0,n._0)();r>n.AR&&(0,n.Vp)(Error("Session Storage Limit Exceeding"),"PlainStringSessionStorage.setItem.limit",{currentSize:r},"plainStringSetItemLimit")}catch(t){(0,n.Vp)(t,"PlainStringSessionStorage.setItem.sizeCalc",{key:e},"plainStringSetItemSizeCalc")}}},removeItem:function(e){if(o())try{window.sessionStorage.removeItem(e)}catch(e){}}}},661515:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return L},default:function(){return Y}});var n=r(687800),o=r(827378),i=r(934301),a=r(198557),l=r(950693),c=r(171389),s=r(768587),u=r(340332),d=r(273656),f=r(449057),m=r(447054),y=r(29765),p=r(65009),g=r(918669),v=r(537850),b=r(900223),h=r(753330),_=[{questionKey:"creator_marketplace.order_confirmation.faq.item_1.question",questionDefault:"What if I'm not home to receive my delivery?",answerKey:"creator_marketplace.order_confirmation.faq.item_1.answer",answerDefault:"You don't need to be home. Your ingredients stay fresh in our insulated boxes for up to 24 hours after delivery."},{questionKey:"creator_marketplace.order_confirmation.faq.item_2.question",questionDefault:"Can I change the time, date, or location of my delivery?",answerKey:"creator_marketplace.order_confirmation.faq.item_2.answer",answerDefault:"Delivery details can't be changed after you place your order. Contact support if you need help with your delivery."}];function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function S(){var e,t=(0,v.H)().translateRaw,r=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(!0))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return w(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],a=r[1];return i?(0,n.tZ)(s.Yo,{variant:"success",onDismiss:function(){return a(!1)},dismissLabel:t("creator_marketplace.order_confirmation.feedback_bar.dismiss_label")||"Close","data-test-id":"order-confirmation-success-bar",children:t("creator_marketplace.order_confirmation.feedback_bar.message")||"Payment complete. You'll get an email confirmation shortly."}):null}function x(e){var t=e.firstName,r=(0,v.H)().translateRaw,o=r("creator_marketplace.order_confirmation.thank_you_hero.headline")||"Thank you",i=t?"".concat(o,", ").concat(t,"!"):"".concat(o,"!");return(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"global.sm-2",padding:"global.md-1",height:"144px",backgroundColor:"alias.brand.background.default","data-test-id":"order-confirmation-thank-you-hero",children:[(0,n.tZ)(s.xv,{styleAs:"h2",type:"body-xl-bold",color:"global.white",textAlign:"center",children:i}),(0,n.tZ)(s.xv,{type:"body-md-regular",color:"global.white",textAlign:"center",children:r("creator_marketplace.order_confirmation.thank_you_hero.subtitle")||"Our team will be preparing your order soon."})]})}var k=r(295332),O=r(384949);function Z(e){var t,r=e.delivery,o=(0,v.H)().translateRaw;if(!r)return null;var i=(0,k.Z)((0,y.Z)(r.delivery_date),O.He),a=function(e){var t=e.split("-");if(t.length<4)return null;var r=t[3];if(!/^\d{4}$/.test(r))return null;var n=parseInt(r.slice(0,2),10);return"".concat(n>12?n-12:n||12).concat(n>=12?"pm":"am")}(r.delivery_option_handle),l=a?o("creator_marketplace.order_confirmation.delivery_info.date_before_time",{date:i,time:a})||"".concat(i,", before ").concat(a):i,c=r.delivery_address,u=(null===(t=c.recipients)||void 0===t?void 0:t.join(", "))||"",d=[c.house_number,c.street,c.street_2].filter(Boolean).join(" "),f=[c.city,c.region,c.postcode].filter(Boolean).join(", ");return(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",alignItems:"center",gap:"global.sm-1",mt:"global.md-1",mx:"auto",padding:"global.md-1",backgroundColor:"global.white","data-test-id":"order-confirmation-delivery-information",width:"100%",maxWidth:"825px",children:[(0,n.tZ)(s.xv,{type:"body-md-regular",children:o("creator_marketplace.order_confirmation.delivery_info.heading")||"Your order will arrive:"}),(0,n.tZ)(s.xv,{type:"body-md-bold",children:l}),(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",alignItems:"center",gap:"zero",children:[(0,n.tZ)(s.xv,{type:"body-sm-regular",color:"neutral.600",children:o("creator_marketplace.order_confirmation.delivery_info.at")||"at"}),u&&(0,n.tZ)(s.xv,{as:"span",type:"body-sm-regular",textAlign:"center",color:"neutral.600",children:u}),(0,n.tZ)(s.xv,{as:"span",type:"body-sm-regular",textAlign:"center",color:"neutral.600",children:d}),(0,n.tZ)(s.xv,{as:"span",type:"body-sm-regular",textAlign:"center",color:"neutral.600",children:f})]}),(0,n.tZ)(s.xv,{type:"body-sm-regular",color:"neutral.800",textAlign:"center",children:o("creator_marketplace.order_confirmation.delivery_info.email_note")||"An email will be sent to your inbox shortly."})]})}var A=r(141323),I=r(887824),j=r(527157);function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function C(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var E=function(){var e=(0,I.Z)().push,t=(0,j.Z)(),r=(0,A.j)({},{suspense:!1,useErrorBoundary:!1}),n=r.data,i=r.isLoading,a=(null==n?void 0:n.id)?"".concat(n.id):"",l=(null==n?void 0:n.activeSubscriptionId)?"".concat(n.activeSubscriptionId):"",c=(0,o.useCallback)(function(){return{event:"gaEventTrigger",brand:t,tribe:"New Ventures",screen:"OrderSuccess",customer_id:a,subscription_id:l,gaEventCategory:"creator-marketplace",timestamp:Date.now()}},[t,a,l]);return{trackPageView:(0,o.useCallback)(function(){e(C(P({},c()),{event_name:"CM_OrderSuccess_PageView",gaEventAction:"pageView",gaEventLabel:"order_success"}))},[c,e]),trackBrowseRecipesClick:(0,o.useCallback)(function(){e(C(P({},c()),{event_name:"CM_OrderSuccess_BrowseRecipesClick",gaEventAction:"browseRecipesClicked",gaEventLabel:"order_success"}))}
1,[c,e]),trackFaqAccordionClick:(0,o.useCallback)(function(t){e(C(P({},c()),{event_name:"CM_OrderSuccess_FaqAccordionClick",question_key:t.questionKey,gaEventAction:"faqAccordionClicked",gaEventLabel:t.questionKey}))},[c,e]),isCustomerInfoReady:!i}},q=function(e){var t,r,i,a,l,c,w,k,O,A,I,j,P,C,q,D,R=e.orderState,B=R.status,T=("success"===B?R:{}).order,X=(0,u.nB)(),K=(0,g.G)(),z="success"===K.status?K.profile.firstName:"",M=(0,v.H)().translateRaw,N=E(),L=N.trackPageView,Y=N.trackFaqAccordionClick,U=N.isCustomerInfoReady,V=(0,o.useRef)(!1);(0,o.useEffect)(function(){!V.current&&("success"===B||"unavailable"===B)&&U&&(L(),V.current=!0)},[B,U,L]);var F=M("creator_marketplace.order_confirmation.order_summary.heading")||"Your order",H=M("creator_marketplace.order_confirmation.faq.heading")||"FAQs",$=_.map(function(e){var t=e.questionKey,r=e.questionDefault,n=e.answerKey,o=e.answerDefault;return{question:M(t)||r,answer:M(n)||o,questionKey:t}}),W=(O=(k=(0,p.b)()).productFamily,A=k.defaultServingSize,I=(null==T?void 0:null===(t=T.delivery)||void 0===t?void 0:t.delivery_date)?(0,m.Z)((0,y.Z)(T.delivery.delivery_date)):null,j=(0,d.rS)({weeks:I||"",exclude:[],product:O},{enabled:!!T&&!!I,staleTime:6e5,cacheTime:18e5,suspense:!1}),P=new Map,I&&(null===(i=j.data)||void 0===i?void 0:null===(r=i.items)||void 0===r?void 0:r[0])&&P.set(I,j.data.items[0]),C=(0,f.D)(null!==(w=null==T?void 0:T.items)&&void 0!==w?w:[],P,null==T?void 0:null===(a=T.delivery)||void 0===a?void 0:a.delivery_date,A),!j.isLoading&&T&&I&&(null===(c=j.data)||void 0===c?void 0:null===(l=c.items)||void 0===l?void 0:l[0])?C.map(function(e){var t;return{recipeId:e.id,recipeName:e.name,imageUrl:e.imageUrl,servings:e.servings,basePriceCents:e.basePriceCents,baseServings:null!==(t=e.baseServings)&&void 0!==t?t:e.servings}}):[]),G=null!==(q=null==T?void 0:T.price)&&void 0!==q?q:void 0,Q=null!==(D=null==T?void 0:T.delivery)&&void 0!==D?D:void 0,J=X(100*(G?G.grand_total-G.shipping_amount:0)),ee=G?X(100*G.shipping_amount):void 0,et=G?X(100*G.grand_total):void 0;return(0,n.BX)(s.xu,{"data-test-id":"creator-marketplace-order-confirmation-content",display:"flex",flexDirection:"column",width:"100%",children:[(0,n.tZ)(S,{}),(0,n.tZ)(x,{firstName:z}),(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",maxWidth:"100%",marginX:["global.sm-2","global.md-1"],children:[Q&&(0,n.tZ)(Z,{delivery:Q}),(0,n.BX)(s.xu,{width:"100%",maxWidth:"1200px",marginX:"auto",marginY:["global.md-2","global.md-3"],children:["success"===B&&T&&(0,n.BX)(n.HY,{children:[(0,n.BX)(s.xu,{width:"100%",maxWidth:"500px",marginX:"auto",display:"flex",flexDirection:"column",gap:["global.sm-2","global.md-1"],children:[(0,n.tZ)(s.xu,{display:["block","none"],children:(0,n.tZ)(s.xv,{as:"h2",children:F})}),(0,n.tZ)(s.xu,{display:["none","block"],children:(0,n.tZ)(s.xv,{as:"h2",styleAs:"h1",children:F})}),(0,n.tZ)(b.$,{items:W,subtotalFormatted:J,shippingFormatted:ee,totalFormatted:et})]}),(0,n.tZ)(s.iz,{mx:"zero"})]}),(0,n.tZ)(s.xu,{width:"100%",maxWidth:["100%","825px"],marginX:"auto",marginY:["global.md-2","global.md-1"],"data-test-id":"order-confirmation-faq-section",children:(0,n.tZ)(h.o,{title:H,items:$,onExpand:function(e){var t=e.questionKey;t&&Y({questionKey:t})}})})]})]})]})},D=r(32074),R=function(e){var t=!!e,r=(0,D.Vo)({orderId:e},{enabled:t,suspense:!1}),n=r.data,o=r.isLoading,i=r.isError;return!t||o?{status:"loading"}:i||!n||0===n.items.length?{status:"unavailable"}:{status:"success",order:n}},B=r(581340),T=r(529553),X=r(340674),K=r(888149);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var M=function(e){var t,r=e.orderId,i=e.orderState,a=e.children,l=(0,B.t)(),c=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(!1))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return z(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=c[0],u=c[1],d=(0,o.useRef)(!1);return((0,o.useEffect)(function(){if(!d.current){var e=T.o.getItem(X.Rx);if(T.o.getItem(X.$K)===r){l.replace((0,K.Zw)());return}if(e===r){T.o.setItem(X.$K,r),d.current=!0,u(!0);return}l.replace((0,K.Yt)())}},[r,l]),s&&"loading"!==i.status)?(0,n.tZ)(n.HY,{children:a}):null},N=function(e){var t=e.ssrPayload.orderId,r=R(t);return(0,n.BX)(a.l,{children:[(0,n.tZ)(l.s,{}),(0,n.tZ)(M,{orderId:t,orderState:r,children:(0,n.tZ)(q,{orderState:r})}),(0,n.tZ)(c.t,{})]})};N.customLayout=i.C;var L=!0,Y=N},753330:function(e,t,r){"use strict";r.d(t,{o:function(){return s}});var n=r(687800),o=r(827378),i=r(768587),a=r(553911);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e){var t,r=e.question,c=e.answer,s=e.questionKey,u=e.onExpand,d=function(e){if(Array.isArray(e))return e}(t=(0,o.useState)(!1))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return l(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=d[0],m=d[1];return(0,n.BX)(i.UQ.Outline,{onClick:function(){m(!f),!f&&u&&u({questionKey:s})},isOpen:f,buttonPosition:"right",buttonStyle:"plain",children:[(0,n.tZ)(i.UQ.Title,{children:(0,n.tZ)(a.Z,{hasMarkdown:!0,copy:r})}),(0,n.tZ)(i.UQ.Description,{children:(0,n.tZ)(a.Z,{hasMarkdown:!0,copy:c})})]})}function s(e){var t=e.title,r=e.items,o=e.onExpand;return(0,n.BX)(i.xu,{width:"100%",marginX:"auto","data-test-id":"faq-section",children:[(0,n.tZ)(i.xv,{as:"h2",styleAs:"h3",marginBottom:"global.sm-2",textAlign:"center",children:t}),r.map(function(e,t){return(0,n.tZ)(c,{question:e.question,answer:e.answer,questionKey:e.questionKey,onExpand:o},t)})]})}}},function(e){e.O(0,[47057,38579,94924,10198,17925,49461,78255,50693,71316,92888,49774,40179],function(){return e(e.s=817698)}),_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.