PageSourceSearch

https://www.redwingshoes.com/on/demandware.static/Sites-RedWing-Site/-/en_US/v1790886774192/js/search.js

js redwingshoes.com collected 2026-10-02 04:55:27 UTC 13,995 bytes, 1 lines download raw bytes

1!function(){var e,t={4913:function(e){"use strict";var t=$(".compare-bar-wrapper"),n=parseInt($(".compare-bar").data("max-slots"),10),r=[],i=$("button.compare").text(),a=location.href;function o(e){var t=e.map(function(e,t){var n,r,i;return n=e,r=t,'<div class="col-3 selected-product"><div class="slot" data-pid="'+(i=n.pid)+'"><img src="'+n.imgSrc+'" /><div class="close"><i class="fa fa-close"></i></div></div><input type="hidden" name="pid'+r+'" value="'+i+'" /></div>\n'}).join("");if(e.length<n){for(var r=n-e.length,i=0;i<r;i++)0===i&&e.length<2?t+='<div class="col-3 selected-product"><div class="slot"><div class="min-products-msg">'+$(".compare-bar").data("min-products-msg")+"</div></div></div>":t+='<div class="col-3 selected-product"><div class="slot"></div></div>'}$(".compare-bar .product-slots").empty().append(t)}function s(e){e>0?$("button.compare").text(i+"("+e+")"):$("button.compare").text(i),e<2?$("button.compare").attr("disabled",!0):$("button.compare").removeAttr("disabled")}function c(e){return e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t})}function l(e,r,i){var a=c(e)||[];return a.length<n&&(a.push({pid:r,imgSrc:i}),a.length===n&&$("input[type=checkbox]:not(:checked)").attr("disabled",!0),o(a),s(a.length),t.show()),a}function d(e,n){var r=c(e)||[];return 0===(r=r.filter(function(e){return e.pid!==n})).length&&t.hide(),$("input#"+n).prop("checked",!1),$("input[type=checkbox]:not(:checked)").removeAttr("disabled"),o(r),s(r.length),r}function u(){r.forEach(function(e){$(this).trigger("compare:deselected",{pid:e.pid})}),r=[],$(".compare input").prop("checked",!1),$(".compare input[type=checkbox]:not(:checked)").removeAttr("disabled"),t.hide()}e.exports={handleCompareClick:function(){$("div.page").on("click",".compare input[type=checkbox]",function(){var e=$
1(this).attr("id"),t=$(this).is(":checked"),n=$(this).closest(".product-tile").find(".tile-image").prop("src");t?(r=l(r,e,n),$(this).trigger("compare:selected",{pid:e})):(r=d(r,e),$(this).trigger("compare:deselected",{pid:e}))})},handleClearAll:function(){$(".compare-bar a.clear-all").on("click",function(e){e.preventDefault(),u()})},deselectProductOnCompareBar:function(){$(".compare-bar").on("click",".close",function(){var e=$(this).closest(".slot").data("pid").toString();r=d(r,e),$(this).trigger("compare:deselected",{pid:e})})},selectCheckedProducts:function(){$(".product-grid").ready(function(){location.hash&&location.hash.replace("#","").split(",").forEach(function(e){$("input#"+e).prop("checked","checked")}),$(".compare input:checked").each(function(){var e=$(this).prop("id"),t=$(this).closest(".product-tile").find("img.tile-image").prop("src");r=l(r,e,t),$(this).trigger("compare:selected",{pid:e})})})},setBackUrl:function(){$(".search-results").on("click",".refinements a",function(){$('input[name="backUrl"]').val($(this).prop("href"))})},setPushState:function(){$(".compare-products-form").on("submit",function(){(t=(e=$(".compare-products-form")).attr("action").split("?"))[1]&&(t[1].split("&").forEach(function(t){var n=t.split("="),r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]);r&&i&&0===e.find('[name="'+r+'"]').length&&e.append('<input type="hidden" name="'+r+'" value="'+i+'" />')}),e.attr("action",t[0]));var e,t,n=$(".compare input:checked").map(function(){return this.id}).get().join(",");history.pushState({},document.title,a+"#"+n),location.hash=n,$(this).find('input[name="cgid"]').attr("value",$("input.category-id").val())})},catchFilterChange:function(){$(".container").on("click",".refinements li a, .refinement-bar a.reset",function(e){e.preventDefault(),u()})},listenToFilterChange:function(){$("body").on("search:filter",function(e,t){a=t.currentTarget.href})}}},2310:function(e){"use strict";function t(e,t){var n=e.find(t);$(t).empty().html(n.html()),$("body").trigger("search:updateDom",t)}function n(e){$(".refinement.active").each(function(){$(this).removeClass("active");var t=e.find("."+$(this)[0].className.replace(/ /g,"."));t.addClass("active"),t.find("button.title").attr("aria-expanded","true")}),t(e,".refinements")}function r(e,t){var n=e.data("url");$.spinner().start(),$.ajax({url:n,method:"GET",success:function(e){t.append(e),$.spinner().stop()},error:function(){$.spinner().stop()}})}e.exports={filter:function(){$(".container").on("click","button.filter-results",function(){$(".refinement-bar, .modal-background").show(),$(".refinement-bar").siblings().attr("aria-hidden",!0),$(".refinement-bar").closest(".row").siblings().attr("aria-hidden",!0),$(".refinement-bar").closest(".tab-pane.active").siblings().attr("aria-hidden",!0),$(".refinement-bar").closest(".container.search-results").siblings().attr("aria-hidden",!0),$(".refinement-bar .close").focus()})},closeRefinements:function(){$(".container").on("click",".refinement-bar button.close, .modal-background",function(){$(".refinement-bar, .modal-background").hide(),$(".refinement-bar").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".row").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".tab-pane.active").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".container.search-results").siblings().attr("aria-hidden",!1),$(".btn.filter-results").focus()})},resize:function(){$(window).resize(function(){$(".refinement-bar, .modal-background").hide(),$(".refinement-bar").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".row").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".tab-pane.active").siblings().attr("aria-hidden",!1),$(".refinement-bar").closest(".container.search-results").siblings().attr("aria-hidden",!1)})},sort:function(){$(".container").on("change","[name=sort-order]",function(e){e.preventDefault(),$.spinner().start(),$(this).trigger("search:sort",this.value),$.ajax({url:this.value,data:{selectedUrl:this.value},method:"GET",success:function(e){$(".product-grid").empty().html(e),$("body").trigger("search:updateDom",".product-grid"),$.spinner().stop()},error:function(){$.spinner().stop()}})})},showMore:function(){$(".container").on("click",".show-more button",function(e){e.stopPropagation();var t=$(this).data("url");e.preventDefault(),$.spinner().start(),$(this).trigger("search:showMore",e),$.ajax({url:t,data:{selectedUrl:t},method:"GET",success:function(e){$(".grid-footer").replaceWith(e),$("body").trigger("search:updateDom",".grid-footer"),!function(e){$("<div>
1").append($(e)).find(".grid-footer").data("sort-options").options.forEach(function(e){$("option."+e.id).val(e.url)})}(e),$.spinner().stop()},error:function(){$.spinner().stop()}})})},applyFilter:function(){$(".container").on("click",".refinements li button, .refinement-bar button.reset, .filter-value button, .swatch-filter button",function(e){e.preventDefault(),e.stopPropagation(),$.spinner().start(),$(this).trigger("search:filter",e);var r=$(this).data("href"),i=$(this).data("seo-href")||r;i&&window.history.pushState({},null,i);var a="#"+$(this).find("span").last().attr("id");$.ajax({url:r,data:{page:$(".grid-footer").data("page-number"),selectedUrl:r},method:"GET",success:function(e){var r,i;r=$(e),i={".refinements":n},[".grid-header",".header-bar",".header.page-title",".product-grid",".show-more",".filter-bar"].forEach(function(e){t(r,e)}),Object.keys(i).forEach(function(e){i[e](r)}),$.spinner().stop(),$(a).parent("button").focus()},error:function(){$.spinner().stop(),$(a).parent("button").focus()}})})},showContentTab:function(){$(".container").on("click",".content-search",function(){""===$("#content-search-results").html()&&r($(this),$("#content-search-results"))}),$(".container").on("click",".show-more-content button",function(){r($(this),$("#content-search-results")),$(".show-more-content").remove()})},onPopState:function(){$(window).on("popstate",function(){window.location=window.location.href})}}},836:function(e){"use strict";e.exports=function(e){"function"==typeof e?e():"object"==typeof e&&Object.keys(e).forEach(function(t){"function"==typeof e[t]&&e[t]()})}},7332:function(e,t,n){"use strict";var r=n(9663);function i(e){$(e).find(".tooltip").toggleClass("d-none"),"false"===$(e).attr("aria-expanded")?$(e).attr("aria-expanded","true"):$(e).attr("aria-expanded","false")}e.exports={init:function(){r(["default","xs-up","sm-up","md-up"])?$(".info-icon").on("click",function(){i(this)}):($(".info-icon").on("mouseenter focusin",function(){i(this)}),$(".info-icon").on("mouseleave focusout",function(){i(this)}))}}},1272:function(e,t,n){"use strict";var r=n(7332),i=n(2062),a=n(2310),o=n(9663);function s(){$(".js-alt-image").on("mouseover mouseout",function(e){var t=$(this),n=t.find(".js-alt-image-srcset"),r=t.find(".js-main-image");if(clearTimeout(t.data("hoverTimeout")),"mouseover"===e.type){var i=setTimeout(function(){var e=n.data("alt-image");$(r).addClass("is-hovered"),e&&n.attr("srcset",e)},350);t.data("hoverTimeout",i)}else{var a=n.data("main-image");$(r).removeClass("is-hovered"),a&&n.attr("srcset",a)}})}function c(e,t){var n=e.find(t);$(t).empty().html(n.html()),r.init(),s()}function l(e){$(".refinement.active").each(function(){$(this).removeClass("active"),e.find("."+$(this)[0].className.replace(/ |'/g,".")).addClass("active")}),c(e,".refinements")}function d(e){c(e,".grid-header")}"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n});e.exports=Object.assign(a,{init:function(){s(),!o(["sm-up","md-up","lg-up","xl-up"])&&$(".js-refinement-bar").attr("role","dialog").attr("aria-modal","true").attr("aria-labelledby","refinement-bar-title")},showMore:function(){$(".container").on("click",".show-more button",function(e){e.stopPropagation();var t=$(this).data("url");e.preventDefault(),$.spinner().start(),$(this).trigger("search:showMore",e),$.ajax({url:t,data:{selectedUrl:t},method:"GET",success:function(e){var t,n,i;t=e,i=(n=$($.parseHTML(t))).filter(".st-product-grid__item").first().find(".c-product-tile__image-container a"),setTimeout(function(){$(i).focus()},500),$(".grid-footer").replaceWith(n),!function(e){$("<div>").append($(e)).find(".grid-footer").data("sort-options").options.forEach(function(e){$("option."+e.id).val(e.url)})}(e),r.init(),s(),$.spinner().stop()},error:function(){$.spinner().stop()}})})},applyFilter:function(){$(".container").on("click",".refinements li a, .refinements li button, .refinement-bar .reset, .filter-value a, .swatch-filter a",function(e){var t="#"+$(this).find("span").last().attr("id"),n=$(this).data("href"),r="true"===new URLSearchParams(window.location.search).get("grid");if(r){var a=n.indexOf("?")>-1?"&":"?";n=n+a+"grid=true",$(this).attr("data-href",n)}if($(this).hasClass("category"))return window.location=$(this).attr("href"),!0;e.preventDefault(),e.stopPropagation(),$.spinner().start(),$(this).trigger("search:filter",e),$.ajax({url:n,data:{page:$(".grid-footer").data("page-number")},method:"GET",success:function(e){if(n=$(e),a={".refinements":l,".grid-header":d},[".header-bar",".header.page-title",".product-grid",".show-more",".filter-bar",".js-sort-order"].forEach(function(e){c(n,e)}
1),Object.keys(a).forEach(function(e){a[e](n)}),r){var n,a,o=i.addQueryParams($(".permalink").val(),{grid:!0});$(".permalink").val(o)}!function(){let e=document.querySelector(".permalink");e&&/^https?:\/\//.test(e.value)&&history.replaceState(null,null,e.value)}(),$.spinner().stop(),$(t).parent("button").focus()},error:function(){$.spinner().stop(),$(t).parent("button").focus()}})})},sort:function(){$(".container").on("change","[name=sort-order]",function(e){e.preventDefault(),$.spinner().start(),$(this).trigger("search:sort",this.value),$.ajax({url:this.value,data:{selectedUrl:this.value},method:"GET",success:function(e){$(".product-grid").empty().html(e),r.init(),s(),$.spinner().stop()},error:function(){$.spinner().stop()}})})},toggleRefinementPanel:function(){$(".container").on("click",".js-refinement-toggle",function(e){e.preventDefault();var t=$(".js-refinement-panel");o(["sm-up","md-up","lg-up","xl-up"])&&(t.hasClass("show")?(t.removeClass("show"),t.attr("aria-hidden",!0),$(this).attr("aria-expanded",!1),$(".js-grid-container").removeClass("col-md-9"),$(".js-product-grid-item").removeClass("col-sm-4").addClass("col-sm-3"),$(".js-refinement-toggle--close").addClass("d-none").removeClass("d-inline-flex"),$(".js-refinement-toggle--open").addClass("d-inline-flex"),$(".js-filter-bar").removeClass("d-md-none")):(t.addClass("show"),t.attr("aria-hidden",!1),$(this).attr("aria-expanded",!0),$(".js-grid-container").addClass("col-md-9"),$(".js-product-grid-item").removeClass("col-sm-3").addClass("col-sm-4"),$(".js-refinement-toggle--close").addClass("d-inline-flex"),$(".js-refinement-toggle--open").addClass("d-none").removeClass("d-inline-flex"),$(".js-filter-bar").addClass("d-md-none")))})},closeRefinementPanel:function(){$(".container").on("click",".js-close-mobile-refinement-panel",function(e){$(".js-refinement-bar, .modal-background").hide()})}
1,loadArticles:function(){var e=$(".js-nav-tabs-wrapper");e.length&&!0===e.data("has-content")&&$(".js-tab-link-content").trigger("click")}})},9663:function(e){e.exports=function(e){var t="",n=!1;return window.getComputedStyle&&(t=getComputedStyle(document.querySelector("body"),":after").content.replace(/[^a-z-]/ig,""),n=e.indexOf(t)>=0||!t),n}},2062:function(e){"use strict";function t(e){return new URLSearchParams(e.split("?")[1]||"")}e.exports={addQueryParams:function(e,n){let r=e.split("?")[0],i=t(e);return $.each(n,function(e,t){i.set(e,t)}),r+"?"+i.toString()},getQueryParams:t}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.rv=function(){return"1.0.8"},r.ruid="[email protected]",e=r(836),$(document).ready(function(){e(r(1272)),e(r(4913))})}();

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.