UNPKG

@hoosei/voxweave-react

Version:

A customizable and interactive voice UI component for React applications

3 lines (2 loc) 1.31 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var y=function(e){return e.tagName==="TEXTAREA"},w=function(e,r){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[r]!=="hidden"&&!(t.overflowY===t.overflowX&&!y(e)&&t[r]==="visible")},p=function(e){return w(e,"overflowY")},B=function(e){return w(e,"overflowX")},H=function(e,r){var t=r.ownerDocument,l=r;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var v=g(e,l);if(v){var n=b(e,l),a=n[1],o=n[2];if(a>o)return!0}l=l.parentNode}while(l&&l!==t.body);return!1},V=function(e){var r=e.scrollTop,t=e.scrollHeight,l=e.clientHeight;return[r,t,l]},D=function(e){var r=e.scrollLeft,t=e.scrollWidth,l=e.clientWidth;return[r,t,l]},g=function(e,r){return e==="v"?p(r):B(r)},b=function(e,r){return e==="v"?V(r):D(r)},N=function(e,r){return e==="h"&&r==="rtl"?-1:1},W=function(e,r,t,l,v){var n=N(e,window.getComputedStyle(r).direction),a=n*l,o=t.target,f=r.contains(o),c=!1,d=a>0,s=0,h=0;do{var i=b(e,o),u=i[0],m=i[1],C=i[2],S=m-C-n*u;(u||S)&&g(e,o)&&(s+=S,h+=u),o=o.parentNode.host||o.parentNode}while(!f&&o!==document.body||f&&(r.contains(o)||r===o));return(d&&Math.abs(s)<1||!d&&Math.abs(h)<1)&&(c=!0),c};exports.handleScroll=W;exports.locationCouldBeScrolled=H; //# sourceMappingURL=index85.js.map