1// source --> https://www.jak-nowa.pl/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=11.1.2 2function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count"),o=document.querySelector('[data-wp-interactive="woocommerce/product-filters"]');if(e&&window.location.search&&!o){var t=e.innerHTML;e.setAttribute("role","alert"),e.setAttribute("aria-hidden","true");var n=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=t,clearTimeout(n)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id"),t=e("<button>",{type:"button","class":"show-password-input","aria-label":woocommerce_params.i18n_password_show});t.attr("aria-describedby",o),e(this).append(t)}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").trigger("focus")}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focu
2s_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready); 3// source --> https://www.jak-nowa.pl/wp-content/plugins/sticky-header-effects-for-elementor/assets/js/she-header.js?ver=2.2.3 4var $j = jQuery.noConflict(); 5 6$j(document).ready(function () { 7 "use strict"; 8 // She header 9 sheHeader(); 10 11 // Anchor scroll offset â keep in-page links clear of the sticky header. 12 sheAnchorOffset(); 13 14 // Back to Top button â inject + wire its own scroll/click handlers. 15 sheBackToTop(); 16 17 // Debounce resize: sheHeader() re-runs the full per-header setup and 18 // rebinds every scroll listener, so firing it on every resize pixel is 19 // wasteful (and janky on devices that stream resize events). Run it once 20 // the resize settles instead. 21 var sheResizeTimer; 22 $j(window).on('resize', function (e) { 23 clearTimeout(sheResizeTimer); 24 sheResizeTimer = setTimeout(function () { 25 sheHeader(e); 26 sheAnchorOffset(); 27 }, 150); 28 }); 29 30 // The header height changes as it shrinks / becomes sticky, so keep the 31 // anchor offset in sync on scroll. rAF-throttled and cheap: it reads one 32 // height and sets one CSS property. 33 var sheAnchorTicking = false; 34 $j(window).on('scroll', function () { 35 if (!sheAnchorTicking) { 36 sheAnchorTicking = true; 37 window.requestAnimationFrame(function () { 38 sheAnchorOffset(); 39 sheAnchorTicking = false; 40 }); 41 } 42 }); 43}); 44 45 46/* ============================================== 47HEADER EFFECTS 48============================================== */ 49 50 51function sheHeader(e) { 52 53 // Iterate each sticky header independently so that multiple sticky headers 54 // each use their OWN settings/scroll-distance instead of all sharing the 55 // first matched header's settings (the "sticks too early" group bug). 56 $j('.elementor-element.she-header-yes').each(function (sheIndex) { 57 58 var header = $j(this), 59 container = header.find('.elementor-container').add(header.filter('.e-con')), 60 header_elementor = header.closest('.elementor-edit-mode').length ? header : $j(), 61 header_logo = header.find('.elementor-widget-theme-site-logo img:not(.elementor-widget-n-menu img), .elementor-widget-image img:not(.elementor-widget-n-menu img)'), 62 header_logo_div = header.find('.elementor-widget-theme-site-logo a, .elementor-widget-image a'), 63 data_settings = header.data('settings'); 64 65 if (typeof data_settings != 'undefined') { 66 var responsive_settings = data_settings["transparent_on"]; 67 var width = $j(window).width(), 68 header_height = header.height(), 69 logo_width = header_logo.width(), 70 logo_height = header_logo.height(); 71 } 72 73 // Check responsive is enabled 74 if (typeof width != 'undefined' && width) { 75 if (width >= 1025) { 76 var enabled = "desktop"; 77 } else if (width > 767 && width < 1025) { 78 var enabled = "tablet"; 79 } else if (width <= 767) { 80 var enabled = "mobile"; 81 } 82 } 83 84 if ($j.inArray(enabled, responsive_settings) !== -1) { 85 86 var scroll_distance = data_settings["scroll_distance"]; 87 var she_offset = data_settings["she_offset_top"]; 88 var she_padding = data_settings["she_padding"]; 89 var she_width = data_settings["she_width"]; 90 var transparent_header = data_settings["transparent_header_show"]; 91 var background = data_settings["background"]; 92 var bottom_border_color = data_settings["custom_bottom_border_color"], 93 bottom_border_view = data_settings["bottom_border"], 94 bottom_border_width = data_settings["custom_bottom_border_width"]; 95 96 var shrink_header = data_settings["shrink_header"], 97 data_height = data_settings["custom_height_header"], 98 data_height_tablet = data_settings["custom_height_header_tablet"], 99 data_height_mobile = data_settings["custom_height_header_mobile"]; 100 101 var shrink_logo = data_settings["shrink_header_logo"], 102 data_logo_height = data_settings["custom_height_header_logo"], 103 data_logo_height_tablet = data_settings["custom_height_header_logo_tablet"], 104 data_logo_height_mobile = data_settings["custom_height_header_logo_mobile"]; 105 106 var change_logo_color = data_settings["change_logo_color"]; 107 108 var blur_bg = data_settings["blur_bg"]; 109 110 var scroll_distance_hide_header = data_settings["scroll_distance_hide_header"]; 111 112 // offset 113 if (width >= 1025) { 114 she_offset = data_settings["she_offset_top"]; 115 she_padding = data_settings["she_padding"]; 116 she_width = data_settings["she_width"]; 117 } else if (width > 767 && width < 1025) { 118 she_offset = data_settings["she_offset_top_tablet"]; 119 she_padding = data_settings["she_padding_tablet"]; 120 she_width = data_settings["she_width_tablet"]; 121 } else if (width <= 767) { 122 she_offset = data_settings["she_offset_top_mobile"]; 123 she_padding = data_settings["she_padding_mobile"]; 124 she_width = data_settings["she_width_mobile"]; 125 } 126 127 if (header.hasClass("she-header")) { 128 if( e?.type === 'resize' ){ 129 header.css("width", she_width.size + she_width.unit); 130 header.css("padding-top", she_padding.top + she_padding.unit); 131 header.css("padding-bottom", she_padding.bottom + she_padding.unit); 132 header.css("padding-left", she_padding.left + she_padding.unit); 133 header.css("padding-right", she_padding.right + she_padding.unit); 134 } 135 } 136 137 // add transparent class 138 if (transparent_header == "yes") { 139 header.addClass('she-header-transparent-yes'); 140 } 141 142 // header height shrink 143 if (typeof data_height != "undefined" && data_height) { 144 if (width >= 1025) { 145 var shrink_height = data_height["size"]; 146 } else if (width > 767 && width < 1025) { 147 var shrink_height = data_height_tablet["size"]; 148 if (shrink_height == "") { 149 shrink_height = data_height["size"]; 150 } 151 } else if (width <= 767) { 152 var shrink_height = data_height_mobile["size"]; 153 if (shrink_height == "") { 154 shrink_height = data_height["size"]; 155 } 156 } 157 } 158 159 // Logo height shrink 160 if ( 161 typeof data_logo_height != "undefined" && 162 data_logo_height 163 ) { 164 if (width >= 1025) { 165 var shrink_logo_height = data_logo_height["size"]; 166 } else if (width > 767 && width < 1025) { 167 var shrink_logo_height = 168 data_logo_height_tablet["size"]; 169 } else if (width <= 767) { 170 var shrink_logo_height = 171 data_logo_height_mobile["size"]; 172 } 173 174 //Calc New width and height 175 if (shrink_logo_height == "") { 176 //Get logo shrink settings from desktop 177 shrink_logo_height = data_logo_height["size"]; 178 179 if (shrink_logo_height == "") { 180 // Shrink same settings from height shrink option 181 shrink_logo_height = shrink_height; 182 183 var percent = 184 parseInt(shrink_logo_height) / 185 parseInt(header_height), 186 width_l = logo_width * percent, 187 height_l = logo_height * percent; 188 } else { 189 var width_l = 190 (logo_width * shrink_logo_height) / 100, 191 height_l = 192 (logo_height * shrink_logo_height) / 100; 193 } 194 } else { 195 //Get logo shrink settings from the responsive option
196 var width_l = (logo_width * shrink_logo_height) / 100, 197 height_l = (logo_height * shrink_logo_height) / 100; 198 } 199 } 200 201 // border bottom 202 if (typeof bottom_border_width != 'undefined' && bottom_border_width) { 203 var bottom_border = bottom_border_width["size"] + "px solid " + bottom_border_color; 204 } 205 206 // hide header on scroll 207 if ( 208 typeof scroll_distance_hide_header != "undefined" && 209 scroll_distance_hide_header 210 ) { 211 var mywindow = $j(window), 212 mypos = mywindow.scrollTop(); 213 214 mywindow.off('scroll.sheHide' + sheIndex).on('scroll.sheHide' + sheIndex, function () { 215 var sd_hh_s = scroll_distance_hide_header["size"], 216 sd_hh_u = scroll_distance_hide_header["unit"], 217 sd_hh_tablet = 218 data_settings[ 219 "scroll_distance_hide_header_tablet" 220 ], 221 sd_hh_tablet_s = sd_hh_tablet["size"], 222 sd_hh_tablet_u = sd_hh_tablet["unit"], 223 sd_hh_mobile = 224 data_settings[ 225 "scroll_distance_hide_header_mobile" 226 ], 227 sd_hh_mobile_s = sd_hh_mobile["size"], 228 sd_hh_mobile_u = sd_hh_mobile["unit"]; 229 230 // get responsive view 231 if ( 232 typeof scroll_distance_hide_header != "undefined" && 233 scroll_distance_hide_header 234 ) { 235 if (width >= 1025) { 236 var sd_hh = sd_hh_s, 237 sd_hh_u = sd_hh_u; 238 // calc sise for vh unit 239 if (sd_hh_u == "vh") { 240 sd_hh = window.innerHeight * (sd_hh / 100); 241 } 242 } else if (width > 767 && width < 1025) { 243 var sd_hh = sd_hh_tablet_s, 244 sd_hh_u = sd_hh_tablet_u; 245 246 if (sd_hh == "") { 247 sd_hh = sd_hh_s; 248 } 249 // calc sise for vh unit 250 if (sd_hh_u == "vh") { 251 sd_hh = window.innerHeight * (sd_hh / 100); 252 } 253 } else if (width <= 767) { 254 var sd_hh = sd_hh_mobile_s, 255 sd_hh_u = sd_hh_mobile_u; 256 257 if (sd_hh == "") { 258 sd_hh = sd_hh_s; 259 } 260 // calc sise for vh unit 261 if (sd_hh_u == "vh") { 262 sd_hh = window.innerHeight * (sd_hh / 100); 263 } 264 } 265 } 266 267 if (mypos > sd_hh) { 268 if (mywindow.scrollTop() > mypos) { 269 header.addClass("headerup"); 270 } else { 271 header.removeClass("headerup"); 272 } 273 } 274 mypos = mywindow.scrollTop(); 275 }); 276 } 277 278 // scroll function â throttled with requestAnimationFrame so the 279 // heavy per-property style writes below run at most once per frame. 280 var she_scroll_ticking = false; 281 $j(window).off("load.sheScroll" + sheIndex + " scroll.sheScroll" + sheIndex).on("load.sheScroll" + sheIndex + " scroll.sheScroll" + sheIndex, function (e) { 282 if (she_scroll_ticking) { 283 return; 284 } 285 she_scroll_ticking = true; 286 requestAnimationFrame(function () { 287 she_scroll_ticking = false; 288 var scroll = $j(window).scrollTop(); 289 290 if (header_elementor.length) { 291 header_elementor.css("position", "relative"); 292 } 293 294 var sd_s = scroll_distance["size"], 295 sd_u = scroll_distance["unit"], 296 sd_tablet = data_settings["scroll_distance_tablet"], 297 sd_tablet_s = sd_tablet["size"], 298 sd_tablet_u = sd_tablet["unit"], 299 sd_mobile = data_settings["scroll_distance_mobile"], 300 sd_mobile_s = sd_mobile["size"], 301 sd_mobile_u = sd_mobile["unit"]; 302 303 // get responsive view 304 if ( 305 typeof scroll_distance != "undefined" && 306 scroll_distance 307 ) { 308 if (width >= 1025) { 309 var sd = sd_s, 310 sd_u = sd_u; 311 // calc sise for vh unit 312 if (sd_u == "vh") { 313 sd = window.innerHeight * (sd / 100); 314 } 315 } else if (width > 767 && width < 1025) { 316 var sd = sd_tablet_s, 317 sd_u = sd_tablet_u; 318 319 if (sd == "") { 320 sd = sd_s; 321 } 322 // calc sise for vh unit 323 if (sd_u == "vh") { 324 sd = window.innerHeight * (sd / 100); 325 } 326 } else if (width <= 767) { 327 var sd = sd_mobile_s, 328 sd_u = sd_mobile_u; 329 330 if (sd == "") { 331 sd = sd_s; 332 } 333 // calc sise for vh unit 334 if (sd_u == "vh") { 335 sd = window.innerHeight * (sd / 100); 336 } 337 } 338 } 339 340 if (scroll >= sd) { 341 header.removeClass('header').addClass("she-header"); 342 header.css("background-color", background); 343 header.css("border-bottom", bottom_border); 344 345 // Multi-Sticky (Pro) manages its own top / width / padding via a 346 // placeholder spacer. Skip Free's geometry writes for those 347 // containers so the two don't fight (cosmetic background/border 348 // above still apply). Pure-Free headers have no 349 // data-she-multi-mode attribute and get the full treatment. 350 if (!header.attr("data-she-multi-mode")) { 351 header.css("top", she_offset.size + she_offset.unit); 352 353 if (width >= 783 && document.body.classList.contains('admin-bar')) { 354 if (she_offset.unit === 'px') { 355 header.css("top", (32 + she_offset.size) + "px"); 356 } else { 357 header.css("top", "calc(32px + " + she_offset.size + she_offset.unit + ")"); 358 } 359 } 360 361 header.css("padding-top", she_padding.top + she_padding.unit); 362 header.css("padding-bottom", she_padding.bottom + she_padding.unit); 363 header.css("padding-left", she_padding.left + she_padding.unit); 364 header.css("padding-right", she_padding.right + she_padding.unit); 365 header.css("width", she_width.size + she_width.unit); 366 } 367 368 header.removeClass('she-header-transparent-yes'); 369 370 if (shrink_header == "yes") { 371 header.css({ "padding-top": "0", "padding-bottom": "0", "margin-top": "0", "margin-bottom": "0" }); 372 container.css({ "min-height": shrink_height, "transition": "all 0.4s ease-in-out", "
372-webkit-transition": "all 0.4s ease-in-out", "-moz-transition": "all 0.4s ease-in-out" }); 373 } 374 375 if (change_logo_color == "yes") { 376 header_logo.addClass("change-logo-color"); 377 } 378 379 // ---------------------------------- SHRINK LOGO 380 if (shrink_logo == "yes") { 381 header_logo.css({ 382 width: width_l, 383 transition: "all 0.4s ease-in-out", 384 "-webkit-transition": "all 0.4s ease-in-out", 385 "-moz-transition": "all 0.4s ease-in-out", 386 }); 387 } 388 389 } else { 390 header.removeClass("she-header").addClass('header'); 391 header.css("background-color", ""); 392 header.css("border-bottom", ""); 393 if (!header.attr("data-she-multi-mode")) { 394 header.css("top", ""); 395 header.css("padding-top", ""); 396 header.css("padding-bottom", ""); 397 header.css("padding-left", ""); 398 header.css("padding-right", ""); 399 header.css("width", ""); 400 } 401 402 if (transparent_header == "yes") { 403 header.addClass('she-header-transparent-yes'); 404 } 405 if (shrink_header == "yes") { 406 header.css({ "padding-top": "", "padding-bottom": "", "margin-top": "", "margin-bottom": "" }); 407 container.css("min-height", ""); 408 } 409 410 // ---------------------------------- SHRINK LOGO 411 if (shrink_logo == "yes") { 412 header_logo.css({ height: "", width: "" }); 413 } 414 415 if (change_logo_color == "yes") { 416 header_logo.removeClass("change-logo-color"); 417 418 } 419 420 } 421 422 423 }); // end requestAnimationFrame 424 }); 425 } 426 427 }); // end .each â per sticky-header iteration 428 429}; 430 431 432/* ============================================== 433ANCHOR SCROLL OFFSET 434Keeps in-page anchor links (and keyboard focus) clear of the sticky header by 435setting scroll-padding-top on <html> to the live header height. Using the CSS 436scroll-padding mechanism means native #anchor jumps, scrollIntoView() and 437focus scrolling all respect the offset â no click interception needed. 438============================================== */ 439function sheAnchorOffset() { 440 var html = document.documentElement; 441 442 // First sticky header that has the anchor-offset option enabled. 443 var $header = $j('.elementor-element.she-header-yes').filter(function () { 444 var s = $j(this).data('settings') || {}; 445 return s.she_anchor_offset === 'yes'; 446 }).first(); 447 448 if (!$header.length) { 449 // Feature off (or no such header) â clear anything we may have set. 450 html.style.scrollPaddingTop = ''; 451 html.style.scrollBehavior = ''; 452 return; 453 } 454 455 var s = $header.data('settings') || {}; 456 457 // Extra offset (SLIDER â { size, unit }). 458 var extra = 0; 459 if (s.she_anchor_offset_extra && s.she_anchor_offset_extra.size !== '' && typeof s.she_anchor_offset_extra.size !== 'undefined') { 460 extra = parseFloat(s.she_anchor_offset_extra.size) || 0; 461 } 462 463 var headerHeight = $header.outerHeight() || 0; 464 html.style.scrollPaddingTop = (headerHeight + extra) + 'px'; 465 466 // Smooth scroll â honour the visitor's reduced-motion preference. 467 var prefersReduced = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; 468 if (s.she_anchor_smooth === 'yes' && !prefersReduced) { 469 html.style.scrollBehavior = 'smooth'; 470 } else { 471 html.style.scrollBehavior = ''; 472 } 473} 474 475 476/* ============================================== 477BACK TO TOP BUTTON 478Injects a floating button into <body> (NOT the header) that appears after a 479configurable scroll distance and scrolls back to the top on click. It must live 480in <body>, not inside the header: a position:fixed element is positioned 481relative to any ancestor that has a transform, and the header frequently gets 482one (e.g. .headerup's translateY when Hide-on-scroll-down is active), which 483would drag the button off-screen. Styling is read from the element settings and 484applied inline, since the button is outside the Elementor wrapper. 485============================================== */ 486function sheBackToTop() { 487 if (document.querySelector('.she-totop-btn')) { 488 return; // already injected. 489 } 490 491 // First sticky header that has the Back to Top option enabled. 492 var $header = $j('.elementor-element.she-header-yes').filter(function () { 493 var s = $j(this).data('settings') || {}; 494 return s.she_totop_enable === 'yes'; 495 }).first(); 496 497 if (!$header.length) { 498 return; 499 } 500 501 var s = $header.data('settings') || {}; 502 503 // Scroll distance before the button appears (SLIDER â { size, unit }). 504 var threshold = sheSliderNum(s.she_totop_display_after, 300); 505 506 var btn = document.createElement('button'); 507 btn.type = 'button'; 508 btn.className = 'she-totop-btn'; 509 btn.setAttribute('aria-label', 'Back to top'); 510 btn.innerHTML = '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
510<path d="M12 8.29l-6.29 6.3 1.41 1.41L12 11.12l4.88 4.88 1.41-1.41z"></path></svg>'; 511 512 // Inline styling (button lives in <body>, so Elementor selectors can't 513 // reach it â mirror the announcement bar's approach). 514 var offset = sheSliderNum(s.she_totop_offset, 24); 515 btn.style.bottom = offset + 'px'; 516 if (s.she_totop_position === 'left') { 517 btn.style.left = offset + 'px'; 518 btn.style.right = 'auto'; 519 } else { 520 btn.style.right = offset + 'px'; 521 btn.style.left = 'auto'; 522 } 523 524 var size = sheSliderNum(s.she_totop_size, 44); 525 btn.style.width = size + 'px'; 526 btn.style.height = size + 'px'; 527 528 if (s.she_totop_radius && s.she_totop_radius.size !== '' && typeof s.she_totop_radius.size !== 'undefined') { 529 btn.style.borderRadius = s.she_totop_radius.size + ( s.she_totop_radius.unit || 'px' ); 530 } 531 if (s.she_totop_bg) { 532 btn.style.backgroundColor = s.she_totop_bg; 533 } 534 if (s.she_totop_icon_color) { 535 btn.style.color = s.she_totop_icon_color; 536 } 537 if (s.she_totop_bg_hover) { 538 btn.style.setProperty('--she-totop-hover', s.she_totop_bg_hover); 539 } 540 541 document.body.appendChild(btn); 542 543 btn.addEventListener('click', function () { 544 var prefersReduced = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; 545 window.scrollTo({ top: 0, behavior: prefersReduced ? 'auto' : 'smooth' }); 546 }); 547 548 var ticking = false; 549 function toggle() { 550 var y = window.pageYOffset || document.documentElement.scrollTop; 551 if (y > threshold) { 552 btn.classList.add('she-totop-visible'); 553 } else { 554 btn.classList.remove('she-totop-visible'); 555 } 556 ticking = false; 557 } 558 559 $j(window).on('scroll', function () { 560 if (!ticking) { 561 ticking = true; 562 window.requestAnimationFrame(toggle); 563 } 564 }); 565 566 toggle(); // set initial state (e.g. page loaded already scrolled down). 567} 568 569// Read an Elementor SLIDER value ({ size, unit }) as a number, with a fallback. 570function sheSliderNum(ctrl, fallback) { 571 if (ctrl && ctrl.size !== '' && typeof ctrl.size !== 'undefined') { 572 var n = parseFloat(ctrl.size); 573 if (!isNaN(n)) { 574 return n; 575 } 576 } 577 return fallback; 578};
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.