1jQuery(document).ready(function(r){var i=wc_ps_vars.legacy_api_url,a=(wc_ps_vars.permalink_structure,wc_ps_vars.search_page_url,wc_ps_vars.minChars),n=wc_ps_vars.delay,c=24,o=!0,e=!0,t="fadeInUpBig";void 0!==wc_ps_vars.cache_timeout&&(c=wc_ps_vars.cache_timeout),void 0!==wc_ps_vars.is_debug&&"yes"!=wc_ps_vars.is_debug&&(o=!1),void 0!==wc_ps_vars.allow_result_effect&&"yes"!=wc_ps_vars.allow_result_effect&&(e=!1),void 0!==wc_ps_vars.show_effect&&(t=wc_ps_vars.show_effect),o&&console.log("Predictive Search -- DEBUG");var p={apps:{},models:{},collections:{},views:{}};_.templateSettings={evaluate:/[<{][%{](.+?)[%}][}>]/g,interpolate:/[<{][%{]=(.+?)[%}][}>]/g,escape:/[<{][%{]-(.+?)[%}][}>]/g},p.models.Item=Backbone.Model.extend({defaults:{title:"Empty Product",keyword:"",url:null,image_url:null,sku:null,price:null,description:null,stock:null,categories:[],type:"product",status:!0}}),p.collections.Items=Backbone.Collection.extend({model:p.models.Item,totalItems:function(){return this.where({status:!0}).length},haveItems:function(e){return this.where({type:e}).length}}),p.views.Item=Backbone.View.extend({tagName:"li",className:function(e){switch(this.model.get("type")){case"nothing":return"ac_odd nothing";default:return"ac_odd"}},itemTpl:_.template(r("#wc_psearch_itemTpl").html().replace("/*<![CDATA[*/","").replace("/*]]>*/","")),footerSidebarTpl:_.template(r("#wc_psearch_footerSidebarTpl").html().replace("/*<![CDATA[*/","").replace("/*]]>*/","")),footerHeaderTpl:_.template(r("#wc_psearch_footerHeaderTpl").html().replace("/*<![CDATA[*/","").replace("/*]]>*/","")),initialize:function(){this.listenTo(this.model,"destroy",this.remove)},render:function(){switch(this.model.get("type")){case"header":this.$el.html('<div class="ajax_search_content_title">'+this.model.get("title")+"</div>");break;case"footerSidebar":this.$el.html(this.footerSidebarTpl(this.model.toJSON()));break;case"footerHeader":this.$el.html(this.footerHeaderTpl(this.model.toJSON()));break;case"footerCustom":this.$el.html(_.template(r("#wc_psearch_footerCustomTpl_"+this.model.get("templateID")).html().replace("/*<![CDATA[*/","").replace("/*]]>*/",""))(this.model.toJSON()));break;case"nothing":this.$el.html('<div class="ajax_no_result">'+this.model.get("title")+"</div>");break;default:e?this.$el.html(this.itemTpl(this.model.toJSON())).addClass("animated "+t).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){r(this).removeClass("animated "+t)}):this.$el.html(this.itemTpl(this.model.toJSON()))}return this}}),p.views.PopupResult=Backbone.View.extend({initialize:function(){this.predictive_search_input=null,this.original_ps_search_other="",this.delaytime=0,this.prepend=!1,this.listenTo(this.collection,"add",this.addItem),this.list_items_container=this.$(".predictive_search_results")},createItems:function(e,t){this.prepend=t,r.each(e,function(e,t){this.collection.add(t)}.bind(this));var s=r(this.predictive_search_input).data("ps-id"),i=r(".wc_ps_bar-"+s);""==this.original_ps_search_other&&(this.original_ps_search_other=i.data("ps-search_other")),""==this.original_ps_search_in&&(this.original_ps_search_in=i.data("ps-search_in")),ps_search_other=this.original_ps_search_other.split(","),new_ps_search_other=[],new_ps_search_in="",r.each(ps_search_other,function(e,t){0<this.collection.haveItems(t)&&(new_ps_search_other.push(t),""==new_ps_search_in&&(new_ps_search_in=t))}.bind(this)),""!=new_ps_search_in&&(i.data("ps-search_in",new_ps_search_in),r(this.predictive_search_input).parents(".wc_ps_form").find("input[name=search_in]").val(new_ps_search_in)),0==new_ps_search_other.length&&(new_ps_search_other=[i.data("ps-search_in")]),i.data("ps-search_other",new_ps_search_other.join(",")),r(this.predictive_search_input).parents(".wc_ps_form").find("input[name=search_other]").val(new_ps_search_other.join(","))},addItem:function(e){var t=new p.views.Item({model:e}).render().el;this.prepend?this.list_items_container.prepend(t):this.list_items_container.append(t),r.data(t,"ac_data",e.attributes)},clearAll:function(){return _.invoke(this.collection.where({status:!0}),"destroy"),!1}}),p.apps.App={initialize:function(){r(document).on("click",".wc_ps_nav_submit_bt",this.goToSearchResultPage),r(".wc_ps_form").bind("keypress",function(e){if(13==e.keyCode)return this.goToSearchResultPage(e),!1}.bind(this)),r(".wc_ps_category_selector").change(function(){r(this).parents(".wc_ps_container").find(".wc_ps_nav_facade_label").html(r(this).find("option:selected").text().trim())}).focus(function(){r(this).parents(".wc_ps_container").addClass("wc_ps_container_active")}).blur(function(){r(this).parents(".wc_ps_container").removeClass("wc_ps_container_active")}),r(document).on("click",".wc_ps_mobile_icon",function(){var e,t,s,i=r(this).parents(".wc_ps_bar"),a=i.data("ps-id"),n=20,c=r(this).offset().top+r(this).find("svg").outerHeight(),_=!1;680<window.innerWidth&&(n=i.offset().left,_=i.innerWidth()),r(this).hasClass("active")?(r(this).removeClass("active"),i.append(r(".wc_ps_container-"+a)),r("#wc_ps_mobile_popup-"+a).remove()):(r(this).addClass("active"),r('<div class="wc_ps_mobile_popup" id="wc_ps_mobile_popup-'+a+'"></div>').appendTo(document.body),i.find(".wc_ps_container").appendTo(r("#wc_ps_mobile_popup-"+a)),r("#wc_ps_mobile_popup-"+a).css({transform:"translate3d("+n+"px, "+c+"px, 0)"}),_&&(r("#wc_ps_mobile_popup-"+a).css({width:_+"px"}),t=(e=r("#wc_ps_mobile_popup-"+a).find(".wc_ps_form")).find(".wc_ps_category_selector").data("ps-cat_max_wide"),s=e.innerWidth()*t/100,e.find(".wc_ps_nav_facade_label").css("max-width",s))),r(".ac_input_"+a).trigger("ps_mobile_icon_click")}),this.initPredictSearch()},initPredictSearch:function(){r(".wc_ps_search_keyword").each(function(){r(this).ps_autocomplete(i,{minChars:a,delay:n,cacheTimeout:c,isDebug:o,scrollHeight:2e3,loadingClass:"predictive_loading",highlight:!1},p);var e=r(this).parents(".wc_ps_bar"),t=e.data("ps-search_in"),s=e.data("ps-search_other");e.find("input[name=search_in]").val(t),e.find("input[name=search_other]").val(s),r(this).result(function(e,t,s){""!=t&&r(this).val(t),""!=s&&null!=s&&"#"!=s&&(window.location=s)})}).focus(function(){r(this).parents(".wc_ps_container").addClass("wc_ps_container_active")}).blur(function(){r(this).parents(".wc_ps_container").removeClass("wc_ps_container_active")})},goToSearchResultPage:function(e){var t=r(e.target).parents(".wc_ps_container");
1predictive_search_input=t.find(".wc_ps_search_keyword"),cat_selected=t.find(".wc_ps_category_selector option:selected"),""!=predictive_search_input.val()&&predictive_search_input.val()!=predictive_search_input.data("ps-default_text")?t.find(".wc_ps_form").submit():""!==cat_selected.val()&&(cat_href=cat_selected.data("href"),window.location=cat_href)}},p.apps.App.initialize()});
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.