Files
OverlayScrollbars/packages/overlayscrollbars/dist/overlayscrollbars.min.js
T
2021-04-04 02:47:56 +02:00

1 line
20 KiB
JavaScript

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).OverlayScrollbars=t()}(this,(function(){"use strict";var n=function(n,t){var r,e=t||{},i=e.o,o=e.u,u=e.s,a=o;return{v:function(t,e){var o=a,c=n?n(e,a,r):e,f=t||(i?!i(o,c):o!==c);return(f||u)&&(a=c,r=o),{_:a,g:r,p:f}},m:function(n){return{_:a,g:r,p:!!n}}}},t=Node.ELEMENT_NODE,r=Object.prototype,e=r.toString,i=r.hasOwnProperty;function o(n){return void 0===n}function u(n){return null===n}var a=function(n){return o(n)||u(n)?""+n:e.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};function c(n){return"number"==typeof n}function f(n){return"string"==typeof n}function l(n){return"function"==typeof n}function s(n){return Array.isArray(n)}function v(n){return"object"==typeof n&&!s(n)&&!u(n)}function d(n){var t=!!n&&n.length,r=c(t)&&t>-1&&t%1==0;return!!(s(n)||!l(n)&&r)&&(!(t>0&&v(n))||t-1 in n)}function h(n){if(!n||!v(n)||"object"!==a(n))return!1;var t,r=n.constructor,e=r&&r.prototype,u=i.call(n,"constructor"),c=e&&i.call(e,"isPrototypeOf");if(r&&!u&&!c)return!1;for(t in n);return o(t)||i.call(n,t)}function _(n){var r=window.Element;return!!n&&(r?n instanceof r:n.nodeType===t)}function g(n,t){if(d(n))for(var r=0;r<n.length&&!1!==t(n[r],r,n);r++);else n&&g(Object.keys(n),(function(r){return t(n[r],r,n)}));return n}var p=function(n,t,r){return n.indexOf(t,r)},w=function(n,t,r){return r||f(t)||!d(t)?n.push(t):Array.prototype.push.apply(n,t),n},b=function(n){if(Array.from)return Array.from(n);var t=[];return g(n,(function(n){w(t,n)})),t},m=function(n){return n&&0===n.length},y=function(n,t){var r=function(n){return n&&n(t)};n instanceof Set?n.forEach(r):g(n,r)},x=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},S=function(n){return n?Object.keys(n):[]};function z(n,t,r,e,i,o,a){var c=[t,r,e,i,o,a];return"object"==typeof n&&!u(n)||l(n)||(n={}),g(c,(function(t){g(S(t),(function(r){var e=t[r];if(n===e)return!0;var i=s(e);if(e&&(h(e)||i)){var o=n[r],u=o;i&&!s(o)?u=[]:i||h(o)||(u={}),n[r]=z(u,e)}else n[r]=e}))})),n}function M(n){for(var t in n)return!1;return!0}function O(n,t,r,e){if(o(e))return r?r[n]:t;r&&(r[n]=e)}function L(n,t,r){if(o(r))return n?n.getAttribute(t):null;n&&n.setAttribute(t,r)}function C(n,t){return O("scrollLeft",0,n,t)}function A(n,t){return O("scrollTop",0,n,t)}var T,j=Element.prototype,R=function(n,t){var r=[],e=t?_(t)?t:null:document;return e?w(r,e.querySelectorAll(n)):r},I=function(n,t){return!!_(n)&&(j.matches||j.msMatchesSelector).call(n,t)},V=function(n){return n?b(n.childNodes):[]},E=function(n){return n?n.parentElement:null},P=function(n,t,r){if(r){var e,i=t;n&&(d(r)?(e=document.createDocumentFragment(),g(r,(function(n){n===i&&(i=n.previousSibling),e.appendChild(n)}))):e=r,t&&(i?i!==t&&(i=i.nextSibling):i=n.firstChild),n.insertBefore(e,i||null))}},q=function(n,t){P(n,null,t)},B=function(n,t){P(n,n&&n.firstChild,t)},F=function(n,t){P(E(n),n&&n.nextSibling,t)},D=function n(t){if(d(t))g(b(t),(function(t){return n(t)}));else if(t){var r=E(t);r&&r.removeChild(t)}},H=function(n){var t=document.createElement("div");return n&&L(t,"class",n),t},W=function(n){var t=H();return t.innerHTML=n.trim(),g(V(t),(function(n){return D(n)}))},Y=["WebKit","Moz","O","MS","webkit","moz","o","ms"],k={},N=function(n){var t=k[n]||window[n];return x(k,n)||(g(Y,(function(r){var e;return!(t=t||window[r+(e=n,e.charAt(0).toUpperCase()+e.slice(1))])})),k[n]=t),t},X=N("MutationObserver"),G=N("IntersectionObserver"),U=N("ResizeObserver"),$=N("cancelAnimationFrame"),J=N("requestAnimationFrame"),K=/[^\x20\t\r\n\f]+/g,Q=function(n,t,r){var e,i=0,o=!1;if(n&&f(t)){var u=t.match(K)||[];for(o=u.length>0;e=u[i++];)o=!!r(n.classList,e)&&o}return o},Z=function(n,t){Q(n,t,(function(n,t){return n.add(t)}))},nn=function(n,t){Q(n,t,(function(n,t){return n.remove(t)}))},tn={w:0,h:0},rn=function(){return{w:window.innerWidth,h:window.innerHeight}},en=function(n){return n?{w:n.offsetWidth,h:n.offsetHeight}:tn},on=function(n){return n?{w:n.clientWidth,h:n.clientHeight}:tn},un=function(n){return n?{w:n.scrollWidth,h:n.scrollHeight}:tn},an=function(n){return n.getBoundingClientRect()},cn=function(n){return n.split(" ")},fn=function(n,t,r,e){g(cn(t),(function(t){n.removeEventListener(t,r,e)}))},ln=function(n,t,r,e){var i=function(){if(o(T)){T=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){T=!0}}))}catch(n){}}return T}(),u=i&&e&&e.S||!1,a=e&&e.M||!1,c=e&&e.O||!1,f=[],l=i?{passive:u,capture:a}:a;return g(cn(t),(function(t){var e=c?function(i){n.removeEventListener(t,e,a),r&&r(i)}:r;w(f,fn.bind(null,n,t,e,a)),n.addEventListener(t,e,l)})),y.bind(0,f)},sn=function(n){return n.stopPropagation()},vn=function(n){return n.preventDefault()},dn=function(n,t,r,e){if(n&&t){var i=!0;return g(r,(function(r){(e?e(n[r]):n[r])!==(e?e(t[r]):t[r])&&(i=!1)})),i}return!1},hn=function(n,t){return dn(n,t,["w","h"])},_n=function(n,t){return dn(n,t,["x","y"])},gn=function(n,t){return dn(n,t,["t","r","b","l"])},pn=function(n,t,r){return dn(n,t,["width","height"],r&&function(n){return Math.round(n)})},wn=function(){},bn={animationiterationcount:1,columncount:1,fillopacity:1,flexgrow:1,flexshrink:1,fontweight:1,lineheight:1,opacity:1,order:1,orphans:1,widows:1,zindex:1,zoom:1},mn=function(n,t){var r=t?parseFloat(n):parseInt(n,10);return Number.isNaN(r)?0:r},yn=function(n,t,r){return null!=t?t[r]||t.getPropertyValue(r):n.style[r]},xn=function(n,t,r){try{if(n){var e=n.style;o(e[t])?e.setProperty(t,r):e[t]=function(n,t){return!bn[n.toLowerCase()]&&c(t)?t+"px":t}(t,r)}}catch(i){}};function Sn(n,t){var r=f(t);if(s(t)||r){var e=r?"":{};if(n){var i=window.getComputedStyle(n,null);e=r?yn(n,i,t):t.reduce((function(t,r){return t[r]=yn(n,i,r),t}),e)}return e}g(S(t),(function(r){return xn(n,r,t[r])}))}var zn={x:0,y:0},Mn=function(n){var t=n?an(n):0;return t?{x:t.left+window.pageYOffset,y:t.top+window.pageXOffset}:zn};var On=function(n){var t={exports:{}};return n(t,t.exports),t.exports}((function(n){function t(){return n.exports=t=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n},t.apply(this,arguments)}n.exports=t})),Ln=JSON.stringify,Cn=["__TPL_","_TYPE__"],An=["boolean","number","string","array","object","function","null"].reduce((function(n,t){return n[t]=Cn[0]+t+Cn[1],n}),{}),Tn=function(n,t,r,e){return function n(t,r,e,i,u){var c={},l=On({},t);return g(S(r).filter((function(n){return x(t,n)})),(function(v){var d=o(e[v])?{}:e[v],_=t[v],p=r[v],b=h(p),m=u?u+".":"";if(b&&h(_)){var y=n(_,p,d,i,m+v);c[v]=y.L,l[v]=y.C,g([l,c],(function(n){M(n[v])&&delete n[v]}))}else if(!b){var x=!1,S=[],z=[],O=a(_);if(g(s(p)?p:[p],(function(n){var t;g(An,(function(r,e){r===n&&(t=e)}));var r=o(t);if(r&&f(_)){var e=n.split(" ");x=!!e.find((function(n){return n===_})),w(S,e)}else x=An[O]===n;return w(z,r?An.string:t),!x})),x)(s(_)||h(_)?Ln(_)!==Ln(d):_!==d)&&(c[v]=_);else i&&console.warn('The option "'+m+v+"\" wasn't set, because it doesn't accept the type [ "+O.toUpperCase()+' ] with the value of "'+_+'".\r\nAccepted types are: [ '+z.join(", ").toUpperCase()+" ].\r\n"+(S.length>0?"\r\nValid strings are: [ "+S.join(", ")+" ].":""));delete l[v]}})),{C:l,L:c}}(n,t,r||{},e||!1)};var jn,Rn=Math.abs,In=Math.round,Vn=function(n,t){q(n,t);var r=on(t),e=en(t);return{x:e.h-r.h,y:e.w-r.w}},En=function(n,t){Sn(n,{overflowX:"hidden",overflowY:"hidden",direction:"rtl"}),C(n,0);var r=Mn(n),e=Mn(t);C(n,-999);var i=Mn(t);return{i:r.x===e.x,n:e.x!==i.x}},Pn=function(n,t){Z(n,"os-environment-flexbox-glue");var r=an(n),e=an(t),i=pn(e,r,!0);Z(n,"os-environment-flexbox-glue-max");var o=an(n),u=an(t),a=pn(u,o,!0);return i&&a},qn=function(){var n=window.screen.deviceXDPI||0,t=window.screen.logicalXDPI||1;return window.devicePixelRatio||n/t},Bn=function(){var n,t,r=document.body,e=W('<div class="os-environment"><div></div></div>')[0],i=e.firstChild,o=new Set,u=Vn(r,e),a={x:0===u.x,y:0===u.y},c={A:!1,T:u,j:a,R:!1,I:"-1"===Sn(e,"zIndex"),V:En(e,i),P:Pn(e,i),q:function(n){o.add(n)},B:function(n){o.delete(n)}};if(t="style",(n=e)&&n.removeAttribute(t),D(e),!a.x||!a.y){var f=rn(),l=qn(),s=u;window.addEventListener("resize",(function(){if(o.size){var n=rn(),t={w:n.w-f.w,h:n.h-f.h};if(0===t.w&&0===t.h)return;var i={w:Rn(t.w),h:Rn(t.h)},u={w:Rn(In(n.w/(f.w/100))),h:Rn(In(n.h/(f.h/100)))},a=qn(),c=i.w>2&&i.h>2,v=(h=u.h,_=Rn(u.w),g=Rn(h),!(_!==g&&_+1!==g&&_-1!==g));if(c&&v&&(a!==l&&l>0)){var d=jn.T=Vn(r,e);D(e),s.x===d.x&&s.y===d.y||y(o),s=d}f=n,l=a}var h,_,g}))}return c},Fn=function(){return jn||(jn=Bn()),jn},Dn=function(n){q(E(n),V(n)),D(n)},Hn=0,Wn=function(n){var r=function(n){var r=window.HTMLElement;return!!n&&(r?n instanceof r:n.nodeType===t)}(n),e=r?{}:{F:n.host,D:n.target,H:n.padding,W:n.viewport,Y:n.content};if(r){var i=H("os-padding"),u=H("os-viewport"),a=H("os-content");q(i,u),q(u,a),e.D=n,e.H=i,e.W=u,e.Y=a}var c=e.D,f=e.H,l=e.W,s=e.Y,v=[],d=I(c,"textarea"),h=!d&&I(c,"body"),_=d?e.F||H():c,g=function(n){return d?c:V(n)};if(d&&_!==e.F&&(F(c,_),w(v,(function(){F(_,c),D(_)}))),r)q(s,g(c)),q(_,f),w(v,(function(){q(_,V(s)),D(f),nn(_,"os-host")}));else{var p=s||l||f||_,b=o(f),m=o(l),x=o(s),S=g(p);f=e.H=b?H():f,l=e.W=m?H():l,s=e.Y=x?H():s,q(_,f),q(f||_,l),q(l,s),q(s||l,S),w(v,(function(){x&&Dn(s),m&&Dn(l),b&&Dn(f),nn(_,"os-host"),nn(f,"os-padding"),nn(l,"os-viewport"),nn(s,"os-content")}))}Z(_,"os-host"),Z(f,"os-padding"),Z(l,"os-viewport"),Z(s,"os-content");var z,M,O,C=c.ownerDocument,A=C.body,T={k:C.defaultView,N:C,X:E(A),G:A,U:d,$:h},j=On({},e,{F:_}),R=Fn(),B=R.R,W=R.j,Y=R.I;if(B)w(v,nn.bind(0,l,"os-viewport-scrollbar-styled"));else if(!Y&&(W.x||W.y)){var k=(L(O=document.createElement("style"),"id","os-viewport-arrange-"+Hn),Hn++,O);M=k,P(E(z=l),z,M),w(v,D.bind(0,k)),j.J=k}return{K:j,Z:T,nn:function(){y(v)}}},Yn=function(t){var r=t.tn,e=t.rn,i=t.en.K,o=i.F,u=i.H,a=i.W,c=n((function(){return f=Sn(o,[i=(r=(n="padding")?n+"-":"")+"top"+(e=t?"-"+t:""),u=r+"right"+e,a=r+"bottom"+e,c=r+"left"+e]),{t:mn(f[i]),r:mn(f[u]),b:mn(f[a]),l:mn(f[c])};var n,t,r,e,i,u,a,c,f}),{o:gn}),f=c.v,l=c.m;return function(n,t,i){var o=l(i),c=(o._,o.p),s=Fn().R,v=n.in,d=n.on,h=d._,_=d.p,g=t("paddingAbsolute"),p=g._,w=g.p;if(v||c){var b=f(i);b._,c=b.p}var m=w||_||c;if(m){var y=f(i)._,x=!p||!u&&!s,S=y.r+y.l,z=y.t+y.b,M={marginTop:0,marginRight:0,marginBottom:x?-z:0,marginLeft:0,top:x?-y.t:0,right:0,bottom:0,left:0,maxWidth:x?"calc(100% + "+S+"px)":""},O={paddingTop:x?y.t:0,paddingRight:x?y.r:0,paddingBottom:x?y.b:0,paddingLeft:x?y.l:0};if(x){var L=h?"right":"left",C=h?"marginLeft":"marginRight",A=h?y.r:y.l;M[L]=-A,M[C]=-S}Sn(u||a,M),Sn(a,O),r({un:!x,H:y}),e(u?O:On({},M,O))}return{an:m}}},kn=function(t){var r=t.en,e=t.cn,i=t.fn,o=t.ln,u=t.sn,a=r.K,c=a.F,f=a.H,l=a.W,s=a.J,v=n((function(n){return w(n.vn,n.dn,n.hn)}),{o:hn}),d=v.v,h=v.m,_=n((function(n){return{x:Math.max(0,n._n.w-n.gn.w),y:Math.max(0,n._n.h-n.gn.h)}}),{o:_n,u:{x:0,y:0}}),g=_.v,p=_.m,w=function(n,t,r){return{w:n.w-Math.round(Math.max(0,r.width-t.w)),h:n.h-Math.round(Math.max(0,r.height-t.h))}},b=function(n,t){if(Sn(l,{height:""}),t){var r=o(),e=r.un,i=r.H,u=n.pn,a=n.wn,f=an(c),s=en(c),v=on(c),d=e?i.b+i.t:0,h=v.h+(f.height-s.h);Sn(l,{height:h+(u.x?a.x:0)-d})}},m=function(n,t){var r=Fn(),e=r.T,i=r.j,o=r.R,u=i.x,a=i.y,c=o||n?0:42,f=!t?Sn(l,["overflowX","overflowY"]):t,s={x:"scroll"===f.overflowX,y:"scroll"===f.overflowY};return{pn:s,wn:{x:s.x&&!o?u?c:e.x:0,y:s.y&&!o?a?c:e.y:0}}},y=function(n,t,r){if(e){var o=n.wn,u=o.x,a=o.y,c=i(),f=c[r?"paddingRight":"paddingLeft"],v=c.paddingTop,d={w:a?a+t.w-f+"px":"",h:u?u+t.h-v+"px":""};if(s){var h=s.sheet;if(h){var _=h.cssRules;if(_){_.length||h.insertRule("#"+L(s,"id")+" + .os-viewport-arrange::before {}",0);var g=_[0].style;g.width=d.w,g.height=d.h}}}else Sn(l,{"--viewport-arrange-width":d.w,"--viewport-arrange-height":d.h})}return e};return function(n,t,r){var o,a=n.on,s=n.bn,v=n.in,_=n.mn,x=n.yn,z=n.an,M=Fn(),O=M.P,L=M.R,C=M.j,A=s._,T=s.p,j=a._,R=a.p,I=t("nativeScrollbarsOverlaid.show"),V=I._,E=I.p,P=V&&C.x&&C.y,q=!O&&(v||x||_||E||T),B=p(r),F=h(r);if(E&&L&&(P?nn(l,"os-viewport-scrollbar-styled"):Z(l,"os-viewport-scrollbar-styled")),q&&(o=m(P),b(o,!!A)),v||z||x||E||R){var D=function(){if(e){var n=Fn().P,t=i();n||(t=On({},t,{height:""}));var r=Sn(l,S(t));return nn(l,"os-viewport-arrange"),Sn(l,t),function(){Sn(l,r),Z(l,"os-viewport-arrange")}}return wn}(),H=on(l),W=an(l),Y=en(l),k=un(l),N=H,X=F=d(r,{hn:W,dn:Y,vn:k}),G=X._,U=X.p;if(D(),(U||E)&&!P)y(o||m(P),G,j)&&(N=on(l),k=w(un(l),en(l),an(l)));B=g(r,{_n:{w:Math.max(G.w,k.w),h:Math.max(G.h,k.h)},gn:{w:N.w+Math.max(0,H.w-G.w),h:N.h+Math.max(0,H.h-G.h)}})}var $=t("overflow"),J=$._,K=$.p,Q=F,tn=Q._,rn=Q.p,cn=B,fn=cn._,ln=cn.p;if(z||rn||ln||K||E||R||q){var sn={marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,maxWidth:"",overflowY:"",overflowX:""},vn=function(n,t,r,e){var i=function(n,t,r,e){var i="visible-scroll"===r,o=t>0&&("scroll"===r||"hidden"===r);return o&&(e[n?"overflowX":"overflowY"]=r),{xn:!o,Sn:i?"scroll":"hidden"}},o=i(!0,t.x,r.x,e),u=o.xn,a=o.Sn,c=i(!1,t.y,r.y,e),f=c.xn,l=c.Sn;return u&&!f&&(e.overflowX=a),f&&!u&&(e.overflowY=l),m(n,e)}(P,fn,J,sn);!function(n,t,r,e){var o=Fn().R,u=n.pn,a=n.wn,l=a.x,s=a.y,v=u.x,d=u.y,h=i(),_=t?"marginLeft":"marginRight",g=t?"paddingLeft":"paddingRight",p=h[_],w=h.marginBottom,b=h[g],m=h.paddingBottom;e.maxWidth="calc(100% + "+(s+-1*p)+"px)",e[_]=-s+p,e.marginBottom=-l+w,r&&(e[g]=b+s,e.paddingBottom=m+l),o||Sn(f||c,{overflow:v||d?"hidden":""})}(vn,j,y(vn,tn,j),sn),q&&b(vn,!!A),Sn(l,sn),u(vn.pn)}}},Nn={direction:["rtl"]},Xn=function(n){var t=!1;return g(Sn(n,["direction"]),(function(n,r){t=t||p(Nn[r],n)>-1})),t},Gn=function(n){return n&&(n.height||n.width)},Un=function(t,r,e){var i,o=e||{},u=o.zn,a=void 0!==u&&u,c=o.Mn,f=void 0!==c&&c,l=Fn().V,v=W('<div class="os-size-observer"><div class="os-size-observer-listener"></div></div>')[0],d=v.firstChild,h=n(0,{s:!0,o:function(n,t){return!(!n||!Gn(n)&&Gn(t))}}).v,_=function(n){var t=n&&"boolean"==typeof n._,e=!1;if(s(n)&&n.length>0){var i=h(0,n.pop().contentRect),o=i.g,u=i._;i.p;e=!o||!Gn(u)}else t&&n.p;if(a){var c=t?n._:Xn(v);C(v,c?l.n?-3333333:l.i?0:3333333:3333333),A(v,3333333)}e||r(t?n:void 0)},g=[],p=!!f&&_;if(U){var b=new U(_);b.observe(d),w(g,(function(){return b.disconnect()}))}else{var m=W('<div class="os-size-observer-listener-item" dir="ltr"><div class="os-size-observer-listener-item"><div class="os-size-observer-listener-item-final"></div></div><div class="os-size-observer-listener-item"><div class="os-size-observer-listener-item-final" style="width: 200%; height: 200%"></div></div></div>');q(d,m),Z(d,"os-size-observer-listener-scroll");var x,S=m[0],z=S.lastChild,M=S.firstChild,O=null==M?void 0:M.firstChild,L=en(d),T=L,j=!1,R=function(){C(M,3333333),A(M,3333333),C(z,3333333),A(z,3333333)},I=function(){x=0,j&&(L=T,_())},V=function(n){return T=en(d),j=!n||!hn(T,L),n&&j&&!x?($(x),x=J(I)):n||I(),R(),n&&(vn(n),sn(n)),!1};w(g,[ln(M,"scroll",V),ln(z,"scroll",V)]),Sn(O,{width:3333333,height:3333333}),R(),p=f?function(){return V()}:R}if(a){var E=(i=n((function(){return Xn(v)}))).v;w(g,ln(v,"scroll",(function(n){var t=E(),r=t._;return t.p&&(Sn(d,r?{left:"auto",right:0}:{left:0,right:"auto"}),_(t)),vn(n),sn(n),!1})))}return p&&(Z(v,"os-size-observer-appear"),w(g,ln(v,"animationstart",p,{O:!!U}))),B(t,v),{nn:function(){y(g),D(v)},On:function(n){return{on:i?i.m(n):{_:!1,g:!1,p:!1}}}}},$n=function(n,t,r,e){var i,u=function(){r.forEach((function(n,t){fn(t,n,e)})),r.clear()},a=function(t){i&&g(i.reduce((function(r,e){if(e){var i=e[0],o=e[1],u=o&&i&&(t?t(i):R(i,n));u&&w(r,[u,l(o)?o(u):o],!0)}return r}),[]),(function(n){var t=n[0],i=n[1];g(t,(function(n){!function(n,t){var i=r.get(n),u=o(i),a=function(){r.set(n,t),ln(n,t,e)};u||t===i?u&&a():(fn(n,i,e),a())}(n,i)}))}))},c=function(n){i=n,u(),a()};return t&&c(t),{nn:u,Ln:a,v:c}},Jn=function(n,t,r){var e,i,o,u,a,l,s,v,d,h,_=!1,b=r||{},y=b.Cn,x=b.An,S=b.Tn,z=b.jn,M=b.Rn,O=b.In,C=b.Vn,A=$n(n,y&&z,new Map,(e=function(){_&&t([],!1,!0)},l=c(i=84)&&i>0,s=c(o)&&o>0,v=l?window.clearTimeout:$,d=l?window.setTimeout:J,h=function(n){a=s?performance.now():0,u&&v(u),e.apply(this,n)},function(){var n=h.bind(this,arguments),t=!!s&&performance.now()-a>=o;u&&v(u),u=t?n():d(n,i)})),T=A.Ln,j=A.nn,V=A.v,E=S||[],P=(x||[]).concat(E),q=function(e){var i=O||wn,o=C||wn,u=[],a=[],c=!1,l=!1,s=!1;g(e,(function(t){var e=t.attributeName,v=t.target,d=t.type,h=t.oldValue,_=t.addedNodes,g="attributes"===d,b="childList"===d,m=n===v,x=g&&f(e)?L(v,e):0,S=0!==x&&h!==x,z=S&&m&&!y&&!i(v,e,h,x),O=p(E,e)>-1&&S;if(z&&w(u,e),y){var C=!g,A=g&&O&&!m,T=A&&M&&I(v,M),j=(T?!i(v,e,h,x):C||A)&&!o(t,!!T,n,r);w(a,_),l=l||j,s=s||b}c=c||z&&O})),s&&!m(a)&&T((function(n){return a.reduce((function(t,r){return w(t,R(n,r)),I(r,n)?w(t,r):t}),[])})),(!m(u)||c||l)&&t(u,c,l)},B=new X(q);return B.observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:P,subtree:y,childList:y,characterData:y}),_=!0,{En:function(){_&&(j(),B.disconnect(),_=!1)},Pn:function(n){V(_&&y&&n)},v:function(){_&&q(B.takeRecords())}}},Kn=function(n,t){return n&&t.split(".").reduce((function(n,t){return n&&x(n,t)?n[t]:void 0}),n)},Qn=["id","class","style","open"],Zn={un:!1,H:{t:0,r:0,b:0,l:0}},nt={marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},tt={x:!1,y:!1},rt={_:!1,g:!1,p:!1},et={_:!1,g:!1,p:!1},it=function(t,r){var e=Zn,i=nt,o=tt,u=r.K,a=u.F,f=u.W,l=u.Y,s=Fn(),v=s.R,d=s.j,h=s.P,_=s.q,p=s.B,b=!v&&(d.x||d.y),m=[],x={qn:t,en:r,cn:b,ln:function(){return e},tn:function(n){e=n||Zn},fn:function(){return i},rn:function(n){var t,r;i=n?(r=nt,S(t=n).reduce((function(n,r){var e=t[r];return n[r]=""===e?0:e,n}),On({},r))):nt},Bn:function(){return o},sn:function(n){o=n||tt}};w(m,function(n){var t=n.en.K.Y;return function(n){var r=n.bn,e=r._;r.p&&Sn(t,{height:e?"auto":"100%"})}}(x)),w(m,Yn(x)),w(m,kn(x));var z=function(n,r,e){var i=n||{},o=i.on,u=i.bn,a=i.in,l=void 0===a?e||!1:a,s=i.mn,v=void 0===s?e||!1:s,d=i.yn,_=void 0===d?e||!1:d,p=i.an,w=void 0===p?e||!1:p,y=o||(O?O.On(e).on:rt),x=u||(M?M.On(e).bn:et),S=function(n){return{_:Kn(t,n),p:e||void 0!==Kn(r,n)}},z=b||!h,L=z&&C(f),T=z&&A(f);g(m,(function(n){var t=n({on:y,bn:x,in:l,mn:v,yn:_,an:w},S,!!e)||{},r=t.in,i=t.mn,o=t.yn,u=t.an;l=r||l,v=i||v,_=o||_,w=u||w})),c(L)&&C(f,L),c(T)&&A(f,T)},M=l&&function(t,r){var e=W('<div class="os-trinsic-observer"></div>')[0],i=[],o=n((function(n){return 0===n.h||n.isIntersecting||n.intersectionRatio>0}),{u:!1}),u=o.v,a=o.m;if(G){var c=new G((function(n){if(n&&n.length>0){var t=n.pop();if(t){var e=u(0,t);e.p&&r(e)}}}),{root:t});c.observe(e),w(i,(function(){return c.disconnect()}))}else{var f=function(){var n=en(e),t=u(0,n);t.p&&r(t)};w(i,Un(e,f).nn),f()}return B(t,e),{nn:function(){y(i),D(e)},On:function(n){return{bn:a(n)}}}}(a,(function(n){z({bn:n})})),O=Un(a,(function(n){z({on:n,in:!n})}),{Mn:!0,zn:!v}),L=(Jn(a,(function(){requestAnimationFrame((function(){z({mn:!0})}))}),{Tn:Qn,An:Qn}),Jn(l||f,(function(){requestAnimationFrame((function(){z({yn:!0})}))}),{Cn:!0,Tn:Qn,An:Qn,jn:t.updating.elementEvents}),function(n,t){z(null,n,t)}),T=L.bind(null,null,!0);return _(T),console.log("flexboxGlue",h),{v:L,nn:function(){p(T)}}},ot=An.number,ut=[An.string,An.array,An.null],at=[!0,An.boolean],ct=[!1,An.boolean],ft=function n(t){var r={Fn:{},qn:{}};return g(S(t),(function(e){var i=t[e];if(s(i))r.Fn[e]=i[1],r.qn[e]=i[0];else{var o=n(i);r.Fn[e]=o.Fn,r.qn[e]=o.qn}})),r}({resize:["none","none both horizontal vertical"],paddingAbsolute:ct,updating:{elementEvents:[[["img","load"]],[An.array,An.null]],contentMutationDebounce:[80,ot],hostMutationDebounce:[0,ot],resizeDebounce:[0,ot]},overflow:{x:["scroll","visible-hidden visible-scroll scroll hidden"],y:["scroll","visible-hidden visible-scroll scroll hidden"]},scrollbars:{visibility:["auto","visible hidden auto"],autoHide:["never","never scroll leavemove"],autoHideDelay:[800,ot],dragScroll:at,clickScroll:ct,touch:at},textarea:{dynWidth:ct,dynHeight:ct,inheritedAttrs:[["style","class"],ut]},nativeScrollbarsOverlaid:{show:ct,initialize:ct}}),lt=ft.Fn,st=ft.qn;return function(){return[Fn(),(n=document.body,r=z({},st,Tn(t||{},lt,null,!0).L),e=Wn(n),i=it(r,e),o={options:function(n){if(n){var t=Tn(n,lt,r,!0).L;M(t)||(z(r,t),i.v(t))}return r},update:function(n){i.v(null,n)}},o.update(!0),o)];var n,t,r,e,i,o}}));