| 1 |
(()=>{"use strict";const t=window.ReactDOM,n=t=>!(null==t||""===t||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&""===t.trim()||"number"==typeof t&&0===t);window.React;const e=(t,e)=>n(e)?`${t}: ${e};`:"",o=(t,n="box")=>{const{hOffset:e="0px",vOffset:o="0px",blur:i="0px",spreed:r="0px",color:a="#7090b0",isInset:s=!1}=t||{},$=`${e} ${o} ${i}`;return("text"===n?`${$} ${a}`:`${$} ${r} ${a} ${s?"inset":""}`)||"none"},i="bBlocksIconBox",r=window.ReactJSXRuntime,a=({attributes:t,id:a,extraCSS:s=""})=>{const{wrapper:$,icon:d,animation:c}=t,{size:l,color:u,shadow:h}=d,{width:b,height:m}=$,{duration:p,delay:y,type:x,iteration:w,iterationCount:g,hover:f}=c,v=`#${a} .${i}`,j=`${v} svg`,S=(t,n,e,o,i)=>`${n} ${e}ms ${n==t+"Spin"?"linear":n===t+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${s}\n\t\t\t${v}{\n\t\t\t\twidth: ${b&&0!==parseInt(b)?b:"auto"};\n\t\t\t\theight: ${m&&0!==parseInt(m)?m:"auto"};\n\t\t\t}\n\t\t\t#${a}{\n\t\t\t\t${e("justify-content",$?.alignment?.desktop)}\n\t\t\t}\n\t\t\t${j}{\n\t\t\t\tfill: ${u};\n\t\t\t\theight: ${l};\n\t\t\t\twidth: ${l};\n\t\t\t\tfilter: drop-shadow(${o(h,"text")});\n\t\t\t}\n\n\t\t\t${v}:hover svg {\n\t\t\t\t${e("fill",d?.hover?.color)}\n\t\t\t\t${e("filter",n(d?.hover?.shadow)?`drop-shadow(${o(d?.hover?.shadow,"text")})`:"")}\n\t\t\t}\n\n\t\t\t${v}.${x} {\n\t\t\t\tanimation: ${S("n",x,p,y,"number"===w?g:w)}\n\t\t\t}\n\t\t\t\t\n\t\t\t${v}.${f?.type}:hover{\n\t\t\t\tanimation: ${S("h",f?.type,f?.duration,f?.delay,"number"===f?.iteration?f?.iterationCount:f?.iteration)}\n\t\t\t}\n\n\t\t\t@media only screen and (max-width: 1024px){\n\t\t\t\t#${a}{\n\t\t\t\t\t${e("justify-content",$?.alignment?.tablet)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media only screen and (max-width: 640px){\n\t\t\t\t#${a}{\n\t\t\t\t\t${e("justify-content",$?.alignment?.mobile)}\n\t\t\t\t}\n\t\t\t}\n\n`.replace(/\s+/g," ")}})},s=({attributes:t})=>{const{icon:n,animation:e}=t,{type:o,hover:a={}}=e;return(0,r.jsx)("div",{className:`${i} b-blocks-icon-box-animation ${o} ${a?.type}`,dangerouslySetInnerHTML:{__html:n.svg}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-icon-box").forEach((n=>{const e=JSON.parse(n.dataset.attributes);(0,t.createRoot)(n).render((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a,{attributes:e,id:n.id}),(0,r.jsx)(s,{attributes:e})]})),n?.removeAttribute("data-attributes")}))}))})(); |