(()=>{"use strict";var t={5338:(t,e,n)=>{var r=n(5795);e.H=r.createRoot,r.hydrateRoot},5795:t=>{t.exports=window.ReactDOM}},e={};const n=window.React;var r=function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}(5338);const i=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},a=({attributes:t,id:e})=>{const{layout:r,alignment:a}=t,o=`#${e} .bpsc-fis-parallax-container`,s=`${o} .text-layer`,l=`${o} .image-layer`;return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n        \n        ${o}{\n          min-height:${r?.section?.minHeight?.desktop};\n          margin:${i(r?.section?.margin?.desktop)};\n        }\n          \n        ${s}{\n          padding:${i(r?.section?.padding?.desktop)};\n          justify-content: ${a};\n        }\n\n        ${l}{\n          height:${r?.section?.minHeight?.desktop}\n        }\n\n\n        @media  (min-width:641px) and (max-width: 1024px){\n          ${o}{\n            min-height:${r?.section?.minHeight?.tablet};\n            margin:${i(r?.section?.margin?.tablet)};\n          }\n            \n          ${s}{\n            padding:${i(r?.section?.padding?.tablet)};\n          }\n  \n          ${l}{\n            height:${r?.section?.minHeight?.tablet}\n          }\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\n\t\n\t\n\t\t    @media (max-width: 480px){\n          ${o}{\n            min-height:${r?.section?.minHeight?.mobile};\n            margin:${i(r?.section?.margin?.mobile)};\n          }\n            \n          ${s}{\n            padding:${i(r?.section?.padding?.mobile)};\n          }\n  \n          ${l}{\n            height:${r?.section?.minHeight?.mobile}\n          }\n\t\t\t\t\t\n\t\t    }\n\t\t\t\t\n\t`}})},o=window.wp.blockEditor,s=()=>(0,n.createElement)(o.InnerBlocks,{template:[["core/heading",{content:"bPlugins",level:2,style:{spacing:{margin:"6px 0 19px 0"},typography:{fontSize:"72px",fontWeight:"900"},color:{text:"#fff"}}}]]}),l=({attributes:t,innerContent:e,isBackend:r=!1})=>{const{image:i}=t||"",a=(0,n.useRef)(null),o=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.createElement)("div",{ref:a,className:"bpsc-fis-parallax-container",onMouseMove:t=>{const e=a.current,n=o.current,r=l.current;if(!e)return;const i=e.getBoundingClientRect(),s=(t.clientX-i.left-i.width/2)/i.width,c=(t.clientY-i.top-i.height/2)/i.height;n.style.transform=`translate(${20*s}px, ${20*c}px) scale(1.1)`,r.style.transform=`translate(${-30*s}px, ${-30*c}px)`},onMouseLeave:()=>{const t=o.current,e=l.current;t.style.transform="translate(0, 0) scale(1.1)",e.style.transform="translate(0, 0)"}},(0,n.createElement)("div",{ref:o,className:"image-layer"},(0,n.createElement)("img",{src:i,alt:"JAPAY"})),(0,n.createElement)("div",{ref:l,className:"text-layer"},r?(0,n.createElement)("div",null,(0,n.createElement)(s,null)):(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:e}})))};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-bpsc-floating-image-section").forEach((t=>{const e=JSON.parse(t.dataset.attributes),i=JSON.parse(t.dataset.content);(0,r.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)(a,{attributes:e,id:t.id}),(0,n.createElement)(l,{attributes:e,innerContent:i}))),t?.removeAttribute("data-attributes")}))}))})();