/
react.min.js
22 lines (21 loc) · 39.8 KB
/
react.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
!function(e,t){function i(){this._events={},this._conf&&s.call(this,this._conf)}function s(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners&&(this._events.maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),this.wildcard&&(this.listenerTree={}))}function o(e){this._events={},this.newListener=!1,s.call(this,e)}function u(e,t,n,r){if(!n)return[];var i=[],s,o,a,f,l,c,h,p=t.length,d=t[r],v=t[r+1];if(r===p&&n._listeners){if(typeof n._listeners=="function")return e&&e.push(n._listeners),[n];for(s=0,o=n._listeners.length;s<o;s++)e&&e.push(n._listeners[s]);return[n]}if(d==="*"||d==="**"||n[d]){if(d==="*"){for(a in n)a!=="_listeners"&&n.hasOwnProperty(a)&&(i=i.concat(u(e,t,n[a],r+1)));return i}if(d==="**"){h=r+1===p||r+2===p&&v==="*",h&&n._listeners&&(i=i.concat(u(e,t,n,p)));for(a in n)a!=="_listeners"&&n.hasOwnProperty(a)&&(a==="*"||a==="**"?(n[a]._listeners&&!h&&(i=i.concat(u(e,t,n[a],p))),i=i.concat(u(e,t,n[a],r))):a===v?i=i.concat(u(e,t,n[a],r+2)):i=i.concat(u(e,t,n[a],r)));return i}i=i.concat(u(e,t,n[d],r+1))}f=n["*"],f&&u(e,t,f,r+1),l=n["**"];if(l)if(r<p){l._listeners&&u(e,t,l,p);for(a in l)a!=="_listeners"&&l.hasOwnProperty(a)&&(a===v?u(e,t,l[a],r+2):a===d?u(e,t,l[a],r+1):(c={},c[a]=l[a],u(e,t,{"**":c},r+1)))}else l._listeners?u(e,t,l,p):l["*"]&&l["*"]._listeners&&u(e,t,l["*"],p);return i}function a(e,t){e=typeof e=="string"?e.split(this.delimiter):e.slice();for(var i=0,s=e.length;i+1<s;i++)if(e[i]==="**"&&e[i+1]==="**")return;var o=this.listenerTree,u=e.shift();while(u){o[u]||(o[u]={}),o=o[u];if(e.length===0){if(!o._listeners)o._listeners=t;else if(typeof o._listeners=="function")o._listeners=[o._listeners,t];else if(n(o._listeners)){o._listeners.push(t);if(!o._listeners.warned){var a=r;typeof this._events.maxListeners!="undefined"&&(a=this._events.maxListeners),a>0&&o._listeners.length>a&&(o._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",o._listeners.length),console.trace())}}return!0}u=e.shift()}return!0}var n=Array.isArray?Array.isArray:function(t){return Object.prototype.toString.call(t)==="[object Array]"},r=10;o.prototype.delimiter=".",o.prototype.setMaxListeners=function(e){this._events||i.call(this),this._events.maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e},o.prototype.event="",o.prototype.once=function(e,t){return this.many(e,1,t),this},o.prototype.many=function(e,t,n){function i(){--t===0&&r.off(e,i),n.apply(this,arguments)}var r=this;if(typeof n!="function")throw new Error("many only accepts instances of Function");return i._origin=n,this.on(e,i),r},o.prototype.emit=function(){this._events||i.call(this);var e=arguments[0];if(e==="newListener"&&!this.newListener&&!this._events.newListener)return!1;if(this._all){var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];for(r=0,t=this._all.length;r<t;r++)this.event=e,this._all[r].apply(this,n)}if(e==="error"&&!this._all&&!this._events.error&&(!this.wildcard||!this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var s;if(this.wildcard){s=[];var o=typeof e=="string"?e.split(this.delimiter):e.slice();u.call(this,s,o,this.listenerTree,0)}else s=this._events[e];if(typeof s=="function"){this.event=e;if(arguments.length===1)s.call(this);else if(arguments.length>1)switch(arguments.length){case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];s.apply(this,n)}return!0}if(s){var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];var a=s.slice();for(var r=0,t=a.length;r<t;r++)this.event=e,a[r].apply(this,n);return a.length>0||this._all}return this._all},o.prototype.on=function(e,t){if(typeof e=="function")return this.onAny(e),this;if(typeof t!="function")throw new Error("on only accepts instances of Function");this._events||i.call(this),this.emit("newListener",e,t);if(this.wildcard)return a.call(this,e,t),this;if(!this._events[e])this._events[e]=t;else if(typeof this._events[e]=="function")this._events[e]=[this._events[e],t];else if(n(this._events[e])){this._events[e].push(t);if(!this._events[e].warned){var s=r;typeof this._events.maxListeners!="undefined"&&(s=this._events.maxListeners),s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}}return this},o.prototype.onAny=function(e){this._all||(this._all=[]);if(typeof e!="function")throw new Error("onAny only accepts instances of Function");return this._all.push(e),this},o.prototype.addListener=o.prototype.on,o.prototype.off=function(e,t){if(typeof t!="function")throw new Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){var s=typeof e=="string"?e.split(this.delimiter):e.slice();i=u.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var o=0;o<i.length;o++){var a=i[o];r=a._listeners;if(n(r)){var f=-1;for(var l=0,c=r.length;l<c;l++)if(r[l]===t||r[l].listener&&r[l].listener===t||r[l]._origin&&r[l]._origin===t){f=l;break}if(f<0)return this;this.wildcard?a._listeners.splice(f,1):this._events[e].splice(f,1),r.length===0&&(this.wildcard?delete a._listeners:delete this._events[e])}else if(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)this.wildcard?delete a._listeners:delete this._events[e]}return this},o.prototype.offAny=function(e){var t=0,n=0,r;if(e&&this._all&&this._all.length>0){r=this._all;for(t=0,n=r.length;t<n;t++)if(e===r[t])return r.splice(t,1),this}else this._all=[];return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(e){if(arguments.length===0)return!this._events||i.call(this),this;if(this.wildcard){var t=typeof e=="string"?e.split(this.delimiter):e.slice(),n=u.call(this,null,t,this.listenerTree,0);for(var r=0;r<n.length;r++){var s=n[r];s._listeners=null}}else{if(!this._events[e])return this;this._events[e]=null}return this},o.prototype.listeners=function(e){if(this.wildcard){var t=[],r=typeof e=="string"?e.split(this.delimiter):e.slice();return u.call(this,t,r,this.listenerTree,0),t}return this._events||i.call(this),this._events[e]||(this._events[e]=[]),n(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},o.prototype.listenersAny=function(){return this._all?this._all:[]},typeof define=="function"&&define.amd?define("eventemitter2",[],function(){return o}):e.EventEmitter2=o}(typeof process!="undefined"&&typeof process.title!="undefined"&&typeof exports!="undefined"?exports:window),define("react/eventemitter",["eventemitter2"],function(e){var t=e?e.EventEmitter2?e.EventEmitter2:e:EventEmitter2;return t}),define("util",["require","exports","module"],function(e,t,n){function s(e,t,n,r){var i={showHidden:t,seen:[],stylize:r?a:f};return l(i,e,typeof n=="undefined"?2:n)}function a(e,t){var n=u[t];return n?"["+o[n][0]+"m"+e+"["+o[n][1]+"m":e}function f(e,t){return e}function l(e,n,r){if(n&&typeof n.inspect=="function"&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n))return n.inspect(r);var i=c(e,n);if(i)return i;var s=Object.keys(n),o=e.showHidden?Object.getOwnPropertyNames(n):s;if(o.length===0){if(typeof n=="function"){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(g(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return e.stylize(Date.prototype.toString.call(n),"date");if(b(n))return h(n)}var a="",f=!1,l=["{","}"];m(n)&&(f=!0,l=["[","]"]);if(typeof n=="function"){var w=n.name?": "+n.name:"";a=" [Function"+w+"]"}g(n)&&(a=" "+RegExp.prototype.toString.call(n)),y(n)&&(a=" "+Date.prototype.toUTCString.call(n)),b(n)&&(a=" "+h(n));if(o.length!==0||!!f&&n.length!==0){if(r<0)return g(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var E;return f?E=p(e,n,r,s,o):E=o.map(function(t){return d(e,n,r,s,t,f)}),e.seen.pop(),v(E,a,l)}return l[0]+a+l[1]}function c(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}if(t===null)return e.stylize("null","null")}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){var s=[];for(var o=0,u=t.length;o<u;++o)Object.prototype.hasOwnProperty.call(t,String(o))?s.push(d(e,t,n,r,String(o),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(d(e,t,n,r,i,!0))}),s}function d(e,t,n,r,i,s){var o,u,a;a=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},a.get?a.set?u=e.stylize("[Getter/Setter]","special"):u=e.stylize("[Getter]","special"):a.set&&(u=e.stylize("[Setter]","special")),r.indexOf(i)<0&&(o="["+i+"]"),u||(e.seen.indexOf(a.value)<0?(n===null?u=l(e,a.value,null):u=l(e,a.value,n-1),u.indexOf("\n")>-1&&(s?u=u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):u="\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special"));if(typeof o=="undefined"){if(s&&i.match(/^\d+$/))return u;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+u}function v(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.length+1},0);return i>60?n[0]+(t===""?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function m(e){return Array.isArray(e)||typeof e=="object"&&w(e)==="[object Array]"}function g(e){return typeof e=="object"&&w(e)==="[object RegExp]"}function y(e){return typeof e=="object"&&w(e)==="[object Date]"}function b(e){return typeof e=="object"&&w(e)==="[object Error]"}function w(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}function x(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}var r=/%[sdj%]/g;t.format=function(e){if(typeof e!="string"){var t=[];for(var n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}var i=1,o=arguments,u=o.length,a=String(e).replace(r,function(e){if(e==="%%")return"%";if(i>=u)return e;switch(e){case"%s":return String(o[i++]);case"%d":return Number(o[i++]);case"%j":return JSON.stringify(o[i++]);default:return e}});for(var f=o[i];i<u;f=o[++i])f===null||typeof f!="object"?a+=" "+f:a+=" "+s(f);return a},t.print=function(){for(var e=0,t=arguments.length;e<t;++e)process.stdout.write(String(arguments[e]))},t.puts=function(){for(var e=0,t=arguments.length;e<t;++e)process.stdout.write(arguments[e]+"\n")},t.debug=function(e){process.stderr.write("DEBUG: "+e+"\n")};var i=t.error=function(e){for(var t=0,n=arguments.length;t<n;++t)process.stderr.write(arguments[t]+"\n")};t.inspect=s;var o={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u={special:"cyan",number:"yellow","boolean":"yellow","undefined":"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};t.isArray=m,t.isRegExp=g,t.isDate=y,t.isError=b;var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(e){t.puts(x()+" - "+e.toString())},t.pump=function(e,t,n){function i(e,t,i){n&&!r&&(n(e,t,i),r=!0)}var r=!1;e.addListener("data",function(n){t.write(n)===!1&&e.pause()}),t.addListener("drain",function(){e.resume()}),e.addListener("end",function(){t.end()}),e.addListener("close",function(){i()}),e.addListener("error",function(e){t.end(),i(e)}),t.addListener("error",function(t){e.destroy(),i(t)})},t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t._extend=function(e,t){if(!t)return e;var n=Object.keys(t),r=n.length;while(r--)e[n[r]]=t[n[r]];return e}}),define("react/error",["util"],function(e){function t(e){if(!Error.stackTraceLimit||Error.stackTraceLimit<e)Error.stackTraceLimit=e}function n(e){return e?e&&e.name?e.name:e:"undefined"}function r(t){if(!t.meta)return;var r=t.meta.vcon,i=t.meta.task,s="\n\n";return i&&i.f&&i.a&&(s+="Error occurs in Task function: "+n(i.f)+"("+i.a.join(",")+")\n\n"),r&&(s+="Variable Context: \n",s+=e.inspect(r),s+="\n\n"),i&&i.f&&(s+="Task Source:\n\n",s+=i.f.toString(),s+="\n\n"),s}function i(e,t){typeof e=="string"&&(e=new Error(e));var n=e.toString();return e.meta=t,e.toString=function(){return n+r(e)},e}return{ensureStackTraceLimitSet:t,augmentError:i}}),define("react/sprintf",["util"],function(e){var t=e.format;return t}),function(e,t){typeof exports=="object"?module.exports=t():typeof define=="function"&&define.amd?define("ensure-array",[],t):e.ensureArray=t()}(this,function(){function e(e,t,n){if(arguments.length===0)return[];if(arguments.length===1){if(e===undefined||e===null)return[];if(Array.isArray(e))return e}return Array.prototype.slice.call(arguments)}return e}),define("react/status",[],function(){var e={READY:"ready",RUNNING:"running",ERRORED:"errored",COMPLETE:"complete"};return e}),define("react/event-manager",["./eventemitter"],function(e){function i(){}var t={wildcard:!0,delimiter:".",maxListeners:30},n=/^ast.defined$/,r={AST_DEFINED:"ast.defined",FLOW_BEGIN:"flow.begin",TASK_BEGIN:"task.begin",TASK_COMPLETE:"task.complete",TASK_ERRORED:"task.errored",FLOW_COMPLETE:"flow.complete",FLOW_ERRORED:"flow.errored",EXEC_FLOW_START:"exec.flow.start",EXEC_INPUT_PREPROCESS:"exec.input.preprocess",EXEC_TASKS_PRECREATE:"exec.tasks.precreate",EXEC_OUTTASK_CREATE:"exec.outTask.create",EXEC_TASK_START:"exec.task.start",EXEC_TASK_COMPLETE:"exec.task.complete",EXEC_TASK_ERRORED:"exec.task.errored",EXEC_FLOW_COMPLETE:"exec.flow.complete",EXEC_FLOW_ERRORED:"exec.flow.errored"};return i.create=function(){return new i},i.TYPES=r,i.prototype.TYPES=r,i.prototype.isEnabled=function(){return!!(this.emitter||this.parent&&this.parent.isEnabled())},i.prototype.on=function(n,r){this.emitter||(this.emitter=new e(t)),n==="*"?this.emitter.onAny(r):this.emitter.on(n,r)},i.prototype.emit=function(e,t,r,i){if(e===undefined)throw new Error("event is undefined");this.emitter&&this.emitter.emit.apply(this.emitter,arguments),this.parent&&this.parent.isEnabled()&&this.parent.emit.apply(this.parent,arguments),n.test(e)&&typeof process!="undefined"&&process.emit&&process.emit.apply(process,arguments)},i.prototype.removeListener=function(e,t){this.emitter&&this.emitter.removeListener.apply(this.emitter,arguments)},i.prototype.removeAllListeners=function(e){this.emitter&&this.emitter.removeAllListeners.apply(this.emitter,arguments)},i.global=i.create(),i}),define("react/base-task",["ensure-array","./status","./event-manager"],function(e,t,n){function r(){}function i(e){return e.indexOf(".")!==-1}return r.prototype.getOutParams=function(){return e(this.out)},r.prototype.isComplete=function(){return this.status===t.COMPLETE},r.prototype.start=function(e){this.args=e,this.env.currentTask=this,this.env.flowEmitter.emit(n.TYPES.EXEC_TASK_START,this)},r.prototype.complete=function(e){this.status=t.COMPLETE,this.results=e,this.env.currentTask=this,this.env.flowEmitter.emit(n.TYPES.EXEC_TASK_COMPLETE,this)},r.prototype.functionExists=function(e){var t=this.f;if(!t)return!1;if(t instanceof Function)return!0;if(typeof t=="string"){var n=e.getVar(t);if(n&&n instanceof Function)return!0}return!1},r.prototype.areAllDepArgsDefined=function(e){return this.a.every(function(t){return e.getVar(t)!==undefined})},r.prototype.depTasksAreDone=function(e){return!this.after||!this.after.length||this.after.every(function(t){return e[t].isComplete()})},r.prototype.parentExists=function(e,t){if(!i(e))return!0;var n=e.split(".");n.pop();var r=n.reduce(function(e,t){return e===undefined||e===null?undefined:e[t]},t.values);return r!==undefined&&r!==null},r.prototype.outParentsExist=function(e){var t=this;return this.getOutParams().every(function(n){return n===null?!0:t.parentExists(n,e)})},r.prototype.isReady=function(e,t){return!this.status&&this.functionExists(e)&&this.areAllDepArgsDefined(e)&&this.depTasksAreDone(t)&&(!this.outParentsExist||this.outParentsExist(e))},r.prototype.isMethodCall=function(){return typeof this.f=="string"&&/^.*\..*$/.test(this.f)},r.prototype.getMethodObj=function(e){var t=this.f;if(!t)return undefined;var n=t.split(".");n.pop();if(!n.length)return undefined;var r=e.resolveNameArr(n);return r},r}),define("react/cb-task",["util","./sprintf","./base-task"],function(e,t,n){function r(n,r){return t("%s - %s",n,e.inspect(r))}function a(e){var t=this;Object.keys(e).forEach(function(n){t[n]=e[n]})}var i="cbTask requires f, a, out",s="cbTask requires f to be a function or string",o="cbTask requires a to be an array of string param names",u="cbTask requires out to be an array of string param names";return a.prototype=new n,a.prototype.constructor=a,a.validate=function(e){var t=[];if(!e.f||!e.a||!e.out)t.push(r(i,e));else{var n=typeof e.f;e.f instanceof Function||n==="string"||t.push(r(s,e)),(!Array.isArray(e.a)||!e.a.every(function(e){return typeof e=="string"}))&&t.push(r(o,e)),(!Array.isArray(e.out)||!e.out.every(function(e){return typeof e=="string"}))&&t.push(r(u,e))}return t},a.prototype.prepare=function(t,n,r){var i=this;this.cbFun=function(e,s,o,u){var a=Array.prototype.slice.call(arguments,1);if(e){t(i,e);return}n.saveResults(i.out,a),i.complete(a),r()}},a.prototype.exec=function(t,n,r){try{var i=this.a.map(function(e){return t.getVar(e)});this.start(i),i.push(this.cbFun);var s=this.f,o=t.getVar("this");this.isMethodCall()?(s=t.getVar(this.f),o=this.getMethodObj(t)):typeof s=="string"&&(s=t.getVar(s)),s.apply(o,i)}catch(u){n(this,u)}},a}),define("react/promise-task",["util","./sprintf","./base-task"],function(e,t,n){function r(n,r){return t("%s - %s",n,e.inspect(r))}function a(e){var t=this;Object.keys(e).forEach(function(n){t[n]=e[n]})}var i="promiseTask requires f, a, out",s="promiseTask requires f to be a function or string",o="promiseTask requires a to be an array of string param names",u="promiseTask requires out to be an array[1] of string param names";return a.prototype=new n,a.prototype.constructor=a,a.validate=function(e){var t=[];if(!e.f||!e.a||!e.out)t.push(r(i,e));else{var n=typeof e.f;e.f instanceof Function||n==="string"||t.push(r(s,e)),(!Array.isArray(e.a)||!e.a.every(function(e){return typeof e=="string"}))&&t.push(r(o,e)),Array.isArray(e.out)&&e.out.length<=1&&e.out.every(function(e){return typeof e=="string"})||t.push(r(u,e))}return t},a.prototype.prepare=function(t,n,r){var i=this;this.nextFn=function(e){var t=Array.prototype.slice.call(arguments);n.saveResults(i.out,t),i.complete(t),r()},this.failFn=function(e){t(i,e)}},a.prototype.exec=function(t,n,r){try{var i=this.a.map(function(e){return t.getVar(e)});this.start(i);var s=this.f,o=t.getVar("this");this.isMethodCall()?(s=t.getVar(this.f),o=this.getMethodObj(t)):typeof s=="string"&&(s=t.getVar(s));var u=s.apply(o,i);u&&typeof u.then=="function"?u.then(this.nextFn,this.failFn):this.nextFn(u)}catch(a){n(this,a)}},a}),define("react/ret-task",["util","./sprintf","./base-task"],function(e,t,n){function r(n,r){return t("%s - %s",n,e.inspect(r))}function a(e){var t=this;Object.keys(e).forEach(function(n){t[n]=e[n]})}var i="retTask requires f, a, out",s="retTask requires f to be a function or string",o="retTask requires a to be an array of string param names",u="retTask requires out to be an array with single string param name or []";return a.prototype=new n,a.prototype.constructor=a,a.validate=function(e){var t=[];if(!e.f||!e.a||!e.out)t.push(r(i,e));else{var n=typeof e.f;e.f instanceof Function||n==="string"||t.push(r(s,e)),(!Array.isArray(e.a)||!e.a.every(function(e){return typeof e=="string"}))&&t.push(r(o,e)),(!Array.isArray(e.out)||!(e.out.length===0||e.out.length===1&&typeof (e.out[0]==="string")))&&t.push(r(u,e))}return t},a.prototype.exec=function(t,n,r){try{var i=this.a.map(function(e){return t.getVar(e)});this.start(i);var s=this.f,o=t.getVar("this");this.isMethodCall()?(s=t.getVar(this.f),o=this.getMethodObj(t)):typeof s=="string"&&(s=t.getVar(s));var u=[s.apply(o,i)];t.saveResults(this.out,u),this.complete(u),r()}catch(a){n(this,a)}},a}),define("react/when-task",["util","./sprintf","./base-task"],function(e,t,n){function r(n,r){return t("%s - %s",n,e.inspect(r))}function u(e){var t=this;Object.keys(e).forEach(function(n){t[n]=e[n]})}var i="whenTask requires a, out",s="whenTask requires a to be an array[1] of string param names",o="whenTask requires out to be an array[1] of string param names";return u.prototype=new n,u.prototype.constructor=u,u.prototype.f=function(){},u.validate=function(e){var t=[];return!e.a||!e.out?t.push(r(i,e)):((!Array.isArray(e.a)||e.a.length!==1||!e.a.every(function(e){return typeof e=="string"}))&&t.push(r(s,e)),Array.isArray(e.out)&&e.out.length<=1&&e.out.every(function(e){return typeof e=="string"})||t.push(r(o,e))),t},u.prototype.prepare=function(t,n,r){var i=this;this.nextFn=function(e){var t=Array.prototype.slice.call(arguments);n.saveResults(i.out,t),i.complete(t),r()},this.failFn=function(e){t(i,e)}},u.prototype.exec=function(t,n,r){try{var i=this.a.map(function(e){return t.getVar(e)});this.start(i);var s=i[0];s&&typeof s.then=="function"?s.then(this.nextFn,this.failFn):this.nextFn(s)}catch(o){n(this,o)}},u}),define("react/finalcb-task",["./sprintf","util","./status","./event-manager"],function(e,t,n,r){function s(e){var t=e.taskDef;if(typeof e.cbFunc!="function")throw new Error("callback is not a function");var n=this;for(var r in t)n[r]=t[r];this.f=e.cbFunc,this.tasks=e.tasks,this.vCon=e.vCon,this.retValue=e.retValue,this.execOptions=e.execOptions,this.env=e.env}function o(n,r){return e("%s - %s",n,t.inspect(r))}var i="ast.outTask.a should be an array of string param names";return s.validate=function(e){var t=[];return(!Array.isArray(e.a)||!e.a.every(function(e){return typeof e=="string"}))&&t.push(o(i,e)),t},s.prototype.isReady=function(){return this.tasks.every(function(e){return e.status===n.COMPLETE})},s.prototype.exec=function(e){if(!this.f)return;if(e)this.env.error=e,this.env.flowEmitter.emit(r.TYPES.EXEC_FLOW_ERRORED,this.env),this.f.call(null,e);else{var t=this.vCon,n=this.a.map(function(e){return t.getVar(e)});n.unshift(null),this.env.results=n,this.env.flowEmitter.emit(r.TYPES.EXEC_FLOW_COMPLETE,this.env),this.f.apply(null,n)}this.f=null},s}),define("react/vcon",[],function(){function t(){}var e=":LAST_RESULTS";return t.prototype.getLastResults=function(){return this.getVar(e)},t.prototype.setLastResults=function(t){this.setVar(e,t)},t.prototype.getVar=function(e){var t=this.values;if(typeof e!="string")return e;e=e.trim();if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(/^-?[0-9]+$/.test(e))return parseInt(e,10);if(/^-?[0-9.]+$/.test(e))return parseFloat(e);var n=/^("|')([^\1]*)\1$/.exec(e);if(n)return n[2];var r=e.split("."),i=this.resolveNameArr(r);return i},t.prototype.resolveNameArr=function(e){var t=this.values,n=e.reduce(function(e,t){return e===undefined||e===null?undefined:e[t]},t);return n===undefined&&this.global!==undefined&&(n=e.reduce(function(e,t){return e===undefined||e===null?undefined:e[t]},this.global)),n},t.prototype.saveResults=function(e,t){var n=this;e.forEach(function(e,r){n.setVar(e,t[r]!==undefined?t[r]:null)}),this.setLastResults(t)},t.prototype.setVar=function(e,t){if(!e)return;var n=this.values,r=e.split("."),i=r.pop(),s=r.reduce(function(e,t){var n=e[t];if(n===undefined||n===null)n=e[t]={};return n},n);s[i]=t},t.create=function(e,n,r,i){var s={};i&&(s["this"]=i),r&&Object.keys(r).forEach(function(e){s[e]=r[e]});var o=new t;return o.values=e.reduce(function(e,t,r){var i=n[r];return i&&(e[i]=t!==undefined?t:null),e},s),typeof global=="object"?o.global=global:o.global=(new Function("return this"))(),o},t}),define("react/finalcb-first-task",["./sprintf","util","./status","./vcon","./event-manager"],function(e,t,n,r,i){function o(e){var t=e.taskDef;if(typeof e.cbFunc!="function")throw new Error("callback is not a function");var n=this;for(var r in t)n[r]=t[r];this.f=e.cbFunc,this.tasks=e.tasks,this.vCon=e.vCon,this.retValue=e.retValue,this.env=e.env}function u(n,r){return e("%s - %s",n,t.inspect(r))}var s="ast.outTask.a should be an array of string param names";return o.validate=function(e){var t=[];return(!Array.isArray(e.a)||!e.a.every(function(e){return typeof e=="string"}))&&t.push(u(s,e)),t},o.prototype.isReady=function(){var e=this.vCon.getLastResults();return e?e.some(function(e){return e!==undefined&&e!==null}):!1},o.prototype.exec=function(e){if(!this.f)return;if(e)this.env.error=e,this.env.flowEmitter.emit(i.TYPES.EXEC_FLOW_ERRORED,this.env),this.f.call(null,e);else{var t=this.vCon,n=this.a.map(function(e){return t.getVar(e)});n.unshift(null),this.env.results=n,this.env.flowEmitter.emit(i.TYPES.EXEC_FLOW_COMPLETE,this.env),this.f.apply(null,n)}this.f=null},o}),define("react/task",["util","./sprintf","ensure-array","./cb-task","./promise-task","./ret-task","./when-task","./finalcb-task","./finalcb-first-task","./status","./error","./vcon","./event-manager"],function(e,t,n,r,i,s,o,u,a,f,l,c,h){function v(){return Object.keys(p)}function g(){return Object.keys(m)}function S(n,r){return t("%s - %s",n,e.inspect(r))}function x(e){return e.type?e:(e.type="cb",e)}function T(e){e.type||(e.type=Object.keys(m)[0])}function N(e){if(!e.after)return;var t=n(e.after);t=t.map(function(e){return typeof e=="function"?e.name:e}),e.after=t}function C(e){if(!e||typeof e!="object")return[S(b,e)];x(e),N(e);var t=[];return t=t.concat(k(e)),t=t.concat(L(e)),t}function k(e){var t=[];return Object.keys(p).some(function(t){return e.type===t})||t.push(S(E,e)),t}function L(e){var t=[],n=p[e.type];return n&&(t=t.concat(n.validate(e))),t}function A(e){var t=[];T(e);var n=m[e.type];return t=t.concat(n.validate(e)),t}function O(e,n,r){function s(){}var i=[],o=e.map(function(e){return s}),u=c.create(o,e,r),a=n.map(D),f=a.filter(function(e){return e.type!=="when"});return f.forEach(function(e,n){if(!e.functionExists(u))if(!e.isMethodCall())i.push(t(y,e.f,n));else{var r=e.getMethodObj(u);r&&r!==s&&i.push(t(y,e.f,n))}}),i}function M(e){return typeof e=="function"?e.name:e?e:""}function _(e){var n=e.reduce(function(e,t){return t.name&&(e[t.name]=t),e},{});return e.forEach(function(e,r){if(!e.name){var i=M(e.f);i||(i=t(d,r));if(!i||n[i])i=t("%s_%s",i,r);e.name=i,n[i]=e}}),n}function D(e){var t=p[e.type];return new t(e)}function P(e,t,n,r,i,s){T(e);var o={taskDef:e,cbFunc:t,tasks:n,vCon:r,execOptions:i,env:s,TaskConstructor:m[e.type]};h.global.emit(h.TYPES.EXEC_OUTTASK_CREATE,o);var u=o.TaskConstructor;return new u(o)}function H(e,t){return function(r,i){r.status=f.ERRORED,r.error=i,t.env.currentTask=r,t.env.flowEmitter.emit(h.TYPES.EXEC_TASK_ERRORED,r);var s=l.augmentError(i,{task:r,vcon:e});t.exec(s)}}function B(e,t,n){return t.filter(function(t){return t.isReady(e,n)})}function j(e,t,n,r){e.forEach(function(e){e.status=f.READY}),e.forEach(function(e){e.exec(t,n,r)})}function F(e,n,r,i){var s=n.filter(function(e){return e.status===f.RUNNING||e.status===f.READY});if(!s.length){var o=n.filter(function(e){return!e.status}),u=o.map(function(e){return e.name}),a=t(w,u.join(", ")),l={env:i};r(l,new Error(a))}}function I(e,t,n,r,i,s){var o=B(e,t,n);o.length||F(e,t,r,s),j(o,e,r,i)}function q(e){return _(e),e.forEach(function(e,t,n){t!==0&&(e.after=[n[t-1].name])}),e}var p={cb:r,ret:s,promise:i,when:o},d="task_%s",m={finalcb:u,finalcbFirst:a},y="function: %s not found in locals or input params - task[%s]",b="task must be an object",w="no tasks running, flow will not complete, remaining tasks: %s",E="task.type should match one of "+Object.keys(p).join(", ");return{serializeTasks:q,TASK_TYPES:p,taskTypeKeys:v,OUT_TASK_TYPES:m,outTaskTypeKeys:g,setMissingType:x,validate:C,validateOutTask:A,validateLocalFunctions:O,nameTasks:_,create:D,createOutTask:P,createErrorHandler:H,findReadyAndExec:I}}),define("react/validate",["util","./sprintf","ensure-array","./task"],function(e,t,n,r){function h(n,r){return t("%s - %s",n,e.inspect(r))}function p(e){return c.test(e)}function d(e){if(!e||!e.inParams||!e.tasks||!e.outTask)return[i];var t=[];return t=t.concat(v(e.inParams)),t=t.concat(m(e.tasks)),t=t.concat(g(e.tasks)),t=t.concat(r.validateOutTask(e.outTask)),t=t.concat(y(e.locals)),t.length===0&&(e.outTask.type!=="finalcbFirst"&&(t=t.concat(w(e.tasks))),t=t.concat(r.validateLocalFunctions(e.inParams,e.tasks,e.locals)),t=t.concat(E(e))),t}function v(e){return!Array.isArray(e)||!e.every(function(e){return typeof e=="string"})?[s]:[]}function m(e){if(!Array.isArray(e))return[o];var t=[];return e.forEach(function(e){t=t.concat(r.validate(e))}),t}function g(e){if(!Array.isArray(e))return[];var n=[],r=e.filter(function(e){return e.name}),i=r.map(function(e){return e.name});return i.reduce(function(e,r){return e[r]?n.push(t("%s %s",u,r)):e[r]=!0,e},{}),n}function y(e){var t=[];return e===null&&t.push(a),t}function b(e){return n(e.out)}function w(e){var n=[];return e.reduce(function(e,r){return b(r).forEach(function(r){e[r]!==undefined?n.push(t("%s: %s",f,r)):e[r]=!0}),e},{}),n}function E(e){var n=[],r={};return e.locals&&(r=Object.keys(e.locals).reduce(function(e,t){return e[t]=!0,e},r)),e.inParams.reduce(function(e,t){return e[t]=!0,e},r),e.tasks.reduce(function(e,t){return t.out.reduce(function(e,t){return e[t]=!0,e},e)},r),e.tasks.reduce(function(e,n){return n.a.reduce(function(e,n){return!p(n)&&!r[n]&&e.push(t(l,n)),e},e)},n),e.outTask.a.reduce(function(e,n){return!p(n)&&!r[n]&&e.push(t(l,n)),e},n),n}var i="ast must be an object with inParams, tasks, and outTask",s="ast.inParams must be an array of strings",o="ast.tasks must be an array of tasks",u="ast.tasks that specify name need to be unique, duplicate:",a="ast.locals should not be null",f="multiple tasks output the same param, must be unique. param",l="missing or mispelled variable referenced in flow definition: %s",c=/^(true|false|this|null|\-?[0-9\.]+)$|'|"|\./i;return d}),define("react/input-parser",["./event-manager"],function(e){function r(e){return e&&e.reactExecOptions}function i(e){return r(e)}function s(e){return!r(e)}function o(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function u(e,t,r){var i={};return i.args=t.map(function(t){return e.shift()}),r===n.CALLBACK&&e.length&&(i.cb=e.shift()),i.extra=e,i}function a(n,r){var a={},f=n.filter(i);f.unshift(t),a.options=f.reduce(o,{});var l=n.filter(s),c=u(l,r.inParams,a.options.outputStyle);return a.args=c.args,a.cb=c.cb,c.outputStyle&&(a.options.outputStyle=c.outputStyle),c.extra&&(a.extraArgs=c.extra),e.global.emit(e.TYPES.EXEC_INPUT_PREPROCESS,a),a}var t={reactExecOptions:!0,outputStyle:"cb"},n={CALLBACK:"cb",NONE:"none"};return a.defaultExecOptions=t,a}),define("react/id",[],function(){function t(){return e+=1,e===Number.MAX_VALUE&&(e=0),e}var e=0;return{createUniqueId:t}}),define("react/core",["./eventemitter","./error","./validate","./task","./status","./vcon","./event-manager","./input-parser","./id","./sprintf"],function(e,t,n,r,i,s,o,u,a,f){function h(e){return Object.keys(l).reduce(function(e,t){return e[t]||(e[t]=l[t]),e},e)}function p(){return f("flow_%s",a.createUniqueId())}function d(){function f(t){Object.keys(t).forEach(function(e){i[e]=t[e]});var s=n(i);return s.length||(i.name||(i.name=p()),r.nameTasks(i.tasks)),Object.freeze&&(Object.keys(t).forEach(function(e){typeof t[e]=="object"&&Object.freeze(t[e])}),Object.freeze(t)),e.emit(o.TYPES.AST_DEFINED,i),s}function d(t,n,f,l){function E(){if(!b.f)return;if(b.isReady())return b.exec();r.findReadyAndExec(m,g,y,w,E,d)}var p=Array.prototype.slice.call(arguments),d={execId:a.createUniqueId(),args:p,ast:i,flowEmitter:e};d.name=i.name||d.execId,e.emit(o.TYPES.EXEC_FLOW_START,d);var v=u(p,i),m=s.create(v.args,i.inParams,i.locals,this);d.parsedInput=v,d.options=h(v.options),d.vCon=m,d.taskDefs=i.tasks.slice(),d.outTaskDef=Object.create(i.outTask),c.emit(o.TYPES.EXEC_TASKS_PRECREATE,d);var g=d.taskDefs.map(r.create),y=r.nameTasks(g),b=r.createOutTask(d.outTaskDef,v.cb,g,m,d.options,d),w=r.createErrorHandler(m,b);return g.forEach(function(t){t.id=a.createUniqueId(),t.env=d,t.prepare&&t.prepare(w,m,E,e)}),E(),b.retValue}if(arguments.length)throw new Error("react() takes no args, check API");t.ensureStackTraceLimitSet(l.stackTraceLimitMin);var e=o.create();e.parent=c;var i={name:undefined,inParams:[],tasks:[],outTask:{},locals:{}},v=d;return v.ast=i,v.setAndValidateAST=f,v.events=e,v}var l={stackTraceLimitMin:30},c=o.global;return d.options=l,d.events=c,d}),define("react/parse",["./sprintf"],function(e){function t(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e}):[]}function n(e,t){if(typeof e!="string")return e;var n=t.regex?t.regex.exec(e):e.split(t.splitStr);return n?t.fn(n,e):e}function r(t,r,i){var s=r.reduce(n,t);if(typeof s!="string")return s;throw new Error(e(i,t))}return{splitTrimFilterArgs:t,parseStr:r}}),define("react/dsl",["./sprintf","./core","./parse","./task"],function(e,t,n,r){function h(e){return e.length&&e[e.length-1].match(l)&&e.pop(),e}function p(e){return e.length&&e[0].match(c)&&e.shift(),e}function v(e){var t=n.parseStr(e,[d],s);return t.inDef=h(t.inDef),t}function m(t){var n=[],r,i,s;while(t.length>=2){i={},r=t.shift(),s=v(t.shift()),typeof t[0]=="object"&&(i=t.shift()),i.f=r,i.a=s.inDef;var o=s.type;i.out=s.outDef,i.type=o,n.push(i)}if(t.length)throw new Error(e(a,t[0]));return n}function g(e){var t=e.shift()||"",n=e.length&&typeof e[0]=="object"?e.shift():{},r=e,i={inOutParamStr:t,taskDefArr:r,options:n};return i}function y(n,r,s,o){var u=t();if(n&&f.test(n))throw new Error(e(i,n));var a=g(Array.prototype.slice.call(arguments,1)),l=v(a.inOutParamStr),c={name:n,inParams:l.inDef,tasks:m(a.taskDefArr),outTask:{a:l.outDef}};a.options&&Object.keys(a.options).forEach(function(e){c[e]=a.options[e]});var h=u.setAndValidateAST(c);if(h.length){var p=h.join("\n");throw new Error(p)}return u}function b(e,n,i,s){var o=t(),u=g(Array.prototype.slice.call(arguments,1)),a=v(u.inOutParamStr),f=r.serializeTasks(m(u.taskDefArr)),l={name:e,inParams:a.inDef,tasks:f,outTask:{type:"finalcbFirst",a:a.outDef}};u.options&&Object.keys(u.options).forEach(function(e){l[e]=u.options[e]});var c=o.setAndValidateAST(l);if(c.length){var h=c.join("\n");throw new Error(h)}return o}var i="first flow parameter should be the flow name, but found in/out def: %s",s='params in wrong format, wanted "foo, bar, cb -> err, baz" - found: %s',o='callback specified, but first out param was not "err", use for clarity. Found in/out def: %s',u="found err param, but cb/callback is not specified, is this cb-style async or sync function? Found in/out def: %s",a="extra unmatched task arg: %s",f=/\->/,l=/^cb|callback$/i,c=/^err$/i,d={splitStr:"->",fn:function(t,r){var i=n.splitTrimFilterArgs(t[0]),s=i[i.length-1],a=s&&l.test(s)?"cb":"ret",f=n.splitTrimFilterArgs(t[1]),d=f[0];if(a==="cb"&&(!d||!c.test(d)))throw new Error(e(o,r));if(a==="ret"&&d&&c.test(d))throw new Error(e(u,r));return{type:a,inDef:h(i),outDef:p(f)}}};return y.selectFirst=b,y}),define("react/track-tasks",[],function(){function t(t){if(e)return;e=!0,t.events.on(t.events.TYPES.EXEC_FLOW_START,function(e){e.startTime=Date.now(),e.flowEmitter.emit(t.events.TYPES.FLOW_BEGIN,e)}),t.events.on(t.events.TYPES.EXEC_TASK_START,function(e){e.startTime=Date.now(),e.env.flowEmitter.emit(t.events.TYPES.TASK_BEGIN,e)}),t.events.on(t.events.TYPES.EXEC_TASK_COMPLETE,function(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime,e.env.flowEmitter.emit(t.events.TYPES.TASK_COMPLETE,e)}),t.events.on(t.events.TYPES.EXEC_TASK_ERRORED,function(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime,e.env.flowEmitter.emit(t.events.TYPES.TASK_ERRORED,e)}),t.events.on(t.events.TYPES.EXEC_FLOW_COMPLETE,function(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime,e.flowEmitter.emit(t.events.TYPES.FLOW_COMPLETE,e)}),t.events.on(t.events.TYPES.EXEC_FLOW_ERRORED,function(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime,e.flowEmitter.emit(t.events.TYPES.FLOW_ERRORED,e)})}var e=!1;return t}),define("react/log-events",["util"],function(e){function s(t){var n=new Date;n.setTime(t.startTime);var r=t.args.filter(function(e){return typeof e!="function"}),i=n.toISOString();if(this.event==="flow.complete"){var s=t;console.error("%s: %s msecs: %s \n args: %s \n results: %s\n",this.event,s.name,s.elapsedTime,e.inspect(r),e.inspect(s.results))}else{var o=t.name,u=t.args;console.error("%s: %s \n args: %s\n",this.event,o,e.inspect(r))}}function o(t){var n=new Date;n.setTime(t.startTime);var r=t.args.filter(function(e){return typeof e!="function"}),i=n.toISOString();if(this.event==="task.complete"){var s=t;console.error("%s: %s:%s msecs: %s \n args: %s \n results: %s\n",this.event,s.env.name,s.name,s.elapsedTime,e.inspect(r),e.inspect(s.results))}else{var o=t.name,u=t.args;console.error("%s: %s:%s \n args: %s\n",this.event,t.env.name,t.name,e.inspect(r))}}function u(e,t){if(!e)throw new Error("flowFn is required");e.events._loggingEvents||(e.events._loggingEvents=[]);if(t===!1)e.events._loggingEvents.forEach(function(t){e.events.removeAllListeners(t)}),e.events._loggingEvents.length=0;else if(t&&t!=="*"){var u=i.test(t)?s:o;e.events.removeListener(t,u),e.events.on(t,u),e.events._loggingEvents.push(t)}else e.events.removeListener(n,s),e.events.on(n,s),e.events._loggingEvents.push(n),e.events.removeListener(r,o),e.events.on(r,o),e.events._loggingEvents.push(r)}var t={},n="flow.*",r="task.*",i=/^flow\./;return t.logEvents=u,t}),define("react/promise-resolve",[],function(){function n(n){if(t)return;t=!0,n.events.on(n.events.TYPES.EXEC_TASKS_PRECREATE,function(t){var n=t.vCon.values,r=t.ast.inParams.filter(function(e){var t=n[e];return t&&typeof t.then=="function"});r.forEach(function(r){var i=r+e;n[i]=n[r],n[r]=undefined,t.taskDefs.push({type:"when",a:[i],out:[r]})})})}var e="__promise",t=!1;return n}),define("react/event-collector",[],function(){function e(e){function i(){this.events=[]}e.trackTasks();var t=/^ast\./,n=/^task\./,r=/^flow\./;return i.prototype.capture=function(i,s){function a(e){var i={event:this.event,time:Date.now()};r.test(this.event)?i.env=e:n.test(this.event)?i.task=e:t.test(this.event)&&(i.ast=e),u.events.push(i)}!s&&typeof i=="string"?(s=i,i=e):i||(i=e),s||(s="*");var o=i.events,u=this;o.on(s,a)},i.prototype.list=function(){return this.events},i.prototype.clear=function(){this.events=[]},new i}return e}),define("react/react",["./core","./dsl","./track-tasks","./log-events","./promise-resolve","./event-collector"],function(e,t,n,r,i,s){function u(){i(o)}function a(){n(o)}function f(e,t){return typeof e!="function"&&(t=e,e=undefined),e||(e=o),a(),r.logEvents(e,t)}function l(){return s(o)}var o=t;return o.options=e.options,o.events=e.events,o.logEvents=f,o.resolvePromises=u,o.trackTasks=a,o.createEventCollector=l,o}),define("react",["react/react"],function(e){return e});