PageSourceSearch

https://www.fhopepack.com/assets/mobirise-shop/script.js

js fhopepack.com collected 2026-10-01 14:48:17 UTC 10,627 bytes, 21 lines download raw bytes

1
2(function(){function C(b){b=b.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}}function y(b){return parseFloat(getComputedStyle(b,null).width.replace("px",""))}function E(b){"loading"!=document.readyState?b():document.addEventListener("DOMContentLoaded",b)}if(!document.querySelector("html").classList.contains("is-builder")){var F=function(b,a){var e=a.querySelector(".shopItemsModal"),d=b.querySelector(".sidebar_wraper").cloneNode(!0),f=b.querySelector("img").cloneNode(!0),
3h=b.querySelector(".onsale").cloneNode(!0);Array.from(e.children).filter(function(a){return a.matches(".text-modal")}).forEach(function(a){a.appendChild(d)});Array.from(e.children).filter(function(a){return a.matches(".image-modal")}).forEach(function(a){a.appendChild(f);a.appendChild(h)})},m=function(b){b=b.querySelector(".shopItemsModal");Array.from(b.children).filter(function(a){return a.matches(".text-modal")}).forEach(function(a){for(;a.firstChild;)a.removeChild(a.firstChild)});Array.from(b.children).filter(function(a){return a.matches(".image-modal")}).forEach(function(a){for(;a.firstChild;)a.removeChild(a.firstChild)})},
4G=function(b){b.querySelectorAll(".mbr-gallery-item > .item_overlay").forEach(function(a){a.addEventListener("click",function(a){a=a.target.closest(".mbr-gallery-item");m(b);F(a,b);b.querySelector(".shopItemsModal_wraper").style.display="flex"})});b.querySelectorAll(".close-modal-wrapper, .shopItemsModalBg").forEach(function(a){a.addEventListener("click",function(){b.querySelectorAll(".shopItemsModal_wraper").forEach(function(a){return a.style.display="none"});m(b)})})},p=function(b,a,e){b=3>a?Array.from(e.querySelector(".shop-items").children).sort(function(b,
5d){var c=parseFloat(b.getAttribute("data-price")),e=parseFloat(d.getAttribute("data-price"));return 1==a?c>e?1:c==e?0:-1:c<e?1:c==e?0:-1}).map(function(a){return a.cloneNode(!0)}):Array.from(e.querySelector(".shop-items").children).map(function(a){return a.cloneNode(!0)});Array.from(e.querySelector(".shop-items").children).forEach(function(a){return a.parentNode.removeChild(a)});for(var d=0;d<b.length;d++)e.querySelector(".shop-items").appendChild(b[d]);G(e)},w=function(b){var a=0;b.querySelectorAll(".mbr-gallery-item").forEach(function(b){parseFloat(b.getAttribute("data-price"))>
6a&&(a=parseFloat(b.getAttribute("data-price")))});return a},x=function(b){var a=1E6;b.querySelectorAll(".mbr-gallery-item").forEach(function(b){parseFloat(b.getAttribute("data-price"))<a&&(a=parseFloat(b.getAttribute("data-price")))});return a},D=function(b){var a=document.querySelector(".min-input").value,e=document.querySelector(".max-input").value;Array.from(b.querySelectorAll(".mbr-gallery-item")).filter(function(a){return!a.matches(".bestsellers > .mbr-gallery-item")}).forEach(function(b){parseFloat(b.getAttribute("data-price"))>=
7parseFloat(a)&&parseFloat(b.getAttribute("data-price"))<=parseFloat(e)?b.classList.remove("hided-by-price"):b.classList.add("hided-by-price")})},v=function(b){var a=b.querySelector("input.min-input"),e=b.querySelector("input.max-input"),d=b.querySelector("div.range-controls"),f=d.querySelector("div.bar"),h=d.querySelector("div.min-toggle"),c=d.querySelector("div.max-toggle"),l=Math.max(f.scrollWidth,f.offsetWidth,f.clientWidth)-20,g=0,k=l,z=C(d),A=z.left,q=a.value,r=e.value,t=a.value,p=e.value,B=
8y(b.querySelector(".filter-cost"))-20,u={left:function(a,b){if(g<k)return q=g,g+"px";q=r;return k+"px"},marginLeft:function(){return g<k?g+"px":k+"px"},width:function(){return g<k?l-(g+(l-k))+"px":"0px"},right:function(a,b){if(g<k)return r=k,l-k+"px";r=q;return l-g+"px"}},m=function(d){c.style.zIndex="0";h.style.zIndex="1";togglePos=Math.round(d.pageX-A)-10;g=0>=togglePos?0:togglePos>=l?l:togglePos;h.style.left=u.left();f.style.marginLeft=u.marginLeft();f.style.width=u.width();a.value=Math.floor((w(b)-
9x(b))/B*q)+parseInt(t);D(b)},v=function(a){c.style.zIndex="1";h.style.zIndex="0";togglePos=Math.round(a.pageX-A)-10;k=0>=togglePos?0:togglePos>=l?l:togglePos;c.style.right=u.right();f.style.width=u.width();e.value=Math.ceil((w(b)-x(b))/B*r)+parseInt(t);D(b)};h.addEventListener("mousedown",function(){document.addEventListener("mousemove",m)});c.addEventListener("mousedown",function(){document.addEventListener("mousemove",v)});document.addEventListener("mouseup",function(){document.removeEventListener("mousemove",
10m);document.removeEventListener("mousemove",v)});window.addEventListener("resize",function(){z=C(d);A=z.left;q=a.value;r=e.value;B=y(b.querySelector(".filter-cost"))-20;var m=y(d)-20,n=(p-t)/m;l=m;g=Math.ceil((q-t)/n);k=Math.ceil((r-t)/n);n={left:function(a,b){return g+"px"},marginLeft:function(){return g+"px"},width:function(){return k-g+"px"},right:function(a,b){return m-k+1+"px"}};h.style.left=n.left();c.style.right=n.right();f.style.marginLeft=n.marginLeft();f.style.width=n.width()})},H=function(b){b.querySelector("input[name=max]").value=
11w(b);b.querySelector("input[name=min]").value=x(b);"block"==getComputedStyle(b.querySelector(".range-slider"),null).display&&v(b)},I=function(b){var a=b.querySelector(".mbr-gallery-filter-all"),e=[];
11if(b)if(b.querySelectorAll(".mbr-gallery-item").forEach(function(a){(a.getAttribute("data-tags")||"").trim().split(",").map(function(a){a=a.trim();-1==e.indexOf(a)&&e.push(a)})}),0<b.querySelectorAll(".mbr-gallery-filter").length&&b.querySelector(".mbr-gallery-filter").classList.contains("gallery-filter-active")){var d=
12[];b.querySelectorAll(".mbr-gallery-filter > ul > li").forEach(function(a,b){0!=b&&a.removeChild(a.firstChild)});e.map(function(a){var b=document.createElement("li");b.classList.add("display-7");b.innerText=a;d.push(b)});var f=b.querySelector(".mbr-gallery-filter > ul");f.appendChild(a);d.forEach(function(a){return f.appendChild(a)});b.querySelectorAll(".mbr-gallery-filter > ul > li").forEach(function(a){a.addEventListener("click",function(c){c.preventDefault();li=a;li.parentElement.querySelectorAll("li").forEach(function(a){return a.classList.remove("active")});
13li.classList.add("active");var d=li.closest("section").querySelector(".mbr-gallery-row"),e=li.innerHTML.trim();Array.from(b.querySelectorAll(".mbr-gallery-item")).filter(function(a){return!a.matches(".bestsellers > .mbr-gallery-item")}).forEach(function(a){tagsTrimmed=a.getAttribute("data-tags").split(",").map(function(a){return a.trim()});-1!=tagsTrimmed.indexOf(e)||li.classList.contains("mbr-gallery-filter-all")?a.classList.remove("mbr-gallery-item__hided"):(a.classList.add("mbr-gallery-item__hided"),
14setTimeout(function(){a.style.left="300px"},200))});setTimeout(function(){d.closest(".mbr-gallery-row").dispatchEvent(new CustomEvent("filter"))},50)})})}else b.querySelector(".mbr-gallery-item__hided").classList.remove("mbr-gallery-item__hided"),b.querySelector(".mbr-gallery-row").dispatchEvent(new CustomEvent("filter"))};E(function(){var b=document.querySelectorAll(".mbr-shop");b&&(b.forEach(function(a){var b=a.querySelector(".shop-items").children,d=a.querySelector(".sort-buttons >
14 .filter-by-pu > .btn"),
15f=a.querySelector(".sort-buttons > .filter-by-pd > .btn"),h=a.querySelector(".sort-buttons > .filter-by-d > .btn"),c=a.closest("section").getAttribute("data-sortbtn"),l=a.querySelector(".sort-buttons"),g=a.querySelector(".range-slider"),k=a.querySelector(".sidebar-categories");l&&(a.querySelector(".filter-by-pu").addEventListener("click",function(g){g.preventDefault();g.stopPropagation();d.classList.remove("disableSortButton");d.classList.remove(c+"-outline");d.classList.add(c);f.classList.remove(c+
16"-outline");f.classList.remove(c);f.classList.add("disableSortButton");f.classList.add(c+"-outline");h.classList.remove(c+"-outline");h.classList.remove(c);h.classList.add("disableSortButton");h.classList.add(c+"-outline");p(b,1,a)}),a.querySelector(".filter-by-pd").addEventListener("click",function(g){g.preventDefault();g.stopPropagation();d.classList.remove(c);d.classList.remove(c+"-outline");d.classList.add("disableSortButton");d.classList.add(c+"-outline");f.classList.remove("disableSortButton");
17f.classList.remove("btn-primary-outline");f.classList.add(c);h.classList.remove(c);h.classList.remove(c+"-outline");h.classList.add("disableSortButton");h.classList.add(c+"-outline");p(b,2,a)}),a.querySelector(".filter-by-d").addEventListener("click",function(g){g.preventDefault();g.stopPropagation();d.classList.remove(c+"-outline");d.classList.remove(c);d.classList.add("disableSortButton");d.classList.add(c+"-outline");f.classList.remove(c);f.classList.remove(c+"-outline");f.classList.add("disableSortButton");
18f.classList.add(c+"-outline");h.classList.remove("disableSortButton");h.classList.remove(c+"-outline");h.classList.add(c);p(b,3,a)}));g&&(a.querySelector(".price-range").addEventListener("click",function(b){b.preventDefault();var c=a.querySelector(".min-input").value,d=a.querySelector(".max-input").value;Array.from(a.querySelectorAll(".mbr-gallery-item")).filter(function(a){return!a.matches(".bestsellers > .mbr-gallery-item")}).forEach(function(a){parseFloat(a.getAttribute("data-price"))>=parseFloat(c)&&
19parseFloat(a.getAttribute("data-price"))<=parseFloat(d)?a.classList.remove("hided-by-price"):a.classList.add("hided-by-price")})}),a.querySelector(".price-range-reset").addEventListener("click",function(b){b.preventDefault();a.querySelector(".max-input").value=w(a);a.querySelector(".min-input").value=x(a);a.querySelector(".max-toggle").style.right="0";a.querySelector(".min-toggle").style.left="0";a.querySelector(".range-controls > * > .bar").style.marginLeft="0px";a.querySelector(".range-controls > * > .bar").style.width=
20"100%";v(a);Array.from(a.querySelectorAll(".mbr-gallery-item")).filter(function(a){return!a.matches(".bestsellers > .mbr-gallery-item")}).forEach(function(a){a.classList.remove("hided-by-price")})}),H(a));k&&I(a);p(a.querySelectorAll(".shop-items").children,3,a)}),0!=document.querySelectorAll(".mbr-shop").length&&(null!==navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)||void 0!==document.createTouch||"ontouchstart"in
21window||"onmsgesturechange"in window||navigator.msMaxTouchPoints?(document.querySelectorAll(".range-controls").forEach(function(a){return a.style.display="none"}
21),document.querySelectorAll(".price-controls, .filter-cost").forEach(function(a){return a.style.marginBottom="15px"})):(document.querySelectorAll("input.min-input, input.max-input").forEach(function(a){return a.disabled=!0}),document.querySelectorAll(".filterPriceRange").forEach(function(a){return a.style.display="none"}))))})}})();

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.