(window.webpackJsonpvtex_product_price_1_31_1=window.webpackJsonpvtex_product_price_1_31_1||[]).push([["Savings"],[function(e,a){e.exports=React},function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.format-currency@0.x/FormattedCurrency"]},function(e,a){e.exports=ReactIntl},,function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@1.x/useCssHandles"]},function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.product-context@0.x/useProduct"]},function(e,a,t){"use strict";function n(e){if(e&&0!==e.length){var a=e.find((function(e){return e.sellerDefault}));return a||e[0]}}t.d(a,"a",(function(){return n}))},function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessageWithMarkers"]},function(e,a,t){"use strict";function n(e){var a=e.alwaysShow,t=e.availableQuantity;return!a&&t<=0}t.d(a,"a",(function(){return n}))},,,,,,function(e,a){e.exports=__RENDER_8_COMPONENTS__["vtex.product-summary-context@0.x/ProductSummaryContext"]},,,,,,,,,,,,,,function(e,a,t){"use strict";t.r(a),function(e){var a=t(3);t.p=Object(a.getPublicPath)("vtex.product-price@1.31.1");var n=Object(a.register)((function(){return t(29)}),e,"vtex.product-price@1.31.1","vtex.product-price@1.x","Savings");n.renderHotReload,n.setupHMR}.call(this,t(9)(e))},function(e,a,t){"use strict";t.r(a);var n=t(0),s=t.n(n),r=t(2),i=t(5),c=t.n(i),u=t(1),l=t.n(u),o=t(4),v=t.n(o),d=t(7),m=t.n(d),p=t(14),g=t.n(p),_=t(6),f=t(8),x=["savings","previousPriceValue","newPriceValue","savingsValue","savingsWithTax","savingsPercentage"],P=Object(r.defineMessages)({title:{id:"admin/savings.title"},description:{id:"admin/savings.description"},default:{id:"store/savings.default"}}),E=String.fromCharCode(160);function N(e){var a=e.formatNumber,t=e.savingsPercentage,n=e.percentageStyle,s=a(t,{style:"percent"});return"compact"===n?s.replace("".concat(E,"%"),"%"):s}function y(e){var a,t=e.message,n=void 0===t?P.default.id:t,i=e.markers,u=void 0===i?[]:i,o=e.minimumPercentage,d=void 0===o?0:o,p=e.percentageStyle,E=void 0===p?"locale":p,y=e.classes,h=e.alwaysShow,O=void 0!==h&&h,b=v()(x,{classes:y}),w=b.handles,S=b.withModifiers,R=Object(r.useIntl)().formatNumber,V=c()(),k=g.a.useProductSummary(),C=Object(_.a)(null===(a=null==V?void 0:V.selectedItem)||void 0===a?void 0:a.sellers),M=null==C?void 0:C.commertialOffer;if(!M||Object(f.a)({alwaysShow:O,availableQuantity:M.AvailableQuantity})||(null==k?void 0:k.isLoading))return null;var T=M.ListPrice,j=M.Price,D=T-j,W=D+D*M.taxPercentage,I=D/T;if(D<=0||I