PageSourceSearch

https://www.hellofresh.de/_next/static/chunks/pages/creator-marketplace/account/orders-2971ba8dde0ea276.js

js hellofresh.de collected 2026-09-25 23:38:22 UTC 31,837 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28931],{48485:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/creator-marketplace/account/orders",function(){return t(298219)}])},298219:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return eo},default:function(){return ei}});var n=t(687800),o=t(827378),i=t(934301),a=t(504555),l=t(888149),c=t(222579),s=t(768587),d=t(625251),u=t(537850),p=t(651350),m=t(340332),f=t(32074),g=function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=(0,f.CR)({},{enabled:e,suspense:!1}),t=r.data,n=r.isLoading,o=r.isError;return n?{isLoading:!0,isError:!1,orders:[]}:o?{isLoading:!1,isError:!0,orders:[]}:t?{isLoading:!1,isError:!1,orders:t}:{isLoading:!1,isError:!1,orders:[]}};function y(e){var r=e.orderId,t=e.enabled,n=g(!!r&&(void 0===t||t)),o=n.orders,i=n.isLoading,a=n.isError,l=o.find(function(e){return e.id===r});return l?{order:l,isLoading:i,isError:a}:{order:void 0,isLoading:i,isError:a}}var h=t(814818),b=t(449057),v=t(680199),x=t.n(v),w=t(29765);function _(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}var O=function(e){var r=e.name.toLowerCase();return r.includes("mealbox")||r.includes("meal box")},k=function(e,r){var t,n,o,i,a,l,c,s,d,u,p=(0,w.Z)(e.delivery.delivery_date),m=new Date;m.setHours(0,0,0,0);var f=new Date(p);f.setHours(0,0,0,0);var g=f<m,y=g?Math.floor((m.getTime()-f.getTime())/864e5):void 0,h=e.delivery.delivery_address,b=function(e){if(Array.isArray(e))return e}(t=(null!==(l=null===(n=h.recipients)||void 0===n?void 0:n[0])&&void 0!==l?l:"").split(" "))||function(e,r){var t,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=(t=o.next()).done)&&(i.push(t.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,r){if(e){if("string"==typeof e)return _(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(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.")}(),v=b[0],k=b[1],Z=null===(i=e.tracking)||void 0===i?void 0:null===(o=i.status)||void 0===o?void 0:o.toLowerCase(),j=Z&&["processing","shipped","delivered","cancelled"].includes(Z)?Z:g?"delivered":"upcoming",S="PLACED"===e.state;return{id:e.id,deliveryStatus:g?"past":"upcoming",deliveryDate:x()(p,"YYYY-MM-DD"),recipesCount:e.items.reduce(function(e,r){var t;return O(r)?e:(null===(t=r.customer_selections)||void 0===t?void 0:t.length)?e+r.customer_selections.length:r.menu_id?e+1:e},0),totalAmount:e.price.grand_total,currency:r,recipes:[],shippingAddress:{firstName:void 0===v?"":v,lastName:void 0===k?"":k,address1:null!==(c=h.street)&&void 0!==c?c:"",address2:null!==(s=h.street_2)&&void 0!==s?s:void 0,city:null!==(d=h.city)&&void 0!==d?d:"",postcode:null!==(u=h.postcode)&&void 0!==u?u:""},shippingAmount:e.price.shipping_amount,isPaid:S,daysSinceDelivery:y,orderStatus:j,trackingUrl:null===(a=e.tracking)||void 0===a?void 0:a.tracking_url,deliveryOptionHandle:e.delivery.delivery_option_handle}},Z=t(447054),j=function(){var e,r,t=(0,m.SX)(),n=g(),o=n.orders,i=n.isLoading,a=n.isError;return e=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({},o.reduce(function(e,r){var n=k(r,t);return e[n.deliveryStatus].push(n),e},{upcoming:[],past:[]})),r=r={isLoading:i,isError:a},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e},S=function(e){var r,t,n,o,i,a=(0,m.SX)(),l=y({orderId:e.orderId}),c=l.order,s=l.isLoading,d=l.isError,u=(null==c?void 0:null===(r=c.delivery)||void 0===r?void 0:r.delivery_date)?(0,Z.Z)((0,w.Z)(c.delivery.delivery_date)):null,p=(0,h.t)({week:u||""}),f=p.isLoading,g=p.isError,v=c?k(c,a):void 0,x=new Map;return u&&(null===(n=p.data)||void 0===n?void 0:null===(t=n.items)||void 0===t?void 0:t[0])&&x.set(u,p.data.items[0]),{isLoading:s||f,isError:d||g,details:v,recipes:(0,b.D)(null!==(i=null==c?void 0:c.items)&&void 0!==i?i:[],x,null==c?void 0:null===(o=c.delivery)||void 0===o?void 0:o.delivery_date)}},C=t(277425),D=t(318066),P=t(295332),I=function(e){var r=e.split("-");if(r.length<4)return null;var t=r[2],n=r[3];return/^\d{4}$/.test(t)&&/^\d{4}$/.test(n)?{from:"".concat(t.slice(0,2),":").concat(t.slice(2)),to:"".concat(n.slice(0,2),":").concat(n.slice(2))}:null};function A(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}var E="/hellofresh_website/empty-dish-thumbnail.png",B=function(e){var r,t,o,i,a=e.order,l=e.variant,c=e.onViewOrder,d=e.onCookRecipes,p=(0,u.H)().translateRaw,m=function(){if(!a.deliveryOptionHandle)return null;var e=I(a.deliveryOptionHandle);if(!e)return null;var r=function(e){var r,t=parseInt((function(e){if(Array.isArray(e))return e}(r=e.split(":"))||function(e,r){var t,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=(t=o.next()).done)&&(i.push(t.value),1!==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}}(r,1)||function(e,r){if(e){if("string"==typeof e)return A(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A(e,1)}}(r,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],10);return Number.isNaN(t)?e:"".concat(t%12||12).concat(t>=12?"pm":"am")};return{from:r(e.from),to:r(e.to)}},f=null===(o=a.recipes[0])||void 0===o?void 0:o.imageUrl,g=f?(0,C.Z)(f):E;return(0,n.tZ)(s.xu,{borderWidth:"1px",borderStyle:"solid",borderColor:"neutral.700",borderRadius:"border-radius-lg",padding:"global.sm-2",display:"flex",flexDirection:["column","row"],alignItems:["stretch","center"],justifyContent:"space-between",gap:"global.md-1",children:(0,n.BX)(s.xu,{display:"flex",flexDirection:["column","column","row"],gap:"global.md-1",flexGrow:1,children:[(0,n.BX)(s.xu,{display:"flex",gap:["global.xs","global.md-1"],width:"100%",flexDirection:["row","row-reverse"],justifyContent:["space-between","flex-end"],children:[(0,n.BX)(s.xu,{children:[(0,n.tZ)(s.xv,{type:"body-md-bold",color:"upcoming"===(a.orderStatus||l)?"alias.brand.foreground.default":"neutral.600",children:function(){var e=a.orderStatus||l;switch(e){case"upcoming":case"processing":case"shipped":case"delivered":case"cancelled":return p("creator_marketplace.account_settings.orders.status.".concat(e))||e.charAt(0).toUpperCase()+e.slice(1);default:return p("creator_marketplace.account_settings.orders.status.upcoming")||"Upcoming"}}()}),(0,n.tZ)(s.xv,{as:"h2",sizes:"headline-md-desktop",color:"neutral.800",children:(r=a.deliveryDate,(0,P.Z)((0,w.Z)(r),"ddd, MMM D"))}),(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",width:"100%",gap:"global.xs",children:[(0,n.tZ)(s.xv,{type:"body-sm-regular",color:"neutral.600",children:function(){if("upcoming"===l){var e,r,t,n,o=m();return p("creator_marketplace.account_settings.orders.expected_time",{from:null!==(e=null==o?void 0:o.from)&&void 0!==e?e:"8am",to:null!==(r=null==o?void 0:o.to)&&void 0!==r?r:"9pm"})||"Expected by ".concat(null!==(t=null==o?void 0:o.from)&&void 0!==t?t:"8am","-").concat(null!==(n=null==o?void 0:o.to)&&void 0!==n?n:"9pm")}return p("creator_marketplace.account_settings.orders.meals_count",{count:a.recipesCount})||"".concat(a.recipesCount," ").concat(1===a.recipesCount?"meal":"meals")}()}),(0,n.tZ)(s.xv,{type:"body-sm-regular",color:"neutral.600",children:[(t=a.shippingAddress).address1,t.city,t.postcode].filter(
1Boolean).join(", ")})]})]}),(0,n.tZ)(s.xu,{display:["flex"],position:"relative",flexShrink:0,width:["60px","135px"],height:["60px","135px"],borderRadius:"border-radius-lg",overflow:"hidden",children:(0,n.tZ)(D.ZP,{src:g,alt:(null===(i=a.recipes[0])||void 0===i?void 0:i.name)||"Order",fill:!0,sizes:"(min-width: 768px) 135px, 60px",style:{objectFit:"cover"},fallbacksrc:E})})]}),(0,n.tZ)(s.xu,{display:"flex",flexDirection:"column",gap:"global.xs",width:"100%",maxWidth:[null,null,"33.33%"],justifyContent:["flex-start","center"],children:function(){if("upcoming"===l)return(0,n.tZ)(s.zx.Primary,{onClick:c,width:"100%",children:p("creator_marketplace.account_settings.orders.view_order")||"View order"});var e=!!d&&"cancelled"!==a.orderStatus&&void 0!==a.daysSinceDelivery&&a.daysSinceDelivery<=14;return(0,n.BX)(n.HY,{children:[e&&(0,n.tZ)(s.zx.Primary,{onClick:d,width:"100%",children:p("creator_marketplace.account_settings.orders.cook_recipes")||"Cook recipe(s)"}),(0,n.tZ)(s.zx.Tertiary,{onClick:c,width:"100%",children:p("creator_marketplace.account_settings.orders.view_receipt")||"View receipt"})]})}()})]})})},R=t(342058),X=t(268481),L=function(e){var r=e.onMaybeLater,t=e.onContactUs,o=(0,u.H)().translateRaw;return(0,n.BX)(s.xu,{pt:"global.sm-2",display:"flex",gap:"global.xs",children:[(0,n.tZ)(s.zx.Secondary,{size:"sm","data-test-id":"order-help-panel-later-cta",onClick:r,children:o("creator_marketplace.account_settings.orders.help_panel.maybe_later")||"Maybe later"}),(0,n.tZ)(s.zx.Primary,{size:"sm","data-test-id":"order-help-panel-contact-cta",onClick:t,children:o("creator_marketplace.account_settings.orders.help_panel.contact_us")||"Contact us"})]})},H=t(900223),T=t(384949),M=function(e){var r=e.orderId,t=e.deliveryDate,o=e.items,i=e.subtotalFormatted,a=e.shippingFormatted,l=e.totalFormatted,c=e.isPaid,d=e.isLoading,p=e.showGetHelpButton,m=e.onGetHelp,f=(0,u.H)().translateRaw;return(0,n.BX)(n.HY,{children:[(0,n.BX)(s.xu,{marginBottom:"global.sm-2","data-test-id":"order-summary-metadata",children:[(0,n.tZ)(s.xv,{type:"body-sm-regular",children:(0,P.Z)((0,w.Z)(t),T.He)}),(0,n.BX)(s.xv,{as:"p",type:"body-sm-bold",children:[f("creator_marketplace.account_settings.orders.order_number")||"Order number"," ","- ",r]})]}),(0,n.tZ)(s.xu,{flex:1,paddingBottom:"global.md-1",children:(0,n.tZ)(H.$,{items:o,subtotalFormatted:i,shippingFormatted:a,discountFormatted:null,totalFormatted:l,isLoading:d})}),(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",gap:"global.xs",paddingTop:"global.sm-2",children:[c&&(0,n.tZ)(s.xu,{display:"flex",justifyContent:"flex-end",marginBottom:"global.xs",children:(0,n.tZ)(s.xv,{type:"body-md-regular",children:f("creator_marketplace.account_settings.orders.payment_status_paid")||"Paid"})}),p&&m&&(0,n.tZ)(s.zx.Secondary,{onClick:m,width:"100%","data-test-id":"order-summary-get-help-button",children:f("creator_marketplace.account_settings.orders.get_help")||"Get help with this order"})]})]})};function N(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}var F=function(e){var r,t,i=e.isOpen,a=e.onClose,l=e.triggerRef,c=e.orderId,d=e.variant,p=e.onGetHelp,f=(0,u.H)().translateRaw,g=(0,m.nB)(),y=(0,X.Sj)(),h=S({orderId:c}),b=h.details,v=h.recipes,x=h.isLoading,w="mobile"===y,_=function(e){if(Array.isArray(e))return e}(r=(0,o.useState)(!1))||function(e,r){var t,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=(t=o.next()).done)&&(i.push(t.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}}(r,2)||function(e,r){if(e){if("string"==typeof e)return N(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N(e,2)}}(r,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.")}(),O=_[0],k=_[1],Z=null!==(t=null==v?void 0:v.map(function(e){var r;return{recipeId:e.id,recipeName:e.name,imageUrl:e.imageUrl,servings:e.servings,basePriceCents:e.basePriceCents,baseServings:null!==(r=e.baseServings)&&void 0!==r?r:e.servings}}))&&void 0!==t?t:[],j=(null==b?void 0:b.shippingAmount)?100*b.shippingAmount:0,C=g(b?100*b.totalAmount-j:0),D=g(j),P=b?g(100*b.totalAmount):"",I=null==b?void 0:b.isPaid,A="upcoming"===d||(null==b?void 0:b.orderStatus)==="delivered"&&void 0!==b.daysSinceDelivery&&b.daysSinceDelivery<=14;return(0,n.BX)(s.dy.Container,{"aria-label":f("creator_marketplace.order_summary.title"),placement:w?"bottom":"right",isOpen:i,isModal:!0,isTouchMoveEnabled:!0,hideCloseButton:!0,returnFocusRef:l,onDismiss:a,onClose:a,width:w?"100%":"500px",children:[(0,n.BX)(s.xu,{display:"flex",alignItems:"center",justifyContent:O?"flex-end":"space-between",paddingY:"global.sm-1",children:[!O&&(0,n.tZ)(s.xv,{as:"h2",styleAs:"h3",color:"neutral.800",children:f("creator_marketplace.order_summary.title")}),(0,n.tZ)(s.hU.Tertiary,{"aria-label":f("creator_marketplace.order_summary.close_drawer.accessibility_label"),icon:(0,n.tZ)(R.default,{}),onClick:a,"data-test-id":"account-order-summary-drawer-close-button"})]}),(0,n.tZ)(s.xu,{paddingBottom:"global.md-1",overflowY:"auto",children:O&&p?(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",gap:"global.sm-2",children:[(0,n.tZ)(s.xu,{display:"flex",justifyContent:"center",paddingY:"global.md-1",children:(0,n.tZ)("img",{src:"https://img.hellofresh.com/f_auto,q_auto,w_200/hellofresh_website/us/my-deliveries-fragment/delivery-check-in/other-issues.svg",alt:"",width:80,height:80})}),(0,n.tZ)(s.xv,{as:"h3",textAlign:"center",children:f("creator_marketplace.account_settings.orders.help_panel.title")||"We're terribly sorry that you are facing issues"}),(0,n.tZ)(s.xv,{type:"body-md-regular",color:"neutral.600",textAlign:"center",children:f("creator_marketplace.account_settings.orders.help_panel.subtitle")||"Would you like to explain the issue further? Remember, you can always access this tool later if you're busy"}),(0,n.tZ)(L,{onMaybeLater:function(){return k(!1)},onContactUs:p})]}):b?(0,n.tZ)(M,{orderId:c,deliveryDate:b.deliveryDate,items:Z,subtotalFormatted:C,shippingFormatted:D,totalFormatted:P,isPaid:I,isLoading:x,showGetHelpButton:A,onGetHelp:function(){return k(!0)}}):null})]})},z=t(508065),U=t(696328),Y=t(113822),V=t(273656),G=function(e){var r,t=y({orderId:e}),n=t.order,i=t.isLoading,a=t.isError,l=(0,U.z)(),c=(0,Y.Q)().map,s=(null==n?void 0:null===(r=n.delivery)||void 0===r?void 0:r.delivery_date)?(0,Z.Z)((0,w.Z)(n.delivery.delivery_date)):null,d=(0,V.rS)({weeks:s||"",exclude:[],product:"menu-addons-creator-marketplace"},{enabled:!!n&&!!s,staleTime:6e5,cacheTime:18e5,suspense:!1});return{recipes:(0,o.useMemo)(function(){var e=null===(u=d.data)||void 0===u?void 0:null===(s=u.items)||void 0===s?void 0:s[0];if(!n||!e)return[];var r=new Set,t=[],o=!0,i=!1,a=void 0;try{for(var s,u,p,m=n.items[Symbol.iterator]();!(o=(p=m.next()).done);o=!0){var f=p.value,g=!0,y=!1,h=void 0;try{for(var b,v,x=(null!==(b=f.customer_selections)&&void 0!==b?b:[])[Symbol.iterator]();!(g=(v=x.next()).done);g=!0)!function(){var n=v.value,o=e.courses.find(function(e){return e.index===n.index});if(!(!(null==o?void 0:o.recipe)||r.has(o.recipe.id))){r.add(o.recipe.id);var i=l(o),a=c.get(o.recipe.id);t.push(a?function(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({},i),{creator:a}):i)}}()}catch(e){y=!0,h=e}finally{try{g||null==x.return||x.return()}finally{if(y)throw h}}}}catch(e){i=!0,a=e}finally{try{o||null==m.return||m.return()}finally{if(i)throw a}}return t},[n,d.data,c,l]),isLoading:i||d.isLoading,isError:a||d.isError}},$={server:1.2,mobile:1.2,tablet:3,desktop:4.2},W=function(e){var r,t=e.isOpen,o=e.onClose,i=e.triggerRef,a=e.orderId,l=(0,u.H)().translateRaw,c=(0,X.Sj)(),d=G(a),p=d.recipes,m=d.isLoading,f=d.isError,g=null!==(r=$[c])&&void 0!==r?r:$.desktop,y=l("creator_marketplace.account_settings.orders.cooking_drawer.title")||"What would you like to cook?",h=l("creator_marketplace.account_settings.orders.cooking_drawer.subtitle")||"Find the recipe instructions in the details.";return(0,n.tZ)(s.dy.Container,{"aria-label":y,placement:"bottom",isOpen:t,isModal:!0,isTouchMoveEnabled:!0,hideCloseButton:!0,returnFocusRef:i,onDismiss:o,onClose:o,width:"100%",children:(0,n.BX)(s.xu,{maxWidth:"1320px",width:"100%",display:"flex",flexDirection:"column",marginX:"auto",children:[(0,n.BX)(s.xu,{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingY:"global.md-1",width:"100%",children:[(0,n.BX)(s.xu,{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"global.xs",children:[(0,n.tZ)(s.xv,{as:"h2",color:"neutral.800",children:y}),(0,n.tZ)(s.xv,{type:"body-md-regular",color:"neutral.600",children:h})]}),(0,n.tZ)(s.xu,{position:"absolute",top:0,right:0,children:(0,n.tZ)(s.hU.Tertiary,{"aria-label":l("creator_marketplace.order_summary.close_drawer.accessibility_label")||"Close drawer",icon:(0,n.tZ)(R.default,{}),onClick:o,"data-test-id":"cooking-drawer-close-button"})})]}),(0,n.tZ)(s.xu,{paddingBottom:"global.md-1",overflowY:"auto",children:f?(0,n.tZ)(s.xv,{as:"p",role:"alert",color:"global.cherry.500",children:l("creator_marketplace.account_settings.orders.cooking_drawer.error")||"Could not load recipes. Please try again."}):m?(0,n.tZ)(s.xu,{display:"flex",gap:"global.sm-2",children:Array.from({length:Math.floor(g)+1}).map(function(e,r){return(0,n.tZ)(s.xu,{flexShrink:0,width:"".concat(100/g,"%"),children:(0,n.tZ)(z.v.Skeleton,{})},r)})}):p.length?(0,n.tZ)(s.lr,{id:"cooking-drawer-carousel",perPage:g,snapAlign:"start",autosnap:!0,partialSlideView:g%1>0,showArrowNavigation:!1,showBulletPagination:!1,paddingX:"global.none","data-test-id":"cooking-drawer-recipe-carousel",children:p.map(function(e,r){return(0,n.tZ)(s.xu,{paddingRight:"global.sm-2",children:(0,n.tZ)(z.v,{recipe:e,isPrefetch:r<Math.ceil(g),navigateWithOpenDrawer:!0,fromParam:"account",hideFooter:!0})},e.id)})}):null})]})})},K=function(e){var r=e.type,t=e.message,o=e.onDismiss,i=(0,u.H)().translateRaw;return(0,n.BX)(s.xu,{role:"error"===r?"alert":"status","aria-live":"error"===r?"assertive":"polite",padding:"global.sm-2",borderRadius:"border-radius-md",backgroundColor:"success"===r?"global.mint.100":"global.cherry.100",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,n.tZ)(s.xv,{type:"body-md-regular",color:"success"===r?"global.mint.700":"global.cherry.700",children:t}),(0,n.tZ)(s.hU.Tertiary,{onClick:o,"aria-label":i("creator_marketplace.account_settings.orders.dismiss")||"Dismiss",icon:(0,n.tZ)(R.default,{})})]})};function J(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function q(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,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=(t=o.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}(e,r)||ee(e,r)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ee(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,r){if(e){if("string"==typeof e)return J(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return J(e,r)}}var er=function(e){var r=q((0,o.useState)({isOpen:!1,orderId:null,variant:"upcoming"}),2),t=r[0],n=r[1],i=q((0,o.useState)(null),2),a=i[0],l=i[1],c=q((0,o.useState)(null),2),s=c[0],d=c[1];return{drawerState:t,notification:a,setNotification:l,handleViewOrder:function(e,r){n({isOpen:!0,orderId:e,variant:r})},handleCloseDrawer:function(){n({isOpen:!1,orderId:null,variant:"upcoming"})},handleGetHelp:function(){var r=Q(e.upcoming).concat(Q(e.past)).find(function(e){return e.id===t.orderId});r&&(window.location.href="/contact-us?orderId=".concat(r.id,"&deliveryDate=").concat(r.deliveryDate))},cookingDrawerOrderId:s,handleCookRecipes:function(e){d(e)},handleCloseCookingDrawer:function(){d(null)}}},et=function(){var e=j(),r=e.upcoming,t=e.past,i=e.isLoading,a=e.isError,l=(0,u.H)().translateRaw,c=(0,p.S)().trackPastOrderClick,m=er({upcoming:r,past:t}),f=m.drawerState,g=m.notification,y=m.setNotification,h=m.handleViewOrder,b=m.handleCloseDrawer,v=m.handleGetHelp,x=m.cookingDrawerOrderId,w=m.handleCookRecipes,_=m.handleCloseCookingDrawer,O=(0,o.useRef)(null),k=(0,o.useRef)(null),Z=function(e){c({orderId:e}),h(e,"past")},S=function(e,r){k.current=e.currentTarget,w(r)};return i?(0,n.tZ)(s.xu,{"data-test-id":"account-orders-page",children:(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",gap:"global.sm-1",children:[(0,n.tZ)(d.K,{width:"100%",height:"200px"}),(0,n.tZ)(d.K,{width:"100%",height:"200px"}),(0,n.tZ)(d.K,{width:"100%",height:"200px"})]})}):a?(0,n.tZ)(s.xu,{"data-test-id":"account-orders-page",children:(0,n.tZ)(s.xv,{color:"global.cherry.500",children:l("creator_marketplace.account_settings.orders.error")||"Failed to load orders. Please try again."})}):(0,n.BX)(s.xu,{"data-test-id":"account-orders-page",children:[(0,n.BX)(s.xu,{display:"flex",flexDirection:"column",gap:"global.md-1",children:[g&&(0,n.tZ)(K,{type:g.type,message:g.message,onDismiss:function(){return y(null)}}),(0,n.BX)(s.xu,{children:[(0,n.tZ)(s.xu,{marginBottom:"global.md-1",children:(0,n.tZ)(s.xv,{as:"h2",sizes:"headline-lg-desktop",children:l("creator_marketplace.account_settings.orders.upcoming_title")||"Your upcoming orders"})}),0===r.length?(0,n.tZ)(s.xv,{color:"neutral.600",children:l("creator_marketplace.account_settings.orders.upcoming_empty")||"You have no upcoming orders."}):(0,n.tZ)(s.xu,{display:"flex",flexDirection:"column",gap:"global.xs",children:r.map(function(e){return(0,n.tZ)(B,{order:e,variant:"upcoming",onViewOrder:function(){return h(e.id,"upcoming")}},e.id)})})]}),(0,n.BX)(s.xu,{children:[(0,n.tZ)(s.xu,{marginBottom:"global.sm-1",children:(0,n.tZ)(s.xv,{as:"h2",sizes:"headline-lg-desktop",children:l("creator_marketplace.account_settings.orders.past_title")||"Past orders"})}),(0,n.tZ)(s.xu,{marginBottom:"global.md-1",children:(0,n.tZ)(s.xv,{sizes:"body-md-regular",color:"neutral.600",children:l("creator_marketplace.account_settings.orders.past_subtitle")||"Review your previous orders and reorder your favourites."})}),0===t.length&&0===r.length?(0,n.tZ)(s.xv,{color:"neutral.600",children:l("creator_marketplace.account_settings.orders.empty_state")||"You haven't placed any orders yet. Browse recipes to get started!"}):t.length>0?(0,n.tZ)(s.xu,{display:"flex",flexDirection:"column",gap:"global.sm-2",children:t.map(function(e){return(0,n.tZ)(B,{order:e,variant:"past",onViewOrder:function(){return Z(e.id)},onCookRecipes:function(r){return S(r,e.id)}},e.id)})}):null]})]}),f.orderId&&(0,n.tZ)(F,{isOpen:f.isOpen,onClose:b,triggerRef:O,orderId:f.orderId,variant:f.variant,onGetHelp:v}),x&&(0,n.tZ)(W,{isOpen:!0,onClose:_,triggerRef:k,orderId:x})]})},en=function(e){return e.ssrPayload,(0,n.tZ)(a.F,{redirectPathIfGuest:(0,l.sF)(),children:(0,n.tZ)(c.R,{children:(0,n.tZ)(et,{})})})};en.customLayout=i.C;var eo=!0,ei=en},797634:function(e,r,t){"use strict";t.d(r,{P:function(){return f}});var n=t(687800),o=t(827378),i=t(857222),a=t(768587),l=t(259955),c=t(537850),s=t(902400),d=function(e){var r,t,o=e.onClick,i=e.onKeyDown,l=e.testId,c=e.ariaLabel;return(0,n.tZ)(a.xu,(r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}
1))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({as:"button",type:"button",onClick:o,onKeyDown:i,"data-test-id":l,"aria-label":c,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",borderStyle:"none",color:"global.white",cursor:"pointer",paddingX:"global.sm-2",height:"100%",borderRadius:"border-radius-md"},{pseudo:{"@media (hover: hover)":{":hover":{backgroundColor:"alias.buttons.base.primary.bcg.hover"}},":active":{backgroundColor:"alias.buttons.base.primary.bcg.press"}}}),t=t={children:(0,n.tZ)(a.JO,{icon:(0,n.tZ)(s.Z,{}),color:"global.white"})},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}),r))};function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function p(){var e,r,t=(e=["\n  [data-radix-popper-content-wrapper]:has([data-test-id$='-max-tooltip']) {\n    /* Radix sets z-index: auto inline on the wrapper, so !important is\n       required to override it from a stylesheet. */\n    z-index: 30 !important;\n  }\n"],r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}})));return p=function(){return t},t}var m=(0,i.vJ)(p()),f=function(e){var r,t,i,s=e.recipeName,p=e.decrementTestId,f=e.incrementTestId,g=e.onDecrement,y=e.onIncrement,h=e.isIncrementDisabled,b=void 0!==h&&h,v=e.children,x=(0,c.H)().translateRaw,w=function(e){if(Array.isArray(e))return e}(r=(0,o.useState)(!1))||function(e,r){var t,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=(t=o.next()).done)&&(i.push(t.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}}(r,2)||function(e,r){if(e){if("string"==typeof e)return u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,2)}}(r,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.")}(),_=w[0],O=w[1],k=x("creator_marketplace.recipe_card.stepper_aria_label",{recipeName:s,defaultValue:"{{recipeName}} servings"}),Z=x("creator_marketplace.recipe_card.decrease_servings_aria_label",{recipeName:s,defaultValue:"Decrease {{recipeName}} servings"}),j=x("creator_marketplace.recipe_card.increase_servings_aria_label",{recipeName:s,defaultValue:"Increase {{recipeName}} servings"}),S=x("creator_marketplace.recipe_card.stepper.max_servings_reached")||"Maximum servings reached",C=(0,o.useRef)(null),D=(0,o.useCallback)(function(){O(!0),C.current&&clearTimeout(C.current),C.current=setTimeout(function(){return O(!1)},3e3)},[]);(0,o.useEffect)(function(){return function(){C.current&&clearTimeout(C.current)}},[]);var P=(0,o.useCallback)(function(e){"ArrowUp"!==e.key||b?"ArrowDown"===e.key&&(e.preventDefault(),g(e)):(e.preventDefault(),y(e))},[y,g,b]),I=(0,n.tZ)(a.xu,(t=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}({as:"button",type:"button",onClick:b?D:y,onKeyDown:P,"data-test-id":f,"aria-label":j,"aria-disabled":b,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",borderStyle:"none",color:"global.white",cursor:b?"not-allowed":"pointer",opacity:b?.4:1,paddingX:"global.sm-2",height:"100%",borderRadius:"border-radius-md"},!b&&{pseudo:{"@media (hover: hover)":{":hover":{backgroundColor:"alias.buttons.base.primary.bcg.hover"}},":active":{backgroundColor:"alias.buttons.base.primary.bcg.press"}}}),i=i={children:(0,n.tZ)(a.JO,{icon:(0,n.tZ)(l.Z,{}),color:"global.white"})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):(function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}),t)),A=b?(0,n.BX)(n.HY,{children:[(0,n.tZ)(m,{}),(0,n.tZ)(a.u,{trigger:I,content:S,variant:"dark",position:"top",placement:"center",asChild:!0,portal:!0,textProps:{type:"body-xs-regular"},isVisible:_,"data-test-id":f?"".concat(f,"-max-tooltip"):void 0})]}):I;return(0,n.BX)(a.xu,{role:"group","aria-label":k,"aria-roledescription":"Servings stepper",display:"flex",alignItems:"center",backgroundColor:"neutral.800",borderRadius:"border-radius-md",width:"100%",height:"48px",children:[(0,n.tZ)(d,{onClick:g,onKeyDown:P,testId:p,ariaLabel:Z}),(0,n.tZ)(a.xu,{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minWidth:0,whiteSpace:"nowrap","aria-hidden":!0,children:v}),A]})}},978199:function(e,r,t){"use strict";t.d(r,{k:function(){return n}});var n=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",t=e>=1e3?"+":"";return new Intl.NumberFormat(r,{notation:e>=1e3?"compact":"standard",compactDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:1}).format(e)+t}}},function(e){e.O(0,[38579,94924,10198,17925,49461,78255,24007,7882,68368,71316,8065,92888,49774,40179],function(){return e(e.s=48485)}),_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.