10 lines
27 KiB
JavaScript
10 lines
27 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3304],{9837:function(e,t,n){var r,o,i;e.exports=(r=n(59496),o=n(87995),i=n(59255),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),a=(r(i),n(3)),s=r(a),u=r(n(13)),l=r(n(14)),c=r(n(15)),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.measure=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.props.includeMargin;if(n.props.shouldMeasure){n._node.parentNode||n._setDOMNode();var t=n.getDimensions(n._node,e),r="function"==typeof n.props.children;n._propsToMeasure.some((function(e){if(t[e]!==n._lastDimensions[e])return n.props.onMeasure(t),r&&void 0!==n&&n.setState({dimensions:t}),n._lastDimensions=t,!0}))}},n.state={dimensions:{width:0,height:0,top:0,right:0,bottom:0,left:0}},n._node=null,n._propsToMeasure=n._getPropsToMeasure(e),n._lastDimensions={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this;this._setDOMNode(),this.measure(),this.resizeObserver=new l.default((function(){return e.measure()})),this.resizeObserver.observe(this._node)}},{key:"componentWillReceiveProps",value:function(e){var t=(e.config,e.whitelist),n=e.blacklist;this.props.whitelist===t&&this.props.blacklist===n||(this._propsToMeasure=this._getPropsToMeasure({whitelist:t,blacklist:n}))}},{key:"componentWillUnmount",value:function(){this.resizeObserver.disconnect(this._node),this._node=null}},{key:"_setDOMNode",value:function(){this._node=u.default.findDOMNode(this)}},{key:"getDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._node,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.includeMargin;return(0,c.default)(e,{margin:t})}},{
|
|
key:"_getPropsToMeasure",value:function(e){var t=e.whitelist,n=e.blacklist;return t.filter((function(e){return n.indexOf(e)<0}))}},{key:"render",value:function(){var e=this.props.children;return i.Children.only("function"==typeof e?e(this.state.dimensions):e)}}]),t}(i.Component);f.propTypes={whitelist:s.default.array,blacklist:s.default.array,includeMargin:s.default.bool,useClone:s.default.bool,cloneOptions:s.default.object,shouldMeasure:s.default.bool,onMeasure:s.default.func},f.defaultProps={whitelist:["width","height","top","right","bottom","left"],blacklist:[],includeMargin:!0,useClone:!1,cloneOptions:{},shouldMeasure:!0,onMeasure:function(){return null}},t.default=f,e.exports=t.default},function(e,t){e.exports=r},function(e,t,n){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("production"!==t.env.NODE_ENV){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(5)((function(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e&&e.$$typeof===o}),!0)}else e.exports=n(12)()}).call(t,n(4))},function(e,t){"use strict";function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(){h&&p&&(h=!1,p.length?d=p.concat(d):m=-1,d.length&&a())}function a(){if(!h){var e=o(i);h=!0;for(var t=d.length;t;){for(p=d,d=[];++m<t;)p&&p[m].run();m=-1,t=d.length}p=null,h=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function s(e,t){this.fun=e,this.array=t}function u(){}var l,c,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(e){c=r}}();var p,d=[],h=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new s(e,t)),1!==d.length||h||o(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e
|
|
}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(6),i=n(7),a=n(8),s=n(9),u=n(10),l=n(11);e.exports=function(e,n){function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){this.message=e,this.stack=""}function p(e){function r(r,l,c,p,d,h,m){if(p=p||S,h=h||c,m!==u)if(n)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+c;!o[v]&&s<3&&(a(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),o[v]=!0,s++)}return null==l[c]?r?new f(null===l[c]?"The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(l,c,p,d,h)}if("production"!==t.env.NODE_ENV)var o={},s=0;var l=r.bind(null,!1);return l.isRequired=r.bind(null,!0),l}function d(e){return p((function(t,n,r,o,i,a){var s=t[n];return m(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function h(t){switch(void 0===t?"undefined":r(t)){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(h);if(null===t||e(t))return!0;var n=function(e){var t=e&&(g&&e[g]||e[b]);if("function"==typeof t)return t}(t);if(!n)return!1;var o,i=n.call(t);if(n!==t.entries){for(;!(o=i.next()).done;)if(!h(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!h(a[1]))return!1}return!0;default:return!1}}function m(e){var t=void 0===e?"undefined":r(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}var g="function"==typeof Symbol&&Symbol.iterator,b="@@iterator",S="<<anonymous>>",O={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:p(o.thatReturnsNull),arrayOf:function(e){return p((function(t,n,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new f("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<a.length;s++){var l=e(a,s,r,o,i+"["+s+"]",u)
|
|
;if(l instanceof Error)return l}return null}))},element:p((function(t,n,r,o,i){var a=t[n];return e(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement.")})),instanceOf:function(e){return p((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||S;return new f("Invalid "+o+" `"+i+"` of type `"+function(e){return e.constructor&&e.constructor.name?e.constructor.name:S}(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}))},node:p((function(e,t,n,r,o){return h(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,n,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=m(a);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,o,i+"."+l,u);if(c instanceof Error)return c}return null}))},oneOf:function(e){return Array.isArray(e)?p((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(c(a,e[s]))return null;return new f("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")})):("production"!==t.env.NODE_ENV&&a(!1,"Invalid argument supplied to oneOf, expected an instance of array."),o.thatReturnsNull)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&a(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),o.thatReturnsNull;for(var n=0;n<e.length;n++){var r=e[n];if("function"!=typeof r)return a(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",y(r),n),o.thatReturnsNull}return p((function(t,n,r,o,i){for(var a=0;a<e.length;a++)if(null==(0,e[a])(t,n,r,o,i,u))return null;return new f("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return p((function(t,n,r,o,i){var a=t[n],s=m(a);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var p=c(a,l,r,o,i+"."+l,u);if(p)return p}}return null}))},exact:function(e){return p((function(t,n,r,o,i){var a=t[n],l=m(a);if("object"!==l)return new f("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var c=s({},t[n],e);for(var p in c){var d=e[p];if(!d)return new f("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(a,p,r,o,i+"."+p,u);if(h)return h}return null}))}};return f.prototype=Error.prototype,O.checkPropTypes=l,O.PropTypes=O,O}}).call(t,n(4))},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r
|
|
},function(e,t,n){(function(t){"use strict";var n=function(e){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=function(e,t,r,o,i,a,s,u){if(n(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,i,a,s,u],f=0;(l=new Error(t.replace(/%s/g,(function(){return c[f++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}}).call(t,n(4))},function(e,t,n){(function(t){"use strict";var r=n(6);if("production"!==t.env.NODE_ENV){var o=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return n[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];o.apply(void 0,[t].concat(r))}}}e.exports=r}).call(t,n(4))},function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,s,u=n(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))o.call(a,c)&&(u[c]=a[c]);if(r){s=r(a);for(var f=0;f<s.length;f++)i.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("production"!==t.env.NODE_ENV)var o=n(7),i=n(8),a=n(10),s={};e.exports=function(e,n,u,l,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var p;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",l||"React class",u,f,r(e[f])),p=e[f](n,f,l,u,null,a)}catch(e){p=e}
|
|
if(i(!p||p instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",u,f,void 0===p?"undefined":r(p)),p instanceof Error&&!(p.message in s)){s[p.message]=!0;var d=c?c():"";i(!1,"Failed %s type: %s%s",u,p.message,null!=d?d:"")}}}}).call(t,n(4))},function(e,t,n){"use strict";var r=n(6),o=n(7),i=n(10);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.getBoundingClientRect(),o=void 0,i=void 0,a=void 0;return t.margin&&(a=(0,r.default)(getComputedStyle(e))),t.margin?(o=a.left+n.width+a.right,i=a.top+n.height+a.bottom):(o=n.width,i=n.height),{width:o,height:i,top:n.top,right:n.right,bottom:n.bottom,left:n.left}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(16));e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{top:n((e=e||{}).marginTop),right:n(e.marginRight),bottom:n(e.marginBottom),left:n(e.marginLeft)}};var n=function(e){return parseInt(e)||0};e.exports=t.default}]))},69397:(e,t,n)=>{"use strict";n.d(t,{FixedSizeList:()=>w,VariableSizeList:()=>_});var r=n(19624),o=n(55682),i=n(75542),a=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function s(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||a(r)&&a(o)))return!1;var r,o;return!0}const u=function(e,t){var n;void 0===t&&(t=s);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}};var l=n(59496),c="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function f(e){cancelAnimationFrame(e.id)}function p(e,t){var n=c();var r={id:requestAnimationFrame((function o(){c()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var d=null;function h(e){if(void 0===e&&(e=!1),null===d||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),
|
|
t.scrollLeft>0?d="positive-descending":(t.scrollLeft=1,d=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),d}return d}var m=function(e,t){return e};function v(e){var t,n,a=e.getItemOffset,s=e.getEstimatedTotalSize,c=e.getItemSize,d=e.getOffsetForIndexAndAlignment,v=e.getStartIndexForOffset,g=e.getStopIndexForStartIndex,b=e.initInstanceProps,S=e.shouldResetStyleCacheOnItemSizeChange,O=e.validateProps;return n=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=b(n.props,(0,i.default)((0,i.default)(n))),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:(0,i.default)((0,i.default)(n)),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=u((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=u((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,o=r.direction,i=r.itemSize,s=r.layout,u=n._getItemStyleCache(S&&i,S&&s,S&&o);if(u.hasOwnProperty(e))t=u[e];else{var l=a(n.props,e,n._instanceProps),f=c(n.props,e,n._instanceProps),p="horizontal"===o||"horizontal"===s,d="rtl"===o,h=p?l:0;u[e]=t={position:"absolute",left:d?void 0:h,right:d?h:void 0,top:p?0:l,height:p?"100%":f,width:p?f:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=u((function(e,t,n){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(h()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&f(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=p(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}(0,o.default)(t,e),t.getDerivedStateFromProps=function(e,t){return y(e,t),O(e),null};var n=t.prototype
|
|
;return n.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props.itemCount,r=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(d(this.props,e,t,r,this._instanceProps))},n.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(h()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&f(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,u=e.innerElementType,c=e.innerTagName,f=e.itemCount,p=e.itemData,d=e.itemKey,h=void 0===d?m:d,v=e.layout,y=e.outerElementType,g=e.outerTagName,b=e.style,S=e.useIsScrolling,O=e.width,_=this.state.isScrolling,w="horizontal"===o||"horizontal"===v,x=w?this._onScrollHorizontal:this._onScrollVertical,I=this._getRangeToRender(),T=I[0],M=I[1],R=[];if(f>0)for(var E=T;E<=M;E++)R.push((0,l.createElement)(t,{data:p,key:h(E,p),index:E,isScrolling:S?_:void 0,style:this._getItemStyle(E)}));var P=s(this.props,this._instanceProps);return(0,l.createElement)(y||g||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:(0,r.default)({position:"relative",height:i,width:O,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},(0,l.createElement)(u||c||"div",{children:R,ref:a,style:{height:w?"100%":P,pointerEvents:_?"none":void 0,width:w?P:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,u=i.scrollUpdateWasRequested;this._callOnScroll(a,s,u)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var s=v(this.props,a,this._instanceProps),u=g(this.props,s,a,this._instanceProps),l=o&&"backward"!==i?1:Math.max(1,n),c=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,s-l),Math.max(0,Math.min(t-1,u+c)),s,u]},t}(l.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,
|
|
useIsScrolling:!1},n}var y=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},g=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var u=i+1;u<=t;u++){var l=r(u);o[u]={offset:a,size:l},a+=l}n.lastMeasuredIndex=t}return o[t]},b=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=g(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},S=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&g(e,n,t).offset<r;)n+=i,i*=2;return b(e,t,Math.min(n,o-1),Math.floor(n/2),r)},O=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},_=v({getItemOffset:function(e,t,n){return g(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:O,getOffsetForIndexAndAlignment:function(e,t,n,r,o){var i=e.direction,a=e.height,s=e.layout,u=e.width,l="horizontal"===i||"horizontal"===s?u:a,c=g(e,t,o),f=O(e,o),p=Math.max(0,Math.min(f-l,c.offset)),d=Math.max(0,c.offset-l+c.size);switch("smart"===n&&(n=r>=d-l&&r<=p+l?"auto":"center"),n){case"start":return p;case"end":return d;case"center":return Math.round(d+(p-d)/2);case"auto":default:return r>=d&&r<=p?r:r<d?d:p}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?b(e,t,o,0,n):S(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,u=e.width,l="horizontal"===o||"horizontal"===s?u:i,c=g(e,t,r),f=n+l,p=c.offset+c.size,d=t;d<a-1&&p<f;)d++,p+=g(e,d,r).size;return d},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}}),w=v({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,i=e.height,a=e.itemCount,s=e.itemSize,u=e.layout,l=e.width,c="horizontal"===o||"horizontal"===u?l:i,f=Math.max(0,a*s-c),p=Math.min(f,t*s),d=Math.max(0,t*s-c+s);switch("smart"===n&&(n=r>=d-c&&r<=p+c?"auto":"center"),n){case"start":return p;case"end":return d;case"center":var h=Math.round(d+(p-d)/2);return h<Math.ceil(c/2)?0:h>f+Math.floor(c/2)?f:h;case"auto":default:return r>=d&&r<=p?r:r<d?d:p}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){
|
|
var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,u=e.width,l=t*a,c="horizontal"===r||"horizontal"===s?u:o,f=Math.ceil((c+n-l)/a);return Math.max(0,Math.min(i-1,t+f-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}})},55682:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(11430);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.default)(e,t)}}}]); |