(window.webpackJsonpvtex_store_components_3_178_5=window.webpackJsonpvtex_store_components_3_178_5||[]).push([[3],{22:function(e,t,a){e.exports={priceContainer:"vtex-store-components-3-x-priceContainer",listPrice:"vtex-store-components-3-x-listPrice",listPriceLabel:"vtex-store-components-3-x-listPriceLabel",listPriceValue:"vtex-store-components-3-x-listPriceValue",sellingPriceContainer:"vtex-store-components-3-x-sellingPriceContainer",sellingPrice:"vtex-store-components-3-x-sellingPrice",sellingPriceLabel:"vtex-store-components-3-x-sellingPriceLabel",sellingPriceValue:"vtex-store-components-3-x-sellingPriceValue","sellingPriceValue--range":"vtex-store-components-3-x-sellingPriceValue--range",savingPrice:"vtex-store-components-3-x-savingPrice",savingPriceValue:"vtex-store-components-3-x-savingPriceValue",installmentsPrice:"vtex-store-components-3-x-installmentsPrice",interestRatePrice:"vtex-store-components-3-x-interestRatePrice",priceLoaderContainer:"vtex-store-components-3-x-priceLoaderContainer",listPriceLoader:"vtex-store-components-3-x-listPriceLoader",sellingPriceLabelLoader:"vtex-store-components-3-x-sellingPriceLabelLoader",sellingPriceLoader:"vtex-store-components-3-x-sellingPriceLoader",installmentsPriceLoader:"vtex-store-components-3-x-installmentsPriceLoader",savingsPriceLoader:"vtex-store-components-3-x-savingsPriceLoader"}},33:function(e,t,a){"use strict";var i=a(0);function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,["animate","ariaLabel","children","className","height","preserveAspectRatio","primaryColor","primaryOpacity","rtl","secondaryColor","secondaryOpacity","speed","style","uniquekey","width"]),C=v?v+"-idClip":n(),L=v?v+"-idGradient":n(),O=p?["1; -3","2; -2","3; -1"]:["-3; 1","-2; 2","-1; 3"];return Object(i.createElement)("svg",r({role:"img",style:b,className:l,"aria-labelledby":a||null,viewBox:"0 0 "+h+" "+c,preserveAspectRatio:o},f),a?Object(i.createElement)("title",null,a):null,Object(i.createElement)("rect",{x:"0",y:"0",width:h,height:c,clipPath:"url(#"+C+")",style:{fill:"url(#"+L+")"}}),Object(i.createElement)("defs",null,Object(i.createElement)("clipPath",{id:C},s),Object(i.createElement)("linearGradient",{id:L},Object(i.createElement)("stop",{offset:"0%",stopColor:m,stopOpacity:u},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[0],dur:P+"s",repeatCount:"indefinite"})),Object(i.createElement)("stop",{offset:"50%",stopColor:g,stopOpacity:d},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[1],dur:P+"s",repeatCount:"indefinite"})),Object(i.createElement)("stop",{offset:"100%",stopColor:m,stopOpacity:u},t&&Object(i.createElement)("animate",{attributeName:"offset",values:O[2],dur:P+"s",repeatCount:"indefinite"})))))},l={animate:!0,ariaLabel:"Loading interface...",height:130,preserveAspectRatio:"xMidYMid meet",primaryColor:"#f0f0f0",primaryOpacity:1,rtl:!1,secondaryColor:"#e0e0e0",secondaryOpacity:1,speed:2,width:400},c=function(e){return Object(i.createElement)("rect",{x:"0",y:"0",rx:"5",ry:"5",width:e.width,height:e.height})},o=function(e){var t=r({},l,e),a=e.children?e.children:Object(i.createElement)(c,t);return Object(i.createElement)(s,t,a)};t.a=o},45:function(e,t,a){"use strict";var i=a(10),r=a(9),n=a(0),s=a.n(n),l=a(6),c=a.n(l),o=a(1),m=a(4),u=a(38),p=a.n(u),g=a(8),d=a(58),P=a.n(d),b=a(7),v=a.n(b),h=a(57),f=a(33),C=a(22),L=a.n(C),O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.loaderClass,a=Object(h.a)(e,["loaderClass"]);return s.a.createElement("div",{className:c()(L.a.priceContainer,L.a.priceLoaderContainer,t)},s.a.createElement(f.a,Object(i.a)({style:{width:"100%",height:"100%"},width:300,height:70,preserveAspectRatio:"xMinYMin meet"},a),s.a.createElement("rect",Object(i.a)({height:"0.75em",width:"50%",x:"25%"},e[L.a.listPriceLoader])),s.a.createElement("rect",e[L.a.sellingPriceLabelLoader]),s.a.createElement("rect",Object(i.a)({height:"1em",width:"70%",x:"15%",y:"1.25em"},e[L.a.sellingPriceLoader])),s.a.createElement("rect",Object(i.a)({height:"0.75em",width:"80%",x:"10%",y:"2.75em"},e[L.a.installmentsPriceLoader])),s.a.createElement("rect",e[L.a.savingsPriceLoader])))},y=a(2),w=a.n(y),x=(w.a.arrayOf(w.a.number),w.a.arrayOf(w.a.number),w.a.number,w.a.number,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool.isRequired,w.a.bool,w.a.string,w.a.string,w.a.arrayOf(w.a.shape({Value:w.a.number.isRequired,InterestRate:w.a.number.isRequired,TotalValuePlusInterestRate:w.a.number,NumberOfInstallments:w.a.number.isRequired,Name:w.a.string})),w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.string,w.a.object,w.a.object.isRequired,Object(m.injectIntl)((function(e){var t=e.showLabels,a=e.installments,i=void 0===a?[]:a,l=e.className,u=e.installmentClass,p=e.interestRateClass,d=e.intl,b=Object(g.useRuntime)().culture;if(!i||Object(o.isEmpty)(i.filter((function(e){return e.NumberOfInstallments>1}))))return null;var v=i.filter((function(e){return!e.InterestRate&&e.NumberOfInstallments>1})),h=(Object(o.isEmpty)(v)?i:v).reduce((function(e,t){return e.NumberOfInstallments>t.NumberOfInstallments?e:t})),f=P()({intl:d,culture:b,value:h.Value}),C=[h.NumberOfInstallments,f,s.a.createElement(n.Fragment,{key:"x"},"x")].map((function(e,t){return s.a.createElement("span",{className:u,key:t},e)})),O=Object(r.a)(C,3),y=O[0],w=O[1],x=O[2];return s.a.createElement("div",{className:c()(L.a.installmentsPrice,l)},t?s.a.createElement(m.FormattedMessage,{id:"store/pricing.installment-display",values:{installments:y,installmentPrice:w,times:x}}):s.a.createElement(n.Fragment,null,y,x," ",w),!h.InterestRate&&s.a.createElement("div",{className:c()(L.a.interestRatePrice,p)},s.a.createElement(m.FormattedMessage,{id:"store/pricing.interest-free"})))}))),R=a(60),E=a.n(R),j=Object(m.injectIntl)((function(e){var t=e.showPriceRange,a=e.priceRange,i=e.price,n=e.rangeContainerClasses,l=e.singleContainerClasses,c=e.intl,o=Object(g.useRuntime)().culture;return t&&a&&function(e){var t=Object(r.a)(e,2),a=t[0],i=t[1];return 2===e.length&&a!==i}(a)?s.a.createElement("span",{className:n},function(e,t,a){return(a||[]).map((function(a){return P()({intl:e,culture:t,value:a})})).join(" - ")}(c,o,a)):s.a.createElement("span",{className:l},s.a.createElement(E.a,{value:i}))})),_=["price_className","price_loader","price_listPriceContainer","price_listPriceLabel","price_listPrice","price_listPriceRange","price_sellingPriceRange","price_sellingPriceContainer","price_sellingPriceLabel","price_sellingPrice","price_savingsContainer","price_savings","price_savings_value","price_installment","price_interestRate","price_installmentContainer"],N=function(e){var t=Object(r.a)(e,2),a=t[0],i=t[1];return 2===e.length&&a!==i},I=function(e){var t=Object(o.sort)((function(e,t){return e-t}),e);return[Object(o.head)(t),Object(o.last)(t)]},V=Object(m.injectIntl)((function(e){var t=e.sellingPriceList,a=e.sellingPrice,r=e.listPrice,n=e.listPriceList,l=e.showListPrice,u=e.showSellingPriceRange,d=e.showListPriceRange,b=e.showInstallments,h=e.showLabels,f=e.showSavings,C=e.labelSellingPrice,y=e.labelListPrice,w=e.className,R=e.loaderClass,E=e.listPriceContainerClass,V=e.listPriceLabelClass,S=e.listPriceClass,q=e.listPriceRangeClass,M=e.sellingPriceRangeClass,k=e.sellingPriceContainerClass,A=e.sellingPriceLabelClass,F=e.sellingPriceClass,G=e.savingsContainerClass,J=e.savingsClass,Y=e.installments,B=e.installmentClass,T=e.interestRateClass,z=e.installmentContainerClass,D=e.styles,H=e.intl,K=Object(g.useRuntime)().culture,Q=v()(_).handles;if(l&&Object(o.isNil)(r)||Object(o.isNil)(a))return s.a.createElement(O,Object(i.a)({loaderClass:"".concat(R," ").concat(Q.price_loader)},D));var U=function(e){var t=e.sellingPriceList,a=e.sellingPrice,i=e.listPrice,r=e.listPriceList,n=e.showListPrice,s=e.showListPriceRange,l=e.showSellingPriceRange;if(!n)return!1;var c=t&&I(t)||[],m=r&&I(r)||[],u=l&&N(c)?c:a,p=s&&N(m)?m:i;return!Object(o.equals)(p,u)}(e),W=t&&I(t),X=n&&I(n);return s.a.createElement("div",{className:c()(L.a.priceContainer,w,Q.price_className)},U&&s.a.createElement("div",{className:c()(L.a.listPrice,E,Q.price_listPriceContainer)},h&&s.a.createElement("div",{className:c()(L.a.listPriceLabel,V,Q.price_listPriceLabel,"dib ph2 t-small-ns t-mini")},s.a.createElement(p.a,{id:y})),s.a.createElement(j,{showPriceRange:d,priceRange:X,price:r,rangeContainerClasses:c()(L.a.listPriceValue,q,Q.price_listPriceRange),singleContainerClasses:c()(L.a.listPriceValue,S,Q.price_listPrice)})),s.a.createElement("div",{className:c()(L.a.sellingPrice,L.a.sellingPriceContainer,k,Q.price_sellingPriceContainer)},h&&U&&s.a.createElement("div",{className:c()(L.a.sellingPriceLabel,A,Q.price_sellingPriceLabel)},s.a.createElement(p.a,{id:C})),s.a.createElement(j,{showPriceRange:u,priceRange:W,price:a,rangeContainerClasses:c()(L.a.sellingPrice,L.a.sellingPriceValue,L.a["sellingPriceValue--range"],M,Q.price_sellingPriceRange),singleContainerClasses:c()(L.a.sellingPrice,L.a.sellingPriceValue,F,Q.price_sellingPrice)})),b&&s.a.createElement(x,{installments:Y,showLabels:h,className:"".concat(z," ").concat(Q.price_installmentContainer),interestRateClass:"".concat(T," ").concat(Q.price_interestRate),installmentClass:"".concat(B," ").concat(Q.price_installment)}),U&&f&&r-a>0&&s.a.createElement("div",{className:c()(L.a.savingPrice,G,Q.price_savingsContainer)},s.a.createElement("div",{className:c()(L.a.savingPriceValue,J,Q.price_savings)},s.a.createElement(m.FormattedMessage,{id:"store/pricing.savings",values:{savings:s.a.createElement("span",{className:Q.price_savings_value},P()({intl:H,culture:K,value:r-a}))}}))))}));V.defaultProps={showSellingPriceRange:!1,showListPriceRange:!1,showListPrice:!0,showLabels:!0,showInstallments:!1,showSavings:!1,labelSellingPrice:null,labelListPrice:null},V.schema={title:"admin/editor.productPrice.title",description:"admin/editor.productPrice.description",type:"object",properties:{showSellingPriceRange:{type:"boolean",title:"admin/editor.productPrice.showSellingPriceRange",default:V.defaultProps.showSellingPriceRange,isLayout:!0},showListPriceRange:{type:"boolean",title:"admin/editor.productPrice.showListPriceRange",default:V.defaultProps.showListPriceRange,isLayout:!0},showListPrice:{type:"boolean",title:"admin/editor.productPrice.showListPrice",default:V.defaultProps.showListPrice,isLayout:!0},showLabels:{type:"boolean",title:"admin/editor.productPrice.showLabels",default:V.defaultProps.showLabels,isLayout:!0},showInstallments:{type:"boolean",title:"admin/editor.productPrice.showInstallments",default:V.defaultProps.showInstallments,isLayout:!0},showSavings:{type:"boolean",title:"admin/editor.productPrice.showSavings",default:V.defaultProps.showSavings,isLayout:!0}}};t.a=V}}]);