1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1124],{181:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/loyalty",function(){return s(12904)}])},12904:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>g,default:()=>V});var n=s(37876),c=s(48230),a=s.n(c),o=s(62429),l=s(78799),r=s(14232),d=s(99783),m=s(51819),i=s(14059);let u=(e,t)=>(e.setMonth(e.getMonth()+t),e);var x=s(18813),h=s(54587),f=s.n(h),v=s(51211);function b(e){let{suptitle:t=v.loyaltyPage.YourStatus,title:s,subtitle:c,colors:a,image:o}=e;return(0,n.jsxs)("div",{className:"mt-4 md:flex w-full items-center mb-8",children:[o&&(0,n.jsx)("div",{className:"md:pr-10",children:(0,n.jsx)("div",{className:"relative w-28 h-28 mx-auto mb-8 md:mb-0",children:(0,n.jsx)(f(),{layout:"fill",src:o,alt:s})})}),(0,n.jsxs)("div",{className:"md:flex-grow-1 md:pb-2 font-medium text-gray-500",children:[(0,n.jsx)("p",{children:t}),(0,n.jsx)("h1",{className:"mt-1 mb-2 font-serif ".concat(a.text," text-4xl lg:text-5xl"),children:s}),(0,n.jsx)("p",{children:c})]})]})}var g=!0;function V(e){let{memberSince:t}=e,{statusBannerTitle:s,statusBannerSubtitle:c,image:h,colors:f}=(e=>{let t="es-es"===l.vV?12:6,s=(0,i.nI)(e,new Date),n=(0,i.jU)(e),c="en-gb"===l.vV&&n>=6,a=c?l.fZ:l.uE,o=(0,r.useMemo)(()=>{if("es-es"===l.vV){let e=n>=12?Math.floor(n/12):0,t=n-12*e,c=Math.floor(s),a="";return 0===n?a="".concat(c," ").concat(1===c?"d\xeda":"d\xedas"):(a=0===t?"":"".concat(t," ").concat(1===t?"mes":"meses"),e>0&&(a="".concat(e," ").concat(1===e?"a\xf1o":"a\xf1os").concat(0===t?"":" y ").concat(a))),"Miembro desde hace ".concat(a)}return c?"Birchbox VIP":"Member"},[c,n,s]),x=(0,r.useMemo)(()=>{if("es-es"!==l.vV&&"en-gb"!==l.vV)return"";let e=d.A[l.vV].reduce((e,t,s)=>t.month<=n?s:e,0),t=d.A[l.vV][e];return"es-es"===l.vV?"".concat(void 0===t?0:t.discount,"% de descuento en todos los productos"):(c&&(t=d.A[l.vV][d.A[l.vV].length-1]),"".concat(void 0===t?0:t.discount,"% discount on all ").concat(c?"products":"featured samples of the month"))},[c,n]),h=(0,r.useMemo)(()=>{if("es-es"===l.vV){if(n>=12)return;let t=d.A[l.vV].reduce((e,t,s)=>t.month<=n?s:e,0),s=t+ +(t!==d.A[l.vV].length-1),c="";if(0===n){let t=new Date(e);t.setMonth(t.getMonth()+1);let s=Math.ceil((0,i.nI)(new Date,t));c="".concat(s," ").concat(1===s?"d\xeda":"d\xedas")}else{let e=d.A[l.vV][s].month-n;c="".concat(e," ").concat(1===e?"mes":"meses")}return"".concat(c," m\xe1s y llegar\xe1s a un ").concat(d.A[l.vV][s].discount,"% de descuento")}return c?"Enjoy your VIP status!":n>=6?void 0:"".concat(6-n," more ").concat(5===n?"month":"months"," to VIP status")},[c,e,n]);return{maxMonths:t,passedDays:s,progressTotalDays:(0,i.nI)(e,u(new Date(e),t)),passedCompleteMonths:n,passedCompleteMonthsInDays:(0,i.nI)(e,u(new Date(e),n)),statusBannerTitle:o,statusBannerSubtitle:x,progressBarCaption:h,image:a.image,colors:(0,m.A)(a.id)}})(new Date(t));return(0,n.jsx)(x.A,{children:(0,n.jsx)("div",{className:"flex justify-center w-full mb-20 col-span-full",children:(0,n.jsxs)("div",{className:"w-full my-8 text-center md:text-left max-md:max-w-md",children:[(0,n.jsx)(b,{title:s,subtitle:c,colors:f,image:h}),"en-us"!==l.vV&&(0,n.jsxs)("div",{className:"mt-16 font-medium text-gray-500 ".concat("es-es"===l.vV?"md:mt-20":""),children:[(0,n.jsx)("h1",{className:"mt-1 mb-2 font-serif ".concat(f.text," text-4xl lg:text-5xl"),children:o.ct.xQ.o4}),(0,n.jsx)("p",{children:o.ct.xQ.o4}),o.ct.xQ.qV.O&&(0,n.jsx)(a(),{legacyBehavior:!0,href:o.ct.xQ.qV.O,children:(0,n.jsx)("a",{className:"px-8 mt-8 md:mt-6 button button-primary",children:o.ct.xQ.qV.P})})]})]})})})}},51819:(e,t,s)=>{"use strict";function n(e){return"ace"===e?{text:"text-bbx-gold",bg:"bg-bbx-gold"}:{text:"text-bbx-spark",bg:"bg-bbx-spark"}}s.d(t,{A:()=>n})}},e=>{e.O(0,[137,636,6593,8792],()=>e(e.s=181)),_N_E=e.O()}]); 2//# sourceMappingURL=loyalty-b0335ed39ebae1ef.js.map
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.