UNPKG

@jacksonrayhamilton/redux-infinite-scroll

Version:

React infinite scroll component designed for a Redux data-flow.

22 lines 22.8 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.ReduxInfiniteScroll=t(require("React"),require("ReactDOM")):e.ReduxInfiniteScroll=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(4)},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?y=d.concat(y):h=-1,y.length&&c())}function c(){if(!m){var e=o(a);m=!0;for(var t=y.length;t;){for(d=y,y=[];++h<t;)d&&d[h].run();h=-1,t=y.length}d=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function s(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var d,y=[],m=!1,h=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new u(e,t)),1!==y.length||m||o(c)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=s,p.addListener=s,p.once=s,p.off=s,p.removeListener=s,p.removeAllListeners=s,p.emit=s,p.prependListener=s,p.prependOnceListener=s,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,r){(function(t){"use strict";"production"===t.env.NODE_ENV?e.exports=r(12):e.exports=r(11)}).call(t,r(1))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(13),s=n(u),f=r(10),l=n(f),p=r(14),d=n(p),y=r(5),m=function(e){function t(e){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.scrollFunction=r.scrollListener.bind(r),r}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){this.attachScrollListener()}},{key:"_findElement",value:function(){return this.props.elementIsScrollable?d.default.findDOMNode(this):window}},{key:"attachScrollListener",value:function(){if(this.props.hasMore&&!this.props.loadingMore){var e=this._findElement();e.addEventListener("scroll",this.scrollFunction,!0),e.addEventListener("resize",this.scrollFunction,!0),this.scrollListener()}}},{key:"_elScrollListener",value:function(){var e=d.default.findDOMNode(this);if(this.props.horizontal){var t=e.scrollLeft,r=e.scrollWidth,n=e.offsetWidth,o=t+n;return r-o}var i=e.scrollTop,a=e.scrollHeight,c=e.offsetHeight,u=i+c;return a-u}},{key:"_windowScrollListener",value:function(){var e=d.default.findDOMNode(this);if(this.props.horizontal){var t=void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,r=(0,y.leftPosition)(e)+e.offsetWidth,n=r-t-window.innerWidth;return n}var o=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,i=(0,y.topPosition)(e)+e.offsetHeight,a=i-o-window.innerHeight;return a}},{key:"scrollListener",value:function(){if(!(this._totalItemsSize()<=0)){var e=this.props.elementIsScrollable?this._elScrollListener():this._windowScrollListener();e<Number(this.props.threshold)&&(this.detachScrollListener(),this.props.loadMore())}}},{key:"detachScrollListener",value:function(){var e=this._findElement();e.removeEventListener("scroll",this.scrollFunction,!0),e.removeEventListener("resize",this.scrollFunction,!0)}},{key:"_renderOptions",value:function(){var e=this.props.children.concat(this.props.items);return e}},{key:"_totalItemsSize",value:function(){var e=void 0;return e+=this.props.children.size?this.props.children.size:this.props.children.length,e+=this.props.items.size?this.props.items.size:this.props.items.length}},{key:"componentWillUnmount",value:function(){this.detachScrollListener()}},{key:"renderLoader",value:function(){return this.props.loadingMore&&this.props.showLoader?this.props.loader:void 0}},{key:"_assignHolderClass",value:function(){var e=void 0;return e="function"==typeof this.props.className?this.props.className():this.props.className,"redux-infinite-scroll "+e}},{key:"render",value:function(){var e=this.props.holderType;return s.default.createElement(e,{className:this._assignHolderClass(),style:{height:this.props.containerHeight,overflow:"scroll"}},this._renderOptions(),this.renderLoader())}}]),t}(s.default.Component);t.default=m,m.propTypes={elementIsScrollable:l.default.bool,containerHeight:l.default.oneOfType([l.default.number,l.default.string]),threshold:l.default.number,horizontal:l.default.bool,hasMore:l.default.bool,loadingMore:l.default.bool,loader:l.default.any,showLoader:l.default.bool,loadMore:l.default.func.isRequired,items:l.default.oneOfType([l.default.array]),children:l.default.oneOfType([l.default.array]),holderType:l.default.string,className:l.default.oneOfType([l.default.string,l.default.func])},m.defaultProps={className:"",elementIsScrollable:!0,containerHeight:"100%",threshold:100,horizontal:!1,hasMore:!0,loadingMore:!1,loader:s.default.createElement("div",{style:{textAlign:"center"}},"Loading..."),showLoader:!0,holderType:"div",children:[],items:[]}},function(e,t){"use strict";function r(e){return e?e.offsetTop+r(e.offsetParent):0}function n(e){return e?e.offsetLeft+n(e.offsetParent):0}Object.defineProperty(t,"__esModule",{value:!0}),t.topPosition=r,t.leftPosition=n},function(e,t){/* object-assign (c) Sindre Sorhus @license MIT */ "use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function n(){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={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(e,t){for(var n,c,u=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var f in n)i.call(n,f)&&(u[f]=n[f]);if(o){c=o(n);for(var l=0;l<c.length;l++)a.call(n,c[l])&&(u[c[l]]=n[c[l]])}}return u}},function(e,t,r){(function(t){"use strict";function n(e,r,n,u,s){if("production"!==t.env.NODE_ENV)for(var f in e)if(c(e,f)){var l;try{if("function"!=typeof e[f]){var p=Error((u||"React class")+": "+n+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.");throw p.name="Invariant Violation",p}l=e[f](r,f,u,n,null,i)}catch(e){l=e}if(!l||l instanceof Error||o((u||"React class")+": type specification of "+n+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". 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 instanceof Error&&!(l.message in a)){a[l.message]=!0;var d=s?s():"";o("Failed "+n+" type: "+l.message+(null!=d?d:""))}}}var o=function(){};if("production"!==t.env.NODE_ENV){var i=r(2),a={},c=Function.call.bind(Object.prototype.hasOwnProperty);o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}n.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(a={})},e.exports=n}).call(t,r(1))},function(e,t,r){"use strict";function n(){}function o(){}var i=r(2);o.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,o,a){if(a!==i){var c=new Error("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");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){(function(t){"use strict";function n(){return null}var o=r(3),i=r(6),a=r(2),c=r(7),u=Function.call.bind(Object.prototype.hasOwnProperty),s=function(){};"production"!==t.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,r){function f(e){var t=e&&(M&&e[M]||e[L]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function p(e){this.message=e,this.stack=""}function d(e){function n(n,c,u,f,l,d,y){if(f=f||I,d=d||u,y!==a){if(r){var m=new Error("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");throw m.name="Invariant Violation",m}if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var h=f+":"+u;!o[h]&&i<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+f+"`. 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."),o[h]=!0,i++)}}return null==c[u]?n?new p(null===c[u]?"The "+l+" `"+d+"` is marked as required "+("in `"+f+"`, but its value is `null`."):"The "+l+" `"+d+"` is marked as required in "+("`"+f+"`, but its value is `undefined`.")):null:e(c,u,f,l,d)}if("production"!==t.env.NODE_ENV)var o={},i=0;var c=n.bind(null,!1);return c.isRequired=n.bind(null,!0),c}function y(e){function t(t,r,n,o,i,a){var c=t[r],u=P(c);if(u!==e){var s=$(c);return new p("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected ")+("`"+e+"`."))}return null}return d(t)}function m(){return d(n)}function h(e){function t(t,r,n,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var c=t[r];if(!Array.isArray(c)){var u=P(c);return new p("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+n+"`, expected an array."))}for(var s=0;s<c.length;s++){var f=e(c,s,n,o,i+"["+s+"]",a);if(f instanceof Error)return f}return null}return d(t)}function v(){function t(t,r,n,o,i){var a=t[r];if(!e(a)){var c=P(a);return new p("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return d(t)}function b(){function e(e,t,r,n,i){var a=e[t];if(!o.isValidElementType(a)){var c=P(a);return new p("Invalid "+n+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return d(e)}function g(e){function t(t,r,n,o,i){if(!(t[r]instanceof e)){var a=e.name||I,c=N(t[r]);return new p("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+n+"`, expected ")+("instance of `"+a+"`."))}return null}return d(t)}function w(e){function r(t,r,n,o,i){for(var a=t[r],c=0;c<e.length;c++)if(l(a,e[c]))return null;var u=JSON.stringify(e,function(e,t){var r=$(t);return"symbol"===r?String(t):t});return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` "+("supplied to `"+n+"`, expected one of "+u+"."))}return Array.isArray(e)?d(r):("production"!==t.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),n)}function O(e){function t(t,r,n,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var c=t[r],s=P(c);if("object"!==s)return new p("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected an object."));for(var f in c)if(u(c,f)){var l=e(c,f,n,o,i+"."+f,a);if(l instanceof Error)return l}return null}return d(t)}function S(e){function r(t,r,n,o,i){for(var c=0;c<e.length;c++){var u=e[c];if(null==u(t,r,n,o,i,a))return null}return new p("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?s("Invalid argument supplied to oneOfType, expected an instance of array."):void 0,n;for(var o=0;o<e.length;o++){var i=e[o];if("function"!=typeof i)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(i)+" at index "+o+"."),n}return d(r)}function E(){function e(e,t,r,n,o){return _(e[t])?null:new p("Invalid "+n+" `"+o+"` supplied to "+("`"+r+"`, expected a ReactNode."))}return d(e)}function x(e){function t(t,r,n,o,i){var c=t[r],u=P(c);if("object"!==u)return new p("Invalid "+o+" `"+i+"` of type `"+u+"` "+("supplied to `"+n+"`, expected `object`."));for(var s in e){var f=e[s];if(f){var l=f(c,s,n,o,i+"."+s,a);if(l)return l}}return null}return d(t)}function T(e){function t(t,r,n,o,c){var u=t[r],s=P(u);if("object"!==s)return new p("Invalid "+o+" `"+c+"` of type `"+s+"` "+("supplied to `"+n+"`, expected `object`."));var f=i({},t[r],e);for(var l in f){var d=e[l];if(!d)return new p("Invalid "+o+" `"+c+"` key `"+l+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(u,l,n,o,c+"."+l,a);if(y)return y}return null}return d(t)}function _(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(_);if(null===t||e(t))return!0;var r=f(t);if(!r)return!1;var n,o=r.call(t);if(r!==t.entries){for(;!(n=o.next()).done;)if(!_(n.value))return!1}else for(;!(n=o.next()).done;){var i=n.value;if(i&&!_(i[1]))return!1}return!0;default:return!1}}function j(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function P(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":j(t,e)?"symbol":t}function $(e){if("undefined"==typeof e||null===e)return""+e;var t=P(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function k(e){var t=$(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function N(e){return e.constructor&&e.constructor.name?e.constructor.name:I}var M="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",I="<<anonymous>>",R={array:y("array"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:m(),arrayOf:h,element:v(),elementType:b(),instanceOf:g,node:E(),objectOf:O,oneOf:w,oneOfType:S,shape:x,exact:T};return p.prototype=Error.prototype,R.checkPropTypes=c,R.resetWarningCache=c.resetWarningCache,R.PropTypes=R,R}}).call(t,r(1))},function(e,t,r){(function(t){if("production"!==t.env.NODE_ENV){var n=r(3),o=!0;e.exports=r(9)(n.isElement,o)}else e.exports=r(8)()}).call(t,r(1))},function(e,t,r){(function(e){/** @license React v16.12.0 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict";"production"!==e.env.NODE_ENV&&!function(){function e(e){return"string"==typeof e||"function"==typeof e||e===g||e===T||e===O||e===w||e===j||e===P||"object"==typeof e&&null!==e&&(e.$$typeof===k||e.$$typeof===$||e.$$typeof===S||e.$$typeof===E||e.$$typeof===_||e.$$typeof===N||e.$$typeof===M||e.$$typeof===L)}function r(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case v:var r=e.type;switch(r){case x:case T:case g:case O:case w:case j:return r;default:var n=r&&r.$$typeof;switch(n){case E:case _:case k:case $:case S:return n;default:return t}}case b:return t}}}function n(e){return G||(G=!0,C(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),o(e)||r(e)===x}function o(e){return r(e)===T}function i(e){return r(e)===E}function a(e){return r(e)===S}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===v}function u(e){return r(e)===_}function s(e){return r(e)===g}function f(e){return r(e)===k}function l(e){return r(e)===$}function p(e){return r(e)===b}function d(e){return r(e)===O}function y(e){return r(e)===w}function m(e){return r(e)===j}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&Symbol.for,v=h?Symbol.for("react.element"):60103,b=h?Symbol.for("react.portal"):60106,g=h?Symbol.for("react.fragment"):60107,w=h?Symbol.for("react.strict_mode"):60108,O=h?Symbol.for("react.profiler"):60114,S=h?Symbol.for("react.provider"):60109,E=h?Symbol.for("react.context"):60110,x=h?Symbol.for("react.async_mode"):60111,T=h?Symbol.for("react.concurrent_mode"):60111,_=h?Symbol.for("react.forward_ref"):60112,j=h?Symbol.for("react.suspense"):60113,P=h?Symbol.for("react.suspense_list"):60120,$=h?Symbol.for("react.memo"):60115,k=h?Symbol.for("react.lazy"):60116,N=h?Symbol.for("react.fundamental"):60117,M=h?Symbol.for("react.responder"):60118,L=h?Symbol.for("react.scope"):60119,I=function(){},R=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=0,i="Warning: "+e.replace(/%s/g,function(){return r[o++]});"undefined"!=typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}};I=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];R.apply(void 0,[t].concat(n))}};var C=I,A=x,D=T,z=E,V=S,F=v,W=_,q=g,H=k,U=$,Y=b,J=O,B=w,X=j,G=!1;t.typeOf=r,t.AsyncMode=A,t.ConcurrentMode=D,t.ContextConsumer=z,t.ContextProvider=V,t.Element=F,t.ForwardRef=W,t.Fragment=q,t.Lazy=H,t.Memo=U,t.Portal=Y,t.Profiler=J,t.StrictMode=B,t.Suspense=X,t.isValidElementType=e,t.isAsyncMode=n,t.isConcurrentMode=o,t.isContextConsumer=i,t.isContextProvider=a,t.isElement=c,t.isForwardRef=u,t.isFragment=s,t.isLazy=f,t.isMemo=l,t.isPortal=p,t.isProfiler=d,t.isStrictMode=y,t.isSuspense=m}()}).call(t,r(1))},function(e,t){/** @license React v16.12.0 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ "use strict";function r(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case c:case s:case u:case m:return e;default:switch(e=e&&e.$$typeof){case l:case y:case b:case v:case f:return e;default:return t}}case a:return t}}}function n(e){return r(e)===d}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,c=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,l=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,y=o?Symbol.for("react.forward_ref"):60112,m=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.suspense_list"):60120,v=o?Symbol.for("react.memo"):60115,b=o?Symbol.for("react.lazy"):60116,g=o?Symbol.for("react.fundamental"):60117,w=o?Symbol.for("react.responder"):60118,O=o?Symbol.for("react.scope"):60119;t.typeOf=r,t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=f,t.Element=i,t.ForwardRef=y,t.Fragment=c,t.Lazy=b,t.Memo=v,t.Portal=a,t.Profiler=s,t.StrictMode=u,t.Suspense=m,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===d||e===s||e===u||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===f||e.$$typeof===l||e.$$typeof===y||e.$$typeof===g||e.$$typeof===w||e.$$typeof===O)},t.isAsyncMode=function(e){return n(e)||r(e)===p},t.isConcurrentMode=n,t.isContextConsumer=function(e){return r(e)===l},t.isContextProvider=function(e){return r(e)===f},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return r(e)===y},t.isFragment=function(e){return r(e)===c},t.isLazy=function(e){return r(e)===b},t.isMemo=function(e){return r(e)===v},t.isPortal=function(e){return r(e)===a},t.isProfiler=function(e){return r(e)===s},t.isStrictMode=function(e){return r(e)===u},t.isSuspense=function(e){return r(e)===m}},function(t,r){t.exports=e},function(e,r){e.exports=t}])});