/*!
 * name: @jswork/next-element-in-viewport
 * description: Detect element if is in viewport.
 * homepage: https://github.com/afeiship/next-element-in-viewport
 * version: 1.0.0
 * date: 2020-11-22 17:45:43
 * license: MIT
 */
!function(){var u=(this||window||Function("return this")()).nx||require("@jswork/next");u.elementInViewport=function(t,e){var n=u.mix({offset:0,threshold:0},e),o=n.offset,i=n.threshold,r=t.getBoundingClientRect(),d=r.top,h=r.right,e=r.bottom,n=r.left,t=r.width,r=r.height,n=window.innerWidth-n,d=window.innerHeight-d,t=i*t,r=i*r;return e>=(o.top||o+r)&&n>=(o.right||o+t)&&d>=(o.bottom||o+r)&&h>=(o.left||o+t)},"undefined"!=typeof module&&module.exports&&(module.exports=u.elementInViewport)}();