1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
|
|
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[4],{137:function(e,t,n){"use strict";var o;function r(e){if("undefined"===typeof document)return 0;if(e||void 0===o){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var c=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;c===a&&(a=n.clientWidth),document.body.removeChild(n),o=c-a}return o}n.d(t,"a",(function(){return r}))},268:function(e,t,n){"use strict";var o=n(10),r=n(13),c=n(15),a=n(16),i=n(9),l=n(0),s=n(54),u=n(271),f=n(27),d=n(137);var m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return{};var n=t.element,o=void 0===n?document.body:n,r={},c=Object.keys(e);return c.forEach((function(e){r[e]=o.style[e]})),c.forEach((function(t){o.style[t]=e[t]})),r};var v={},p=function(e){if(document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth||e){var t="ant-scrolling-effect",n=new RegExp("".concat(t),"g"),o=document.body.className;if(e){if(!n.test(o))return;return m(v),v={},void(document.body.className=o.replace(n,"").trim())}var r=Object(d.a)();if(r&&(v=m({position:"relative",width:"calc(100% - ".concat(r,"px)")}),!n.test(o))){var c="".concat(o," ").concat(t);document.body.className=c.trim()}}},b=n(4),C=[],g="ant-scrolling-effect",h=new RegExp("".concat(g),"g"),y=0,O=new Map,j=function e(t){var n=this;Object(o.a)(this,e),this.lockTarget=void 0,this.options=void 0,this.getContainer=function(){var e;return null===(e=n.options)||void 0===e?void 0:e.container},this.reLock=function(e){var t=C.find((function(e){return e.target===n.lockTarget}));t&&n.unLock(),n.options=e,t&&(t.options=e,n.lock())},this.lock=function(){var e;if(!C.some((function(e){return e.target===n.lockTarget})))if(C.some((function(e){var t,o=e.options;return(null===o||void 0===o?void 0:o.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})))C=[].concat(Object(b.a)(C),[{target:n.lockTarget,options:n.options}]);else{var t=0,o=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body;(o===document.body&&window.innerWidth-document.documentElement.clientWidth>0||o.scrollHeight>o.clientHeight)&&(t=Object(d.a)());var r=o.className;if(0===C.filter((function(e){var t,o=e.options;return(null===o||void 0===o?void 0:o.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})).length&&O.set(o,m({width:0!==t?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:o})),!h.test(r)){var c="".concat(r," ").concat(g);o.className=c.trim()}C=[].concat(Object(b.a)(C),[{target:n.lockTarget,options:n.options}])}},this.unLock=function(){var e,t=C.find((function(e){return e.target===n.lockTarget}));if(C=C.filter((function(e){return e.target!==n.lockTarget})),t&&!C.some((function(e){var n,o=e.options;return(null===o||void 0===o?void 0:o.container)===(null===(n=t.options)||void 0===n?void 0:n.container)}))){var o=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body,r=o.className;h.test(r)&&(m(O.get(o),{element:o}),O.delete(o),o.className=o.className.replace(h,"").trim())}},this.lockTarget=y++,this.options=t},k=0,E=Object(f.a)();var x={},w=function(e){if(!E)return null;if(e){if("string"===typeof e)return document.querySelectorAll(e)[0];if("function"===typeof e)return e();if("object"===Object(i.a)(e)&&e instanceof window.HTMLElement)return e}return document.body},N=function(e){Object(c.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).container=void 0,r.componentRef=l.createRef(),r.rafId=void 0,r.scrollLocker=void 0,r.renderComponent=void 0,r.updateScrollLocker=function(e){var t=(e||{}).visible,n=r.props,o=n.getContainer,c=n.visible;c&&c!==t&&E&&w(o)!==r.scrollLocker.getContainer()&&r.scro
|