OwlCyberSecurity - MANAGER
Edit File: product-summary-frontend.js
(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[895],{3326:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>f});var n=o(1609),r=o(851),s=o(6087),l=o(6004);const c=t=>t.replace(/<\/?[a-z][^>]*?>/gi,""),a=(t,e)=>t.replace(/[\s|\.\,]+$/i,"")+e;var i=o(9446);const u=({source:t,maxLength:e=15,countType:o="words",className:r="",style:u={}})=>{const d=(0,s.useMemo)((()=>((t,e=15,o="words")=>{const n=(0,l.autop)(t);if((0,i.count)(n,o)<=e)return n;const r=(t=>{const e=t.indexOf("</p>");return-1===e?t:t.substr(0,e+4)})(n);return(0,i.count)(r,o)<=e?r:"words"===o?((t,e,o="…",n=!0)=>{const r=c(t),s=r.split(" ").splice(0,e).join(" ");return s===r?n?(0,l.autop)(r):r:n?(0,l.autop)(a(s,o)):a(s,o)})(r,e):((t,e,o=!0,n="…",r=!0)=>{const s=c(t),i=s.slice(0,e);if(i===s)return r?(0,l.autop)(s):s;if(o)return(0,l.autop)(a(i,n));const u=i.match(/([\s]+)/g),d=u?u.length:0,p=s.slice(0,e+d);return r?(0,l.autop)(a(p,n)):a(p,n)})(r,e,"characters_including_spaces"===o)})(t,e,o)),[t,e,o]);return(0,n.createElement)(s.RawHTML,{style:u,className:r},d)};var d=o(812),p=o(2796),m=o(3249),y=o(1616);o(7766);const f=(0,y.withProductDataContext)((t=>{const{className:e}=t,{parentClassName:o}=(0,p.useInnerBlockLayoutContext)(),{product:s}=(0,p.useProductDataContext)(),l=(0,m.p)(t);if(!s)return(0,n.createElement)("div",{className:(0,r.A)(e,"wc-block-components-product-summary",{[`${o}__product-summary`]:o})});const c=s.short_description?s.short_description:s.description;return c?(0,n.createElement)(u,{className:(0,r.A)(e,l.className,"wc-block-components-product-summary",{[`${o}__product-summary`]:o}),source:c,maxLength:150,countType:d.r7.wordCountType||"words",style:l.style}):null}))},3249:(t,e,o)=>{"use strict";o.d(e,{p:()=>i});var n=o(851),r=o(3993),s=o(1194),l=o(9786);function c(t={}){const e={};return(0,l.getCSSRules)(t,{selector:""}).forEach((t=>{e[t.key]=t.value})),e}function a(t,e){return t&&e?`has-${(0,s.c)(e)}-${t}`:""}const i=t=>{const e=(t=>{const e=(0,r.isObject)(t)?t:{style:{}};let o=e.style;return(0,r.isString)(o)&&(o=JSON.parse(o)||{}),(0,r.isObject)(o)||(o={}),{...e,style:o}})(t),o=function(t){var e,o,s,l,i,u,d;const{backgroundColor:p,textColor:m,gradient:y,style:f}=t,v=a("background-color",p),g=a("color",m),h=function(t){if(t)return`has-${t}-gradient-background`}(y),b=h||(null==f||null===(e=f.color)||void 0===e?void 0:e.gradient);return{className:(0,n.A)(g,h,{[v]:!b&&!!v,"has-text-color":m||(null==f||null===(o=f.color)||void 0===o?void 0:o.text),"has-background":p||(null==f||null===(s=f.color)||void 0===s?void 0:s.background)||y||(null==f||null===(l=f.color)||void 0===l?void 0:l.gradient),"has-link-color":(0,r.isObject)(null==f||null===(i=f.elements)||void 0===i?void 0:i.link)?null==f||null===(u=f.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:c({color:(null==f?void 0:f.color)||{}})}}(e),s=function(t){var e;const o=(null===(e=t.style)||void 0===e?void 0:e.border)||{};return{className:function(t){var e;const{borderColor:o,style:r}=t,s=o?a("border-color",o):"";return(0,n.A)({"has-border-color":!!o||!(null==r||null===(e=r.border)||void 0===e||!e.color),[s]:!!s})}(t),style:c({border:o})}}(e),l=function(t){var e;return{className:void 0,style:c({spacing:(null===(e=t.style)||void 0===e?void 0:e.spacing)||{}})}}(e),i=(t=>{const e=(0,r.isObject)(t.style.typography)?t.style.typography:{},o=(0,r.isString)(e.fontFamily)?e.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:o,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,textDecoration:e.textDecoration,textTransform:e.textTransform}}})(e);return{className:(0,n.A)(i.className,o.className,s.className,l.className),style:{...i.style,...o.style,...s.style,...l.style}}}},7766:()=>{}}]);