1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50779],{23807:function(e,t,n){var o=n(827378),i=n(581340),r=n(199729),u=n.n(r),a=n(887824),c=n(164528),s=n(695743),l=n(140224),f=n(526720),d=n(603798),p=n(269890);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,o,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r=[],u=!0,a=!1;try{for(i=i.call(e);!(u=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);u=!0);}catch(e){a=!0,o=e}finally{try{u||null==i.return||i.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){var t=e.code,n=e.shippingAmount,r=e.subTotal,v=e.eventLabel,g=e.trackingData,m=e.isFromUrl,_=e.sku,b=h((0,o.useState)(!0),2),y=b[0],x=b[1],O=(0,p.Z)(t,_),A=h((0,o.useState)(!1),2),P=A[0],w=A[1],S=h((0,o.useState)(null),2),j=S[0],D=S[1],E=(0,c.ZP)("senf-notification").translateRaw,Z=(0,i.t)(),C=(0,l.O)(),T=C.systemCountry,k=C.locale,F="US"===T,M=(0,s.z)("website").data,q=(0,a.Z)().push,B=u()(M,"locale.currency.code"),N=u()(M,"notifications.voucher.enableRoundDiscountAmount"),R=u()(M,"notifications.voucher.displayCalculatedAmountForPercentage"),V=u()(M,"navigationVouchers.disabled"),z=Z.asPath.split("?")[0],U=(0,f.fO)(Z.query,M),I=(0,d.Z)(O,r,n,U,E,k,B,N&&!F,R,!F,T).reduce(function(e,t){return"".concat(e," ").concat(t.text)},""),L=(0,o.useMemo)(function(){return[{id:t,name:I,creative:"",position:"1"}]},[t,I]);(0,o.useEffect)(function(){P||w(!0),P&&j!==t&&D(t)},[t,j,P]),(0,o.useEffect)(function(){x(V)},[V]);var G=!O||!M||y||P&&j===t;return(0,o.useEffect)(function(){G||(m?q({event:"gaEventTrigger_EE",gaEventAction:"promoView",gaEventCategory:z,gaEventNonInteraction:!0,gaEventLabel:v,data:g,ecommerce:{promoView:{promotions:L}}}):q({event:"gaEventTrigger",event_name:"Voucher_VoucherNotificationDisplay",gaEventAction:"visible",gaEventCategory:"VoucherNotification",gaEventLabel:v,discount_info:g}))},[q,v,m,z,L,g,G]),(0,o.useEffect)(function(){G||(m?q({event:"donotTrack",gaEventAction:"promoView",gaEventCategory:z,gaEventNonInteraction:!0,gaEventLabel:v,data:g,ecommerce:{promoView:{promotions:L}}}):q({event:"donotTrack",gaEventAction:"promoView",gaEventCategory:"VoucherNotification",gaEventNonInteraction:!0,gaEventLabel:v,data:g}))},[q,v,m,z,L,g,G]),null}},379371:function(e,t){t.Z=function(e){return Number.parseFloat((e/100%1).toPrecision(2))>.98?Math.round(e/100):Math.floor(e/100)}},526720:function(e,t,n){n.d(t,{CP:function(){return c},T3:function(){return p},dN:function(){return g},fO:function(){return h},qR:function(){return v},sj:function(){return f}});var o=n(90104),i=n.n(o),r=n(199729),u=n.n(r),a=n(379371),c=function(e){var t=e.voucher,n=e.index,o=e.subTotal,i=e.addShipping,r=e.shippingAmount,u=e.roundDiscountAmount,a=e.shouldCalculatePercentageAmount,c="Unlimited"===t.discount_settings.lifetime;return s({box:t.discount_settings.discount_rule.box_rule[c?1:n],isPercentageVoucher:"percent"===t.discount_type,subTotal:o,addShipping:i,shippingAmount:r,roundDiscountAmount:u,shouldCalculatePercentageAmount:a})},s=function(e){var t=e.box,n=e.isPercentageVoucher,o=e.subTotal,i=e.addShipping,r=e.shippingAmount,u=e.roundDiscountAmount,c=e.shouldCalculatePercentageAmount;if(!t)return 0;var s=t.discount_value||0;if(o&&n){if(!c)return s;s=s/100*o}if(i){var l=t.applicable_to;if("shipping"===l)return Math.min(s,r);"both"===l&&(s+=r)}return u?100*(0,a.Z)(s):s},l=function(e){if(!e)return!1;var t=e.discount_settings.discount_rule.box_rule;if(i()(t))return!1;var n=t[1].discount_value||0;return!Object.keys(t).every(function(e){return t[e].discount_value===n})},f=function(e){var t=e.repetition_limit;return t?t+(e.repetition_from_first?1:0):"Unlimited"===e.discount_settings.lifetime?52:d(e.discount_settings.discount_rule.box_rule)||e.limit_per_subscription},d=function(e){return Object.keys(e).filter(function(t){var n=e[t];return!!n&&!!n.discount_value}).length},p=function(e){return"Unlimited"===e.discount_settings.lifetime?52:e.discount_settings.box_count},v=function(e){var t=f(e);return(t<=0||t>=52)&&!l(e)},h=function(e,t){var n=e.addShippingOnTotal;return"true"===n||"false"!==n&&u()(t,"notifications.voucher.addShippingOnTotalEnabled")},g=function(e,t,n){return Intl.NumberFormat(t,{style:"currency",currency:n||"USD",minimumFractionDigits:e%1==0?0:2,maximumFractionDigits:2}).format(e)}},269890:function(e,t,n){var o=n(736026);t.Z=function(e,t){var n=(0,o.D)({code:e},{suspense:!1}).data;if(!t)return n;if(n){var i=JSON.parse(JSON.stringify(n)),r={},u=null==i?void 0:null===(s=i.discount_settings)||void 0===s?void 0:null===(c=s.discount_rule)||void 0===c?void 0:c.box_rule;
1for(var a in u){var c,s,l,f=u[a],d=f.discount_sku?function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n.push.apply(n,o)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}({},f),{discount_value:(null===(l=f.discount_sku[t])||void 0===l?void 0:l.discount_value)||f.discount_value}):f;delete d.discount_sku,r[a]=d}return i&&(i.discount_settings.discount_rule.box_rule=r),i}}},48232:function(e,t,n){n.d(t,{Z:function(){return _}});var o=n(269890),i=n(526720),r=n(199729),u=n.n(r),a=n(695743),c=n(859897),s=n(581340),l=n(379371),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:899,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,c=(0,o.Z)(e,r),f=(0,a.z)("website").data,d=(0,s.t)();if(!c||!f)return 0;var v=(0,i.sj)(c),h=u()(f,"notifications.voucher.enableRoundDiscountAmount"),g=0;g=h?(0,l.Z)(g):g/100;var m=0;if((0,i.qR)(c))return p(c,t,n,!1,h);if((0,i.fO)(d.query,f)&&"Unlimited"===c.discount_settings.lifetime&&"products"!==c.discount_settings.discount_rule.box_rule[1].applicable_to)g=52*g*100+(m=5200*(t=h?(0,l.Z)(t):t));else if(c.repetition_rate)g*=v;else{g=0;for(var _=c.discount_settings.discount_rule.box_rule,b=Object.keys(_).length,y=_[1]&&("shipping"===_[1].applicable_to||"both"===_[1].applicable_to),x=(0,i.fO)(d.query,f)&&y,O=x?100*n+t:100*n,A=0;A<b;A++){var P=(0,i.CP)({voucher:c,index:A+1,subTotal:n,addShipping:x,shippingAmount:t,roundDiscountAmount:h});g+=P>=O?O:P}}return g/100},d=function(e,t,n,o){var i=e.discount_value;return i>n?o?n+t/100:n:o?i+t/100:i},p=function(e,t,n,o,i){var r=e.discount_value,u=n;return(o&&(r+=t/100,u=n+t/100),r>u)?u:(i&&(r=(0,l.Z)(100*r)),r)},v=function(e,t,n,r){var l=(0,o.Z)(e,r),f=(0,a.z)("website").data,v=(0,s.t)(),h="1"===(0,c.Y)().hf_ssr_e_gift_card_checkout;if(!l||"fixed"!==l.discount_type||!f)return 0;var g=u()(f,"notifications.voucher.enableRoundDiscountAmount"),m=l.discount_settings.discount_rule.box_rule,_=m[1]&&("shipping"===m[1].applicable_to||"both"===m[1].applicable_to),b=(0,i.fO)(v.query,f)&&_;return h?d(l,t,n,b):p(l,t,n,b,g)},h=function(e,t,n,r,c,l){var f=(0,o.Z)(e,l),d=(0,a.z)("website").data,p=(0,s.t)();if(!f||!d)return 0;var v=u()(d,"notifications.voucher.enableRoundDiscountAmount"),h=f.discount_settings.discount_rule.box_rule,g=h[1]&&("shipping"===h[1].applicable_to||"both"===h[1].applicable_to);return m(f,t,(0,i.fO)(p.query,d)&&g,n,r,c,v)},g=function(e,t,n,r){var c=(0,o.Z)(e,r),f=(0,a.z)("website").data,d=(0,s.t)();if(!c||!f)return 0;var p=u()(f,"notifications.voucher.enableRoundDiscountAmount"),v=0;if((0,i.qR)(c))return(0,l.Z)(m(c,n,!1,100*t));for(var h=c.discount_settings.discount_rule.box_rule,g=Object.keys(h).length,_=h[1]&&("shipping"===h[1].applicable_to||"both"===h[1].applicable_to),b=(0,i.fO)(d.query,f)&&_,y=b?100*t+n:100*t,x=0;x<g;x++){var O=(0,i.CP)({voucher:c,index:x+1,subTotal:t,addShipping:b,shippingAmount:n,roundDiscountAmount:p,shouldCalculatePercentageAmount:!0});v+=O>=y?y:O}return v/100},m=function(e,t,n,o,i,r,u){var a=e.discount_value,c=e.discount_settings.discount_rule.box_rule;if(1===Object.keys(c).length&&(a=c[1].discount_value/100),!o)return a;var s=a/100*o;return(n&&(s+=t/100),!i&&o&&r&&s>=100*o)?o-s:(u&&(s=(0,l.Z)(100*s)),s)},_=function(e,t,n,r,u,a){var c=(0,o.Z)(e,r),s=v(e,t,n,r),l=f(e,t,n,r),d=h(e,t,n,a,u,r),p=g(e,n,t,r);if(!c)return 0;var m="fixed"===c.discount_type,_="percent"===c.discount_type,b=(0,i.sj)(c)>1,y=0;return m&&(y=b?l:s),_&&(y=b?p:d),y}},191976:function(e,t,n){n.d(t,{Z:function(){return j}});var o=n(199729),i=n.n(o),r=n(164528),u=n(958042),a=n(695743),c=n(526720),s=n(827378),l=n(567921),f=n.n(l),d=n(581340),p=n(497249),v=function(e){var t,n,o,r=(0,d.t)(),u=(0,a.z)("website").data,c=r.query.dm||"",l=r.query.utm_c
1ouponvalue||"",v=(0,p.T)();(0,s.useEffect)(function(){var e=v.startSpan("useDisplayMeals");e.setAttributes({dm:c,utmCouponvalue:l}),e.end()},[c,l,v]);var h=i()(u,"newFeatures.displayFreeMealsDefault"),g=(0,s.useMemo)(function(){return f().get("hf_dm_meals")},[]),m=(0,s.useMemo)(function(){return f().get("hf_dm_gifts")},[]),_=(0,s.useMemo)(function(){return f().get("hf_dm_custom")},[]),b=(0,s.useMemo)(function(){return f().get("hf_dm_dollars")},[]),y=(0,s.useMemo)(function(){return f().get("hf_dm_box")},[]),x=r.query.dm||g,O=r.query.dm_gifts||m,A=r.query.dm_custom||_,P=r.query.dm_dollars||b,w=r.query.dm||y;return(0,s.useEffect)(function(){!g&&x&&f().set("hf_dm_meals",x)},[g,x]),(0,s.useEffect)(function(){!b&&P&&f().set("hf_dm_dollars",P)},[b,P]),(0,s.useEffect)(function(){!m&&O&&f().set("hf_dm_gifts",O)},[m,O]),(0,s.useEffect)(function(){!_&&A&&f().set("hf_dm_custom",A)},[_,A]),(0,s.useEffect)(function(){!y&&w&&f().set("hf_dm_box",w)},[y,w]),{displayMeals:"meals"===x||"true"!==P&&h,displayServings:"servings"===x,displayFirstBoxMeals:"first-box-meals"===x,displayFreeGifts:"gifts"===O,displayTote:"tote"===A,displayDollarsOff:"true"===P,displayFreeBox:(n="free-box"===w,o=!!(null===(t=r.query.utm_couponvalue)||void 0===t?void 0:t.includes("165")),n&&!!e&&e<=95&&!o),displayBuyOneGetOne:"buy1get1"===x,displayAmazonGiftCard:"zon"===A}},h=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return(o?Math.floor(e/(t/n)):Math.round(e/(t/n)))||0},g=n(48232),m=n(269890),_=n(859897),b=n(90104),y=n.n(b),x=function(e){var t=e.discount_settings.discount_rule.box_rule,n=t[1]&&("shipping"===t[1].applicable_to||"both"===t[1].applicable_to),o=Object.keys(t).filter(function(e,t){return"0"!==t.toString()}).every(function(e){return"products"===t[e].applicable_to});return n&&o},O=function(e,t,n,o){var i=n?"fixed":e.discount_type,r=!y()(e.discount_settings.discount_rule.box_rule),u=A(e),a=x(e),s=(0,c.qR)(e)?"permanent":"semi-permanent",l="";return(r&&(u&&(l="senf-notification.voucher.".concat(i,".").concat(s,".free-shipping-all")),a&&(l="senf-notification.voucher.".concat(i,".").concat(s,".free-shipping-first"))),l&&t(l))?l:o?"senf-notification.voucher.replacement.fixed.new-year-offer":"senf-notification.voucher.".concat(i,".").concat(s)},A=function(e){var t=e.discount_settings.discount_rule.box_rule,n=(0,c.T3)(e)===(0,c.sj)(e),o=Object.keys(t).every(function(e){var n=t[e];return"shipping"===n.applicable_to||"both"===n.applicable_to});return n&&o},P=n(200770),w=function(e,t,n,o,u){var s=(0,m.Z)(e,t),l=(0,r.ZP)("senf-notification").translateRaw,f=v(n),d=f.displayMeals,p=f.displayServings,h=f.displayFirstBoxMeals,g=f.displayFreeGifts,b=f.displayTote,y=f.displayFreeBox,x=f.displayDollarsOff,A=f.displayBuyOneGetOne,w=f.displayAmazonGiftCard,S=(0,P.Z)(),j=(0,_.Y)(),D=(0,a.z)("website").data,E="1"===j.hf_ssr_e_gift_card_checkout,Z=[],C="";if(!s)return Z;var T=null==u?void 0:u.isEnabled,k=null==u?void 0:u.codes,F=null==k?void 0:k.find(function(e){return e.code===s.code});if(T&&F)return[F.applangaKey];if("Checkout Alternate"===s.channel)return["senf-notification.voucher.checkout-alternate"];if(y)C="senf-notification.voucher.free-box";else{var M=(0,c.qR)(s),q=1===(0,c.sj)(s),B=(0,c.sj)(s)>1;switch(!0){case B:case M:C=O(s,l,x,o);break;case q:C="percent"===s.discount_type?"senf-notification.voucher.percent.first-order":"senf-notification.voucher.fixed.first-order"}if(d){if("US"===S)return C="senf-notification.voucher.display-meals.variation_1",Z.push(C),Z;C="senf-notification.voucher.display-meals"}p&&(C="senf-notification.voucher.display-servings"),h&&(C="senf-notification.voucher.display-first-box-meals"),E&&(C="senf-notification.voucher.gift-card"),A&&(C="senf-notification.voucher.buy-one-message")}return Z.push(C),e===i()(D,"notifications.voucher.experimentCodes.replacementVoucher")&&Z.unshift("senf-notification.voucher.replacement-funnel"),o&&Z.unshift("senf-notification.voucher.replacement-prefix-limited-time-offer"),g&&Z.push("senf-notification.voucher.gift-message"),b&&Z.push("senf-notification.voucher.tote-message"),w&&Z.push("senf-notification.voucher.amazon-message"),Z},S=n(379371),j=function(e,t,n,o,s,l,f){var d,p,_,b=(0,m.Z)(e,s),y=(0,u.Z)(),x=(0,r.ZP)("senf-notification").translateRaw,O=(0,a.z)("website").data,A=i()(O,"locale.currency.code"),P=v(),j=P.displayMeals,D=P.displayServings,E=P.displayFirstBoxMeals,Z=(0,g.Z)(e,n,t,s),C=w(e,s,t,l,f);if(!b)return{applangaKey:"",message:""};if("on-site_alternate"===b.channel)return{applangaKey:"senf-notification.voucher.alternate-voucher",message:x("senf-notification.voucher.alternate-voucher",{alternateVoucherDiscount:null==b?void 0:b.discount_value})};(j||E)&&o&&(d=h(Z,t,o,i()(O,"notifications.voucher.enableFreeMealRoundDown")));var T=(0,c.CP)({voucher:b,index:1,subTotal:t,addShipping:!1,shippingAmount:n,roundDiscountAmount:!1,shouldCalculatePercentageAmount:!1}),k=(0,c.CP)({voucher:b,index:2,subTotal:t,addShipping:!1,shippingAmount:n,roundDiscountAmount:!1,shouldCalculatePercentageAmount:!1}),F=(0,c.CP)({voucher:b,index:1,subTotal:t,addShipping:!0,shippingAmount:n,roundDiscountAmount:!1,shouldCalculatePercentageAmount:!0});if(D&&o){var M=(0,c.CP)({voucher:b,index:1,subTotal:t,addShipping:!1,shippingAmount:n,roundDiscountAmount:!1,shouldCalculatePercentageAmount:!0});p=(0,c.dN)((t-M/100)/o,y,A)}E&&o&&d&&(_=d-h(F/100,t,o,i()(O,"notifications.voucher.enableFreeMealRoundDown")));
1var q=(0,c.sj)(b),B=b.repetition_rate&&!b.repetition_from_first,N=(0,c.dN)(Z,y,A),R=b.discount_settings.discount_rule.box_rule,V=R[1]&&("shipping"===R[1].applicable_to||"both"===R[1].applicable_to),z=V?(null==b?void 0:b.discount_value)+n/100:null==b?void 0:b.discount_value,U=(0,c.dN)(z,y,A);return{applangaKey:C.join("|"),message:C.map(function(e,t){var n=x(e,{amount:N,firstOrder:1===q,totalBoxes:q,ignoreFirst:B,numberOfFreeMeals:d,isFreeShipping:V,totalDiscount:U,pricePerServing:p,firstBoxDiscount:(0,S.Z)(T),secondBoxDiscount:(0,S.Z)(k),remainingMeals:_});return"senf-notification.voucher.expiry-message"!==C[t+1]||n.endsWith(".")||n.endsWith("!")?n:n.replace(/ +$/,"")+"."}).join(" "),formattedAmount:N}}},253508:function(e,t,n){var o=n(695743),i=n(269890),r=n(164528),u=n(199729),a=n.n(u),c=n(603798),s=n(526720),l=n(48232),f=n(191976),d=n(581340),p=n(140224);t.Z=function(e,t){var n,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,v=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,g=arguments.length>5?arguments[5]:void 0,m=(0,i.Z)(e,g),_=(0,o.z)("website").data,b=(0,r.ZP)("senf-notification").translateRaw,y=(0,d.t)(),x=(0,p.O)(),O=x.systemCountry,A=x.locale,P=(0,f.Z)(e,t,u,v,g).message,w=a()(_,"locale.currency.code"),S="US"===O,j=(0,l.Z)(e,u,t,g),D=(0,l.Z)(e,0,t,g);if(!m||!_)return{gaEventLabel:"",data:void 0};var E=(0,s.fO)(y.query,_),Z=a()(_,"notifications.voucher.enableRoundDiscountAmount"),C=a()(_,"notifications.voucher.displayCalculatedAmountForPercentage"),T=m.customer_status,k=m.order_status,F="all";["new","active","existing"].includes(T)&&["new","active","cancelled"].includes(k)||(F="none"),"cancelled"===k&&(F="reactivation"),("new"===k||"active"===k)&&(F="activation");var M="normal";(0,s.qR)(m)&&(M="annual"),m.repetition_rate&&(M="repetitive");var q=(0,s.dN)(j,A,w),B=(0,s.dN)(D,A,w),N=(0,c.Z)(m,t,u,E,b,A,w,Z&&!S,C,!S,O),R=null===(n=m.discount_settings.discount_rule.box_rule[1])||void 0===n?void 0:n.applicable_to;1===(0,s.T3)(m)&&t<=j&&t<=0&&"Freebies"===m.partner&&(P=b("senf-notification.voucher.freebie-datalayer",{isFreeShipping:"shipping"===R||"both"===R}));var V={type:m.voucher_type,discountType:m.discount_type,frequency:M,userType:F,code:m.code,amount:m.discount_value,boxesAmount:"annual"!==M?N.map(function(e){return e.text?e.text:"0"}).join(","):null,totalDiscount:q,totalBoxes:(0,s.sj)(m),discount:B,shippingAmount:u/100,addShippingToTotal:E,message:P,fromInputField:!h};return{gaEventLabel:[V.type,V.userType,V.discountType,V.amount,V.code,V.frequency,"totalBoxes:".concat(V.totalBoxes),"totalDiscount:".concat(V.totalDiscount),V.totalBoxes>1?V.boxesAmount:""].join("-"),data:V}}},603798:function(e,t,n){var o=n(941571),i=n.n(o),r=n(526720);function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){var o;o=n[t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o})}return e}var a=function(e,t,n,o,i,u){if(!e)return"";var a=(0,r.dN)(e,t,n);return o&&u?i?u("senf-notification.voucher.percentage-off",{amount:e}):u("senf-notification.voucher.amount-off",{amount:a}):a};t.Z=function(e,t,n,o,c,s,l,f,d){var p=!(arguments.length>9)||void 0===arguments[9]||arguments[9],v=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,h="US"===v,g=(0,r.T3)(e),m=u({discount:!1,hasFutureBoxes:!1,text:""},h&&{discountAmount:"",boxPrice:"",discountedBoxPrice:"",freeBox:!1});return i()(Math.min(g,12),function(){return m}).map(function(i,v){var m=(0,r.CP)({voucher:e,index:v+1,subTotal:t,addShipping:o,shippingAmount:n,roundDiscountAmount:f,shouldCalculatePercentageAmount:d})/100,_=t+n/100,b=_-m>0?_-m:0,y=!h&&!d&&"percent"===e.discount_type,x=m>=t&&"fixed"===e.discount_type||h&&0===b,O=a(m,s,l,p,y,c),A=a(m,s,l,p,y),P=a(_,s,l,!1,!1),w=a(b,s,l,!1,!1),S=u({discount:!!A,hasFutureBoxes:v+1===12&&g>12,text:O||""},h&&{discountAmount:A,boxPrice:P,discountedBoxPrice:w,freeBox:x});return x&&(S.text=c("senf-notification.voucher.free")),S})}}}]);
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.