1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[6654],{63252(e,t,r){r.d(t,{a8:()=>d,rQ:()=>c}),r(92860);var n=r(35849),s=r(45825);r(49433),r(38048);var l=n.programTypes.threePM,i=n.programTypes.snackMagic,o=n.programTypes.bulk,a=n.programTypes.swagMagic,c=function(e){switch(e){case l:return"theme-pink";case i:case o:return"theme-blue";default:return""}},d=function(e){var t=e.program,r=void 0===t?i:t,n=e.type,l=void 0===n?"logo":n;switch(r){case i:case o:return"link"===l?s.hr:"base"===l?s.I:"icon-link"===l||"mini"===l?s.YE:s.JL;case a:return"base"===l?s.kH:s.BM;default:throw Error("Wrong params specified, program = ".concat(r," and type = ").concat(l))}}},95554(e,t,r){r.r(t),r.d(t,{default:()=>q});var n=r(92860),s=r(32840),l=r(51603),i=r(86107),o=r(23182),a=r(96030),c=r(22426),d=r(59415),u=r(52809),m=r(1256),f=r(47996),p=r.n(f),x=r(40655),h=r(32308),v=r(56870),b=r(32030),y=r(61025),j=r(58534),g=r(31514),w=r(68152),N=r(78584),S=r(49433),O=r(38048);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){I(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function I(e,t,r){return(t=function(e){var t=function(e){if("object"!=A(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(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 P={},E=function(e){var t,r,l=e.product,o=void 0===l?P:l,a=(0,s.useDispatch)(),c=(0,s.useSelector)(i.uy),d=(t=(0,n.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,l,i,o=[],a=!0,c=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);a=!0);}catch(e){c=!0,s=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw s}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=d[0],f=d[1],A=(0,v.A)(o),k=A.isSoldOut,I=A.qtyInCart,E=A.isUpdatingCart,M=A.populateCart,D=A.openDetailViewModal,U=A.productVariants,Y=o.restaurantId,F=o.imageUrls,L=o.name,Q=o.shippedSeparately,B=void 0!==Q&&Q,R=o.slug,V=o.id,q=!!I,G=((null==c?void 0:c[Y])||P).name,H=q||E||k||m,$=function(){return a((0,u.wy)({productIds:[V]}))};return(0,O.jsxs)("div",{className:"row no-gutters pb-4 mb-4 border-bottom align-items-center position-relative ".concat(k?"soldout-product-tile":""),children:[(0,O.jsx)("div",{className:"col-3 col-md-2 col-xl-1 pr-3",children:(0,O.jsxs)("div",{className:"square-image-holder ".concat(k?"soldout-label":""),onClick:D,children:[(0,O.jsx)(w.A,{imageUrls:F,name:L}),(0,O.jsx)("div",{className:"position-absolute w-100 d-flex align-items-center p-2 p-2xl-2",children:B&&(0,O.jsx)(g.A,{containerClasses:"bg-light rounded fs-1-5 text-a1 px-2 px-2xl-2 py-1 py-2xl-1 ml-auto",iconClass:"d-flex",iconOnly:!0})})]})}
1),(0,O.jsxs)("div",{className:"col-6 col-md-7 col-xl-4 pr-3",children:[!!G&&(0,O.jsx)("div",{className:"fs-8px fs-md-10px font-weight-bold ls-1 text-uppercase text-a1 mb-2",children:G}),(0,O.jsx)(h.N_,{to:S.MU.replace(":productSlug",R),className:"fs-14px fs-md-16px font-weight-bold text-dark mb-2 d-block",title:L.length>=30?L:"",children:L}),(0,O.jsx)(j.A,C({},p()(o,["subitemsCount","weight","measurementUnit"])))]}),(0,O.jsx)("div",{className:"col-md-6 col-xl-2 order-1 order-xl-0 mt-3 mt-xl-0 pr-md-3",children:U.length>1&&(0,O.jsx)(N.A,{value:o,variants:U,onSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(Number(V)!==Number(e)){f(!0);var t={oldProductId:V,newProductId:e};a((0,u.Fz)(t)).then(function(){f(!1)}).catch(function(e){throw f(!1),e})}}})}),(0,O.jsx)("div",{className:"col-md-6 col-xl-3 text-center order-1 order-xl-0 mt-3 mt-xl-0 pl-md-3",children:(0,O.jsx)("div",{className:"d-xl-inline-block",children:(0,O.jsx)(x.Ay,{disabled:!k,interactive:!0,content:(0,O.jsx)("div",{className:"p-2 fs-12",children:"You cannot add more quantity, as the product is sold out"}),children:(0,O.jsx)("span",{children:(0,O.jsx)(b.Q$,{disabled:H,className:"btn btn-block btn-primary text-white fs-10px h-34px lh-32px py-0 px-4 border-radius-8px",onClick:H?null:M,isLoading:E,children:k?"SOLD OUT":q?"ADDED TO BAG":"+ ADD TO BAG"})})})})}),(0,O.jsxs)("div",{className:"col-auto ml-auto pr-xl-3 position-static",children:[(0,O.jsx)("div",{className:"text-right mb-3 d-xl-none position-absolute top-0 right-0",children:(0,O.jsx)(b.Qd,{btnStyle:"no-style",onClick:$,className:"common-close-button icon-times w-20px h-20px fs-10px "})}),(0,O.jsx)(y.A,C(C({},p()(o,["id","price","priceWithTax","topItOff"])),{},{customClass:"fs-14px fs-md-20px font-weight-bold flex-column align-items-stretch text-lg-right",showPriceConversion:!1}))]}),(0,O.jsx)("div",{className:"col-md-auto d-none d-xl-block",children:(0,O.jsx)(b.Qd,{btnStyle:"no-style",className:"common-close-button icon-times w-30px h-30px fs-14px",onClick:$})})]})},M=r(36729),D=r(83715),U=r(67183),Y=r(6951),F=r(31869),L=r(6645),Q=r(29246);function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,l,i,o=[],a=!0,c=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);a=!0);}catch(e){c=!0,s=e}finally{try{if(!a&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw s}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(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 V=L.YY.CLEAR_FAVORITES.success;const q=function(){var e=(0,s.useDispatch)(),t=(0,s.useSelector)(i.Ql),r=(0,s.useSelector)(o.IA),f=B((0,n.useState)(!1),2),p=f[0],x=f[1],h=B((0,n.useState)(null),2),v=h[0],y=h[1],j=(0,s.useSelector)(a.m5),g=(0,s.useSelector)(c.j),w=(0,s.useSelector)(o.At);(0,n.useEffect)(function(){null!=g&&g.id&&null===v&&(y(!0),e((0,m.Yr)(g.id,w)).finally(function(){y(!1)}).catch(function(e){throw e}))},[v,g,e,w]);var N=(0,n.useMemo)(function(){return(0,d.NV)(j,"productId").slice(-Q.mB)},[v]),S=r.length;(0,n.useEffect)(function(){S>0&&(x(!0),e((0,u.JM)()).finally(function(){return x(!1)}).catch(function(e){throw e}))},[S,e]);var A=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(D.A,{}),(0,O.jsx)("div",{className:"border-bottom",children:(0,O.jsxs)("div",{className:"py-4 ",children:[(0,O.jsx)("div",{className:"fs-24px font-weight-bold lh-1-5",children:"You have no saved items"}),(0,O.jsxs)("div",{className:"fs-14px lh-1-5",children:["You can add items to your Favorites by clicking"," ",(0,O.jsx)("i",{className:"sm-icon-v2-heart align-middle d-inline-flex"})," on any item."]})]})}),(0,O.jsx)("div",{className:"py-4",children:(0,O.jsx)("div",{className:"row",children:(0,O.jsxs)("div",{className:"col-lg-6 mx-auto",children:[(0,O.jsxs)("div",{className:"d-flex align-items-center my-5",children:[(0,O.jsx)("div",{className:"w-45px flex-shrink-0",children:(0,O.jsx)("img",{src:Y,className:"w-100",alt:"Save Time"})}),(0,O.jsxs)("div",{className:"pl-3 pl-md-4 flex-grow-1",children:[(0,O.jsx)("div",{className:"fs-18px font-weight-bold lh-1-5",children:"Save Time"}),(0,O.jsx)("div",{className:"fs-14px lh-1-5",children:"Easily see snacks you want to try all in one place."})]})]}),(0,O.jsxs)("div",{className:"d-flex align-items-center my-5",children:[(0,O.jsx)("div",{className:"w-45px flex-shrink-0",children:(0,O.jsx)("img",{src:F,className:"w-100",alt:"Save Time"})}),(0,O.jsxs)("div",{className:"pl-3 pl-md-4 flex-grow-1",children:[(0,O.jsx)("div",{className:"fs-18px font-weight-bold lh-1-5",children:"Personalized Menu"}),(0,O.jsx)("div",{className:"fs-14px lh-1-5",children:"Have your own go-to menu of snacks for when cravings occur."})]})]})]})})})]}),k=(0,O.jsxs)(M.FM,{isLoading:p,children:[(0,O.jsx)("div",{className:"border-bottom",children:(0,O.jsxs)("div",{className:"py-4 ",children:[(0,O.jsx)("div",{className:"fs-24px font-weight-bold lh-1-5",children:"Your Favorites"}),(0,O.jsx)("div",{className:"fs-14px lh-1-5"}),(0,O.jsxs)("div",{className:"d-flex mt-2",children:[(0,O.jsxs)("div",{className:"fs-12px ls-1-5px font-weight-bold text-a1",children:[S," ",S>1?"ITEMS":"ITEM"]}),(0,O.jsx)("div",{className:"ml-auto",children:(0,O.jsx)(b.Dc,{buttonText:"Remove All Items",customClass:"fs-12px ls-1-5px font-weight-bold text-a1 ml-auto text-danger text-uppercase",onClickAction:function(){e((0,u.HC)()).then(function(){(0,l.GenerateMsg)("success",V)}).catch(function(e){throw e})}})})]})]})}),(0,O.jsx)("div",{className:"py-4",children:r.map(function(e){var r=t[e];return r?(0,O.jsx)(E,{product:r},e):""})})]});return(0,O.jsxs)("div",{className:"container px-md-5",children:[(0,O.jsx)(D.A,{}),0===S?A:k,(0,O.jsx)(U.A,{title:"Our Recommendations",productIds:N})]})}}}]);
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.