HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/public_html/wp-content/plugins/easy-digital-downloads/assets/js/edd-admin.js
! function(e) {
    var t = {};

    function n(i) {
        if (t[i]) return t[i].exports;
        var o = t[i] = {
            i: i,
            l: !1,
            exports: {}
        };
        return e[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports
    }
    n.m = e, n.c = t, n.d = function(e, t, i) {
        n.o(e, t) || Object.defineProperty(e, t, {
            enumerable: !0,
            get: i
        })
    }, n.r = function(e) {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
            value: "Module"
        }), Object.defineProperty(e, "__esModule", {
            value: !0
        })
    }, n.t = function(e, t) {
        if (1 & t && (e = n(e)), 8 & t) return e;
        if (4 & t && "object" == typeof e && e && e.__esModule) return e;
        var i = Object.create(null);
        if (n.r(i), Object.defineProperty(i, "default", {
                enumerable: !0,
                value: e
            }), 2 & t && "string" != typeof e)
            for (var o in e) n.d(i, o, function(t) {
                return e[t]
            }.bind(null, o));
        return i
    }, n.n = function(e) {
        var t = e && e.__esModule ? function() {
            return e.default
        } : function() {
            return e
        };
        return n.d(t, "a", t), t
    }, n.o = function(e, t) {
        return Object.prototype.hasOwnProperty.call(e, t)
    }, n.p = "", n(n.s = 206)
}({
    1: function(e, t) {
        e.exports = jQuery
    },
    14: function(e, t, n) {
        "use strict";
        (function(e, i) {
            n.d(t, "a", (function() {
                return o
            }));
            var o = function(t) {
                t.tooltip({
                    content: function() {
                        return e(this).prop("title")
                    },
                    tooltipClass: "edd-ui-tooltip",
                    position: {
                        my: "center top",
                        at: "center bottom+10",
                        collision: "flipfit"
                    },
                    hide: {
                        duration: 200
                    },
                    show: {
                        duration: 200
                    }
                })
            };
            i(document).ready((function(e) {
                o(e(".edd-help-tip"))
            }))
        }).call(this, n(1), n(1))
    },
    2: function(e, t) {
        e.exports = function(e, t, n) {
            return t in e ? Object.defineProperty(e, t, {
                value: n,
                enumerable: !0,
                configurable: !0,
                writable: !0
            }) : e[t] = n, e
        }, e.exports.__esModule = !0, e.exports.default = e.exports
    },
    206: function(e, t, n) {
        "use strict";
        n.r(t), n(207), n(208), n(14), n(209), n(210), n(211), n(212), n(213), n(214), n(215), n(216), n(217)
    },
    207: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                var t = e("input.edd_datepicker");
                t.length > 0 && t.attr("autocomplete", "off").datepicker({
                    dateFormat: edd_vars.date_picker_format,
                    beforeShow: function() {
                        e("#ui-datepicker-div").removeClass("ui-datepicker").addClass("edd-datepicker")
                    }
                })
            }))
        }).call(this, n(1))
    },
    208: function(e, t, n) {
        "use strict";
        (function(e) {
            var t = n(5);
            e(document).ready((function(e) {
                e(".edd-select-chosen").each((function() {
                    var n = e(this);
                    n.chosen(Object(t.a)(n))
                })), e(".edd-select-chosen .chosen-search input").each((function() {
                    if (!e(this).attr("placeholder")) {
                        var t = e(this).parent().parent().parent().prev("select.edd-select-chosen").data("search-placeholder");
                        t && e(this).attr("placeholder", t)
                    }
                })), e(".chosen-choices").on("click", (function() {
                    var t = e(this).parent().prev().data("search-placeholder");
                    void 0 === t && (t = edd_vars.type_to_search), e(this).children("li").children("input").attr("placeholder", t)
                })), e("#post").on("click", ".edd-thickbox", (function() {
                    e(".edd-select-chosen", "#choose-download").css("width", "100%")
                })), e(document.body).on("keyup", ".edd-select-chosen .chosen-search input, .edd-select-chosen .search-field input", _.debounce((function(t) {
                    var n = e(this),
                        i = n.val(),
                        o = n.closest(".edd-select-chosen"),
                        a = o.prev(),
                        s = a.data("search-type"),
                        c = o.hasClass("no-bundles"),
                        r = o.hasClass("variations"),
                        d = o.hasClass("variations-only"),
                        l = t.which,
                        u = "edd_download_search";
                    o.attr("id").replace("_chosen", ""), void 0 !== s && "no_ajax" !== s && (u = "edd_" + s + "_search", i.length <= 3 && "edd_download_search" === u || 16 === l || 13 === l || 91 === l || 17 === l || 37 === l || 38 === l || 39 === l || 40 === l ? o.children(".spinner").remove() : (o.children(".spinner").length || o.append('<span class="spinner is-active"></span>'), e.ajax({
                        type: "GET",
                        dataType: "json",
                        url: ajaxurl,
                        data: {
                            s: i,
                            action: u,
                            no_bundles: c,
                            variations: r,
                            variations_only: d
                        },
                        beforeSend: function() {
                            a.closest("ul.chosen-results").empty()
                        },
                        success: function(t) {
                            e("option:not(:selected)", a).remove(), e.each(t, (function(t, n) {
                                e('option[value="' + n.id + '"]', a).length || a.prepend('<option value="' + n.id + '">' + n.name + "</option>")
                            }));
                            var i = n.val();
                            a.trigger("chosen:updated"), n.val(i)
                        }
                    }).fail((function(e) {
                        window.console && window.console.log && console.log(e)
                    })).done((function(e) {
                        o.children(".spinner").remove()
                    }))))
                }), 342))
            }))
        }).call(this, n(1))
    },
    209: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                var t = ".edd-vertical-sections.use-js";
                if (0 !== e(t).length) {
                    e("".concat(t, " .section-content")).hide();
                    var n = window.location.hash;
                    n && n.includes("edd_") ? (e(t).find(n).show(), e("".concat(t, " .section-title")).attr("aria-selected", "false").removeClass("section-title--is-active"), e(t).find('.section-title a[href="' + n + '"]').parents(".section-title").attr("aria-selected", "true").addClass("section-title--is-active")) : (e("".concat(t, " .section-content:first-child")).show(), e("".concat(t, " .section-nav li:first-child")).attr("aria-selected", "true").addClass("section-title--is-active")), e("".concat(t, " .section-nav li a")).on("click", (function(t) {
                        t.preventDefault();
                        var n = e(this),
                            i = n.attr("href"),
                            o = n.parents(".edd-vertical-sections");
                        o.find(".section-content").hide(), o.find(i).show(), o.find(".section-title").attr("aria-selected", "false").removeClass("section-title--is-active"), n.parent().attr("aria-selected", "true").addClass("section-title--is-active"), o.find("div.chosen-container").css("width", "100%"), window.history.pushState("object or string", "", i)
                    }))
                }
            }))
        }).call(this, n(1))
    },
    210: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                var t = e("ul.edd-sortable-list");
                t.length > 0 && t.sortable({
                    axis: "y",
                    items: "li",
                    cursor: "move",
                    tolerance: "pointer",
                    containment: "parent",
                    distance: 2,
                    opacity: .7,
                    scroll: !0,
                    stop: function() {
                        var t = e.map(e(this).children("li"), (function(t) {
                            return e(t).data("key")
                        }));
                        e(this).prev("input.edd-order").val(t)
                    }
                })
            }))
        }).call(this, n(1))
    },
    211: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                e(".edd-ajax-user-search").keyup((function() {
                    var t = e(this).val(),
                        n = "";
                    e(this).data("exclude") && (n = e(this).data("exclude")), e(".edd_user_search_wrap").addClass("loading");
                    var i = {
                        action: "edd_search_users",
                        user_name: t,
                        exclude: n
                    };
                    e.ajax({
                        type: "POST",
                        data: i,
                        dataType: "json",
                        url: ajaxurl,
                        success: function(t) {
                            e(".edd_user_search_wrap").removeClass("loading"), e(".edd_user_search_results").removeClass("hidden"), e(".edd_user_search_results span").html(""), t.results && e(t.results).appendTo(".edd_user_search_results span")
                        }
                    })
                })).blur((function() {
                    t ? t = !1 : (e(this).removeClass("loading"), e(".edd_user_search_results").addClass("hidden"))
                })).focus((function() {
                    e(this).keyup()
                })), e(document.body).on("click.eddSelectUser", ".edd_user_search_results span a", (function(t) {
                    t.preventDefault();
                    var n = e(this).data("login");
                    e(".edd-ajax-user-search").val(n), e(".edd_user_search_results").addClass("hidden"), e(".edd_user_search_results span").html("")
                })), e(document.body).on("click.eddCancelUserSearch", ".edd_user_search_results a.edd-ajax-user-cancel", (function(t) {
                    t.preventDefault(), e(".edd-ajax-user-search").val(""), e(".edd_user_search_results").addClass("hidden"), e(".edd_user_search_results span").html("")
                }));
                var t = !1;
                e(".edd_user_search_results").mousedown((function() {
                    t = !0
                }))
            }))
        }).call(this, n(1))
    },
    212: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                e(".edd-advanced-filters-button").on("click", (function(t) {
                    t.preventDefault(), e(this).closest("#edd-advanced-filters").toggleClass("open")
                }))
            }))
        }).call(this, n(1))
    },
    213: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                (e("body").hasClass("taxonomy-download_category") || e("body").hasClass("taxonomy-download_tag")) && e(".nav-tab-wrapper, .nav-tab-wrapper + br").detach().insertAfter(".wp-header-end")
            }))
        }).call(this, n(1))
    },
    214: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                e(".edd_countries_filter").on("change", (function() {
                    var t = e(this),
                        n = {
                            action: "edd_get_shop_states",
                            country: t.val(),
                            nonce: t.data("nonce"),
                            field_name: "edd_regions_filter"
                        };
                    return e.post(ajaxurl, n, (function(t) {
                        e("select.edd_regions_filter").find("option:gt(0)").remove(), "nostates" !== t && e(t).find("option:gt(0)").appendTo("select.edd_regions_filter"), e("select.edd_regions_filter").trigger("chosen:updated")
                    })), !1
                }))
            }))
        }).call(this, n(1))
    },
    215: function(e, t, n) {
        (function(e) {
            e(document).ready((function(e) {
                var t = e(".edd-admin-notice-top-of-page");
                if (t) {
                    var n = t.detach();
                    e("#wpbody-content").prepend(n), t.delay(1e3).slideDown()
                }
                e(".edd-promo-notice").each((function() {
                    var t = e(this);
                    t.on("click", ".edd-promo-notice-dismiss", (function(n) {
                        e(this).attr("href") || n.preventDefault(), e.ajax({
                            type: "POST",
                            data: {
                                action: "edd_dismiss_promo_notice",
                                notice_id: t.data("id"),
                                nonce: t.data("nonce"),
                                lifespan: t.data("lifespan")
                            },
                            url: ajaxurl,
                            success: function(e) {
                                t.slideUp()
                            }
                        })
                    }))
                }))
            }))
        }).call(this, n(1))
    },
    216: function(e, t) {
        document.addEventListener("alpine:init", (function() {
            Alpine.store("eddNotifications", {
                isPanelOpen: !1,
                notificationsLoaded: !1,
                numberActiveNotifications: 0,
                activeNotifications: [],
                inactiveNotifications: [],
                init: function() {
                    var e = this,
                        t = document.querySelector("#edd-notification-button .edd-number");
                    t && t.classList.remove("edd-hidden"), document.addEventListener("keydown", (function(t) {
                        "Escape" === t.key && e.closePanel()
                    }));
                    var n = new URLSearchParams(window.location.search);
                    n.has("notifications") && "true" === n.get("notifications") && e.openPanel()
                },
                openPanel: function() {
                    var e = this,
                        t = document.getElementById("edd-notifications-header");
                    if (this.notificationsLoaded) return this.isPanelOpen = !0, void(t && setTimeout((function() {
                        t.focus()
                    })));
                    this.isPanelOpen = !0, this.apiRequest("/notifications", "GET").then((function(n) {
                        e.activeNotifications = n.active, e.inactiveNotifications = n.dismissed, e.notificationsLoaded = !0, t && t.focus()
                    })).catch((function(e) {
                        console.log("Notification error", e)
                    }))
                },
                closePanel: function() {
                    if (this.isPanelOpen) {
                        this.isPanelOpen = !1;
                        var e = document.getElementById("edd-notification-button");
                        e && e.focus()
                    }
                },
                apiRequest: function(e, t) {
                    return fetch(edd_vars.restBase + e, {
                        method: t,
                        credentials: "same-origin",
                        headers: {
                            "Content-Type": "application/json",
                            "X-WP-Nonce": edd_vars.restNonce
                        }
                    }).then((function(e) {
                        return e.ok ? e.text() : Promise.reject(e)
                    })).then((function(e) {
                        return e ? JSON.parse(e) : null
                    }))
                },
                dismiss: function(e, t) {
                    var n = this;
                    if (void 0 !== this.activeNotifications[t]) {
                        e.target.disabled = !0;
                        var i = this.activeNotifications[t];
                        this.apiRequest("/notifications/" + i.id, "DELETE").then((function(e) {
                            n.activeNotifications.splice(t, 1), n.numberActiveNotifications = n.activeNotifications.length
                        })).catch((function(e) {
                            console.log("Dismiss error", e)
                        }))
                    }
                }
            })
        }))
    },
    217: function(e, t, n) {
        "use strict";
        (function(e) {
            var t = n(3);
            Object(t.a)((function() {
                e(".download_page_edd-payment-history .row-actions .delete a").on("click", (function() {
                    return !!confirm(edd_vars.delete_payment)
                }))
            }))
        }).call(this, n(1))
    },
    3: function(e, t, n) {
        "use strict";
        (function(e) {
            n.d(t, "a", (function() {
                return i
            }));
            var i = function(t) {
                e(t)
            }
        }).call(this, n(1))
    },
    5: function(e, t, n) {
        "use strict";
        (function(e) {
            n.d(t, "a", (function() {
                return r
            }));
            var i = n(2),
                o = n.n(i);

            function a(e, t) {
                var n = Object.keys(e);
                if (Object.getOwnPropertySymbols) {
                    var i = Object.getOwnPropertySymbols(e);
                    t && (i = i.filter((function(t) {
                        return Object.getOwnPropertyDescriptor(e, t).enumerable
                    }))), n.push.apply(n, i)
                }
                return n
            }

            function s(e) {
                for (var t = 1; t < arguments.length; t++) {
                    var n = null != arguments[t] ? arguments[t] : {};
                    t % 2 ? a(Object(n), !0).forEach((function(t) {
                        o()(e, t, n[t])
                    })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : a(Object(n)).forEach((function(t) {
                        Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
                    }))
                }
                return e
            }
            var c = {
                    disable_search_threshold: 13,
                    search_contains: !0,
                    inherit_select_classes: !0,
                    single_backstroke_delete: !1,
                    placeholder_text_single: edd_vars.one_option,
                    placeholder_text_multiple: edd_vars.one_or_more_option,
                    no_results_text: edd_vars.no_results_text
                },
                r = function(t) {
                    !t instanceof e && (t = e(t));
                    var n = c;
                    return t.data("search-type") && delete n.disable_search_threshold, s(s({}, n), {}, {
                        width: t.css("width")
                    })
                }
        }).call(this, n(1))
    }
});