/*! Sentrize v3.0.0 · content/scroll.js · sentrize.com
 * Minified with terser/csso: local variable renaming and
 * whitespace/comment removal ONLY. No obfuscation, no control-flow flattening, no string encoding. */
self.MVC=self.MVC||{},function(){const t=self.MVC.cssEscape;function e(t,e){const n=[];let l=t;for(;l&&l!==e;){const t=l.parentNode;if(!t||!t.children)return null;const e=Array.prototype.indexOf.call(t.children,l);if(e<0)return null;n.push(e),l=t}return l===e?n.reverse():null}function n(t,e){let n=e;for(const e of t){if(!n||!n.children[e])return null;n=n.children[e]}return n}Object.assign(self.MVC,{normNode:function(t,e){const n=e.document;return t===n||t===n.documentElement||t===n.body||t===n.scrollingElement?n:t},getY:function(t,e){return t===e.document?e.scrollY:t.scrollTop},getX:function(t,e){return t===e.document?e.scrollX:t.scrollLeft},maxY:function(t,e){if(t===e.document){const t=e.document.scrollingElement||e.document.documentElement;return t?Math.max(0,t.scrollHeight-e.innerHeight):0}return t?Math.max(0,t.scrollHeight-t.clientHeight):0},maxX:function(t,e){if(t===e.document){const t=e.document.scrollingElement||e.document.documentElement;return t?Math.max(0,t.scrollWidth-e.innerWidth):0}return t?Math.max(0,t.scrollWidth-t.clientWidth):0},setYX:function(t,e,n,l){t===e.document?e.scrollTo({top:n,left:l,behavior:"instant"}):(t.scrollTop=n,t.scrollLeft=l)},findScroller:function(t,e){const n=t.document,l=n.scrollingElement||n.documentElement;if(!l)return n;if(("x"===e?l.scrollWidth-t.innerWidth:l.scrollHeight-t.innerHeight)>4)return n;let r=null,o=0;const c=n.body?n.body.getElementsByTagName("*"):[],i=Math.min(c.length,2500);for(let n=0;n<i;n++){const l=c[n],i="x"===e?l.scrollWidth-l.clientWidth:l.scrollHeight-l.clientHeight;if(i>o){const n=t.getComputedStyle(l),c="x"===e?n.overflowX:n.overflowY;"auto"!==c&&"scroll"!==c||(r=l,o=i)}}return r||n},pathTo:e,resolvePath:n,findTwin:function(l,r,o){const c=o.ownerDocument||o,i=l.id;if(i&&/^[A-Za-z][\w-]*$/.test(i)){const t=c.getElementById(i);if(t)return t}const u=l.getAttribute&&l.getAttribute("name");if(u){let e=l.tagName+'[name="'+t(u)+'"]';const n=l.getAttribute("type");n&&(e+='[type="'+t(n)+'"]');try{const t=r.querySelectorAll(e),n=c.querySelectorAll(e);if(1===n.length)return n[0];if(n.length>0&&t.length===n.length){const e=Array.prototype.indexOf.call(t,l);if(e>=0)return n[e]}}catch(t){}}const s=l.tagName;if(s){let e=s;const n=l.getAttribute&&l.getAttribute("type");n&&(e+='[type="'+t(n)+'"]');try{const t=r.querySelectorAll(e),n=c.querySelectorAll(e);if(n.length>0&&t.length===n.length){const e=Array.prototype.indexOf.call(t,l);if(e>=0)return n[e]}}catch(t){}}const f=(l.textContent||"").trim().replace(/\s+/g," ");if(f&&f.length<=60){const e=l.getAttribute&&l.getAttribute("role");let n=l.tagName;e&&(n+='[role="'+t(e)+'"]');const o=t=>(t.textContent||"").trim().replace(/\s+/g," ")===f;try{const t=Array.prototype.filter.call(c.querySelectorAll(n),o);if(1===t.length)return t[0];if(t.length>1){const e=Array.prototype.filter.call(r.querySelectorAll(n),o),c=Array.prototype.indexOf.call(e,l);if(c>=0&&t[c])return t[c]}}catch(t){}}const a=e(l,r);return a?n(a,o):null}})}();
