PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/image-scroller/view.js +4 -1 2.1.3 → 2.1.8 View file →
@@ -1 +1,4 @@
1 -(()=>{"use strict";const t=window.ReactDOM,e=window.React,n=window.ReactJSXRuntime,i=({attributes:t,device:i})=>{const{image:r,options:s}=t,{direction:o,isScrollAuto:a}=s,M=(0,e.useRef)(null),c=(0,e.useRef)(null),{device:l}=(()=>{const[t,n]=(0,e.useState)("desktop"),i=()=>{const t=window.innerWidth;n(t>1024?"desktop":t>640?"tablet":"mobile")};return(0,e.useEffect)((()=>(i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)})),[]),{device:t}})(),u=i||l;(0,e.useEffect)((()=>{M.current&&c.current&&a&&(M.current?.addEventListener("mouseover",(()=>{"vertical"===o&&Number(c.current.clientHeight)>parseInt(r.height[u])&&(c.current.style.transform=`translateY(-${Number(c.current.clientHeight)-parseInt(r.height[u])}px)`),"horizontal"===o&&Number(c.current.clientWidth)>Number(M.current.clientWidth)&&(c.current.style.transform=`translateX(-${Number(c.current.clientWidth)-Number(M.current.clientWidth)}px)`)})),M.current?.addEventListener("mouseout",(()=>{"vertical"===o&&(c.current.style.transform="translateY(0px)"),"horizontal"===o&&(c.current.style.transform="translateX(0px)")})))}),[a,c.current]);const d=()=>(0,n.jsx)("div",{ref:M,className:`b-blocks-image-scroller-wrapper ${o} ${a?"":"scrollable"}`,children:(0,n.jsx)("img",{ref:c,className:"b-blocks-image-scroller",src:r.img.url,alt:r.img.alt})});return(0,n.jsx)(d,{})},r=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),s=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},o="@media only screen and (max-width: 1024px)",a="@media only screen and (max-width: 640px)",M=t=>{const e=s(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},c=(t,e)=>r(e)?`${t}: ${e};`:"",l=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""},u=t=>{const{position:e="center center",xPosition:n=0,yPosition:i=0,attachment:s="",repeat:o="no-repeat",size:a="cover",customSize:M="0px"}=t||{},c=t=>"initial"!==t||r(t);return`\n\t\t${c(e)?`background-position: ${"custom"===e?`${n} ${i}`:e};`:""}\n\t\t${s&&c(s)?`background-attachment: ${s};`:""}\n\t\t${c(o)?`background-repeat: ${o};`:""}\n\t\t${c(a)?`background-size: ${"custom"===a?`${M} auto`:a};`:""}\n\t`},d=(t={})=>t?{desktop:r(t.url)?`background-image: ${M(t.url)}; ${u(t?.desktop)}`:"",tablet:r(t.url)?u(t?.tablet):"",mobile:r(t.url)?u(t?.mobile):""}:"",y=(t,e,n=!1)=>{const{type:i="color",color:M,gradient:l,img:u,video:y}=t||{},N="color"===i?c("background",M):"gradient"===i?(t=>{const{type:e="linear",radialType:n="ellipse",colors:i=[],centerPositions:s={x:0,y:0},angel:o=0}=t||{};if(r(t)){const t=i?.map((({color:t,position:e})=>`${t} ${e}%`)),r=`linear-gradient(${o}deg, ${t})`;return c("background","radial"===e?`radial-gradient(${n} at ${s?.x}% ${s?.y}%,${t})`:r)}return""})(l):"image"===i?d(u).desktop:"",j="image"===i?d(u).tablet:"",L="image"===i?d(u).mobile:"",$=n?`${e}:hover`:e;return`\n\t\t${"video"===i?((t,e)=>{const{url:n,loop:i}=t||{},r=document.querySelector(e),o=r?.querySelector(".bPlVideo"),a=document.createElement("video");if(a.muted=!0,a.autoplay=!0,a.classList.add("bPlVideo"),!o&&r&&n){const t=s(n);if(t){const e=document.createElement("source");e.src=t,a.appendChild(e),r.appendChild(a)}}return a.loop=i,a.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(y,e):""}\n\n\t\t${N?`${$}{\n\t\t\t${N}\n\t\t}`:""}\n\n\t\t${j?`${o} {\n\t\t\t${$}{\n\t\t\t\t${j}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${L?`${a} {\n\t\t\t${$}{\n\t\t\t\t${L}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},N=(t,e,n=!1)=>{const{isEnabled:i,colors:s,opacity:o=1,blend:a,filter:M="",blur:l=0,brightness:u=100,contrast:d=100,saturation:N=100,hue:j=0,position:L={top:0,right:0,bottom:0,left:0},zIndex:$=-1}=t||{},p=`${100!==u?`brightness(${u}%)`:""} ${100!==d?`contrast(${d}%)`:""} ${100!==N?`saturate(${N}%)`:""} ${0!==l?`blur(${l}px)`:""} ${0!==j?`hue-rotate(${j}deg)`:""}`,g=`${M}: ${M?p:""}; -webkit-${M}: ${M?p:""};`,m=n?`${e}:hover::after`:`${e}::after`;return i?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${r(L.top)?L.top:0};\n\t\t\tright:${r(L.right)?L.right:0};\n\t\t\tbottom:${r(L.bottom)?L.bottom:0};\n\t\t\tleft:${r(L.left)?L.left:0};\n\t\t\tz-index:${$};\n\t\t}\n\t\t${y(s,m,!1)}\n\t\t${m}{\n\t\t\t${c("opacity",o)}\n\t\t\t${c("mix-blend-mode",a)}\n\t\t\t${g}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},j=(t,e,n=!1)=>{const i=(t,e="desktop")=>{if(!r(t))return"";const{skew:n,scale:i,rotate:s,offset:o,flipX:a,flipY:M}=t,{threeDRotate:l}=s||{},{isProportion:u}=i||{},d=[];return r(n)&&(r(n?.[e]?.x)&&d.push(`skewX(${n[e].x}deg)`),r(n?.[e]?.y)&&d.push(`skewY(${n[e].y}deg)`)),u?r(i?.[e]?.scale)&&d.push(`scale(${i[e].scale})`):(r(i?.[e]?.x)&&d.push(`scaleX(${i[e].x})`),r(i?.[e]?.y)&&d.push(`scaleY(${i[e].y})`)),r(s)&&(r(s?.[e]?.z)&&d.push(`rotateZ(${s[e].z}deg)`),l&&(r(s?.[e]?.x)&&d.push(`rotateX(${s[e].x}deg)`),r(s?.[e]?.y)&&d.push(`rotateY(${s[e].y}deg)`))),r(o)&&(r(o?.[e]?.x)&&d.push(`translateX(${o[e].x})`),r(o?.[e]?.y)&&d.push(`translateY(${o[e].y})`)),r(a)&&d.push(a?"scaleX(-1)":""),r(M)&&d.push(M?"scaleY(-1)":""),0===d.length?"":c("transform",d.join(" "))},s=n?`${e}:hover`:e;return`\n\t\t${s} {\n\t\t\t${i(t,"desktop")}\n\t\t}\n\t\t${o}{\n\t\t\t${s} {\n\t\t\t\t${i(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${a}{\n\t\t\t${s} {\n\t\t\t\t${i(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},L=t=>{const{padding:e,margin:n,height:i,width:r}=t||{},s=(t,e)=>c(t,e),o=(t,e,n)=>s(t,e?.[t]?.[n])+s(`min-${t}`,e?.min?.[n])+s(`max-${t}`,e?.max?.[n]),a=t=>c("padding",l(t)),M=t=>c("margin",l(t));return{desktop:a(e?.desktop)+M(n?.desktop)+o("height",i,"desktop")+o("width",r,"desktop"),tablet:a(e?.tablet)+M(n?.tablet)+o("height",i,"tablet")+o("width",r,"tablet"),mobile:a(e?.mobile)+M(n?.mobile)+o("height",i,"mobile")+o("width",r,"mobile")}},$=t=>{const{normal:e,hover:n}=t||{},i=t=>{const{border:e,radius:n,shadow:i}=t||{},r=c("border-radius",l(n)),s=c("box-shadow",((t,e="box")=>{let n="";return t?.map(((i,r)=>{const{hOffset:s="0px",vOffset:o="0px",blur:a="0px",spreed:M="0px",color:c="#e7f0fe",isInset:l=!1}=i||{},u=l?"inset":"",d=`${s} ${o} ${a}`,y=r+1>=t.length?"":", ";n+="text"===e?`${d} ${c}${y}`:`${d} ${M} ${c} ${u}${y}`})),n||""})(i,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:n="solid",width:i="0px"}=t;return`${i} ${n} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((n=>t[n]?`border-${n}: ${e(t[n])};`:"")).join(" ").trim():c("border",e(t))})(e)+r+s};return{normal:i(e),hover:i(n)}},p=t=>{const{zIndex:e,overflow:n}=t||{},i=n?`overflow: ${n};`:"",s=t=>`${c("z-index",e?.[t])} ${c("position",r(e?.[t])?"relative":"")}`;return{desktop:s("desktop")+i,tablet:s("tablet"),mobile:s("mobile")}},g=(t,e)=>{const{desktop:n=!1,tablet:i=!1,mobile:r=!1}=t||{},s=e?"opacity: 0.5;":"display: none;",o=t=>t?s:"";return{desktop:o(n),tablet:o(i),mobile:o(r)}},m=(t,e,n=!1,i=!0)=>{const{dimension:s,transform:l,background:u,borderShadow:d,mask:m,animation:D,visibility:w,responsive:b,css:x=""}=e||{},z=n?`#${t}>div>div${i?":first-child":""}`:`#${t}>div`;((t,e,n)=>{const i=n?`#${e} > div`:`#${e}`,r=document.querySelector(i);r&&t&&t.type&&(r.setAttribute("data-aos",t.type),r.setAttribute("data-aos-duration",1e3*t.duration||.4),r.setAttribute("data-aos-delay",1e3*t.delay||0),r.classList.contains("aos-init")||(r.classList.add("aos-init"),window?.AOS?.init()),n)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?r.classList.add("aos-animate"):r.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(r)})(D,t,n);const h=L(s).desktop+p(w).desktop+((t,e,n)=>{const{transition:i=.4}=t||{},{transition:r=.4}=e||{},{transition:s=200}=n||{};return`transition: background ${i}s, border ${r}s, border-radius ${r}s, box-shadow ${r}s, transform ${s}ms ease-in-out;`})(u,d,l)+(t=>{const{isMask:e=!1,shape:n={type:"circle"},size:i={type:"contain",scale:"100%"},position:r={type:"center center",x:50,y:50},repeat:s="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===n.type?M(n.url):`url(${(o=n.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zN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jYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===o))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===i.type?i.scale:i.type};\n\t\t${"custom"===r.type?`${c("-webkit-mask-position-x",r.x)}\n\t\t\t${c("-webkit-mask-position-y",r.y)}`:`${c("-webkit-mask-position",r.type)}`}\n\t\t${"cover"!==i.type?`-webkit-mask-repeat: ${s};`:""}`:"";var o})(m),I=L(s).tablet+p(w).tablet+g(b,n).tablet,T=L(s).mobile+p(w).mobile+g(b,n).mobile,k=$(d).normal,v=$(d).hover,S=g(b,n).desktop;return`\n\t\t${h||k?`${z} {\n\t\t\t${h}\n\t\t\t${k}\n\t\t}`:""}\n\t\t${v?`${z}:hover {\n\t\t\t${v}\n\t\t}`:""}\n\n\t\t${S?`@media only screen and (min-width: 1025px) {\n\t\t\t${z}{\n\t\t\t\t${S}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${I?`${o} {\n\t\t\t${z}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${T?`${a} {\n\t\t\t${z}{\n\t\t\t\t${T}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y(u?.normal,z)}\n\t\t${y(u?.hover,z,!0)}\n\t\t${N(u?.overlay,z)}\n\t\t${N(u?.hoverOverlay,z,!0)}\n\t\t${r(l?.normal)?j(l?.normal,z):""}\n\t\t${r(l?.hover)?j(l?.hover,z,!0):""}\n\n\t\t${x}\n\t`.replace(/\s+/g," ")},D=({attributes:t,id:e,isBackend:i=!1})=>{const{image:r,options:s,advanced:M}=t,{easing:l,duration:u}=s,d=`#${e} .b-blocks-image-scroller-wrapper`,y=`${d} .b-blocks-image-scroller`;return(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${d}{\n\t\t\t${c("height",r.height.desktop)}\n\t\t}\n\t\t${y}{\n\t\t\ttransition: transform ${u}ms ${l};\n\t\t}\n\t\t${o}{\n\t\t\t${c("height",r.height.tablet)}\n\t\t}\n\t\t${a}{\n\t\t\t${c("height",r.height.mobile)}\n\t\t}\n\t\t${m(e,M,i)}\n\t\t`}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-image-scroller").forEach((e=>{const r=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D,{attributes:r,id:e.id}),(0,n.jsx)("div",{children:(0,n.jsx)(i,{attributes:r})})]})),e?.removeAttribute("data-attributes")}))}))})();
1 +(()=>{"use strict";const t=window.ReactDOM,e=window.React,i=window.ReactJSXRuntime,n=({attributes:t,device:n})=>{const{image:o,options:r}=t,{direction:s,isScrollAuto:a}=r,l=(0,e.useRef)(null),c=(0,e.useRef)(null),{device:u}=(()=>{const[t,i]=(0,e.useState)("desktop"),n=()=>{const t=window.innerWidth;i(t>1024?"desktop":t>640?"tablet":"mobile")};return(0,e.useEffect)((()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)})),[]),{device:t}})(),d=n||u;(0,e.useEffect)((()=>{l.current&&c.current&&a&&(l.current?.addEventListener("mouseover",(()=>{"vertical"===s&&Number(c.current.clientHeight)>parseInt(o.height[d])&&(c.current.style.transform=`translateY(-${Number(c.current.clientHeight)-parseInt(o.height[d])}px)`),"horizontal"===s&&Number(c.current.clientWidth)>Number(l.current.clientWidth)&&(c.current.style.transform=`translateX(-${Number(c.current.clientWidth)-Number(l.current.clientWidth)}px)`)})),l.current?.addEventListener("mouseout",(()=>{"vertical"===s&&(c.current.style.transform="translateY(0px)"),"horizontal"===s&&(c.current.style.transform="translateX(0px)")})))}),[a,c.current]);const p=()=>(0,i.jsx)("div",{ref:l,className:`b-blocks-image-scroller-wrapper ${s} ${a?"":"scrollable"}`,children:(0,i.jsx)("img",{ref:c,className:"b-blocks-image-scroller",src:o.img.url,alt:o.img.alt})});return(0,i.jsx)(p,{})},o=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),r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}};new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),i=e.documentElement;return!i||"svg"!==i.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),i=await e.text();return this.sanitize(`${i}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const i=e.name,n=i.toLowerCase(),o=e.value;if(this.options.removeEvents&&n.startsWith("on"))return void t.removeAttribute(i);if(this.options.removeExternalResources&&("href"===n||n.endsWith(":href"))&&!this.isAllowedUrl(o))return void t.removeAttribute(i);const r=n.replace("xlink:","");this.allowedAttributeSet.has(n)||this.allowedAttributeSet.has(r)?this.options.removeExternalResources&&this.hasExternalUrl(o)?t.removeAttribute(i):"style"===n&&this.options.sanitizeStyle&&t.setAttribute(i,this.sanitizeCss(o)):t.removeAttribute(i)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const s="@media only screen and (min-width: 1025px)",a="@media only screen and (max-width: 1024px)",l="@media only screen and (max-width: 640px)",c=t=>{const e=r(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},u=(t,e)=>o(e)?`${t}: ${e};`:"",d=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""},p=t=>{const{position:e="center center",xPosition:i=0,yPosition:n=0,attachment:r="",repeat:s="no-repeat",size:a="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||o(t);return`\n\t\t${c(e)?`background-position: ${"custom"===e?`${i} ${n}`:e};`:""}\n\t\t${r&&c(r)?`background-attachment: ${r};`:""}\n\t\t${c(s)?`background-repeat: ${s};`:""}\n\t\t${c(a)?`background-size: ${"custom"===a?`${l} auto`:a};`:""}\n\t`},m=(t={})=>t?{desktop:o(t.url)?`background-image: ${c(t.url)}; ${p(t?.desktop)}`:"",tablet:o(t.url)?p(t?.tablet):"",mobile:o(t.url)?p(t?.mobile):""}:"",M=(t,e,i=!1)=>{const{type:n="color",color:s,gradient:c,img:d,video:p}=t||{},M="color"===n?u("background",s):"gradient"===n?(t=>{const{type:e="linear",radialType:i="ellipse",colors:n=[],centerPositions:r={x:0,y:0},angel:s=0}=t||{};if(o(t)){const t=n?.map((({color:t,position:e})=>`${t} ${e}%`)),o=`linear-gradient(${s}deg, ${t})`;return u("background","radial"===e?`radial-gradient(${i} at ${r?.x}% ${r?.y}%,${t})`:o)}return""})(c):"image"===n?m(d).desktop:"",$="image"===n?m(d).tablet:"",y="image"===n?m(d).mobile:"",h=i?`${e}:hover`:e;return`\n\t\t${"video"===n?((t,e)=>{const{url:i,loop:n}=t||{},o=document.querySelector(e),s=o?.querySelector(".bPlVideo"),a=document.createElement("video");if(a.muted=!0,a.autoplay=!0,a.classList.add("bPlVideo"),!s&&o&&i){const t=r(i);if(t){const e=document.createElement("source");e.src=t,a.appendChild(e),o.appendChild(a)}}return a.loop=n,a.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(p,e):""}\n\n\t\t${M?`${h}{\n\t\t\t${M}\n\t\t}`:""}\n\n\t\t${$?`${a} {\n\t\t\t${h}{\n\t\t\t\t${$}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y?`${l} {\n\t\t\t${h}{\n\t\t\t\t${y}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},$=(t,e,i=!1)=>{const{isEnabled:n,colors:r,opacity:s=1,blend:a,filter:l="",blur:c=0,brightness:d=100,contrast:p=100,saturation:m=100,hue:$=0,position:y={top:0,right:0,bottom:0,left:0
2 +},zIndex:h=-1}=t||{},b=`${100!==d?`brightness(${d}%)`:""} ${100!==p?`contrast(${p}%)`:""} ${100!==m?`saturate(${m}%)`:""} ${0!==c?`blur(${c}px)`:""} ${0!==$?`hue-rotate(${$}deg)`:""}`,g=`${l}: ${l?b:""}; -webkit-${l}: ${l?b:""};`,w=i?`${e}:hover::after`:`${e}::after`;return n?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${o(y.top)?y.top:0};\n\t\t\tright:${o(y.right)?y.right:0};\n\t\t\tbottom:${o(y.bottom)?y.bottom:0};\n\t\t\tleft:${o(y.left)?y.left:0};\n\t\t\tz-index:${h};\n\t\t}\n\t\t${M(r,w,!1)}\n\t\t${w}{\n\t\t\t${u("opacity",s)}\n\t\t\t${u("mix-blend-mode",a)}\n\t\t\t${g}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},y=(t,e,i=!1)=>{const n=(t,e="desktop")=>{if(!o(t))return"";const{skew:i,scale:n,rotate:r,offset:s,flipX:a,flipY:l}=t,{threeDRotate:c}=r||{},{isProportion:d}=n||{},p=[];return o(i)&&(o(i?.[e]?.x)&&p.push(`skewX(${i[e].x}deg)`),o(i?.[e]?.y)&&p.push(`skewY(${i[e].y}deg)`)),d?o(n?.[e]?.scale)&&p.push(`scale(${n[e].scale})`):(o(n?.[e]?.x)&&p.push(`scaleX(${n[e].x})`),o(n?.[e]?.y)&&p.push(`scaleY(${n[e].y})`)),o(r)&&(o(r?.[e]?.z)&&p.push(`rotateZ(${r[e].z}deg)`),c&&(o(r?.[e]?.x)&&p.push(`rotateX(${r[e].x}deg)`),o(r?.[e]?.y)&&p.push(`rotateY(${r[e].y}deg)`))),o(s)&&(o(s?.[e]?.x)&&p.push(`translateX(${s[e].x})`),o(s?.[e]?.y)&&p.push(`translateY(${s[e].y})`)),o(a)&&p.push(a?"scaleX(-1)":""),o(l)&&p.push(l?"scaleY(-1)":""),0===p.length?"":u("transform",p.join(" "))},r=i?`${e}:hover`:e;return`\n\t\t${r} {\n\t\t\t${n(t,"desktop")}\n\t\t}\n\t\t${a}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${l}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},h=t=>{const{padding:e,margin:i,height:n,width:o}=t||{},r=(t,e)=>u(t,e),s=(t,e,i)=>r(t,e?.[t]?.[i])+r(`min-${t}`,e?.min?.[i])+r(`max-${t}`,e?.max?.[i]),a=t=>u("padding",d(t)),l=t=>u("margin",d(t));return{desktop:a(e?.desktop)+l(i?.desktop)+s("height",n,"desktop")+s("width",o,"desktop"),tablet:a(e?.tablet)+l(i?.tablet)+s("height",n,"tablet")+s("width",o,"tablet"),mobile:a(e?.mobile)+l(i?.mobile)+s("height",n,"mobile")+s("width",o,"mobile")}},b=t=>{const{normal:e,hover:i}=t||{},n=t=>{const{border:e,radius:i,shadow:n}=t||{},o=u("border-radius",d(i)),r=u("box-shadow",((t,e="box")=>{let i="";return t?.map(((n,o)=>{const{hOffset:r="0px",vOffset:s="0px",blur:a="0px",spreed:l="0px",color:c="#e7f0fe",isInset:u=!1}=n||{},d=u?"inset":"",p=`${r} ${s} ${a}`,m=o+1>=t.length?"":", ";i+="text"===e?`${p} ${c}${m}`:`${p} ${l} ${c} ${d}${m}`})),i||""})(n,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:i="solid",width:n="0px"}=t;return`${n} ${i} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((i=>t[i]?`border-${i}: ${e(t[i])};`:"")).join(" ").trim():u("border",e(t))})(e)+o+r};return{normal:n(e),hover:n(i)}},g=t=>{const{zIndex:e,overflow:i}=t||{},n=i?`overflow: ${i};`:"",r=t=>`${u("z-index",e?.[t])} ${u("position",o(e?.[t])?"relative":"")}`;return{desktop:r("desktop")+n,tablet:r("tablet"),mobile:r("mobile")}},w=(t,e)=>{const{desktop:i=!1,tablet:n=!1,mobile:o=!1}=t||{},r=e?"opacity: 0.5;":"display: none;",s=t=>t?r:"";return{desktop:s(i),tablet:s(n),mobile:s(o)}},x=(t,e,i=!1,n=!0)=>{const{dimension:r,transform:d,background:p,borderShadow:m,mask:x,animation:j,visibility:N,responsive:f,position:L={},floating:D={},motion:v={},css:z=""}=e||{},k=i?`#${t}>div>div${n?":first-child":""}`:`#${t}>div`;((t,e,i)=>{const n=i?`#${e} > div`:`#${e}`,o=document.querySelector(n);o&&t&&t.type&&(o.setAttribute("data-aos",t.type),o.setAttribute("data-aos-duration",1e3*t.duration||.4),o.setAttribute("data-aos-delay",1e3*t.delay||0),o.classList.contains("aos-init")||(o.classList.add("aos-init"),window?.AOS?.init()),i)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?o.classList.add("aos-animate"):o.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(o)})(j,t,i);const T=h(r).desktop+g(N).desktop+((t,e,i)=>{const{transition:n=.4}=t||{},{transition:o=.4}=e||{},{transition:r=200}=i||{};return`transition: background ${n}s, border ${o}s, border-radius ${o}s, box-shadow ${o}s, transform ${r}ms ease-in-out;`})(p,m,d)+(t=>{const{isMask:e=!1,shape:i={type:"circle"},size:n={type:"contain",scale:"100%"},position:o={type:"center center",x:50,y:50},repeat:r="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===i.type?c(i.url):`url(${(s=i.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNz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aHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{
3 +svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===s))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===n.type?n.scale:n.type};\n\t\t${"custom"===o.type?`${u("-webkit-mask-position-x",o.x)}\n\t\t\t${u("-webkit-mask-position-y",o.y)}`:`${u("-webkit-mask-position",o.type)}`}\n\t\t${"cover"!==n.type?`-webkit-mask-repeat: ${r};`:""}`:"";var s})(x),I=h(r).tablet+g(N).tablet+w(f,i).tablet,S=h(r).mobile+g(N).mobile+w(f,i).mobile,A=b(m).normal,E=b(m).hover,O=w(f,i).desktop;return`\n\t\t${T||A?`${k} {\n\t\t\t${T}\n\t\t\t${A}\n\t\t}`:""}\n\t\t${E?`${k}:hover {\n\t\t\t${E}\n\t\t}`:""}\n\n\t\t${O?`${s} {\n\t\t\t${k}{\n\t\t\t\t${O}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${I?`${a} {\n\t\t\t${k}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${S?`${l} {\n\t\t\t${k}{\n\t\t\t\t${S}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${M(p?.normal,k)}\n\t\t${M(p?.hover,k,!0)}\n\t\t${$(p?.overlay,k)}\n\t\t${$(p?.hoverOverlay,k,!0)}\n\t\t${o(d?.normal)?y(d?.normal,k):""}\n\t\t${o(d?.hover)?y(d?.hover,k,!0):""}\n\t\t${((t,e)=>{const{desktop:i={},tablet:n={},mobile:o={}}=t,r=(t={})=>`\n\t\t${e}{\n\t\t\t${u("position",t?.type)}\n\t\t\t${u("left",t?.horizontal?.left)}\n\t\t\t${u("right",t?.horizontal?.right)}\n\t\t\t${u("top",t?.vertical?.top)}\n\t\t\t${u("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${i?.type?r(i):""}\n\t\t\n\t\t${a}{\n\t\t\t${n?.type?r(n):""}\n\t\t}\n\n\t\t${l}{\n\t\t\t${o?.type?r(o):""}\n\t\t}\n\t`})(L,k)}\n\t\t${((t,e,i="")=>{const{translate:n={},rotate:r={},scale:s={},isEnabled:a=!1}=t||{};if(!a)return"";const l=[],c=[];return[{name:"Translate",property:"translate",values:n,value:t=>["x","y"].some((e=>o(n?.[e]?.[t])))?`${n?.x?.[t]||0}px ${n?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:r,value:t=>["x","y","z"].filter((e=>o(r?.[e]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${r[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:s,value:t=>{const e=s?.y?.[t],i=s?.z?.[t];return o(e)||o(i)?o(i)?`1 ${o(e)?e:1} ${i}`:`1 ${e}`:""}}].forEach((({name:t,property:e,values:n,value:o})=>{const r=o("from"),s=o("to");if(!r||!s)return;const a=Number(n?.duration)>0?Number(n.duration):1e3,u=Number(n?.delay)>0?Number(n.delay):0,d=`advFloat${t}${i?`-${i}`:""}`;l.push(`@keyframes ${d}{ from{ ${e}: ${r}; } to{ ${e}: ${s}; } }`),c.push(`${d} ${a}ms ease-in-out ${u}ms infinite alternate`)})),c.length?`\n\t\t${l.join(" ")}\n\t\t${e}{\n\t\t\tanimation: ${c.join(", ")};\n\t\t}\n\t`:""})(D,k,t)}\n\t\t${((t,e,i)=>{const{isEnable:n=!1,vertical:r={},horizontal:c={},transparency:u={},blur:d={},rotate:p={},scale:m={},effectsRelativeTo:M="viewport",effectOn:$=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:y=!1,mouseTrack:h={},tilt:b={},sticky:g={}}=t||{},w=(t,e)=>o(t)&&!isNaN(t)?Number(t):e,x="viewport"===M,j=x?"view()":"scroll(nearest block)",N=[],f=[],L=[],D=[],v=String(i??"").replace(/[^a-zA-Z0-9]/g,""),z=(t,e,i)=>{N.push(`@keyframes advMe${t}${v}{ ${e} }`),f.push(`advMe${t}${v}`),L.push(j),D.push((t=>{const e=w(t?.top,0),i=w(t?.bottom,100),n=Math.min(e,i),o=Math.max(e,i);return x?`cover ${n}% ${o>=90?"contain 100%":`cover ${o}%`}`:`min(${3*n}vh, ${n}%) min(${3*o}vh, ${o}%)`})(i))};if(n){const t=r?.direction,e=c?.direction,i=t?100*w(r?.speed,4):0,n=e?100*w(c?.speed,4):0;if(i||n){const o="up"===t?-i:i,s="to-left"===e?-n:n,a=[i&&r,n&&c].filter(Boolean);z("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${o}px; }`,{top:Math.min(...a.map((t=>w(t?.top,0)))),bottom:Math.max(...a.map((t=>w(t?.bottom,100))))})}const o=u?.direction;if(o){const t=Math.max(0,1-w(u?.level,5)/10),e={"fade-in":`from{ opacity: ${t}; } to{ opacity: 1; }`,"fade-out":`from{ opacity: 1; } to{ opacity: ${t}; }`,"fade-out-in":`0%{ opacity: 1; } 50%{ opacity: ${t}; } 100%{ opacity: 1; }`,"fade-in-out":`0%{ opacity: ${t}; } 50%{ opacity: 1; } 100%{ opacity: ${t}; }`}[o];e&&z("Opacity",e,u)}const s=d?.direction;if(s){const t=3*w(d?.level,4),e={"fade-in":`from{ filter: blur(${t}px); } to{ filter: blur(0px); }`,"fade-out":`from{ filter: blur(0px); } to{ filter: blur(${t}px); }`,"fade-out-in":`0%{ filter: blur(0px); } 50%{ filter: blur(${t}px); } 100%{ filter: blur(0px); }`,"fade-in-out":`0%{ filter: blur(${t}px); } 50%{ filter: blur(0px); } 100%{ filter: blur(${t}px); }`}[s];e&&z("Blur",e,d)}const a=p?.direction;if(a){const t=20*w(p?.level,4);z("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===a?-t:t}deg; }`,p)}if(m?.direction){const t=.15*w(m?.level,4),e=Math.max(0,1-t),i=1+t,n={"scale-up":`from{ scale: 1; } to{ scale: ${i}; }`,"scale-down":`from{ scale: 1; } to{ scale: ${e}; }`,"scale-down-up":`0%{ scale: 1; } 50%{ scale: ${e}; } 100%{ scale: 1; }`,"scale-up-down":`0%{ scale: 1; } 50%{ scale: ${i}; } 100%{ scale: 1; }`}[m.direction];n&&z("Scale",n,m)}}const k=[];if(y){if(h?.direction){const t="direct"===h?.direction?100:-100;k.push(((e,i)=>`translate(${(e*t).toFixed(2)}px, ${(i*t).toFixed(2)}px)`))}if(b?.direction){const t=12*("direct"===b?.direction?1:-1);k.push(((e,i)=>`perspective(1000px) rotateX(${(i*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const T=(t,i,n)=>{if(!t||!t.defaultView)return;const o=t.defaultView,r=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),s=r.items.get(e)||{x:0,y:0};if(s.rate=i,s.build=n,r.items.set(e,s),r.bound)return;r.bound=!0;const a=e=>{const i=r.last?Math.min(e-r.last,100):16.7;r.last=e;let n=!1;r.items.forEach(((e,o)=>{const s=e.el&&e.el.isConnected?e.el:t.querySelector(o);if(!s)return;e.el=s;const a=e.rate*i/1e3,l=r.x-e.x,c=r.y-e.y,u=Math.sqrt(l*l+c*c);u<=a?(e.x=r.x,e.y=r.y):(e.x+=l/u*a,e.y+=c/u*a,n=!0),s.style.transform=e.build(e.x,e.y)})),r.frame=n?o.requestAnimationFrame(a):0,r.last=n?e:0};t.addEventListener("pointermove",(t=>{r.x=2*(t.clientX/o.innerWidth-.5),r.y=2*(t.clientY/o.innerHeight-.5),r.frame||(r.frame=o.requestAnimationFrame(a))}))};if(k.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*w(h?.speed,w(b?.speed,4))),e=(t,e)=>k.map((i=>i(t,e))).join(" ");T(document,t,e),T(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const I=t=>g?.[t]||("desktop"===t?g?.undefined:""),S=e.split(">")[0],A=t=>{const e=I(t);return e?`position: sticky; ${e}: 0; z-index: 9;`:(t=>"tablet"===t?I("desktop"):"mobile"===t?I("tablet")||I("desktop"):"")(t)?"position: static;":""},E=Array.isArray($)?$:o($)?[$]:[],O=t=>!E.length||E.includes(t)?"":`${e}{ animation-name: none; }`;return`\n\t\t${f.length?`\n\t\t${N.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${e}{\n\t\t\t\tanimation-name: ${f.join(", ")};\n\t\t\t\tanimation-duration: ${f.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${f.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${f.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${f.map((()=>x?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${L.join(", ")};\n\t\t\t\tanimation-range: ${D.join(", ")};\n\t\t\t}\n\t\t\t${O("desktop")?`${s}{ ${O("desktop")} }`:""}\n\t\t\t${O("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${O("tablet-portrait")} }`:""}\n\t\t\t${O("mobile-portrait")?`${l}{ ${O("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${k.length?`${e}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${A("desktop")?`${S}{ ${A("desktop")} }`:""}\n\t\t${A("tablet")?`${a}{ ${S}{ ${A("tablet")} } }`:""}\n\t\t${A("mobile")?`${l}{ ${S}{ ${A("mobile")} } }`:""}\n\t`})(v,k,t)}\n\t\t${z}\n\t`.replace(/\s+/g," ")},j=({attributes:t,id:e,isBackend:n=!1})=>{const{image:o,options:r,advanced:s}=t,{easing:c,duration:d}=r,p=`#${e} .b-blocks-image-scroller-wrapper`,m=`${p} .b-blocks-image-scroller`;return(0,i.jsx)("style",{
4 +dangerouslySetInnerHTML:{__html:`\n\n\t\t${p}{\n\t\t\t${u("height",o.height.desktop)}\n\t\t}\n\t\t${m}{\n\t\t\ttransition: transform ${d}ms ${c};\n\t\t}\n\t\t${a}{\n\t\t\t${u("height",o.height.tablet)}\n\t\t}\n\t\t${l}{\n\t\t\t${u("height",o.height.mobile)}\n\t\t}\n\t\t${x(e,s,n)}\n\t\t`}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-image-scroller").forEach((e=>{const o=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j,{attributes:o,id:e.id}),(0,i.jsx)("div",{children:(0,i.jsx)(n,{attributes:o})})]})),e?.removeAttribute("data-attributes")}))}))})();