'use strict';(function(){function l(d){let b=!1;d.each(function(){var a=this;if(!$(a).is(":visible"))return!0;if(a.getBoundingClientRect){if(a=a.getBoundingClientRect(),0<=a.bottom&&0<=a.right&&a.top<=(window.innerHeight||document.documentElement.clientHeight)&&a.left<=(window.innerWidth||document.documentElement.clientWidth))return b=!0,!1}else{let f=a.offsetTop,e=a.offsetLeft,h=a.offsetWidth,n=a.offsetHeight;for(;a.offsetParent;)a=a.offsetParent,f+=a.offsetTop,e+=a.offsetLeft;if(fwindow.pageYOffset&&e+h>window.pageXOffset)return b=!0,!1}});return b}function g(d){m.forEach(function(b){window.addEventListener(b,d)});c.on("refresh",d)}function k(d){m.forEach(function(b){window.removeEventListener(b,d)});c.off("refresh",d)}const m=["DOMContentLoaded","load","resize","scroll"],c=new ReciBaseUtilsClass;c.inViewport=l;c.viewed=function(d,b){function a(){if(l(f)){var e=b.apply(this,arguments);!0===e?k(a):e&&"function"=== typeof e.then&&(k(a),e.catch(function(h){g(a);console.error(h)}))}}const f=$(d);f.length&&"function"===typeof b&&g(a)};c.addEventListener=g;c.onViewportChg=g;c.rmEventListener=k;c.refresh=function(){c._call("refresh")};window.Reci||(window.Reci={});window.Reci.Utils||(window.Reci.Utils={});window.Reci.Utils.viewport=c})();