{"version":3,"sources":["webpack:///./node_modules/setimmediate/setImmediate.js"],"names":["global","setImmediate","registerImmediate","html","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","document","attachTo","Object","getPrototypeOf","setTimeout","toString","call","process","handle","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","event","data","port2","createElement","documentElement","script","onreadystatechange","removeChild","appendChild","Math","random","source","indexOf","slice","length","addEventListener","attachEvent","callback","Function","args","Array","arguments","i","task","clearImmediate","apply","run","self","this"],"mappings":"+EAAA,6BACI,aAEA,IAAIA,EAAOC,aAAX,CAIA,IAIIC,EA6HIC,EAZAC,EArBAC,EACAC,EAjGJC,EAAa,EACbC,EAAgB,GAChBC,GAAwB,EACxBC,EAAMV,EAAOW,SAoJbC,EAAWC,OAAOC,gBAAkBD,OAAOC,eAAed,GAC9DY,EAAWA,GAAYA,EAASG,WAAaH,EAAWZ,EAGf,qBAArC,GAAGgB,SAASC,KAAKjB,EAAOkB,SApFxBhB,EAAoB,SAASiB,GACzBD,EAAQE,UAAS,WAAcC,EAAaF,QAIpD,WAGI,GAAInB,EAAOsB,cAAgBtB,EAAOuB,cAAe,CAC7C,IAAIC,GAA4B,EAC5BC,EAAezB,EAAO0B,UAM1B,OALA1B,EAAO0B,UAAY,WACfF,GAA4B,GAEhCxB,EAAOsB,YAAY,GAAI,KACvBtB,EAAO0B,UAAYD,EACZD,GAwEJG,GAIA3B,EAAO4B,iBA9CVxB,EAAU,IAAIwB,gBACVC,MAAMH,UAAY,SAASI,GAE/BT,EADaS,EAAMC,OAIvB7B,EAAoB,SAASiB,GACzBf,EAAQ4B,MAAMV,YAAYH,KA2CvBT,GAAO,uBAAwBA,EAAIuB,cAAc,WAtCpD9B,EAAOO,EAAIwB,gBACfhC,EAAoB,SAASiB,GAGzB,IAAIgB,EAASzB,EAAIuB,cAAc,UAC/BE,EAAOC,mBAAqB,WACxBf,EAA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GAAIA,EAAK,GAAIA,EAAK,IAChC,MACJ,QACIF,EAASQ,WAnDrB,EAmDsCN,IAiBlBO,CAAIH,GACN,QACEC,EAAenC,GACfV,GAAwB,MAvE5C,CAyLkB,oBAATgD,UAAyC,IAAXzD,EAAyB0D,KAAO1D,EAASyD,Q","file":"npm.setimmediate.c920b4ddeb9b68365139.js","sourcesContent":["(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a