OwlCyberSecurity - MANAGER
Edit File: product-price-frontend.js
(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[388],{5921:(e,r,c)=>{"use strict";c.r(r),c.d(r,{Block:()=>g,default:()=>v});var t=c(1609),l=c(851),o=c(7723),n=c(4656),a=c(8529),s=c(6087);c(4567);const i=({currency:e,maxPrice:r,minPrice:c,priceClassName:s,priceStyle:i={}})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("span",{className:"screen-reader-text"},(0,o.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */ (0,o.__)("Price between %1$s and %2$s","woocommerce"),(0,a.formatPrice)(c),(0,a.formatPrice)(r))),(0,t.createElement)("span",{"aria-hidden":!0},(0,t.createElement)(n.FormattedMonetaryAmount,{className:(0,l.A)("wc-block-components-product-price__value",s),currency:e,value:c,style:i})," — ",(0,t.createElement)(n.FormattedMonetaryAmount,{className:(0,l.A)("wc-block-components-product-price__value",s),currency:e,value:r,style:i}))),u=({currency:e,regularPriceClassName:r,regularPriceStyle:c,regularPrice:a,priceClassName:s,priceStyle:i,price:u})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("span",{className:"screen-reader-text"},(0,o.__)("Previous price:","woocommerce")),(0,t.createElement)(n.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,t.createElement)("del",{className:(0,l.A)("wc-block-components-product-price__regular",r),style:c},e),value:a}),(0,t.createElement)("span",{className:"screen-reader-text"},(0,o.__)("Discounted price:","woocommerce")),(0,t.createElement)(n.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,t.createElement)("ins",{className:(0,l.A)("wc-block-components-product-price__value","is-discounted",s),style:i},e),value:u})),m=({align:e,className:r,currency:c,format:o="<price/>",maxPrice:a,minPrice:m,price:p,priceClassName:d,priceStyle:y,regularPrice:g,regularPriceClassName:v,regularPriceStyle:N,style:_})=>{const f=(0,l.A)(r,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});o.includes("<price/>")||(o="<price/>",console.error("Price formats need to include the `<price/>` tag."));const b=g&&p&&p<g;let P=(0,t.createElement)("span",{className:(0,l.A)("wc-block-components-product-price__value",d)});return b?P=(0,t.createElement)(u,{currency:c,price:p,priceClassName:d,priceStyle:y,regularPrice:g,regularPriceClassName:v,regularPriceStyle:N}):void 0!==m&&void 0!==a?P=(0,t.createElement)(i,{currency:c,maxPrice:a,minPrice:m,priceClassName:d,priceStyle:y}):p&&(P=(0,t.createElement)(n.FormattedMonetaryAmount,{className:(0,l.A)("wc-block-components-product-price__value",d),currency:c,value:p,style:y})),(0,t.createElement)("span",{className:f,style:_},(0,s.createInterpolateElement)(o,{price:P}))};var p=c(2796),d=c(4487),y=c(1616);const g=e=>{var r,c;const{className:o,textAlign:n,isDescendentOfSingleProductTemplate:s}=e,i=(0,d.p)(e),{parentName:u,parentClassName:y}=(0,p.useInnerBlockLayoutContext)(),{product:g}=(0,p.useProductDataContext)(),v="woocommerce/all-products"===u,N=s&&!("woocommerce/add-to-cart-with-options-grouped-product-selector-item"===u),_=(0,l.A)("wc-block-components-product-price",o,i.className,{[`${y}__product-price`]:y});if(!g.id&&!s){const e=(0,t.createElement)(m,{align:n,className:_});return v?(0,t.createElement)("div",{className:"wp-block-woocommerce-product-price"},e):e}const f=g.prices,b=N?(0,a.getCurrencyFromPriceResponse)():(0,a.getCurrencyFromPriceResponse)(f),P="5000",k=f.price!==f.regular_price,w=(0,l.A)({[`${y}__product-price__value`]:y,[`${y}__product-price__value--on-sale`]:k}),S=(0,t.createElement)(m,{align:n,className:_,style:i.style,regularPriceStyle:i.style,priceStyle:i.style,priceClassName:w,currency:b,price:N?P:f.price,minPrice:null==f||null===(r=f.price_range)||void 0===r?void 0:r.min_amount,maxPrice:null==f||null===(c=f.price_range)||void 0===c?void 0:c.max_amount,regularPrice:N?P:f.regular_price,regularPriceClassName:(0,l.A)({[`${y}__product-price__regular`]:y})});return v?(0,t.createElement)("div",{className:"wp-block-woocommerce-product-price"},S):S},v=e=>e.isDescendentOfSingleProductTemplate?(0,t.createElement)(g,{...e}):(0,y.withProductDataContext)(g)(e)},4487:(e,r,c)=>{"use strict";c.d(r,{p:()=>i});var t=c(851),l=c(3993),o=c(1194),n=c(9786);function a(e={}){const r={};return(0,n.getCSSRules)(e,{selector:""}).forEach((e=>{r[e.key]=e.value})),r}function s(e,r){return e&&r?`has-${(0,o.c)(r)}-${e}`:""}const i=e=>{const r=(e=>{const r=(0,l.isObject)(e)?e:{style:{}};let c=r.style;return(0,l.isString)(c)&&(c=JSON.parse(c)||{}),(0,l.isObject)(c)||(c={}),{...r,style:c}})(e),c=function(e){var r,c,o,n,i,u;const{backgroundColor:m,textColor:p,gradient:d,style:y}=e,g=s("background-color",m),v=s("color",p),N=function(e){if(e)return`has-${e}-gradient-background`}(d),_=N||(null==y||null===(r=y.color)||void 0===r?void 0:r.gradient);return{className:(0,t.A)(v,N,{[g]:!_&&!!g,"has-text-color":p||(null==y||null===(c=y.color)||void 0===c?void 0:c.text),"has-background":m||(null==y||null===(o=y.color)||void 0===o?void 0:o.background)||d||(null==y||null===(n=y.color)||void 0===n?void 0:n.gradient),"has-link-color":(0,l.isObject)(null==y||null===(i=y.elements)||void 0===i?void 0:i.link)?null==y||null===(u=y.elements)||void 0===u||null===(u=u.link)||void 0===u?void 0:u.color:void 0}),style:a({color:(null==y?void 0:y.color)||{}})}}(r),o=function(e){var r;const c=(null===(r=e.style)||void 0===r?void 0:r.border)||{};return{className:function(e){var r;const{borderColor:c,style:l}=e,o=c?s("border-color",c):"";return(0,t.A)({"has-border-color":!!c||!(null==l||null===(r=l.border)||void 0===r||!r.color),[o]:!!o})}(e),style:a({border:c})}}(r),n=function(e){var r;return{className:void 0,style:a({spacing:(null===(r=e.style)||void 0===r?void 0:r.spacing)||{}})}}(r),i=(e=>{const r=(0,l.isObject)(e.style.typography)?e.style.typography:{},c=(0,l.isString)(r.fontFamily)?r.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:c,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,textDecoration:r.textDecoration,textTransform:r.textTransform}}})(r);return{className:(0,t.A)(i.className,c.className,o.className,n.className),style:{...i.style,...c.style,...o.style,...n.style}}}},4567:()=>{}}]);