UNPKG

idle-tabs

Version:

A utility module for tracking user activity on different tabs of same website, with keepalive event, can be used for maintaining sessions where there is token based authentication to preserve or notify users.

185 lines (147 loc) 327 kB
<!doctype html> <meta charset="UTF-8"> <title>Webpack Visualizer</title> <style>html { background-color: #f7eedf; color: #333; } body { font-family: sans-serif; margin: 10px auto 0; width: 750px; padding: 0 10px; } a, .destyledButton { color: #347AB7; } p { margin-top: 0.5em; } svg { vertical-align: middle; } h1 { font-family: "Oswald", "HelveticaNeue-CondensedBold", "Arial Narrow", sans-serif; font-weight: bold; font-size: 70px; text-transform: uppercase; text-align: center; } hr { border: 0 none; border-top: 1px solid #aaa; } code { font-size: 16px; } .breadcrumbs { height: 1em; margin: 1em 0; } .uploadArea { position: relative; margin: 0 auto; min-height: 350px; } .uploadArea--needsUpload { border: 2px dashed #AC9062; border-radius: 10px; cursor: pointer; } .uploadArea--dragging { border-style: solid; background-color: #E6D4B6; } .uploadArea-uploadMessage { display: none; font-size: 1.9em; text-align: center; margin-top: 100px; pointer-events: none; } .uploadArea--needsUpload .uploadArea-uploadMessage { display: block; } .uploadArea-uploadMessage small { font-size: 0.5em; } .chart { position: relative; margin: 0 auto; min-height: 350px; } .chart--large { width: 950px; margin-left: -100px; } .hiddenFileInput { width: 0px; height: 0px; visibility: hidden; } .chart path { stroke: #fff; } .details { position: absolute; top: 325px; left: 50%; width: 170px; margin-left: -85px; font-size: 14px; text-align: center; color: #666; z-index: -1; overflow: hidden; text-overflow: ellipsis; } .chart--large .details { top: 425px; } .details-size { font-size: 0.9em; margin-top: 1em; } .details-name { font-weight: bold; } .details-subText { min-height: 1.2em; } .details-percentage { margin: 0.4em 0 0em; font-size: 2.4em; line-height: 1em; } .errorMessage { margin-top: 2em; padding: 0.8em 1em; border: 1px solid #ab2222; color: #ab2222; } footer { margin-top: 4em; } footer h2 { margin: 1.5em 0 0.5em; font-size: 1.3em; } .destyledButton { background: none; border: 0 none; cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; } @font-face {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+Kv6Lhnir+hrb7U/EpFrwbir+j7mmeHy5uect4ihQZJsgRYx9DlPB5rxB3ea6gjQ5Xi3uX8i79fN4/oveYcWNKjzHADkYosMV1TJxQ84RWc3YRMP4hPSPaSqJZL3/q93ftWbTPyBJ7tB/yTMkyZkbL9IgeAR6gJ4xbjPOxJijn3qPV4Od6GyudcLfomPsSrUsivZU9rLBpncMxpuRTMtxyngPecMQzxwF1Kdme36mL6v/fjEJqDNNgOpEJM6fMau6QMfeENuMVsNcHF/b/N9MumsRHFX47U352otZmrLvMk1B+xGymu0ay9UbM2SSjmDWGjHtFr0IiTbyZ0DPJbhhsSvaIaHaGAeXX8paKive2TK8Uv1yirEfCM6Q8ljqmwiHxQGr6wiKS6JfoS6VMfGcz9ysZmtM5FdTbTnTIyqyhvPgM67jHz8zNdDSjrqC10D6k1O7TvsUafb7eiP3am1bryN+zzVuUwieU05dXYuawTusq9x4nczadntzH/mmJcDAo5yoqHXpPTUy96U/yB4cAybh42m3IuQrCUABE0ZlEE/ftDwQVC9GX5cVEsAhKPsJaUEHExsKPF1zelN7mwIWHX68jDvjXGKBHHz4mmGKGORZYYoUEFhlyFNhgyxrrDBiywSZbbLPDLnvsc8AhR8Hp+ryfo/Bxuxhj9s7SfI0/Q0YylolMpZWZXMtcFrJ0xpXTOm21ewOsDSmueNrbwfi/dQNjL4P3Bo6AiI2MjH2RG93YtCMUNwhEem8QCQIyGiJlN7Bpx0QwbGBWcN3ArO2ygV3BdRNzOJM2mMMG5LCbQTmsQA6bGpTDAuSwykI5HCA9K6EcTiCHIx3K4QJyOE0hHMYN3FA7eBRcdzFw1/9nYNLeyOxWBhThBarj0YVz+YBcXkUYN3KDiDYA+l459gABVhALaAAA) format('woff'); font-weight: bold; font-style: normal; } </style> <div id="App"></div> <script>window.stats = {"errors":[],"warnings":[],"version":"4.32.2","hash":"c9caef98ff5e6c81dda8","publicPath":"","outputPath":"/Users/satyam/learn/github/idle-tabs/lib","assetsByChunkName":{"main":"idleTabs.js"},"assets":[{"name":"idleTabs.js","size":4580,"chunks":[0],"chunkNames":["main"],"emitted":false}],"filteredAssets":0,"entrypoints":{"main":{"chunks":[0],"assets":["idleTabs.js"],"children":{},"childAssets":{}}},"namedChunkGroups":{"main":{"chunks":[0],"assets":["idleTabs.js"],"children":{},"childAssets":{}}},"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"size":6449,"names":["main"],"files":["idleTabs.js"],"hash":"d92249411d19013531b7","siblings":[],"parents":[],"children":[],"childrenByOrder":{},"modules":[{"id":0,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js f864c18cbd70badd0268f93fd1f5d03e","name":"./index.js + 2 modules","index":0,"index2":2,"size":6449,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"single entry","userRequest":"./index.js","loc":"main"}],"usedExports":true,"providedExports":["idleTabs","default","IdleClass"],"optimizationBailout":[],"depth":0,"modules":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js","index":0,"index2":2,"size":281,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"single entry","userRequest":"./index.js","loc":"main"}],"usedExports":true,"providedExports":["idleTabs","default","IdleClass"],"optimizationBailout":["ModuleConcatenation bailout: Module is an entry point"],"depth":0,"source":"import IdleClass from './IdleTabs';\n\nlet idleInstance;\nconst idleTabs = (config, $win, $doc) => {\n if (!(idleInstance instanceof IdleClass)) {\n idleInstance = new IdleClass(config, $win, $doc);\n }\n return idleInstance;\n}\n\n\nexport { idleTabs, idleTabs as default, IdleClass };"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","name":"./IdleTabs.js","index":1,"index2":1,"size":4986,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":"/Users/satyam/learn/github/idle-tabs/src/index.js","issuerId":null,"issuerName":"./index.js","issuerPath":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony side effect evaluation","userRequest":"./IdleTabs","loc":"1:0-35"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony import specifier","userRequest":"./IdleTabs","loc":"5:32-41"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony import specifier","userRequest":"./IdleTabs","loc":"6:23-32"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony export imported specifier","userRequest":"./IdleTabs","loc":"12:0-52"}],"usedExports":["default"],"providedExports":["default"],"optimizationBailout":[],"depth":1,"source":"'use strict'\n\nimport store from './store';\n\nconst addEventListeners = (object, events, callback) => {\n events.forEach((event) => {\n object.addEventListener(event, callback)\n })\n}\n\nconst removeEventListeners = (object, events, callback) => {\n events.forEach((event) => {\n object.removeEventListener(event, callback)\n })\n}\n\nclass IdleTabs {\n constructor(options, $window, $document) {\n this.$document = $document;\n this.$window = $window;\n this.defaults = {\n idleTime: 20, // idle time in minutes\n events: ['mousemove', 'keydown', 'mousedown', 'touchstart'], // events that will trigger the idle resetter\n onIdle: () => { }, // callback function to be executed after idle time\n onActive: () => { }, // callback function to be executed after back form idleness\n onAlive: () => { }, // callback function to be executed after back form idleness\n onHide: () => { }, // callback function to be executed when this.$window become hidden\n onShow: () => { }, // callback function to be executed when this.$window become visible\n keepTracking: true, // set it to false of you want to track only once\n keepAlive: true,\n startAtIdle: false, // set it to true if you want to start in the idle state\n recurIdleCall: false,\n storePrefix: 'idleTabs', // string sufix to localstorage key\n }\n this.config = { ...this.defaults, ...options }\n this.config.idle = this.config.idleTime * 60 * 1000; // convert into ms\n this.config.keepAliveTime = (this.config.idleTime - 1) * 60 * 1000; // convert into ms\n this.idle = this.config.startAtIdle\n this.visible = !this.config.startAtIdle\n this.visibilityEvents = ['visibilitychange', 'webkitvisibilitychange', 'mozvisibilitychange', 'msvisibilitychange']\n this.lastId = null;\n this.aliveId = null;\n this.store = store;\n this.storeKey = `${this.config.storePrefix}`;\n }\n\n notify(msg) {\n if (this.config.debug) {\n console.log(this.config.storePrefix, 'IdleTabs: ', Date().slice(16, 25), this.config.idle / (1000 * 60), msg);\n }\n }\n\n isExpired() {\n const now = Date.now();\n const lastActive = this.store.get(this.storeKey);\n const timeleft = lastActive + this.config.idle;\n const diff = timeleft - now;\n const isTimeout = diff &lt; 0;\n return isTimeout;\n }\n\n getIdleTime(duration) {\n const now = Date.now();\n const lastActive = store.get(this.storeKey) || now;\n const remainingTime = (duration - (now - parseInt(lastActive)));\n return remainingTime;\n }\n\n resetTimeout(id, config) {\n let now = Date.now();\n this.store.set(this.storeKey, now);\n if (this.idle) {\n config.onActive.call()\n this.notify('active')\n this.idle = false\n }\n clearTimeout(id)\n if (this.config.keepTracking) {\n return this.timeout(this.config)\n }\n }\n\n check() {\n if (this.idle) {\n return;\n }\n const isTimeout = this.isExpired();\n if (isTimeout) {\n this.idle = true\n this.config.onIdle.call();\n this.notify('ideal');\n } else {\n clearTimeout(this.lastId);\n this.lastId = this.timeout();\n }\n }\n\n timeout() {\n var timer = (this.config.recurIdleCall) ? setInterval : setTimeout\n var id;\n timer.bind(this);\n id = timer(() => {\n this.check()\n }, this.getIdleTime(this.config.idle))\n return id\n }\n\n keepAlive(id) {\n if (this.config.keepAlive) {\n if (this.idle) {\n clearTimeout(id);\n } else {\n this.aliveId = setTimeout(() => {\n this.config.onAlive.call();\n this.notify('alive');\n this.keepAlive(this.aliveId);\n }, this.config.keepAliveTime)\n }\n }\n }\n\n reset() {\n this.keepAlive();\n this.lastId = this.resetTimeout(this.lastId, this.config)\n this.notify('Reset')\n }\n\n stop() {\n const timer = (this.config.recurIdleCall) ? clearInterval : clearTimeout\n removeEventListeners(this.$window, this.config.events, () => { });\n removeEventListeners(this.$document, this.visibilityEvents, () => { });\n timer(this.lastId);\n clearTimeout(this.aliveId);\n this.notify('Stoped');\n }\n\n start() {\n this.keepAlive();\n this.notify(\"initialized\");\n this.lastId = this.timeout(this.config)\n addEventListeners(this.$window, this.config.events, () => {\n this.lastId = this.resetTimeout(this.lastId, this.config)\n })\n if (this.config.onShow || this.config.onHide) {\n addEventListeners(this.$document, this.visibilityEvents, () => {\n if (this.$document.hidden || this.$document.webkitHidden || this.$document.mozHidden || this.$document.msHidden) {\n if (this.visible) {\n this.visible = false\n this.config.onHide.call()\n this.notify('hidden')\n }\n } else {\n if (!this.visible) {\n this.visible = true\n this.config.onShow.call()\n this.notify('visible')\n }\n }\n })\n }\n }\n}\n\nexport default IdleTabs\n"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/store.js","name":"./store.js","index":2,"index2":0,"size":1182,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","issuerId":null,"issuerName":"./IdleTabs.js","issuerPath":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","name":"./IdleTabs.js"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony side effect evaluation","userRequest":"./store","loc":"3:0-28"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony import specifier","userRequest":"./store","loc":"43:17-22"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony import specifier","userRequest":"./store","loc":"64:23-28"}],"usedExports":["default"],"providedExports":["default"],"optimizationBailout":[],"depth":2,"source":"\n const idleStorageAccessor = {\n get: () => window.localStorage\n }\n\n function AlternativeStorage() {\n var storageMap = {};\n\n this.setItem = function (key, value) {\n storageMap[key] = value;\n };\n\n this.getItem = function (key) {\n if (typeof storageMap[key] !== 'undefined') {\n return storageMap[key];\n }\n return null;\n };\n\n this.removeItem = function (key) {\n storageMap[key] = undefined;\n };\n }\n\n function getStorage() {\n try {\n var s = idleStorageAccessor.get();\n s.setItem('idleStorage', '');\n s.removeItem('idleStorage');\n\n return s;\n } catch (err) {\n return new AlternativeStorage();\n }\n }\n\n var storage = getStorage();\n\n const store = {\n set: function (key, value) {\n storage.setItem('idle.' + key, JSON.stringify(value));\n },\n get: function (key) {\n return JSON.parse(storage.getItem('idle.' + key));\n },\n remove: function (key) {\n storage.removeItem('idle.' + key);\n },\n _wrapped: function () {\n return storage;\n }\n };\n\n export default store;\n"}],"filteredModules":0}],"filteredModules":0,"origins":[{"module":"","moduleIdentifier":"","moduleName":"","loc":"main","request":"./index.js","reasons":[]}]}],"modules":[{"id":0,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js f864c18cbd70badd0268f93fd1f5d03e","name":"./index.js + 2 modules","index":0,"index2":2,"size":6449,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"single entry","userRequest":"./index.js","loc":"main"}],"usedExports":true,"providedExports":["idleTabs","default","IdleClass"],"optimizationBailout":[],"depth":0,"modules":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js","index":0,"index2":2,"size":281,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"single entry","userRequest":"./index.js","loc":"main"}],"usedExports":true,"providedExports":["idleTabs","default","IdleClass"],"optimizationBailout":["ModuleConcatenation bailout: Module is an entry point"],"depth":0,"source":"import IdleClass from './IdleTabs';\n\nlet idleInstance;\nconst idleTabs = (config, $win, $doc) => {\n if (!(idleInstance instanceof IdleClass)) {\n idleInstance = new IdleClass(config, $win, $doc);\n }\n return idleInstance;\n}\n\n\nexport { idleTabs, idleTabs as default, IdleClass };"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","name":"./IdleTabs.js","index":1,"index2":1,"size":4986,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":"/Users/satyam/learn/github/idle-tabs/src/index.js","issuerId":null,"issuerName":"./index.js","issuerPath":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony side effect evaluation","userRequest":"./IdleTabs","loc":"1:0-35"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony import specifier","userRequest":"./IdleTabs","loc":"5:32-41"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony import specifier","userRequest":"./IdleTabs","loc":"6:23-32"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","module":"./index.js","moduleName":"./index.js","type":"harmony export imported specifier","userRequest":"./IdleTabs","loc":"12:0-52"}],"usedExports":["default"],"providedExports":["default"],"optimizationBailout":[],"depth":1,"source":"'use strict'\n\nimport store from './store';\n\nconst addEventListeners = (object, events, callback) => {\n events.forEach((event) => {\n object.addEventListener(event, callback)\n })\n}\n\nconst removeEventListeners = (object, events, callback) => {\n events.forEach((event) => {\n object.removeEventListener(event, callback)\n })\n}\n\nclass IdleTabs {\n constructor(options, $window, $document) {\n this.$document = $document;\n this.$window = $window;\n this.defaults = {\n idleTime: 20, // idle time in minutes\n events: ['mousemove', 'keydown', 'mousedown', 'touchstart'], // events that will trigger the idle resetter\n onIdle: () => { }, // callback function to be executed after idle time\n onActive: () => { }, // callback function to be executed after back form idleness\n onAlive: () => { }, // callback function to be executed after back form idleness\n onHide: () => { }, // callback function to be executed when this.$window become hidden\n onShow: () => { }, // callback function to be executed when this.$window become visible\n keepTracking: true, // set it to false of you want to track only once\n keepAlive: true,\n startAtIdle: false, // set it to true if you want to start in the idle state\n recurIdleCall: false,\n storePrefix: 'idleTabs', // string sufix to localstorage key\n }\n this.config = { ...this.defaults, ...options }\n this.config.idle = this.config.idleTime * 60 * 1000; // convert into ms\n this.config.keepAliveTime = (this.config.idleTime - 1) * 60 * 1000; // convert into ms\n this.idle = this.config.startAtIdle\n this.visible = !this.config.startAtIdle\n this.visibilityEvents = ['visibilitychange', 'webkitvisibilitychange', 'mozvisibilitychange', 'msvisibilitychange']\n this.lastId = null;\n this.aliveId = null;\n this.store = store;\n this.storeKey = `${this.config.storePrefix}`;\n }\n\n notify(msg) {\n if (this.config.debug) {\n console.log(this.config.storePrefix, 'IdleTabs: ', Date().slice(16, 25), this.config.idle / (1000 * 60), msg);\n }\n }\n\n isExpired() {\n const now = Date.now();\n const lastActive = this.store.get(this.storeKey);\n const timeleft = lastActive + this.config.idle;\n const diff = timeleft - now;\n const isTimeout = diff &lt; 0;\n return isTimeout;\n }\n\n getIdleTime(duration) {\n const now = Date.now();\n const lastActive = store.get(this.storeKey) || now;\n const remainingTime = (duration - (now - parseInt(lastActive)));\n return remainingTime;\n }\n\n resetTimeout(id, config) {\n let now = Date.now();\n this.store.set(this.storeKey, now);\n if (this.idle) {\n config.onActive.call()\n this.notify('active')\n this.idle = false\n }\n clearTimeout(id)\n if (this.config.keepTracking) {\n return this.timeout(this.config)\n }\n }\n\n check() {\n if (this.idle) {\n return;\n }\n const isTimeout = this.isExpired();\n if (isTimeout) {\n this.idle = true\n this.config.onIdle.call();\n this.notify('ideal');\n } else {\n clearTimeout(this.lastId);\n this.lastId = this.timeout();\n }\n }\n\n timeout() {\n var timer = (this.config.recurIdleCall) ? setInterval : setTimeout\n var id;\n timer.bind(this);\n id = timer(() => {\n this.check()\n }, this.getIdleTime(this.config.idle))\n return id\n }\n\n keepAlive(id) {\n if (this.config.keepAlive) {\n if (this.idle) {\n clearTimeout(id);\n } else {\n this.aliveId = setTimeout(() => {\n this.config.onAlive.call();\n this.notify('alive');\n this.keepAlive(this.aliveId);\n }, this.config.keepAliveTime)\n }\n }\n }\n\n reset() {\n this.keepAlive();\n this.lastId = this.resetTimeout(this.lastId, this.config)\n this.notify('Reset')\n }\n\n stop() {\n const timer = (this.config.recurIdleCall) ? clearInterval : clearTimeout\n removeEventListeners(this.$window, this.config.events, () => { });\n removeEventListeners(this.$document, this.visibilityEvents, () => { });\n timer(this.lastId);\n clearTimeout(this.aliveId);\n this.notify('Stoped');\n }\n\n start() {\n this.keepAlive();\n this.notify(\"initialized\");\n this.lastId = this.timeout(this.config)\n addEventListeners(this.$window, this.config.events, () => {\n this.lastId = this.resetTimeout(this.lastId, this.config)\n })\n if (this.config.onShow || this.config.onHide) {\n addEventListeners(this.$document, this.visibilityEvents, () => {\n if (this.$document.hidden || this.$document.webkitHidden || this.$document.mozHidden || this.$document.msHidden) {\n if (this.visible) {\n this.visible = false\n this.config.onHide.call()\n this.notify('hidden')\n }\n } else {\n if (!this.visible) {\n this.visible = true\n this.config.onShow.call()\n this.notify('visible')\n }\n }\n })\n }\n }\n}\n\nexport default IdleTabs\n"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/store.js","name":"./store.js","index":2,"index2":0,"size":1182,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[],"issuer":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","issuerId":null,"issuerName":"./IdleTabs.js","issuerPath":[{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/index.js","name":"./index.js"},{"id":null,"identifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","name":"./IdleTabs.js"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony side effect evaluation","userRequest":"./store","loc":"3:0-28"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony import specifier","userRequest":"./store","loc":"43:17-22"},{"moduleId":null,"moduleIdentifier":"/Users/satyam/learn/github/idle-tabs/src/IdleTabs.js","module":"./IdleTabs.js","moduleName":"./IdleTabs.js","type":"harmony import specifier","userRequest":"./store","loc":"64:23-28"}],"usedExports":["default"],"providedExports":["default"],"optimizationBailout":[],"depth":2,"source":"\n const idleStorageAccessor = {\n get: () => window.localStorage\n }\n\n function AlternativeStorage() {\n var storageMap = {};\n\n this.setItem = function (key, value) {\n storageMap[key] = value;\n };\n\n this.getItem = function (key) {\n if (typeof storageMap[key] !== 'undefined') {\n return storageMap[key];\n }\n return null;\n };\n\n this.removeItem = function (key) {\n storageMap[key] = undefined;\n };\n }\n\n function getStorage() {\n try {\n var s = idleStorageAccessor.get();\n s.setItem('idleStorage', '');\n s.removeItem('idleStorage');\n\n return s;\n } catch (err) {\n return new AlternativeStorage();\n }\n }\n\n var storage = getStorage();\n\n const store = {\n set: function (key, value) {\n storage.setItem('idle.' + key, JSON.stringify(value));\n },\n get: function (key) {\n return JSON.parse(storage.getItem('idle.' + key));\n },\n remove: function (key) {\n storage.removeItem('idle.' + key);\n },\n _wrapped: function () {\n return storage;\n }\n };\n\n export default store;\n"}],"filteredModules":0}],"filteredModules":0,"children":[]};</script> <script>!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(1),i=r(o),a=n(153),u=r(a),l=n(154),s=r(l);u.default.render(i.default.createElement(s.default,{stats:window.stats}),document.getElementById("App"))},function(t,e,n){"use strict";t.exports=n(2)},function(t,e,n){"use strict";var r=n(3),o=n(143),i=n(147),a=n(38),u=n(152),l={};a(l,i),a(l,{findDOMNode:u("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:u("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:u("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:u("renderToString","ReactDOMServer","react-dom/server",o,o.renderToString),renderToStaticMarkup:u("renderToStaticMarkup","ReactDOMServer","react-dom/server",o,o.renderToStaticMarkup)}),l.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,l.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o,t.exports=l},function(t,e,n){"use strict";var r=n(4),o=n(5),i=n(70),a=n(44),u=n(27),l=n(17),s=n(49),c=n(53),f=n(141),p=n(90),h=n(142);n(24);i.inject();var d=l.measure("React","render",u.render),v={findDOMNode:p,render:d,unmountComponentAtNode:u.unmountComponentAtNode,version:f,unstable_batchedUpdates:c.batchedUpdates,unstable_renderSubtreeIntoContainer:h};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:a,Mount:u,Reconciler:s,TextComponent:o});t.exports=v},function(t,e){"use strict";var n={current:null};t.exports=n},function(t,e,n){"use strict";var r=n(6),o=n(21),i=n(25),a=n(27),u=n(38),l=n(20),s=n(19),c=(n(69),function(t){});u(c.prototype,{construct:function(t){this._currentElement=t,this._stringText=""+t,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(t,e,n){if(this._rootNodeID=t,e.useCreateElement){var r=n[a.ownerDocumentContextKey],i=r.createElement("span");return o.setAttributeForID(i,t),a.getID(i),s(i,this._stringText),i}var u=l(this._stringText);return e.renderToStaticMarkup?u:"<span "+o.createMarkupForID(t)+">"+u+"</span>"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=a.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){i.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=c},function(t,e,n){"use strict";function r(t,e,n){var r=n>=t.childNodes.length?null:t.childNodes.item(n);t.insertBefore(e,r)}var o=n(7),i=n(15),a=n(17),u=n(18),l=n(19),s=n(12),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(t,e){for(var n,a=null,c=null,f=0;f<t.length;f++)if(n=t[f],n.type===i.MOVE_EXISTING||n.type===i.REMOVE_NODE){var p=n.fromIndex,h=n.parentNode.childNodes[p],d=n.parentID;h?void 0:s(!1),a=a||{},a[d]=a[d]||[],a[d][p]=h,c=c||[],c.push(h)}var v;if(v=e.length&&"string"==typeof e[0]?o.dangerouslyRenderMarkup(e):e,c)for(var g=0;g<c.length;g++)c[g].parentNode.removeChild(c[g]);for(var m=0;m<t.length;m++)switch(n=t[m],n.type){case i.INSERT_MARKUP:r(n.parentNode,v[n.markupIndex],n.toIndex);break;case i.MOVE_EXISTING:r(n.parentNode,a[n.parentID][n.fromIndex],n.toIndex);break;case i.SET_MARKUP:u(n.parentNode,n.content);break;case i.TEXT_CONTENT:l(n.parentNode,n.content);break;case i.REMOVE_NODE:}}};a.measureMethods(c,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),t.exports=c},function(t,e,n){"use strict";function r(t){return t.substring(1,t.indexOf(" "))}var o=n(8),i=n(9),a=n(14),u=n(13),l=n(12),s=/^(<[^ \/>]+)/,c="data-danger-index",f={dangerouslyRenderMarkup:function(t){o.canUseDOM?void 0:l(!1);for(var e,n={},f=0;f<t.length;f++)t[f]?void 0:l(!1),e=r(t[f]),e=u(e)?e:"*",n[e]=n[e]||[],n[e][f]=t[f];var p=[],h=0;for(e in n)if(n.hasOwnProperty(e)){var d,v=n[e];for(d in v)if(v.hasOwnProperty(d)){var g=v[d];v[d]=g.replace(s,"$1 "+c+'="'+d+'" ')}for(var m=i(v.join(""),a),y=0;y<m.length;++y){var b=m[y];b.hasAttribute&&b.hasAttribute(c)&&(d=+b.getAttribute(c),b.removeAttribute(c),p.hasOwnProperty(d)?l(!1):void 0,p[d]=b,h+=1)}}return h!==p.length?l(!1):void 0,p.length!==t.length?l(!1):void 0,p},dangerouslyReplaceNodeWithMarkup:function(t,e){o.canUseDOM?void 0:l(!1),e?void 0:l(!1),"html"===t.tagName.toLowerCase()?l(!1):void 0;var n;n="string"==typeof e?i(e,a)[0]:e,t.parentNode.replaceChild(n,t)}};t.exports=f},function(t,e){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.match(c);return e&&e[1].toLowerCase()}function o(t,e){var n=s;s?void 0:l(!1);var o=r(t),i=o&&u(o);if(i){n.innerHTML=i[1]+t+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=t;var f=n.getElementsByTagName("script");f.length&&(e?void 0:l(!1),a(f).forEach(e));for(var p=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return p}var i=n(8),a=n(10),u=n(13),l=n(12),s=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function o(t){return r(t)?Array.isArray(t)?t.slice():i(t):[t]}var i=n(11);t.exports=o},function(t,e,n){"use strict";function r(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?o(!1):void 0,"number"!=typeof e?o(!1):void 0,0===e||e-1 in t?void 0:o(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}var o=n(12);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,u){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],c=0;l=new Error(e.replace(/%s/g,function(){return s[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}t.exports=r},function(t,e,n){"use strict";function r(t){return a?void 0:i(!1),p.hasOwnProperty(t)||(t="*"),u.hasOwnProperty(t)||("*"===t?a.innerHTML="<link />":a.innerHTML="<"+t+"></"+t+">",u[t]=!a.firstChild),u[t]?p[t]:null}var o=n(8),i=n(12),a=o.canUseDOM?document.createElement("div"):null,u={},l=[1,'<select multiple="true">',"</select>"],s=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],f=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:l,option:l,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:c,th:c},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(t){p[t]=f,u[t]=!0}),t.exports=r},function(t,e){"use strict";function n(t){return function(){return t}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";var r=n(16),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},function(t,e,n){"use strict";var r=n(12),o=function(t){var e,n={};t instanceof Object&&!Array.isArray(t)?void 0:r(!1);for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=o},function(t,e,n){"use strict";function r(t,e,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(t,e,n){},measure:function(t,e,n){return n},injection:{injectMeasure:function(t){o.storedMeasure=t}}};t.exports=o},function(t,e,n){"use strict";var r=n(8),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(t,e){t.innerHTML=e};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(t,e){MSApp.execUnsafeLocalFunction(function(){t.innerHTML=e})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(a=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),o.test(e)||"<"===e[0]&&i.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e})}t.exports=a},function(t,e,n){"use strict";var r=n(8),o=n(20),i=n(18),a=function(t,e){t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){i(t,o(e))})),t.exports=a},function(t,e){"use strict";function n(t){return o[t]}function r(t){return(""+t).replace(i,n)}var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;t.exports=r},function(t,e,n){"use strict";function r(t){return!!c.hasOwnProperty(t)||!s.hasOwnProperty(t)&&(l.test(t)?(c[t]=!0,!0):(s[t]=!0,!1))}function o(t,e){return null==e||t.hasBooleanValue&&!e||t.hasNumericValue&&isNaN(e)||t.hasPositiveNumericValue&&e<1||t.hasOverloadedBooleanValue&&e===!1}var i=n(22),a=n(17),u=n(23),l=(n(24),/^[a-zA-Z_][\w\.\-]*$/),s={},c={},f={createMarkupForID:function(t){return i.ID_ATTRIBUTE_NAME+"="+u(t)},setAttributeForID:function(t,e){t.setAttribute(i.ID_ATTRIBUTE_NAME,e)},createMarkupForProperty:function(t,e){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){if(o(n,e))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&e===!0?r+'=""':r+"="+u(e)}return i.isCustomAttribute(t)?null==e?"":t+"="+u(e):null},createMarkupForCustomAttribute:function(t,e){return r(t)&&null!=e?t+"="+u(e):""},setValueForProperty:function(t,e,n){var r=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(r){var a=r.mutationMethod;if(a)a(t,n);else if(o(r,n))this.deleteValueForProperty(t,e);else if(r.mustUseAttribute){var u=r.attributeName,l=r.attributeNamespace;l?t.setAttributeNS(l,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?t.setAttribute(u,""):t.setAttribute(u,""+n)}else{var s=r.propertyName;r.hasSideEffects&&""+t[s]==""+n||(t[s]=n)}}else i.isCustomAttribute(e)&&f.setValueForAttribute(t,e,n)},setValueForAttribute:function(t,e,n){r(e)&&(null==n?t.removeAttribute(e):t.setAttribute(e,""+n))},deleteValueForProperty:function(t,e){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){var r=n.mutationMethod;if(r)r(t,void 0);else if(n.mustUseAttribute)t.removeAttribute(n.attributeName);else{var o=n.propertyName,a=i.getDefaultValueForProperty(t.nodeName,o);n.hasSideEffects&&""+t[o]===a||(t[o]=a)}}else i.isCustomAttribute(e)&&t.removeAttribute(e)}};a.measureMethods(f,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=f},function(t,e,n){"use strict";function r(t,e){return(t&e)===e}var o=n(12),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(t){var e=i,n=t.Properties||{},a=t.DOMAttributeNamespaces||{},l=t.DOMAttributeNames||{},s=t.DOMPropertyNames||{},c=t.DOMMutationMethods||{};t.isCustomAttribute&&u._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var f in n){u.properties.hasOwnProperty(f)?o(!1):void 0;var p=f.toLowerCase(),h=n[f],d={attributeName:p,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseAttribute:r(h,e.MUST_USE_ATTRIBUTE),mustUseProperty:r(h,e.MUST_USE_PROPERTY),hasSideEffects:r(h,e.HAS_SIDE_EFFECTS),hasBooleanValue:r(h,e.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(d.mustUseAttribute&&d.mustUseProperty?o(!1):void 0,!d.mustUseProperty&&d.hasSideEffects?o(!1):void 0,d.hasBooleanValue+d.hasNumericValue+d.hasOverloadedBooleanValue<=1?void 0:o(!1),l.hasOwnProperty(f)){var v=l[f];d.attributeName=v}a.hasOwnProperty(f)&&(d.attributeNamespace=a[f]),s.hasOwnProperty(f)&&(d.propertyName=s[f]),c.hasOwnProperty(f)&&(d.mutationMethod=c[f]),u.properties[f]=d}}},a={},u={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<u._isCustomAttributeFunctions.length;e++){var n=u._isCustomAttributeFunctions[e];if(n(t))return!0}return!1},getDefaultValueForProperty:function(t,e){var n,r=a[t];return r||(a[t]=r={}),e in r||(n=document.createElement(t),r[e]=n[e]),r[e]},injection:i};t.exports=u},function(t,e,n){"use strict";function r(t){return'"'+o(t)+'"'}var o=n(20);t.exports=r},function(t,e,n){"use strict";var r=n(14),o=r;t.exports=o},function(t,e,n){"use strict";var r=n(26),o=n(27),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(t){o.purgeID(t)}};t.exports=i},function(t,e,n){"use strict";var r=n(6),o=n(21),i=n(27),a=n(17),u=n(12),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},s={updatePropertyByID:function(t,e,n){var r=i.getNode(t);l.hasOwnProperty(e)?u(!1):void 0,null!=n?o.setValueForProperty(r,e,n):o.deleteValueForProperty(r,e)},dangerouslyReplaceNodeWithMarkupByID:function(t,e){var n=i.getNode(t);r.dangerouslyReplaceNodeWithMarkup(n,e)},dangerouslyProcessChildrenUpdates:function(t,e){for(var n=0;n<t.length;n++)t[n].parentNode=i.getNode(t[n].parentID);r.processUpdates(t,e)}};a.measureMethods(s,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=s},function(t,e,n){"use strict";function r(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return t.length===e.length?-1:n}function o(t){return t?t.nodeType===V?t.documentElement:t.firstChild:null}function i(t){var e=o(t);return e&&Z.getID(e)}function a(t){var e=u(t);if(e)if(B.hasOwnProperty(e)){var n=B[e];n!==t&&(f(n,e)?L(!1):void 0,B[e]=t)}else B[e]=t;return e}function u(t){return t&&t.getAttribute&&t.getAttribute(F)||""}function l(t,e){var n=u(t);n!==e&&delete B[n],t.setAttribute(F,e),B[e]=t}function s(t){return B.hasOwnProperty(t)&&f(B[t],t)||(B[t]=Z.findReactNodeByID(t)),B[t]}function c(t){var e=N.get(t)._rootNodeID;return E.isNullComponentID(e)?null:(B.hasOwnProperty(e)&&f(B[e],e)||(B[e]=Z.findReactNodeByID(e)),B[e])}function f(t,e){if(t){u(t)!==e?L(!1):void 0;var n=Z.findReactContainerForID(e);if(n&&I(n,t))return!0}return!1}function p(t){delete B[t]}function h(t){var e=B[t];return!(!e||!f(e,t))&&void(G=e)}function d(t){G=null,w.traverseAncestors(t,h);var e=G;return G=null,e}function v(t,e,n,r,o,i){M.useCreateElement&&(i=T({},i),n.nodeType===V?i[W]=n:i[W]=n.ownerDocument);var a=D.mountComponent(t,e,r,i);t._renderedComponent._topLevelWrapper=t,Z._mountImageIntoNode(a,n,o,r)}function g(t,e,n,r,o){var i=R.ReactReconcileTransaction.getPooled(r);i.perform(v,null,t,e,n,i,r,o),R.ReactReconcileTransaction.release(i)}function m(t,e){for(D.unmountComponent(t),e.nodeType===V&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)}function y(t){var e=i(t);return!!e&&e!==w.getReactRootIDFromNodeID(e)}function b(t){for(;t&&t.parentNode!==t;t=t.parentNode)if(1===t.nodeType){var e=u(t);if(e){var n,r=w.getReactRootIDFromNodeID(e),o=t;do if(n=u(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===K[r])return t}}return null}var x=n(22),_=n(28),M=(n(4),n(40)),C=n(41),E=n(43),w=n(44),N=n(46),S=n(47),k=n(17),D=n(49),P=n(52),R=n(53),T=n(38),A=n(57),I=n(58),O=n(61),L=n(12),U=n(18),j=n(66),F=(n(69),n(24),x.ID_ATTRIBUTE_NAME),B={},q=1,V=9,z=11,W="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),H={},K={},Y=[],G=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var Z={TopLevelWrapper:X,_instancesByReactRootID:H,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,n,r){return Z.scrollMonitor(n,function(){P.enqueueElementInternal(t,e),r&&P.enqueueCallbackInternal(t,r)}),t},_registerComponent:function(t,e){!e||e.nodeType!==q&&e.nodeType!==V&&e.nodeType!==z?L(!1):void 0,_.ensureScrollValueMonitoring();var n=Z.registerContainer(e);return H[n]=t,n},_renderNewRootComponent:function(t,e,n,r){var o=O(t,null),i=Z._registerComponent(o,e);return R.batchedUpdates(g,o,i,e,n,r),o},renderSubtreeIntoContainer:function(t,e,n,r){return null==t||null==t._reactInternalInstance?L(!1):void 0,Z._renderSubtreeIntoContainer(t,e,n,r)},_renderSubtreeIntoContainer:function(t,e,n,r){C.isValidElement(e)?void 0:L(!1);var a=new C(X,null,null,null,null,null,e),l=H[i(n)];if(l){var s=l._currentElement,c=s.props;if(j(c,e)){var f=l._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return Z._updateRootComponent(l,a,n,p),f}Z.unmountComponentAtNode(n)}var h=o(n),d=h&&!!u(h),v=y(n),g=d&&!l&&!v,m=Z._renderNewRootComponent(a,n,g,null!=t?t._reactInternalInstance._processChildContext(t._reactInternalInstance._context):A)._renderedComponent.getPublicInstance();return r&&r.call(m),m},render:function(t,e,n){return Z._renderSubtreeIntoContainer(null,t,e,n)},registerContainer:function(t){var e=i(t);return e&&(e=w.getReactRootIDFromNodeID(e)),e||(e=w.createReactRootID()),K[e]=t,e},unmountComponentAtNode:function(t){!t||t.nodeType!==q&&t.nodeType!==V&&t.nodeType!==z?L(!1):void 0;var e=i(t),n=H[e];if(!n){var r=(y(t),u(t));r&&r===w.getReactRootIDFromNodeID(r);return!1}return R.batchedUpdates(m,n,t),delete H[e],delete K[e],!0},findReactContainerForID:function(t){var e=w.getReactRootIDFromNodeID(t),n=K[e];return n},findReactNod