!function(){"use strict";var t={type:"inline",init:function(){this.selector=document.querySelector(".rey-pppSelector"),this.selector&&(this.key=reycore_ppp_params.key,this.params=new URL(document.location).searchParams,this.params.get(this.key)||(this.stored=rey.util.ls.get(this.key),!this.stored)?(this.selectorItems=this.selector.querySelectorAll("li[data-count]"),this.selector.classList.contains("rey-loopSelectList")&&(this.type="drop",this.selectorItems=this.selector.querySelectorAll("option")),this.selectorItems.length&&this.events()):this.activate(this.stored))},events:function(){"inline"!==this.type?this.selector.addEventListener("change",(function(t){this.activate(t.target.value||0)})):this.selectorItems.forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),this.activate(t.currentTarget.getAttribute("data-count")||0)}))}))},activate:function(t){t&&(this.selector.classList.add("--loading"),this.setCount(t))},setCount:function(t){rey.util.ls.set(this.key,t,2*rey.util.expiration.day),this.params.set(this.key,t),window.location.search=this.params}};document.addEventListener("rey-DOMContentLoaded",(function(e){t.init()}))}();