|
1
|
|
-(()=>{"use strict";var t={5795:t=>{t.exports=window.ReactDOM},9940:(t,e,n)=>{var r=n(5795);e.H=r.createRoot,r.hydrateRoot}},e={};const n=window.React;var r=function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}(9940);const o="linear-gradient(135deg, #0040E3, #18D4FD)",a=(t,e,n=!1)=>{return null==(r=e)||""===r||Array.isArray(r)&&0===r.length||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&""===r.trim()||"number"==typeof r&&0===r?"":`${t}: ${e}${n?" !important":""};`;var r},i=(t,e=!0,n=!0,r=!0)=>{const{type:i="solid",color:s="",gradient:l=o,image:c={},position:d="center center",attachment:u="",repeat:p="no-repeat",size:$="",overlayColor:f=""}=t||{};return"gradient"===i&&n?a("background",l):"image"===i&&r?`background: url(${c?.url});\n\t\t\t\t${a("background-color",f)}\n\t\t\t\t${a("background-position",d)}\n\t\t\t\t${a("background-size",$)}\n\t\t\t\t${a("background-repeat",p)}\n\t\t\t\t${a("background-attachment",u)}\n\t\t\t\t${a("background-repeat",p)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&a("background",s)},s=t=>{const{width:e="",style:n="solid",color:r="",side:o="all",radius:i=""}=t||{},s=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},l=`${e} ${n} ${r}`,c=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>s(t)?`border-${t}: ${l};`:"")).join(""):""}\n\t\t${a("border-radius",i)}\n\t`;return c},l=t=>{const{side:e=2,vertical:n="0px",horizontal:r="0px",top:o="0px",right:a="0px",bottom:i="0px",left:s="0px"}=t||{};return 2===e?`${n} ${r}`:`${o} ${a} ${i} ${s}`},c=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:o="sans-serif",fontVariant:i=400,fontWeight:s,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:d,textTransform:u,textDecoration:p,lineHeight:$,letterSpace:f}=e||{},g=!n||!r||"Default"===r,m=c?.desktop||c,y=c?.tablet||m,b=c?.mobile||y,h=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},x=`\n\t\t${g?"":`font-family: '${r}', ${o};`}\n\t\t${a("font-weight",s)}\n\t\t${a("font-size",h(m))}\n\t\t${a("font-style",d)}\n\t\t${a("text-transform",u)}\n\t\t${a("text-decoration",p)}\n\t\t${a("line-height",$)}\n\t\t${a("letter-spacing",f)}\n\t`,v=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",k=g?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||g?"":`@import url(${k});`,styles:`${t}{\n\t\t\t${x}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${a("font-size",h(y))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${a("font-size",h(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},d="bBlocksAnimatedText",u=({attributes:t,id:e})=>{const{textAlign:r,background:o,typography:a,color:u,padding:p,border:$}=t,f=`#${e} .${d}`;return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${c("",a)?.googleFontLink}\n\t\t${c(`${f} .content`,a)?.styles}\n\n\t\t${f}{\n\t\t\ttext-align: ${r};\n\t\t\t${i(o)}\n\t\t\tpadding: ${l(p)};\n\t\t\t${s($)}\n\t\t}\n\t\t${f} .content{\n\t\t\tcolor: ${u};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},p=jQuery;document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-animated-text").forEach((t=>{const e=JSON.parse(t.dataset.attributes);(0,r.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)(u,{attributes:e,id:t.id}),(0,n.createElement)($,{attributes:e,id:t.id}))),t?.removeAttribute("data-attributes")}))}));const $=({attributes:t,id:e})=>{const{loop:r,animateIn:o,inEffect:a,inSequence:i,outEffect:s,outSequence:l,content:c}=t,u=`#${e} .content`;return(0,n.useEffect)((()=>{const e=new IntersectionObserver((n=>{n[0].intersectionRatio<=0||(p(u).textillate((t=>{const{loop:e,animateIn:n,inEffect:r,inSequence:o,outEffect:a,outSequence:i}=t;return{loop:e,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:r,delayScale:1.5,delay:50,sync:"sync"===o,shuffle:"shuffle"===o,reverse:"reverse"===o},out:{effect:a,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},type:n}})(t)),e.unobserve(n[0].target))}));e.observe(document.querySelector(u))}),[r,o,a,i,s,l]),(0,n.createElement)("div",{className:d},(0,n.createElement)("p",{className:"content"},c))}})(); |
|
1
|
+(()=>{"use strict";const t=window.React,e=window.ReactDOM;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"),n=e.documentElement;return!n||"svg"!==n.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),n=await e.text();return this.sanitize(`${n}`)}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 n=e.name,r=n.toLowerCase(),i=e.value;if(this.options.removeEvents&&r.startsWith("on"))return void t.removeAttribute(n);if(this.options.removeExternalResources&&("href"===r||r.endsWith(":href"))&&!this.isAllowedUrl(i))return void t.removeAttribute(n);const o=r.replace("xlink:","");this.allowedAttributeSet.has(r)||this.allowedAttributeSet.has(o)?this.options.removeExternalResources&&this.hasExternalUrl(i)?t.removeAttribute(n):"style"===r&&this.options.sanitizeStyle&&t.setAttribute(n,this.sanitizeCss(i)):t.removeAttribute(n)}))}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 n="linear-gradient(135deg, #0040E3, #18D4FD)",r=t=>{const e=(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}})(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},i=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},o=(t,e=!0,o=!0,s=!0)=>{const{type:a="solid",color:l="",gradient:c=n,image:d={},position:p="center center",attachment:u="",repeat:h="no-repeat",size:m="",overlayColor:f=""}=t||{};return"gradient"===a&&o?i("background",c):"image"===a&&s?`background: ${r(d?.url)};\n\t\t\t\t${i("background-color",f)}\n\t\t\t\t${i("background-position",p)}\n\t\t\t\t${i("background-size",m)}\n\t\t\t\t${i("background-repeat",h)}\n\t\t\t\t${i("background-attachment",u)}\n\t\t\t\t${i("background-repeat",h)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&i("background",l)},s=t=>{const{width:e="",style:n="solid",color:r="",side:o="all",radius:s=""}=t||{},a=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},l=`${e} ${n} ${r}`,c=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>a(t)?`border-${t}: ${l};`:"")).join(""):""}\n\t\t${i("border-radius",s)}\n\t`;return c},a=t=>{const{side:e=2,vertical:n="0px",horizontal:r="0px",top:i="0px",right:o="0px",bottom:s="0px",left:a="0px"}=t||{};return 2===e?`${n} ${r}`:`${i} ${o} ${s} ${a}`},l=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:o="sans-serif",fontVariant:s=400,fontWeight:a,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:d,textTransform:p,textDecoration:u,lineHeight:h,letterSpace:m}=e||{},f=!n||!r||"Default"===r,g=c?.desktop||c,y=c?.tablet||g,b=c?.mobile||y,$=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},w=`\n\t\t${f?"":`font-family: '${r}', ${o};`}\n\t\t${i("font-weight",a)}\n\t\t${i("font-size",$(g))}\n\t\t${i("font-style",d)}\n\t\t${i("text-transform",p)}\n\t\t${i("text-decoration",u)}\n\t\t${i("line-height",h)}\n\t\t${i("letter-spacing",m)}\n\t`,x=s&&400!==s?"400i"===s?":ital@1":s?.includes("00i")?`: ital, wght@1, ${s?.replace("00i","00")} `:`: wght@${s} `:"",v=f?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${x.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||f?"":`@import url(${v});`,styles:`${t}{\n\t\t\t${w}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${i("font-size",$(y))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${i("font-size",$(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},c="bBlocksAnimatedText",d=window.ReactJSXRuntime,p=({attributes:t,id:e})=>{const{textAlign:n,background:r,typography:i,color:p,padding:u,border:h}=t,m=`#${e} .${c}`;return(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${l("",i)?.googleFontLink}\n\t\t${l(`${m} .content`,i)?.styles}\n\n\t\t${m}{\n\t\t\ttext-align: ${n};\n\t\t\t${o(r)}\n\t\t\tpadding: ${a(u)};\n\t\t\t${s(h)}\n\t\t}\n\t\t${m} .content{\n\t\t\tcolor: ${p};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},u=jQuery;document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-animated-text").forEach((t=>{const n=JSON.parse(t.dataset.attributes);(0,e.createRoot)(t).render((0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p,{attributes:n,id:t.id}),(0,d.jsx)(h,{attributes:n,id:t.id})]})),t?.removeAttribute("data-attributes")}))}));const h=({attributes:e,id:n})=>{const{loop:r,animateIn:i,inEffect:o,inSequence:s,outEffect:a,outSequence:l,content:p}=e,h=`#${n} .content`;return(0,t.useEffect)((()=>{const t=new IntersectionObserver((n=>{n[0].intersectionRatio<=0||(u(h).textillate((t=>{const{loop:e,animateIn:n,inEffect:r,inSequence:i,outEffect:o,outSequence:s}=t;return{loop:e,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:r,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},out:{effect:o,delayScale:1.5,delay:50,sync:"sync"===s,shuffle:"shuffle"===s,reverse:"reverse"===s},type:n}})(e)), |