!function(e,t){"object"==typeof module&&module.exports?module.exports=t(e):e.fizzyUIUtils=t(e)}(this,function e(t){let n={};n.extend=function(e,t){return Object.assign(e,t)},n.modulo=function(e,t){return(e%t+t)%t},n.makeArray=function(e){return Array.isArray(e)?e:null==e?[]:"object"==typeof e&&"number"==typeof e.length?[...e]:[e]},n.removeFrom=function(e,t){let n=e.indexOf(t);-1!=n&&e.splice(n,1)},n.getParent=function(e,t){for(;e.parentNode&&e!=document.body;)if((e=e.parentNode).matches(t))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){let t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,t){return(e=n.makeArray(e)).filter(e=>e instanceof HTMLElement).reduce((e,n)=>{if(!t)return e.push(n),e;n.matches(t)&&e.push(n);let r=n.querySelectorAll(t);return e=e.concat(...r)},[])},n.debounceMethod=function(e,t,n){n=n||100;let r=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){clearTimeout(this[o]);let e=arguments;this[o]=setTimeout(()=>{r.apply(this,e),delete this[o]},n)}},n.docReady=function(e){let t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},n.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,n){return t+"-"+n}).toLowerCase()};let r=t.console;return n.htmlInit=function(e,o){n.docReady(function(){let i="data-"+n.toDashed(o),u=document.querySelectorAll(`[${i}]`),c=t.jQuery;[...u].forEach(t=>{let n=t.getAttribute(i),u;try{u=n&&JSON.parse(n)}catch(a){r&&r.error(`Error parsing ${i} on ${t.className}: ${a}`);return}let l=new e(t,u);c&&c.data(t,o,l)})})},n});