PageSourceSearch

https://qualityacademy.org/wp-content/plugins/multi-currency-switc…/cache/yay-caching.min.js?ver=3.3.5

js qualityacademy.org collected 2026-10-10 02:32:24 UTC 6,933 bytes, 1 lines download raw bytes

1!function (a) { "use strict"; var c = function () { var c = this; c.currencyParamInput = 'input[name="yay_currency_current_url"]', c.oldCurrency = YayCurrency_Callback.Helper.getCookie(window.yayCurrency.cookie_name), c.lastProductHash = null, c._obsTimer = null, c.init = function () { c.customCachingCompatibles(), a(document).on("append.infiniteScroll", () => { c.customCachingCompatibles() }), yay_currency_caching_data.compatibility_filter && "yes" === yay_currency_caching_data.compatibility_filter && c.observeProductHtmlChange() }, c.observeProductHtmlChange = function () { const a = yay_currency_caching_data.observe_product_el ?? [".products"], e = document.querySelector(a.join(",")); e && new MutationObserver(function () { clearTimeout(c._obsTimer), c._obsTimer = setTimeout(function () { const a = YayCurrency_Callback.Helper.getListProductIdsAvailable().join(","); a && a !== c.lastProductHash && (c.lastProductHash = a, c.customCachingCompatibles()) }, 200) }).observe(e, { childList: !0, subtree: !0 }) }, c.detectAllowCaching = function () { if ("1" === yayCurrency.cart_page || "1" === yayCurrency.hide_dropdown_switcher || "1" === yayCurrency.checkout_page) return !1; if ("undefined" != typeof wc_checkout_params && parseInt(wc_checkout_params.is_checkout)) return !1; return YayCurrency_Callback.Helper.detectAllowCaching(!0) }, c.getCachingAjaxUrl = function () { let a = yay_currency_caching_data.ajax_url; return yay_currency_caching_data.gtranslate_active && (a = document.location.origin + "/wp-admin/admin-ajax.php"), a }, c.splitProductIdsIntoBatches = function (a, c) { const e = []; for (let r = 0; r < a.length; r += c)e.push(a.slice(r, r + c)); return e }, c.ajaxWithRetry = function (c) { return a.ajax(c).fail(function (e) { if (403 === e.status && !c._isRetry) { var r = yay_currency_caching_data.rest_url + "/refresh-nonce"; return a.ajax({ url: r, method: "GET", headers: { "X-Yay-Nonce-Request": "1", "Cache-Control": "no-cache" }, success: function (e) { e && e.nonce && (yay_currency_caching_data.rest_nonce = e.nonce, c.headers = c.headers || {}, c.headers["X-WP-Nonce"] = e.nonce, c._isRetry = !0, a.ajax(c)) } }) } }) }, c.customCachingCompatibles = function () { if (!c.detectAllowCaching()) return c.resetCachingLoading(), void c.resetProductCacheLoading(); const a = YayCurrency_Callback.Helper.getListProductIdsAvailable(); a.length ? c.ajaxWithRetry({ type: "POST", url: yay_currency_caching_data.rest_url + "/get_price_html", dataType: "json", contentType: "application/json", headers: { "X-WP-Nonce": yay_currency_caching_data.rest_nonce }, data: JSON.stringify(c.getListDataCaching(!0, a)), xhrFields: { withCredentials: !0 }, beforeSend: function (a) { c.customBeforeSendCaching(a) }, success: function (a) { c.customResponseCaching(a, !0) }, error: function (a) { 403 !== a.status && (console.log("Error responseText: ", a), c.resetCachingLoading(), c.resetProductCacheLoading()) } }) : c.customCachingSwitcher() }, c.customCachingSwitcher = function () { c.ajaxWithRetry({ type: "POST", url: yay_currency_caching_data.rest_url + "/currency_switcher_html", dataType: "json", contentType: "application/json", headers: { "X-WP-Nonce": yay_currency_caching_data.rest_nonce }, data: JSON.stringify(c.getListDataCaching()), xhrFields: { withCredentials: !0 }, beforeSend: function (a) { c.customBeforeSendCaching(a) }, success: function (a) { c.customResponseCaching(a) }, error: function (a) { 403 !== a.status && (console.log("Error responseText: ", a), c.resetCachingLoading(), c.resetProductCacheLoading()) } }) }, c.getListDataCaching = function (a = !1, e = []) { let r = YayCurrency_Callback.Helper.getListDataCaching(a, e); return a && yay_currency_caching_data.product_id && yay_currency_caching_data.product_is_variable && (r.product_variable_id = yay_currency_caching_data.product_id), yayCurrency.apply_currency_before_cache && (r.apply_currency_before_cache = yayCurrency.apply_currency_before_cache), r = c.getDataCaching3rdPlugins(r), r }, c.customBeforeSendCaching = function (e) { "1" === yayCurrency.cache_compatible && (yay_currency_caching_data.is_loading_mark && a(yay_currency_data_args.caching_data_args.yayCurrencyMiniCartContents).addClass(yay_currency_data_args.common_data_args.yayCurrencyLoading), c.customBeforeSendCaching3rdPlugins(e)) }
1, c.customResponseCaching = function (e, r = !1) { if (c.resetCachingLoading(), e.success) { if ("yes" === yay_currency_caching_data.should_refresh_fragment && a(document.body).trigger("wc_fragment_refresh"), e.data.product_variable_should_not_render_html) { const c = yay_currency_caching_data.product_single_variation_wrap_class ?? ".single_variation_wrap"; a(c).addClass("yay-caching-hide-variation-render-html") } e.data.current_currency_id && +c.oldCurrency != e.data.current_currency_id && YayCurrency_Callback.Helper.setCookie(yayCurrency.cookie_name, e.data.current_currency_id, +yayCurrency.cookie_lifetime_days), YayCurrency_Callback.Helper.customResponseCommon(e), e.data.product_content && a(yay_currency_data_args.caching_data_args.yayCurrencyProduct).html(e.data.product_content), a(c.currencyParamInput).val(yay_currency_caching_data.yay_currency_current_url), c.customResponseProductCaching(e, r), c.customResponseCaching3rdPlugins(e) } else c.resetProductCacheLoading() }, c.customResponseProductCaching = function (e, r = !1) { if (r) { if (e.data.price_html) { const c = e.data.price_html; for (let e in c) { const r = `.yay-currency-cache-product-id[data-yay_currency-product-id=${e}]`, n = c[e], t = a(r).closest(".price"); yay_currency_caching_data.product_html_caching_enable && t.length ? t.html(n) : a(r).replaceWith(n) } a(yay_currency_data_args.caching_data_args.yayVariationId).each((e, r) => { let n = a(r).data("product_variations"); n && (n.map(a => { let e = a.variation_id; return c[e] && (a.price_html = c[e]), a }), a(r).data("product_variations", n)) }) } c.resetProductCacheLoading() } }, c.resetProductCacheLoading = function () { a(yay_currency_data_args.caching_data_args.yayProductId).length && a(yay_currency_data_args.caching_data_args.yayProductId).addClass("price").removeClass("yay-currency-cache-product-id yay-currency-cache-loading").removeAttr("data-yay_currency-product-id") }, c.resetCachingLoading = function () { YayCurrency_Callback.Helper.resetCachingLoading(), c.resetCachingLoading3rdPlugins() }, c.getDataCaching3rdPlugins = function (a) { return yayCurrencyHooks.applyFilters("yayCurrencyGetDataCaching", a) }, c.customBeforeSendCaching3rdPlugins = function (a) { yayCurrencyHooks.doAction("yayCurrencyBeforeSendCaching", [{ response: a }]) }, c.customResponseCaching3rdPlugins = function (a) { yayCurrencyHooks.doAction("yayCurrencyResponseCaching", [{ response: a }]) }, c.resetCachingLoading3rdPlugins = function () { yayCurrencyHooks.doAction("yayCurrencyResetLoadingCaching", []) } }; jQuery(document).ready(function (a) { (new c).init() }) }(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.