1 line
No EOL
23 KiB
JavaScript
1 line
No EOL
23 KiB
JavaScript
function astra_customizer_refresh_fragments(){var o=ast_woocommerce.cart_hash_key;window.sessionStorage.setItem(o,"blank")}function hexToRgb(o){let t;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(o))return[(t="0x"+(t=3==(t=o.substring(1).split("")).length?[t[0],t[0],t[1],t[1],t[2],t[2]]:t).join(""))>>16&255,t>>8&255,255&t].join(",");throw new Error("Bad Hex")}function astra_addon_get_shop_items_shadow_css(o,t,r,e){var c="";return c=""!=t.x&&""!=t.y&&""!=t.blur&&""!=t.spread?(c=o+" {")+"box-shadow:"+(""!==t.x?t.x+"px ":"0px ")+(""!==t.y?t.y+"px ":"0px ")+(""!==t.blur?t.blur+"px ":"0px ")+(""!==t.spread?t.spread+"px ":"0px ")+(""!==e?e+" ":"rgba(0,0,0,0.5) ")+(void 0!==r&&"inset"==r?"inset":"")+";}":c}(r=>{var o=".woocommerce div.product .woocommerce-tabs ul.tabs",t="div.product .ast-woocommerce-tabs .ast-tab-header",o=(astra_css("astra-settings[single-product-heading-tab-normal-color]","color",o+" li a,"+t),astra_css("astra-settings[single-product-heading-tab-hover-color]","color",o+" li a:hover,div.product .ast-woocommerce-accordion .ast-accordion-header:not(.active):hover"),astra_css("astra-settings[single-product-heading-tab-active-color]","color",".woocommerce div.product:not(.ast-product-tabs-layout-vertical):not(.ast-product-tabs-layout-horizontal) .woocommerce-tabs ul.tabs li.active a,"+t+".active"),astra_css("astra-settings[single-product-heading-tab-active-color]","background",".woocommerce div.product .woocommerce-tabs ul.tabs li.active:before, .woocommerce div.ast-product-tabs-layout-vertical .woocommerce-tabs ul.tabs li:hover::before"),wp.customize("astra-settings[shop-item-box-shadow-control]",function(o){o.bind(function(o){var t="";""!=o.x&&""!=o.y&&""!=o.blur&&""!=o.spread&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product, .woocommerce ul.products li.product",o,wp.customize("astra-settings[shop-item-box-shadow-position]").get(),wp.customize("astra-settings[shop-item-box-shadow-color]").get())),astra_add_dynamic_css("shop-item-box-shadow-control",t)})}),wp.customize("astra-settings[shop-item-box-shadow-color]",function(o){o.bind(function(o){var t="";""!=o&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product, .woocommerce ul.products li.product",wp.customize("astra-settings[shop-item-box-shadow-control]").get(),wp.customize("astra-settings[shop-item-box-shadow-position]").get(),o)),astra_add_dynamic_css("shop-item-box-shadow-color",t)})}),wp.customize("astra-settings[shop-item-box-shadow-position]",function(o){o.bind(function(o){var t="";""!=o&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product, .woocommerce ul.products li.product",wp.customize("astra-settings[shop-item-box-shadow-control]").get(),o,wp.customize("astra-settings[shop-item-box-shadow-color]").get())),astra_add_dynamic_css("shop-item-box-shadow-position",t)})}),wp.customize("astra-settings[shop-item-hover-box-shadow-control]",function(o){o.bind(function(o){var t="";""!=o.x&&""!=o.y&&""!=o.blur&&""!=o.spread&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product:hover, .woocommerce ul.products li.product:hover",o,wp.customize("astra-settings[shop-item-hover-box-shadow-position]").get(),wp.customize("astra-settings[shop-item-hover-box-shadow-color]").get())),astra_add_dynamic_css("shop-item-hover-box-shadow-control",t)})}),wp.customize("astra-settings[shop-item-hover-box-shadow-color]",function(o){o.bind(function(o){var t="";""!=o&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product:hover, .woocommerce ul.products li.product:hover",wp.customize("astra-settings[shop-item-hover-box-shadow-control]").get(),wp.customize("astra-settings[shop-item-hover-box-shadow-position]").get(),o)),astra_add_dynamic_css("shop-item-hover-box-shadow-color",t)})}),wp.customize("astra-settings[shop-item-hover-box-shadow-position]",function(o){o.bind(function(o){var t="";""!=o&&(t=astra_addon_get_shop_items_shadow_css(".woocommerce-page ul.products li.product:hover, .woocommerce ul.products li.product:hover",wp.customize("astra-settings[shop-item-hover-box-shadow-control]").get(),o,wp.customize("astra-settings[shop-item-hover-box-shadow-color]").get())),astra_add_dynamic_css("shop-item-hover-box-shadow-position",t)})}),astra_responsive_spacing("astra-settings[shop-button-padding]",".woocommerce.archive ul.products li a.button, .woocommerce > ul.products li a.button, .woocommerce related a.button, .woocommerce .related a.button, .woocommerce .up-sells a.button .woocommerce .cross-sells a.button","padding",["top","bottom"]),astra_responsive_spacing("astra-settings[shop-button-padding]",".woocommerce.archive ul.products li a.button, .woocommerce > ul.products li a.button, .woocommerce related a.button, .woocommerce .related a.button, .woocommerce .up-sells a.button .woocommerce .cross-sells a.button","padding",["left","right"]),astra_responsive_spacing("astra-settings[shop-product-content-padding]",".woocommerce ul.products li.product .astra-shop-summary-wrap, .woocommerce-page ul.products li.product .astra-shop-summary-wrap, .woocommerce.ast-woocommerce-shop-page-list-style ul.products li.product .astra-shop-summary-wrap, .woocommerce-page.ast-woocommerce-shop-page-list-style ul.products li.product .astra-shop-summary-wrap","padding",["top","bottom"]),astra_responsive_spacing("astra-settings[shop-product-content-padding]",".woocommerce ul.products li.product .astra-shop-summary-wrap, .woocommerce-page ul.products li.product .astra-shop-summary-wrap, .woocommerce.ast-woocommerce-shop-page-list-style ul.products li.product .astra-shop-summary-wrap, .woocommerce-page.ast-woocommerce-shop-page-list-style ul.products li.product .astra-shop-summary-wrap","padding",["left","right"]),wp.customize("astra-settings[product-sale-style]",function(o){o.bind(function(o){var t=r(document).find(".woocommerce-page .products .product .onsale, .woocommerce .products .product .onsale, .woocommerce .product .onsale");t.removeClass("circle square circle-outline square-outline"),t.addClass(o)})}),wp.customize("astra-settings[shop-pagination-style]",function(o){o.bind(function(o){var t=r("body.woocommerce, body.woocommerce-page");t.removeClass("ast-woocommerce-pagination-default ast-woocommerce-pagination-circle ast-woocommerce-pagination-square"),t.addClass("ast-woocommerce-pagination-"+o)})}),wp.customize("astra-settings[single-product-gallery-layout]",function(o){o.bind(function(o){var t=r(document).find(".woocommerce-page.single .ast-woocommerce-container .product, .woocommerce.single .ast-woocommerce-container .product");t.removeClass("ast-product-gallery-layout-vertical ast-product-gallery-layout-horizontal ast-product-gallery-layout-first-image-large ast-product-gallery-layout-vertical-slider ast-product-gallery-layout-horizontal-slider"),t.addClass("ast-product-gallery-layout-"+o),r(window).trigger("resize"),r(window).trigger("resize")})}),wp.customize("astra-settings[single-product-sticky-product-image-top-offset]",function(o){o.bind(function(o){var t;o?(t=document.querySelector(".woocommerce-product-gallery"))&&(t.style.top=o+"px"):wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[single-product-image-width]",function(o){o.bind(function(o){var t;""!=o?(t=(t=(t="")+"@media (min-width: 769px) { .woocommerce #content .ast-woocommerce-container div.product div.images, .woocommerce .ast-woocommerce-container div.product div.images, .woocommerce-page #content .ast-woocommerce-container div.product div.images, .woocommerce-page .ast-woocommerce-container div.product div.images { width: "+o+"% }")+".woocommerce #content .ast-woocommerce-container div.product div.summary, .woocommerce .ast-woocommerce-container div.product div.summary, .woocommerce-page #content .ast-woocommerce-container div.product div.summary, .woocommerce-page .ast-woocommerce-container div.product div.summary { width: "+(96-o)+"% } }",astra_add_dynamic_css("woocommerce-single-product-image-width",t),r(window).trigger("resize")):wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[single-product-related-upsell-grid]",function(o){o.bind(function(o){wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[checkout-content-width]",function(o){o.bind(function(o){"custom "!==o&&wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[checkout-content-max-width]",function(o){o.bind(function(o){var t=(t="@media all and ( min-width: 769px ) {")+(".woocommerce-checkout form.checkout{ max-width: "+parseInt(o)+"px; margin: 0 auto; } ")+"}";astra_add_dynamic_css("checkout-content-max-width",t)})}),wp.customize("astra-settings[woo-header-cart-total-display]",function(o){o.bind(function(o){r(document.body).trigger("wc_fragment_refresh")})}),wp.customize("astra-settings[woo-header-cart-title-display]",function(o){o.bind(function(o){r(document.body).trigger("wc_fragment_refresh")})}),wp.customize("astra-settings[woo-header-cart-icon-style]",function(o){o.bind(function(o){var t=r(document).find(".ast-site-header-cart");t.removeClass("ast-menu-cart-fill ast-menu-cart-outline"),t.addClass("ast-menu-cart-"+o);astra_add_dynamic_css("woo-header-cart-icon-style",".ast-site-header-cart a, .ast-site-header-cart a *{ transition: all 0s; } ")})}),wp.customize("astra-settings[woo-header-cart-icon-radius]",function(o){o.bind(function(o){o=".ast-site-header-cart.ast-menu-cart-outline .ast-addon-cart-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap{ border-radius: "+parseInt(o)+"px } ";astra_add_dynamic_css("woo-header-cart-icon-radius",o)})}),wp.customize("astra-settings[woo-sale-border-radius]",function(o){o.bind(function(o){o="body.woocommerce .onsale, body.woocommerce-page .onsale, .ast-onsale-card, body .wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale { border-radius: "+parseInt(o)+"px !important } ";astra_add_dynamic_css("woo-sale-border-radius",o)})}),wp.customize("astra-settings[header-woo-cart-icon-color]",function(o){o.bind(function(o){var t=".ast-menu-cart-fill .ast-addon-cart-wrap .count, .ast-menu-cart-fill .ast-addon-cart-wrap { background-color: "+o+"; } ";t+=".ast-site-header-cart .ast-addon-cart-wrap .count, .ast-site-header-cart .ast-addon-cart-wrap .count:after { border-color: "+o+"; } ",astra_add_dynamic_css("header-woo-cart-icon-color",t),wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[single-product-extras-text]",function(o){o.bind(function(o){r(".ast-single-product-extras p strong").text(o)})}),astra_css("astra-settings[plusminus-text-normal-color]","color",".woocommerce form .quantity .minus, .woocommerce form .quantity .plus, .woocommerce form input[type=number].qty.ast-no-internal-border "),astra_css("astra-settings[plusminus-background-normal-color]","background-color",".woocommerce form .quantity .minus, .woocommerce form .quantity .plus, .woocommerce form input[type=number].qty.ast-no-internal-border "),astra_css("astra-settings[plusminus-text-hover-color]","color",".woocommerce form .quantity .minus:hover, .woocommerce form .quantity .plus:hover"),astra_css("astra-settings[plusminus-background-hover-color]","background-color",".woocommerce form .quantity .minus:hover, .woocommerce form .quantity .plus:hover, .woocommerce form input[type=number].qty.ast-no-internal-border:hover"),wp.customize("astra-settings[single-product-extras-list]",function(o){o.bind(function(o){wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[shop-product-background-color]",function(o){o.bind(function(o){astra_add_dynamic_css("global-color-palette",".woocommerce ul.products li.product, .woocommerce-page ul.products li.product { background-color: "+o+" } ")})}),wp.customize("astra-settings[filter-background-color]",function(o){o.bind(function(o){astra_add_dynamic_css("global-color-palette",".woocommerce .astra-off-canvas-sidebar-wrapper .astra-off-canvas-sidebar, .woocommerce-page .astra-off-canvas-sidebar-wrapper .astra-off-canvas-sidebar { background-color: "+o+" } ")})}),astra_css("astra-settings[quick-view-background-color]","background-color","#ast-quick-view-content, .ast-separate-container #ast-quick-view-content .ast-article-post"),wp.customize("astra-settings[order-summary-background-color]",function(o){o.bind(function(o){var t=".woocommerce-checkout .woocommerce .ast-mobile-order-review-wrap { background-color: "+o+" } ",r=document.body.classList.contains("woocommerce-gzd-checkout"),e=document.querySelector("article").classList.contains("ast-one-column-checkout");r||(t+=e?"form #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) table { background-color: "+o+" } ":"form #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) { background-color: "+o+" } "),t+=".woocommerce-page.woocommerce-checkout form #order_review table { background-color: "+o+" } ",astra_add_dynamic_css("order-summary-background-color",t)})}),wp.customize("astra-settings[payment-option-content-background-color]",function(o){o.bind(function(o){var t=(t=".woocommerce-page.woocommerce-checkout #payment div.payment_box { background-color: "+o+" } ")+(".woocommerce-page.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: "+o+" } ")+(".ast-modern-checkout .woocommerce #payment ul.payment_methods div.payment_box { background-color: "+o+" } ");astra_add_dynamic_css("payment-option-content-background-color",t)})}),astra_css("astra-settings[single-product-title-color]","color",".single-product div.product .entry-title"),astra_css("astra-settings[single-product-price-color]","color",".single-product div.product p.price, .single-product div.product span.price"),astra_css("astra-settings[single-product-content-color]","color",".single-product div.product .woocommerce-product-details__short-description, .single-product div.product .product_meta, .single-product div.product .entry-content"),astra_css("astra-settings[single-product-breadcrumb-color]","color",".single-product div.product .woocommerce-breadcrumb, .single-product div.product .woocommerce-breadcrumb a"),astra_css("astra-settings[single-product-category-color]","color",".single-product-category a"),astra_css("astra-settings[shop-product-title-color]","color",".woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title"),astra_css("astra-settings[shop-product-price-color]","color",".woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price"),astra_css("astra-settings[shop-product-content-color]","color",".woocommerce ul.products li.product .ast-woo-product-category, .woocommerce-page ul.products li.product .ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-shop-product-description, .woocommerce-page ul.products li.product .ast-woo-shop-product-description"),astra_css("astra-settings[single-product-price-color]","color",".woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price"),astra_css("astra-settings[single-product-rating-color]","color",".woocommerce .star-rating, .woocommerce .comment-form-rating .stars a, .woocommerce .star-rating::before"),astra_css("astra-settings[product-sale-color]","color",".woocommerce ul.products li.product .onsale, .woocommerce-page ul.products li.product .onsale,.woocommerce span.onsale, .woocommerce div.product .onsale.circle-outline, .woocommerce div.product .onsale.square-outline, .woocommerce ul.products li.product .onsale.square-outline, .woocommerce ul.products li.product .onsale.circle-outline, .ast-onsale-card"),astra_css("astra-settings[product-sale-bg-color]","background-color",".woocommerce ul.products li.product .onsale, .woocommerce-page ul.products li.product .onsale, .woocommerce span.onsale, .ast-onsale-card"),astra_css("astra-settings[product-sale-bg-color]","border-color",".woocommerce ul.products li.product .onsale.circle-outline, .woocommerce ul.products li.product .onsale.square-outline, .woocommerce div.product .onsale.circle-outline, .woocommerce div.product .onsale.square-outline, .ast-onsale-card"),astra_generate_outside_font_family_css("astra-settings[font-family-shop-product-title]",".woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title"),astra_css("astra-settings[font-weight-shop-product-title]","font-weight",".woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title"),astra_responsive_font_size("astra-settings[font-size-shop-product-title]",".woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title"),astra_font_extras_css("font-extras-shop-product-title",".woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title"),astra_generate_outside_font_family_css("astra-settings[font-family-shop-product-price]",".woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price"),astra_css("astra-settings[font-weight-shop-product-price]","font-weight",".woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price"),astra_responsive_font_size("astra-settings[font-size-shop-product-price]",".woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price"),astra_font_extras_css("font-extras-shop-product-price",".woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price"),astra_generate_outside_font_family_css("astra-settings[font-family-shop-product-content]",".woocommerce ul.products li.product .ast-woo-product-category, .woocommerce-page ul.products li.product .ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-shop-product-description, .woocommerce-page ul.products li.product .ast-woo-shop-product-description"),astra_css("astra-settings[font-weight-shop-product-content]","font-weight",".woocommerce ul.products li.product .ast-woo-product-category, .woocommerce-page ul.products li.product .ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-shop-product-description, .woocommerce-page ul.products li.product .ast-woo-shop-product-description"),astra_responsive_font_size("astra-settings[font-size-shop-product-content]",".woocommerce ul.products li.product .ast-woo-product-category, .woocommerce-page ul.products li.product .ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-shop-product-description, .woocommerce-page ul.products li.product .ast-woo-shop-product-description"),astra_font_extras_css("font-extras-shop-product-content",".woocommerce ul.products li.product .ast-woo-product-category, .woocommerce-page ul.products li.product .ast-woo-product-category, .woocommerce ul.products li.product .ast-woo-shop-product-description, .woocommerce-page ul.products li.product .ast-woo-shop-product-description"),astra_generate_outside_font_family_css("astra-settings[font-family-product-title]",".single-product div.product .entry-title"),astra_css("astra-settings[font-weight-product-title]","font-weight",".single-product div.product .entry-title"),astra_responsive_font_size("astra-settings[font-size-product-title]",".single-product div.product .entry-title"),astra_font_extras_css("font-extras-product-title",".single-product div.product .entry-title"),astra_generate_outside_font_family_css("astra-settings[font-family-product-category]",".single-product-category a"),astra_css("astra-settings[font-weight-product-category]","font-weight",".single-product-category a"),astra_responsive_font_size("astra-settings[font-size-product-category]",".single-product-category a"),astra_font_extras_css("font-extras-product-category",".single-product-category a"),astra_generate_outside_font_family_css("astra-settings[font-family-product-price]",".single-product div.product p.price, .single-product div.product span.price"),astra_css("astra-settings[font-weight-product-price]","font-weight",".single-product div.product p.price, .single-product div.product span.price"),astra_responsive_font_size("astra-settings[font-size-product-price]",".single-product div.product p.price, .single-product div.product span.price"),astra_font_extras_css("font-extras-product-price",".single-product div.product p.price, .single-product div.product span.price"),astra_generate_outside_font_family_css("astra-settings[font-family-product-breadcrumb]",".single-product div.product .woocommerce-breadcrumb"),astra_css("astra-settings[font-weight-product-breadcrumb]","font-weight",".single-product div.product .woocommerce-breadcrumb"),astra_responsive_font_size("astra-settings[font-size-product-breadcrumb]",".single-product div.product .woocommerce-breadcrumb"),astra_font_extras_css("font-extras-product-breadcrumb",".single-product div.product .woocommerce-breadcrumb"),astra_generate_outside_font_family_css("astra-settings[font-family-product-content]",".single-product div.product .woocommerce-product-details__short-description, .single-product div.product .product_meta, .single-product div.product .entry-content"),astra_css("astra-settings[font-weight-product-content]","font-weight",".single-product div.product .woocommerce-product-details__short-description, .single-product div.product .product_meta, .single-product div.product .entry-content"),astra_responsive_font_size("astra-settings[font-size-product-content]",".single-product div.product .woocommerce-product-details__short-description, .single-product div.product .product_meta, .single-product div.product .entry-content"),astra_font_extras_css("font-extras-product-content",".single-product div.product .woocommerce-product-details__short-description, .single-product div.product .product_meta, .single-product div.product .entry-content"),".ast-product-navigation-wrapper .product-links a, .ast-product-navigation-wrapper.circle-outline .product-links a, .ast-product-navigation-wrapper.square-outline .product-links a"),t=".ast-product-navigation-wrapper .product-links a:hover, .ast-product-navigation-wrapper.circle-outline .product-links a:hover, .ast-product-navigation-wrapper.square-outline .product-links a:hover";astra_css("astra-settings[single-product-nav-icon-n-color]","color",o),astra_css("astra-settings[single-product-nav-icon-h-color]","color",t),astra_css("astra-settings[single-product-nav-bg-n-color]","background",".ast-product-navigation-wrapper .product-links a"),astra_css("astra-settings[single-product-nav-bg-h-color]","background",t),astra_css("astra-settings[single-product-nav-bg-n-color]","border-color",o),astra_css("astra-settings[single-product-nav-bg-h-color]","border-color",t),wp.customize("astra-settings[shop-filter-scrollbar-max-height]",function(o){o.bind(function(o){var t=(t=(t="")+".ast-collapse-filter .ast-filter-wrap {"+("max-height:"+o+"px;"))+"overflow-y: auto;"+"}";astra_add_dynamic_css("shop-filter-scrollbar-max-height",t)})})})(jQuery),astra_customizer_refresh_fragments(); |