PageSourceSearch

https://lifespan.io/wp-content/themes/fundify/js/custom.js?v=1.1&ver=1.0.27.1784916679

js lifespan.io collected 2026-10-02 04:59:57 UTC 24,009 bytes, 349 lines download raw bytes

1!(function (e, t) {
2    "use strict";
3    var a = e(window),
4        i = e("html"),
5        s = e("body").hasClass("responsive-layout");
6    (jQuery.WPV = jQuery.WPV || {}), (jQuery.WPV.MEDIA = jQuery.WPV.MEDIA || { layout: {} });
7    var l,
8        r = [
9            { min: 0, max: 479, className: "layout-smallest" },
10            { min: 480, max: 958, className: "layout-small" },
11            { min: 959, max: 1 / 0, className: "layout-max" },
12            { min: 959, max: 1280, className: "layout-max-low" },
13            { min: 0, max: 958, className: "layout-below-max" },
14        ];
15    if (s && "matchMedia" in window) {
16        var o,
17            n,
18            d = r.length;
19        a.bind("resize.sizeClass load.sizeClass", function () {
20            var e = [],
21                t = [],
22                i = {};
23            for (n = 0; n < d; n++) {
24                var s = "(min-width: " + r[n].min + "px)";
25                r[n].max !== 1 / 0 && (s += " and (max-width: " + r[n].max + "px)"), window.matchMedia(s).matches ? (e.push(r[n].className), (i[r[n].className] = !0)) : (t.push(r[n].className), (i[r[n].className] = !1));
26            }
27            (jQuery.WPV.MEDIA.layout = i), (e = e.join(" ")), (t = t.join(" ")), o !== e && ((o = e), a.trigger("switchlayout"));
28        });
29    } else i.removeClass("layout-smallest layout-small layout-medium layout-below-max").addClass("layout-max"), (e.WPV.MEDIA.layout = { "layout-max": !0 });
30    a.bind("resize", function () {
31        l && window.clearTimeout(l),
32            (l = setTimeout(function () {
33                a.trigger("delayedResize");
34            }, 150));
35    }),
36        (e.WPV.MEDIA.is_mobile = function () {
37            var e,
38                t = !1;
39            return (
40                (e = navigator.userAgent || navigator.vendor || window.opera),
41                (/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(
42                    e
43                ) ||
44                    /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
45                        e.substr(0, 4)
46                    )) &&
47                    (t = !0),
48                t
49            );
50        });
51})(jQuery),
52    (function (e, t) {
53        "use strict";
54        var a = e(window),
55            i = /MSIE (\d+)/.exec(navigator.userAgent),
56            s = navigator.userAgent.match(/(iPod|iPhone|iPad)/) && navigator.userAgent.match(/AppleWeb
56Kit/);
57        a
58            .resize(function () {
59                a.height(),
60                    (i && 8 === parseInt(i[1], 10)) || s || e.WPV.MEDIA.layout["layout-below-max"]
61                        ? e(".wpv-grid.animated-active").removeClass("animated-active").addClass("animated-suspended")
62                        : e(".wpv-grid.animated-suspended").removeClass("animated-suspended").addClass("animated-active");
63            })
64            .resize(),
65            a
66                .bind("scroll touchmove load", function () {
67                    var t = a.height(),
68                        i = e(window).scrollTop() + t;
69                    e(".wpv-grid.animated-active:not(.animation-ended)").each(function () {
70                        var t = e(this),
71                            a = t.outerHeight();
72                        if (!(i > t.offset().top + a * (a > 100 ? 0.3 : 0.6)) && !s) return !1;
73                        t.addClass("animation-ended");
74                    });
75                })
76                .scroll();
77    })(jQuery),
78    (function (e, t, a) {
79        function i(a) {
80            var i = a.offset(),
81                s = { top: null, left: null, bottom: null, right: null, width: null, height: null },
82                l = { top: null, left: null, bottom: null, right: null, width: null, height: null },
83                r = i.left,
84                o = i.top,
85                n = a.outerHeight(),
86                d = a.width();
87            return (
88                (s.width = e(t).width()),
89                (s.height = e(t).height()),
90                (s.top = e(t).scrollTop()),
91                (s.left = e(t).scrollLeft()),
92                (s.bottom = s.top + s.height),
93                (s.right = s.left + s.width),
94                (l.top = o - s.top),
95                (l.left = r - s.left),
96                (l.width = d),
97                (l.height = n),
98                (l.bottom = l.top + l.height),
99                (l.right = l.left + l.width),
100                n * (Math.round(100 * ((l.height - (Math.max(0, 0 - l.top) + Math.max(0, l.bottom - s.height))) / l.height) * ((l.width - (Math.max(0, 0 - l.left) + Math.max(0, l.right - s.width))) / l.width)) / 100)
101            );
102        }
103        if (
104            (e(".leaf-header-search button").on("click", function (a) {
105                a.preventDefault(),
106                    e("body").addClass("show-leaf-search"),
107                    t.setTimeout(function () {
108                        e('.leaf-search-popup input[type="text"]').focus();
109                    }, 350);
110            }),
111            e(".clear-search-filters a").on("click", function (t) {
112                t.preventDefault(),
113                    e(this).closest(".clear-search-filters").hasClass("none-selected")
114                        ? (e(".limit-results-options label input").prop("checked", !0), e(".clear-search-filters").removeClass("none-selected"))
115                        : (e(".limit-results-options label input").prop("checked", !1), e(".clear-search-filters").addClass("none-selected"));
116            }),
117            e(".limit-results-options").on("change", 'input[type="checkbox"]', function (t) {
118                e(".limit-results-options input:checked").length > 0 ? e(".clear-search-filters").removeClass("none-selected") : e(".clear-search-filters").addClass("none-selected");
119            }),
120            e(".leaf-seach-popup-close").on("click", function (t) {
121                t.preventDefault(), e("body").removeClass("show-leaf-search");
122            }),
123            e(document).keydown(function (t) {
124                27 == t.keyCode && e("body").removeClass("show-leaf-search");
125            }),
126            e(".atcf-profile").on("keypress", "#user-nicename", function (e) {
127                var t = RegExp("^[a-zA-Z0-9 -]+$"),
128                    a = String.fromCharCode(e.charCode ? e.charCode : e.which);
129                return !!t.test(a) || (e.preventDefault(), !1);
130            }),
131            e(".search-result-tab-hd").on("click", function (t) {
132                t.preventDefault(),
133                    e(this).hasClass("is-tab-active") ||
134                        (e(this).addClass("is-tab-active").siblings("a").removeClass("is-tab-active"),
135                        e('.search-result-tab-content[data-type="' + e(this).attr("data-type") + '"]')
136                            .addClass("is-tab-active")
137                            .siblings(".search-result-tab-content")
138                            .removeClass("is-tab-active"));
139            }),
140            e("#playYoutubeVideo").on("click", function () {
141                if ((e(".youtube_url_play").show(), e(".youtube_url_media").hide(), e(".youtube_url_play .rll-youtube-player").length > 0)) e(".youtube_url_play .rll-youtube-player .play").click();
142                else {
143                    var t = e(".youtube_url_play iframe").attr("src");
144                    (t += "&autoplay=1"), e(".youtube_url_play iframe").attr("src", t);
145                }
146            }),
147            e(".search-results-tabs").on("click", ".search-results-pagination a", function (t) {
148                t.preventDefault();
149                var a = e(this).closest(".search-result-tab-content");
150                if (!a.hasClass("ajaxing")) {
151                    a.addClass("ajaxing");
152                    var i = a.attr("data-type");
153                    a.find(".search-results-section-wrapper").html(""), a.find(".search-results-pagination").html("");
154                    var s = e(this).attr("href");
155                    s.search("/page/") > -1 ? (s = parseInt(s.split("/page/")[1])) : s.search("/admin-ajax.php/") > -1 && (s = 1);
156                    var l = e(".life-search-keyword").val();
157                    e("body,html").animate({ scrollTop: a.offset().top }),
158                        e.ajax({
159                            url: edd_scripts.ajaxurl,
160                            type: "POST",
161                            dataType: "JSON",
162                            data: { action: "life_get_search_results", pg: s, type: i, st: l },
163                            success: function (t) {
164                                e('.search-result-tab-content[data-type="' + t.type + '"] .search-results-section-wrapper').html(t.html),
165                                    e('.search-result-tab-content[data-type="' + t.type + '"] .search-results-pagination').html(t.pagination),
166                                    e('.search-result-tab-content[data-type="' + t.type + '"]').removeClass("ajaxing");
167                            },
168                        });
169                }
170            }),
171            e(".mobile-back-btn").length > 0 &&
172                (e(t).on("scroll", function () {
173                    e(this).scrollTop() > e("#sidebar .atcf-price-option:last-child .sidebar-h3").offset().top ? e(".mobile-back-btn").addClass("visible") : e(".mobile-back-btn").removeClass("visible");
174                }),
175                e(".mobile-back-btn a").on("click", function (t) {
176                    t.preventDefault(), e(".contribute-now a").click();
177                })),
178            e("#contribute-now").length > 0)
179        )
180            navigator.userAgent.search("Firefox/"),
181                t.safari,
182                e(t).on("scroll resize", function () {
183                    if (t.innerWidth >= 900) {
184                        // e("#sidebar").attr("style", "min-height: " + e("#contribute-now").outerHeight() + "px");
185                        // var a = e("#sidebar").offset().top,
186                        //     i = e("#sidebar").height(),
187                        //     s = e(t).height(),
188                        //     l = e(t).scrollTop(),
189                        //     r = parseFloat(e("#sidebar").offset().left);
190                        // (r += parseFloat(e("#sidebar").css("padding-left"))),
191                        //     e(t).scrollTop() >= e("#sidebar").offset().top + e("#sidebar").outerHeight() - t.innerHeight + 0
192                        //         ? (e("#contribute-now").addClass("fixed"),
193                        //           (foot_visible = (function t() {
194                        //               var a = e(".leaf-footer-outer"),
195                        //                   i = e(this).scrollTop(),
196                        //                   s = i + e(this).height(),
197                        //                   l = a.offset().top,
198                        //                   r = l + a.outerHeight();
199                        //               return (r > s ? s : r) - (l < i ? i : l);
200                        //           })()) > 0
201                        //               ? e("#contribute-now").attr("style", "width:" + e("#sidebar").css("width") + ";transform: translateY(-" + foot_visible + "px);left:" + r + "px")
202                        //               : e("#contribute-now").attr("style", "width:" + e("#sidebar").css("width") + ";left:" + r + "px"))
203                        //         : (e("#contribute-now").removeAttr("style"), e("#contribute-now").removeClass("fixed"));
204                    }
205                });
206        else if (
207            (e(".widget-area.left").length > 0 || e(".widget-area.right").length > 0) &&
208            0 == e(".disable-sticky-sidebars").length &&
209            (e(".widget-area.right").length > 0 &&
210                e(t).on("scroll resize", function () {
211                    // LSXC-22 — topic pages keep sticky sidebar only above 1180px (Cursor agent 2026-07-20)
212                    var topicStickyMin = e("body.single-topic").length ? 1181 : 900;
213                    if (t.innerWidth >= topicStickyMin) {
214                        e(".widget-area.right").attr("style", "min-height: " + e(".widget-area.right > .sidebar-widgets").outerHeight() + "px");
215                        var a = e(".widget-area.right").offset().top,
216                            s = e(".widget-area.right").height(),
217                            l = e(t).height(),
218                            r = e(t).scrollTop(),
219                            o = parseFloat(e(".widget-area.right").offset().left);
220                        if (((o += parseFloat(e("#sidebar").css("padding-left"))), e(t).scrollTop() >= e(".widget-area.right").offset().top + e(".widget-area.right").outerHeight() - t.innerHeight)) {
221                            if ((e(".widget-area.right > .sidebar-widgets").addClass("fixed"), (foot_visible = i(e(".leaf-footer-outer"))), e(".related-posts").length > 0)) {
222                                var n = i(e(".related-posts"));
223                                foot_visible > 0 ? (foot_visible += e(".related-posts").outerHeight()) : foot_visible < 0 && n > 0 ? (foot_visible = n) : (foot_visible += n);
224                            }
225                            foot_visible > 0
226                                ? e(".widget-area.right > .sidebar-widgets").attr(
227                                      "style",
228                                      "width:" +
229                                          (e(".widget-area.right").outerWidth() - parseInt(e(".widget-area.right").css("padding-left")) - parseInt(e(".widget-area.right").css("padding-right"))) +
230                                          "px;transform: translateY(-" +
231                                          foot_visible +
232                                          "px);"
233                                  )
234                                : e(".widget-area.right > .sidebar-widgets").attr(
235                                      "style",
236                                      "width:" + (e(".widget-area.right").outerWidth() - parseInt(e(".widget-area.right").css("padding-left")) - parseInt(e(".widget-area.right").css("padding-right"))) + "px;"
237                                  );
238                        } else e(".widget-area.right > .sidebar-widgets").removeAttr("style"), e(".widget-area.right > .sidebar-widgets").removeClass("fixed");
239                    } else if (e("body.single-topic").length) {
240                        e(".widget-area.right").removeAttr("style"), e(".widget-area.right > .sidebar-widgets").removeAttr("style"), e(".widget-area.right > .sidebar-widgets").removeClass("fixed");
241                    }
242                }),
243            e(".widget-area.left").length > 0 &&
244                e(t).on("scroll resize", function () {
245                    // LSXC-22 — topic pages keep sticky sidebar only above 1180px (Cursor agent 2026-07-20)
246                    var topicStickyMin = e("body.single-topic").length ? 1181 : 900;
247                    if (t.innerWidth >= topicStickyMin) {
248                        e(".widget-area.left").attr("style", "min-height: " + e(".widget-area.left > .sidebar-widgets").outerHeight() + "px");
249                        var a = e(".widget-area.left").offset().top,
250                            s = e(".widget-area.left").height(),
251                            l = e(t).height(),
252                            r = e(t).scrollTop(),
253                            o = parseFloat(e(".widget-area.left").offset().left);
254                        if (((o += parseFloat(e("#sidebar").css("padding-left"))), e(t).scrollTop() >= e(".widget-area.left").offset().top + e(".widget-area.left").outerHeight() - t.innerHeight)) {
255                            if ((e(".widget-area.left > .sidebar-widgets").addClass("fixed"), (foot_visible = i(e(".leaf-footer-outer"))), e(".related-posts").length > 0)) {
256                                var n = i(e(".related-posts"));
257                                foot_visible > 0 ? (foot_visible += e(".related-posts").outerHeight()) : foot_visible < 0 && n > 0 ? (foot_visible = n) : (foot_visible += n);
258                            }
259                            foot_visible > 0
260                                ? e(".widget-area.left > .sidebar-widgets").attr(
261                                      "style",
262                                      "width:" +
263                                          (e(".widget-area.left").outerWidth() - parseInt(e(".widget-area.left").css("padding-left")) - parseInt(e(".widget-area.left").css("padding-right"))) +
264                                          "px;transform: translateY(-" +
265                                          foot_visible +
266                                          "px);"
267                                  )
268                                : e(".widget-area.left > .sidebar-widgets").attr(
269                                      "style",
270                                      "width:" + (e(".widget-area.left").outerWidth() - parseInt(e(".widget-area.left").css("padding-left")) - parseInt(e(".widget-area.left").css("padding-right"))) + "px;"
271                                  );
272                        } else e(".widget-area.left > .sidebar-widgets").removeAttr("style"), e(".widget-area.left > .sidebar-widgets").removeClass("fixed");
273                    } else if (e("body.single-topic").length) {
274                        e(".widget-area.left").removeAttr("style"), e(".widget-area.left > .sidebar-widgets").removeAttr("style"), e(".widget-area.left > .sidebar-widgets").removeClass("fixed");
275                    }
276                }),
277            1 == e(".widget-area.right").length && 1 == e(".widget-area.right").length && e("#main-content").height() < e(".widget-area.left").height() + 100)
278        ) {
279            function s() {
280                // LSXC-22 — keep topic sidebar in the flex wrapper (Cursor agent 2026-07-20)
281                if (e("body.single-topic").length) {
282                    1 == e("#main-content .widget-area.left").length && e("#main-content .widget-area.left").detach().insertAfter("#main-content");
283                    return;
284                }
285                t.innerWidth <= 1360 && t.innerWidth > 1e3
286                    ? 0 == e("#main-content .widget-area.left").length && e(".widget-area.left").detach().appendTo(e("#main-content"))
287                    : 1 == e("#main-content .widget-area.left").length && e("#main-content .widget-area.left").detach().insertAfter("#main-content");
288            }
289            s(),
290                e(t).on("resize", function () {
291                    s();
292                });
293        }
294        "" != _leaf.t_a_link &&
295            t.setInterval(function () {
296                e('<div class="_l-a-title"><a href="' + _leaf.t_a_link + '">Advertisement</a></div>').insertBefore(
297                    "div:not(.inner-wrapper-sticky) .adsbygoogle:not(._l-a-done),.is-lf-ax:not(._l-a-done),._ning_inner:not(._l-a-done),.g-life--ax:not
297(._l-a-done)"
298                ),
299                    e(".life-a-on-scroll-container ._l-a-title").remove(),
300                    e(".adsbygoogle,.is-lf-ax,._ning_inner,.g-life--ax").addClass("_l-a-done"),
301                    jQuery(".adsbygoogle,.is-lf-ax,.g-life--ax").each(function () {
302                        5 > jQuery(this).outerHeight() && (jQuery(this).removeClass("_l-a-done"), jQuery(this).prev("._l-a-title").remove());
303                    });
304            }, 300),
305            e(".authors-more-count").on("click", function (t) {
306                t.preventDefault(), e("html,body").animate({ scrollTop: e(".author-info-box").offset().top - 50 });
307            }),
308            e(".mobile-menu-inner .menu-item-has-children").each(function () {
309                e(this).find(">a").append('<span class="mobile-item-arrow"></span>');
310            }),
311            e(".mobile-menu-inner").on("click", ".mobile-item-arrow", function (t) {
312                t.preventDefault(), t.stopPropagation(), e(this).closest("li").toggleClass("sub-menu-open").find(">ul").stop().slideToggle();
313            }),
314            e(".mobile-menu-inner ul").on("click", "a", function (t) {
315                if (e(t.target).hasClass("mobile-item-arrow")) {
316                    t.preventDefault();
317                    return;
318                }
319                e(this).closest("li").hasClass("menu-item-has-children") && !e(this).closest("li").hasClass("sub-menu-open") && (t.preventDefault(), e(this).closest("li").toggleClass("sub-menu-open").find(">ul").stop().slideToggle());
320            }),
321            e(".affiliate-link-generator-field button").on("click", function (t) {
322                t.preventDefault();
323                var a = e(".affiliate-link-generator-field input").val();
324                if ("" != a) {
325                    var i = e(".generate-affiliate-link").attr("data-affiliate-url");
326                    (a = a.search(/\?/) > -1 ? a + "&" + i : a + "?" + i), e(".affiliate-link-generated").addClass("open").find("input").val(a);
327                }
328            }),
329            e(".affiliate-link-generated button").on("click", function (a) {
330                a.preventDefault();
331                var i = e(".affiliate-link-generated input").get(0);
332                i.select(),
333                    i.setSelectionRange(0, 99999),
334                    document.execCommand("copy"),
335                    e(".affiliate-link-copied").addClass("show"),
336                    t.setTimeout(function () {
337                        e(".affiliate-link-copied").removeClass("show");
338                    }, 2e3);
339            }),
340            e(".user-avatar-ajax-form").on("change", 'input[type="file"]', function () {
341                e(".user-avatar-ajax-form").addClass("ajaxing"), e("#basic-user-avatar-form").submit();
342            }),
343            jQuery("body").on("avatar_upload_completed", function () {
344                e(".user-avatar-ajax-form").removeClass("ajaxing"), e(".user-avatar-ajax-form").html(ajax_upload_message);
345            }),
346            e(".impact-show-hide input").on("change", function () {
347                e.ajax({ url: edd_scripts.ajaxurl, type: "POST", dataType: "JSON", data: { action: "toggle_public_impact_status", enabled: e(this).is(":checked") ? "1" : "0" }, success: function (e) {} });
348            });
349    })(jQuery, window);

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.