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O,oBAACC,EAAD,CAAiB1C,WAAYA,EAAYwC,QAASA,IAAaJ,GAEtEA,SAAAA,EAAiBO,gBAAgB,oBAInC,IAAMD,EAAkB,SAAC,GAA4B,IAA1B1C,EAA0B,EAA1BA,WAAYwC,EAAc,EAAdA,QAC9BI,EAAe5C,EAAf4C,IAAK9B,EAAUd,EAAVc,MAEP+B,GAAgBC,EAAAA,EAAAA,QAAO,MAY7B,OAVAC,EAAAA,EAAAA,YAAU,WACLF,SAAAA,EAAeG,UAClBtC,EAAamC,EAAcG,QAASH,EAAcG,QAAQC,eAE1DjB,SAASC,iBAAiB,UAAU,WACnCvB,EAAamC,EAAcG,QAASH,EAAcG,QAAQC,qBAG1D,CAACJ,aAAD,EAACA,EAAeG,UAEZ,wCACN,oBAAC,EAAD,CAAOhD,WAAYA,EAAYC,SAAU2C,IAEzC,2BAAKM,UAAU,iBAAiB,aAAYpC,EAAOqC,IAAKN,IAExD,2BAAKK,UAAU,qBAAqB3C,wBAAyB,CAAEC,OAAQgC,O","sources":["webpack://parallax-section/external var \"React\"","webpack://parallax-section/external var \"ReactDOM\"","webpack://parallax-section/../Components/Helper/getCSS.js","webpack://parallax-section/./src/Style.js","webpack://parallax-section/./src/utils/functions.js","webpack://parallax-section/./src/script.js"],"sourcesContent":["var __WEBPACK_NAMESPACE_OBJECT__ = React;","var __WEBPACK_NAMESPACE_OBJECT__ = ReactDOM;","export const getBackgroundCSS = (bg, isSolid = true, isGradient = true, isImage = true) => {\r\n\tconst { type = 'solid', color = '#000000b3', gradient = 'linear-gradient(135deg, #4527a4, #8344c5)', image = {}, position = 'center center', attachment = 'initial', repeat = 'no-repeat', size = 'cover', overlayColor = '#000000b3' } = bg;\r\n\r\n\tconst styles = ('gradient' === type && isGradient) ? `background: ${gradient};` :\r\n\t\t('image' === type && isImage) ?\r\n\t\t\t`background: url(${image?.url});\r\n\t\t\t\tbackground-color: ${overlayColor};\r\n\t\t\t\tbackground-position: ${position};\r\n\t\t\t\tbackground-size: ${size};\r\n\t\t\t\tbackground-repeat: ${repeat};\r\n\t\t\t\tbackground-attachment: ${attachment};\r\n\t\t\t\tbackground-blend-mode: overlay;` :\r\n\t\t\tisSolid && `background: ${color};`;\r\n\r\n\treturn styles;\r\n} // PHP version in Stepped Content\r\n\r\nexport const getBorderCSS = (border) => {\r\n\tconst { width = '0px', style = 'solid', color = '#0000', side = 'all', radius = '0px' } = border;\r\n\r\n\tconst borderSideCheck = s => {\r\n\t\tconst bSide = side?.toLowerCase();\r\n\t\treturn bSide?.includes('all') || bSide?.includes(s);\r\n\t}\r\n\r\n\tconst noWidth = width === '0px' || !width;\r\n\tconst borderCSS = `${width} ${style} ${color}`;\r\n\r\n\tconst styles = `\r\n\t\t${noWidth ? '' : borderSideCheck('top') ? `border-top: ${borderCSS};` : ''}\r\n\t\t${noWidth ? '' : borderSideCheck('right') ? `border-right: ${borderCSS};` : ''}\r\n\t\t${noWidth ? '' : borderSideCheck('bottom') ? `border-bottom: ${borderCSS};` : ''}\r\n\t\t${noWidth ? '' : borderSideCheck('left') ? `border-left: ${borderCSS};` : ''}\r\n\t\t${!radius ? '' : `border-radius: ${radius};`}\r\n\t`;\r\n\r\n\treturn styles;\r\n}\r\n\r\nexport const getColorsCSS = (colors) => {\r\n\tconst { color = '#333', bgType = 'solid', bg = '#0000', gradient = 'linear-gradient(135deg, #4527a4, #8344c5)' } = colors;\r\n\r\n\tconst styles = `\r\n\t\t${color ? `color: ${color};` : ''}\r\n\t\t${gradient || bg ? `background: ${'gradient' === bgType ? gradient : bg};` : ''}\r\n\t`;\r\n\r\n\treturn styles;\r\n}\r\n\r\nexport const getIconCSS = (icon, isSize = true, isColor = true) => {\r\n\tconst { fontSize = 16, colorType = 'solid', color = 'inherit', gradient = 'linear-gradient(135deg, #4527a4, #8344c5)' } = icon;\r\n\r\n\tconst colorCSS = 'gradient' === colorType ?\r\n\t\t`color: transparent; background-image: ${gradient}; -webkit-background-clip: text; background-clip: text;` :\r\n\t\t`color: ${color};`;\r\n\r\n\tconst styles = `\r\n\t\t${!fontSize || !isSize ? '' : `font-size: ${fontSize}px;`}\r\n\t\t${isColor ? colorCSS : ''}\r\n\t`;\r\n\r\n\treturn styles;\r\n}\r\n\r\nexport const getMultiShadowCSS = (value, type = 'box') => {\r\n\tlet styles = '';\r\n\r\n\tvalue?.map((item, index) => {\r\n\t\tconst { hOffset = '0px', vOffset = '0px', blur = '0px', spreed = '0px', color = '#7090b0', isInset = false } = item;\r\n\r\n\t\tconst inset = isInset ? 'inset' : '';\r\n\t\tconst offsetBlur = `${hOffset || ''} ${vOffset || ''} ${blur || ''}`;\r\n\t\tconst isComa = index + 1 >= value.length ? '' : ', ';\r\n\r\n\t\tstyles += 'text' === type ? `${offsetBlur} ${color || ''}${isComa}` : `${offsetBlur} ${spreed || ''} ${color || ''} ${inset}${isComa}`;\r\n\t});\r\n\r\n\treturn styles || 'none';\r\n}\r\n\r\nexport const getSeparatorCSS = (separator) => {\r\n\tconst { width = '50%', height = '2px', style = 'solid', color = '#bbb' } = separator;\r\n\r\n\tconst styles = `\r\n\t\twidth: ${width};\r\n\t\t${'0px' === height && '0em' === height && '0rem' === height ? '' : `border-top: ${height} ${style} ${color};`}\r\n\t`;\r\n\r\n\treturn styles;\r\n}\r\n\r\nexport const getShadowCSS = (shadow) => {\r\n\tconst { type = 'box', hOffset = '0px', vOffset = '0px', blur = '0px', spreed = '0px', color = '#7090b0', isInset = false } = shadow;\r\n\r\n\tconst inset = isInset ? 'inset' : '';\r\n\tconst offsetBlur = `${hOffset} ${vOffset} ${blur}`;\r\n\r\n\tconst styles = 'text' === type ? `${offsetBlur} ${color}` : `${offsetBlur} ${spreed} ${color} ${inset}`;\r\n\r\n\treturn styles || 'none';\r\n}\r\n\r\nexport const getSpaceCSS = (space) => {\r\n\tconst { side = 2, vertical = '0px', horizontal = '0px', top = '0px', right = '0px', bottom = '0px', left = '0px' } = space;\r\n\r\n\tconst styles = 2 === side ? `${vertical} ${horizontal}` : `${top} ${right} ${bottom} ${left}`;\r\n\r\n\treturn styles;\r\n}\r\n\r\nexport const getTypoCSS = (selector, typo, isFamily = true) => {\r\n\tconst { fontFamily = 'Default', fontCategory = 'sans-serif', fontVariant = 400, fontWeight = 400, isUploadFont = true, fontSize = { desktop: 15, tablet: 15, mobile: 15 }, fontStyle = 'normal', textTransform = 'none', textDecoration = 'auto', lineHeight = '135%', letterSpace = '0px' } = typo;\r\n\r\n\tconst generateCss = (value, cssProperty) => !value ? '' : `${cssProperty}: ${value};`;\r\n\r\n\tconst isEmptyFamily = !isFamily || !fontFamily || 'Default' === fontFamily;\r\n\tconst desktopFontSize = fontSize?.desktop || fontSize;\r\n\tconst tabletFontSize = fontSize?.tablet || desktopFontSize;\r\n\tconst mobileFontSize = fontSize?.mobile || tabletFontSize;\r\n\r\n\tconst styles = `\r\n\t\t${isEmptyFamily ? '' : `font-family: '${fontFamily}', ${fontCategory};`}\r\n\t\t${generateCss(fontWeight, 'font-weight')}\r\n\t\t${`font-size: ${desktopFontSize}px;`}\r\n\t\t${generateCss(fontStyle, 'font-style')}\r\n\t\t${generateCss(textTransform, 'text-transform')}\r\n\t\t${generateCss(textDecoration, 'text-decoration')}\r\n\t\t${generateCss(lineHeight, 'line-height')}\r\n\t\t${generateCss(letterSpace, 'letter-spacing')}\r\n\t`;\r\n\r\n\t// Google font link\r\n\tconst linkQuery = !fontVariant || 400 === fontVariant ? '' : '400i' === fontVariant ? ':ital@1' : fontVariant?.includes('00i') ? `: ital, wght@1, ${fontVariant?.replace('00i', '00')} ` : `: wght@${fontVariant} `;\r\n\r\n\tconst link = isEmptyFamily ? '' : `https://fonts.googleapis.com/css2?family=${fontFamily?.split(' ').join('+')}${linkQuery.replace(/ /g, '')}&display=swap`;\r\n\r\n\treturn `\r\n\t\t${!isUploadFont || isEmptyFamily ? '' : `@import url(${link});`}\r\n\r\n\t\t${selector}{\r\n\t\t\t${styles}\r\n\t\t}\r\n\t\t@media (max-width: 768px) {\r\n\t\t\t${selector}{\r\n\t\t\t\t${`font-size: ${tabletFontSize}px;`}\r\n\t\t\t}\r\n\t\t}\r\n\t\t@media (max-width: 576px) {\r\n\t\t\t${selector}{\r\n\t\t\t\t${`font-size: ${mobileFontSize}px;`}\r\n\t\t\t}\r\n\t\t}\r\n\t`.replace(/\\s+/g, ' ').trim()\r\n}\r\n\r\nexport const getBoxCSS = (val = {}) => Object.values(val).join(' ');","import { getBackgroundCSS, getSpaceCSS } from '../../Components/Helper/getCSS';\r\n\r\nconst Style = ({ attributes, clientId }) => {\r\n\tconst { verticalAlign, textAlign, background, minHeight, padding } = attributes;\r\n\r\n\treturn \r\n}\r\nexport default Style;","export const parallaxInit = (el, parentEl, scrollTop = false) => {\r\n\tconst speed = parseFloat(el?.dataset?.speed) || -1;\r\n\tconst windowScrollY = scrollTop || window.scrollY;\r\n\tconst windowHeight = window.innerHeight;\r\n\tconst parentHeight = parentEl?.clientHeight;\r\n\tconst parentOffsetTop = parentEl?.offsetTop;\r\n\r\n\t// The next pixel to show on screen\r\n\tconst winBottom = windowScrollY + windowHeight;\r\n\r\n\t// If block is shown on screen\r\n\tif (winBottom > parentOffsetTop && windowScrollY < parentOffsetTop + parentHeight) {\r\n\t\t// Number of pixels shown after block appear\r\n\t\tconst imgBottom = ((winBottom - parentOffsetTop) * speed);\r\n\t\t// Max number of pixels until block disappear\r\n\t\tconst imgTop = windowHeight + parentHeight;\r\n\t\t// Percentage between start showing until disappearing\r\n\t\tlet imgPercent = ((imgBottom / imgTop) * 100) + (50 - (speed * 50));\r\n\r\n\t\t// Set the style\r\n\t\tel.style.top = imgPercent + '%';\r\n\t\tel.style.transform = 'translate(-50%, -' + imgPercent + '%)';\r\n\t}\r\n}","import { useEffect, useRef } from 'react';\r\nimport { render } from 'react-dom';\r\n\r\nimport './style.scss';\r\nimport Style from './Style';\r\nimport { parallaxInit } from './utils/functions';\r\n\r\n// Parallax Section\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n\tconst allParallaxSection = document.querySelectorAll('.wp-block-psb-parallax');\r\n\tallParallaxSection.forEach(parallaxSection => {\r\n\t\tconst { attributes, content } = JSON.parse(parallaxSection.dataset.props);\r\n\r\n\t\trender(