PageSourceSearch

https://forafricanart.com/wp-content/plugins/woocommerce-product-search/js/price-slider.min.js?ver=7.7.0

js forafricanart.com collected 2026-10-02 13:38:18 UTC 6,164 bytes, 20 lines download raw bytes

1/*!
2 * price-slider.js
3 *
4 * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
5 *
6 * This code is provided subject to the license granted.
7 * Unauthorized use and distribution is prohibited.
8 * See COPYRIGHT.txt and LICENSE.txt
9 *
10 * This code is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * This header and all notices must be kept intact.
15 *
16 * @author itthinx
17 * @package woocommerce-product-search
18 * @since 2.4.0
19 */
20;var wps_price_slider={};(function(a){wps_price_slider.easeIn=function(f,d,c){var e=Math.max(1,Math.log10(Math.ceil(c/10)*10)),b=Math.max(0,f-d)/Math.max(1,c-d);f=(c-d)*Math.pow(b,e)+d;f=Math.max(d,f);f=Math.min(c,f);return f};wps_price_slider.easeOut=function(c,d,b){var e=Math.max(1,Math.log10(Math.ceil(b/10)*10));c=Math.pow(Math.max(0,c-d)/(b-d),1/e)*(b-d)+d;return c};wps_price_slider.create=function(e,b,g,f,d,c){if(f==""){f=b}if(d==""){d=g}if(typeof a().slider!=="undefined"){a(e).slider({range:true,animate:true,min:b,max:g,values:[wps_price_slider.easeOut(f,b,g),wps_price_slider.easeOut(d,b,g)],create:function(){},slide:function(i,o){var q=a(this).parent().find("input.product-search-filter-min-price"),m=a(this).parent().find("input.product-search-filter-max-price"),h=a(this).parent().find(".slider-min"),l=a(this).parent().find(".slider-max"),p=o.values[0],j=o.values[1],n=a(this).data("min_price"),k=a(this).data("max_price");p=parseFloat(wps_price_slider.easeIn(p,n,k)).toFixed(c);j=parseFloat(wps_price_slider.easeIn(j,n,k)).toFixed(c);q.val(p);m.val(j);h.text(p);l.text(j)},change:function(k,m){var l=a(this).parent().find("input.product-search-filter-min-price"),i=a(this).parent().find("input.product-search-filter-max-price"),j=parseFloat(m.values[0]).toFixed(c),h=parseFloat(m.values[1]).toFixed(c);if(j!=l.data("old_min")){l.data("old_min",j);if(!a(this).slider("option","disabled")){l.trigger("input")}}if(h!=i.data("old_max")){i.data("old_max",h);if(!a(this).slider("option","disabled")){i.trigger("input")}}}});if("ontouchstart" in document){a(e).find(".ui-slider-handle").on("touchstart",function(h){wps_price_slider.asMouseEvent(h,"mouseover");wps_price_slider.asMouseEvent(h,"mousemove");wps_price_slider.asMouseEvent(h,"mousedown")});a(e).find(".ui-slider-handle").on("touchmove",function(h){wps_price_slider.asMouseEvent(h,"mousemove")});a(e).find(".ui-slider-handle").on("touchend",function(h){wps_price_slider.asMouseEvent(h,"mouseup");wps_price_slider.asMouseEvent(h,"mouseout");wps_price_slider.asMouseEvent(h,"mouseclick")})}}};wps_price_slider.asMouseEvent=function(c,b){if(c.originalEvent.touches.length>1){return}c.preventDefault();var e=c.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);c.target.dispatchEvent(d)};wps_price_slider.updateForm=function(g,l,f,t){var e=a(l).closest("form");if(e.length>0){if(g.length>0){var h=a(e).find('input[name="ixwpss"]');if(h.length>0){h.val(g)}else{a(e).append('<input type="hidden" name="ixwpss" value="'+g+'"/>')}}if(typeof f.title!=="undefined"){var w=a(e).find('input[name="wps-title"]');if(w.length>0){w.val(f.title)}else{a(e).append('<input type="hidden" name="wps-title" value="'+f.title+'"/>')}}else{a(e).find('input[name="wps-title"]').remove()}if(typeof f.excerpt!=="undefined"){var c=a(e).find('input[name="wps-excerpt"]');if(c.length>0){c.val(f.excerpt)}else{a(e).append('<input type="hidden" name="wps-excerpt" value="'+f.excerpt+'"/>')}}else{a(e).find('input[name="wps-excerpt"]').remove()}if(typeof f.content!=="undefined"){var r=a(e).find('input[name="wps-content"]');if(r.length>0){r.val(f.content)}else{a(e).append('<input type="hidden" name="wps-content" value="'+f.content+'"/>')}}else{a(e).find('input[name="wps-content"]').remove()}if(typeof f.categories!=="undefined"){var p=a(e).find('input[name="wps-categories"]');if(p.length>0){p.val(f.categories)}else{a(e).append('<input type="hidden" name="wps-categories" value="'+f.categories+'"/>')}
20}else{a(e).find('input[name="wps-categories"]').remove()}if(typeof f.attributes!=="undefined"){var j=a(e).find('input[name="wps-attributes"]');if(j.length>0){j.val(f.attributes)}else{a(e).append('<input type="hidden" name="wps-attributes" value="'+f.attributes+'"/>')}}else{a(e).find('input[name="wps-attributes"]').remove()}if(typeof f.tags!=="undefined"){var m=a(e).find('input[name="wps-tags"]');if(m.length>0){m.val(f.tags)}else{a(e).append('<input type="hidden" name="wps-tags" value="'+f.tags+'"/>')}}else{a(e).find('input[name="wps-tags"]').remove()}if(typeof f.sku!=="undefined"){var n=a(e).find('input[name="wps-sku"]');if(n.length>0){n.val(f.sku)}else{a(e).append('<input type="hidden" name="wps-sku" value="'+f.sku+'"/>')}}else{a(e).find('input[name="wps-sku"]').remove()}if(typeof f.wpml!=="undefined"){var k=a(e).find('input[name="wpml"]');if(k.length>0){k.val(f.wpml)}else{a(e).append('<input type="hidden" name="wpml" value="'+f.wpml+'"/>')}}else{a(e).find('input[name="wpml"]').remove()}a(e).find('input[name="orderby"]').remove();a(e).find('input[name^="ixwpst"]').remove();a(e).find('input[name^="ixwpsf"]').remove();a(e).find('input[name="ixwpse"]').remove();a(e).find('input[name="on_sale"]').remove();a(e).find('input[name="rating"]').remove();a(e).find('input[name="in_stock"]').remove();var u=t.substring(t.indexOf("?")+1);var d=u.indexOf("#");if(d>=0){u=u.substring(0,d)}u=u.split("&");if(u.length>0){for(var s=0;s<u.length;s++){var o=u[s].split("="),v="",q="";v=unescape(o[0]);if(o.length>1){q=unescape(o[1])}if(v!==""&&v!=="ixwpsp"&&v!=="min_price"&&v!=="max_price"&&v!=="ixwpss"&&v!=="wps-title"&&v!=="wps-excerpt"&&v!=="wps-content"&&v!=="wps-categories"&&v!=="wps-attributes"&&v!=="wps-tags"&&v!=="wps-sku"&&v!=="wpml"&&(v.indexOf("ixwpst")===0||v.indexOf("ixwpsf")===0||v==="ixwpse"||v==="on_sale"||v==="rating"||v==="in_stock")){var b=a(e).find('input[name="'+v+'"]');if(b.length>0&&!v.endsWith("[]")){b.val(q)}else{a(e).append(a('<input type="hidden" name="'+v+'" />').attr({value:q}))}}}}}}})(jQuery);

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.