mirror of
https://github.com/gre/gl-react.git
synced 2026-01-18 16:16:59 +00:00
13 lines
355 KiB
JavaScript
13 lines
355 KiB
JavaScript
!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";var r=e("react"),o=e("./src");r.render(r.createElement(o,{width:400,height:700}),document.getElementById("container"))},{"./src":235,react:228}],2:[function(e,t,n){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e){return this instanceof o?(this.length=0,this.parent=void 0,"number"==typeof e?i(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):s(this,e)):arguments.length>1?new o(e,arguments[1]):new o(e)}function i(e,t){if(e=d(e,0>t?0:0|m(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function a(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(t,n);return e=d(e,r),e.write(t,n),e}function s(e,t){if(o.isBuffer(t))return l(e,t);if(Z(t))return u(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return c(e,t);if(t instanceof ArrayBuffer)return p(e,t)}return t.length?f(e,t):h(e,t)}function l(e,t){var n=0|m(t.length);return e=d(e,n),t.copy(e,0,0,n),e}function u(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function c(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){return o.TYPED_ARRAY_SUPPORT?(t.byteLength,e=o._augment(new Uint8Array(t))):e=c(e,new Uint8Array(t)),e}function f(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&Z(t.data)&&(n=t.data,r=0|m(n.length)),e=d(e,r);for(var o=0;r>o;o+=1)e[o]=255&n[o];return e}function d(e,t){o.TYPED_ARRAY_SUPPORT?e=o._augment(new Uint8Array(t)):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=o.poolSize>>>1;return n&&(e.parent=K),e}function m(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var n=new o(e,t);return delete n.parent,n}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return S(this,t,n);case"binary":return M(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;r>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+a]=s}return a}function b(e,t,n,r){return Y(z(t,e.length-n),e,n,r)}function x(e,t,n,r){return Y(H(t),e,n,r)}function E(e,t,n,r){return x(e,t,n,r)}function C(e,t,n,r){return Y(G(t),e,n,r)}function w(e,t,n,r){return Y(q(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?W.fromByteArray(e):W.fromByteArray(e.slice(t,n))}function R(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;n>o;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(n>=o+s){var l,u,c,p;switch(s){case 1:128>i&&(a=i);break;case 2:l=e[o+1],128===(192&l)&&(p=(31&i)<<6|63&l,p>127&&(a=p));break;case 3:l=e[o+1],u=e[o+2],128===(192&l)&&128===(192&u)&&(p=(15&i)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(a=p));break;case 4:l=e[o+1],u=e[o+2],c=e[o+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&i)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return D(r)}function D(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(127&e[o]);return r}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(e[o]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=t;n>i;i++)o+=V(e[i]);return o}function P(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function O(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function N(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);i>o;o++)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);i>o;o++)e[n+o]=t>>>8*(r?o:3-o)&255}function F(e,t,n,r,o,i){if(t>o||i>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function k(e,t,n,r,o){return o||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return o||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function j(e){if(e=B(e).replace($,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function B(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return 16>e?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=o-55296<<10|n-56320|65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function q(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);a++)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function G(e){return W.toByteArray(j(e))}function Y(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}var W=e("base64-js"),X=e("ieee754"),Z=e("is-array");n.Buffer=o,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var K={};o.TYPED_ARRAY_SUPPORT=function(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}(),o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);a>i&&e[i]===t[i];)++i;return i!==a&&(n=e[i],r=t[i]),r>n?-1:n>r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Z(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new o(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var r=new o(t),i=0;for(n=0;n<e.length;n++){var a=e[n];a.copy(r,i),i+=a.length}return r},o.byteLength=v,o.prototype.length=void 0,o.prototype.parent=void 0,o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?R(this,0,e):y.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:o.compare(this,e)},o.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,o=0;n+o<e.length;o++)if(e[n+o]===t[-1===r?0:o-r]){if(-1===r&&(r=o),o-r+1===t.length)return n+r}else r=-1;return-1}if(t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(o.isBuffer(e))return n(this,e,t);if("number"==typeof e)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=t,t=0|n,n=o}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(e,t));else{var i=t-e;r=new o(i,void 0);for(var a=0;i>a;a++)r[a]=this[a+e]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},o.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||O(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),X.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),X.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),X.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),X.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||A(this,e,t,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||A(this,e,t,n,Math.pow(2,8*n),0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):N(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):L(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):L(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);A(this,e,t,n,o-1,-o)}var i=0,a=1,s=0>e?1:0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=(e/a>>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);A(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):N(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||A(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):L(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&t>n&&r>t)for(i=a-1;i>=0;i--)e[i+t]=this[i+n];else if(1e3>a||!o.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var o=z(e.toString()),i=o.length;for(r=t;n>r;r++)this[r]=o[r%i]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var J=o.prototype;o._augment=function(e){return e.constructor=o,e._isBuffer=!0,e._set=e.set,e.get=J.get,e.set=J.set,e.write=J.write,e.toString=J.toString,e.toLocaleString=J.toString,e.toJSON=J.toJSON,e.equals=J.equals,e.compare=J.compare,e.indexOf=J.indexOf,e.copy=J.copy,e.slice=J.slice,e.readUIntLE=J.readUIntLE,e.readUIntBE=J.readUIntBE,e.readUInt8=J.readUInt8,e.readUInt16LE=J.readUInt16LE,e.readUInt16BE=J.readUInt16BE,e.readUInt32LE=J.readUInt32LE,e.readUInt32BE=J.readUInt32BE,e.readIntLE=J.readIntLE,e.readIntBE=J.readIntBE,e.readInt8=J.readInt8,e.readInt16LE=J.readInt16LE,e.readInt16BE=J.readInt16BE,e.readInt32LE=J.readInt32LE,e.readInt32BE=J.readInt32BE,e.readFloatLE=J.readFloatLE,e.readFloatBE=J.readFloatBE,e.readDoubleLE=J.readDoubleLE,e.readDoubleBE=J.readDoubleBE,e.writeUInt8=J.writeUInt8,e.writeUIntLE=J.writeUIntLE,e.writeUIntBE=J.writeUIntBE,e.writeUInt16LE=J.writeUInt16LE,e.writeUInt16BE=J.writeUInt16BE,e.writeUInt32LE=J.writeUInt32LE,e.writeUInt32BE=J.writeUInt32BE,e.writeIntLE=J.writeIntLE,e.writeIntBE=J.writeIntBE,e.writeInt8=J.writeInt8,e.writeInt16LE=J.writeInt16LE,e.writeInt16BE=J.writeInt16BE,e.writeInt32LE=J.writeInt32LE,e.writeInt32BE=J.writeInt32BE,e.writeFloatLE=J.writeFloatLE,e.writeFloatBE=J.writeFloatBE,e.writeDoubleLE=J.writeDoubleLE,e.writeDoubleBE=J.writeDoubleBE,e.fill=J.fill,e.inspect=J.inspect,e.toArrayBuffer=J.toArrayBuffer,e};var $=/[^+\/0-9A-Za-z-_]/g},{"base64-js":3,ieee754:4,"is-array":5}],3:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a||t===p?62:t===s||t===f?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var r,o,a,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new i(3*e.length/4-l),a=l>0?e.length-4:e.length;var p=0;for(r=0,o=0;a>r;r+=4,o+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function o(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var o,i,a,s=e.length%3,l="";for(o=0,a=e.length-s;a>o;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],l+=n(i);switch(s){case 1:i=e[e.length-1],l+=t(i>>2),l+=t(i<<4&63),l+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],l+=t(i>>10),l+=t(i>>4&63),l+=t(i<<2&63),l+="="}return l}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),f="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=o}("undefined"==typeof n?this.base64js={}:n)},{}],4:[function(e,t,n){n.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?o-1:0,f=n?-1:1,h=e[t+p];for(p+=f,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+p],p+=f,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+p],p+=f,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var a,s,l,u=8*i-o-1,c=(1<<u)-1,p=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,d=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+p>=1?f/l:f*Math.pow(2,1-p),t*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+h]=255&a,h+=d,a/=256,u-=8);e[n+h-d]|=128*m}},{}],5:[function(e,t,n){var r=Array.isArray,o=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==o.call(e)}},{}],6:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],s(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),l=1;r>l;l++)i[l-1]=arguments[l];n.apply(this,i)}else if(a(n)){for(r=arguments.length,i=new Array(r-1),l=1;r>l;l++)i[l-1]=arguments[l];for(u=n.slice(),r=u.length,l=0;r>l;l++)u[l].apply(this,i)}return!0},r.prototype.addListener=function(e,t){var n;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned){var n;n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(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),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,i,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=i;s-->0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],7:[function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):p=-1,u.length&&o()}function o(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++p<t;)s[p].run();p=-1,t=u.length}s=null,c=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,l=t.exports={},u=[],c=!1,p=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new i(e,t)),1!==u.length||c||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=a,l.addListener=a,l.once=a,l.off=a,l.removeListener=a,l.removeAllListeners=a,l.emit=a,l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],8:[function(e,t,n){"use strict";function r(e){var t=e.getParameter(e.FRAMEBUFFER_BINDING),n=e.getParameter(e.RENDERBUFFER_BINDING),r=e.getParameter(e.TEXTURE_BINDING_2D);return[t,n,r]}function o(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function i(e,t){var n=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);y=new Array(n+1);for(var r=0;n>=r;++r){for(var o=new Array(n),i=0;r>i;++i)o[i]=e.COLOR_ATTACHMENT0+i;for(var i=r;n>i;++i)o[i]=e.NONE;y[r]=o}}function a(e){switch(e){case d:throw new Error("gl-fbo: Framebuffer unsupported");case m:throw new Error("gl-fbo: Framebuffer incomplete attachment");case g:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case v:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function s(e,t,n,r,o,i){if(!r)return null;var a=h(e,t,n,o,r);return a.magFilter=e.NEAREST,a.minFilter=e.NEAREST,a.mipSamples=1,a.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,i,e.TEXTURE_2D,a.handle,0),a}function l(e,t,n,r,o){var i=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,i),e.renderbufferStorage(e.RENDERBUFFER,r,t,n),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,i),i}function u(e){var t=r(e.gl),n=e.gl,i=e.handle=n.createFramebuffer(),u=e._shape[0],c=e._shape[1],p=e.color.length,f=e._ext,h=e._useStencil,d=e._useDepth,m=e._colorType;n.bindFramebuffer(n.FRAMEBUFFER,i);for(var g=0;p>g;++g)e.color[g]=s(n,u,c,m,n.RGBA,n.COLOR_ATTACHMENT0+g);0===p?(e._color_rb=l(n,u,c,n.RGBA4,n.COLOR_ATTACHMENT0),f&&f.drawBuffersWEBGL(y[0])):p>1&&f.drawBuffersWEBGL(y[p]);var v=n.getExtension("WEBGL_depth_texture");v?h?e.depth=s(n,u,c,v.UNSIGNED_INT_24_8_WEBGL,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):d&&(e.depth=s(n,u,c,n.UNSIGNED_SHORT,n.DEPTH_COMPONENT,n.DEPTH_ATTACHMENT)):d&&h?e._depth_rb=l(n,u,c,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):d?e._depth_rb=l(n,u,c,n.DEPTH_COMPONENT16,n.DEPTH_ATTACHMENT):h&&(e._depth_rb=l(n,u,c,n.STENCIL_INDEX,n.STENCIL_ATTACHMENT));var _=n.checkFramebufferStatus(n.FRAMEBUFFER);if(_!==n.FRAMEBUFFER_COMPLETE){e._destroyed=!0,n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(n.deleteRenderbuffer(e._depth_rb),e._depth_rb=null);for(var g=0;g<e.color.length;++g)e.color[g].dispose(),e.color[g]=null;e._color_rb&&(n.deleteRenderbuffer(e._color_rb),e._color_rb=null),o(n,t),a(_)}o(n,t)}function c(e,t,n,r,o,i,a,s){this.gl=e,this._shape=[0|t,0|n],this._destroyed=!1,this._ext=s,this.color=new Array(o);for(var l=0;o>l;++l)this.color[l]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=r,this._useDepth=i,this._useStencil=a;var c=this,p=[0|t,0|n];Object.defineProperties(p,{0:{get:function(){return c._shape[0]},set:function(e){return c.width=e}},1:{get:function(){return c._shape[1]},set:function(e){return c.height=e}}}),this._shapeVector=p,u(this)}function p(e,t,n){if(e._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(e._shape[0]!==t||e._shape[1]!==n){var i=e.gl,s=i.getParameter(i.MAX_RENDERBUFFER_SIZE);if(0>t||t>s||0>n||n>s)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=n;for(var l=r(i),u=0;u<e.color.length;++u)e.color[u].shape=e._shape;e._color_rb&&(i.bindRenderbuffer(i.RENDERBUFFER,e._color_rb),i.renderbufferStorage(i.RENDERBUFFER,i.RGBA4,e._shape[0],e._shape[1])),e.depth&&(e.depth.shape=e._shape),e._depth_rb&&(i.bindRenderbuffer(i.RENDERBUFFER,e._depth_rb),e._useDepth&&e._useStencil?i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,e._shape[0],e._shape[1]):e._useDepth?i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_COMPONENT16,e._shape[0],e._shape[1]):e._useStencil&&i.renderbufferStorage(i.RENDERBUFFER,i.STENCIL_INDEX,e._shape[0],e._shape[1])),i.bindFramebuffer(i.FRAMEBUFFER,e.handle);var c=i.checkFramebufferStatus(i.FRAMEBUFFER);c!==i.FRAMEBUFFER_COMPLETE&&(e.dispose(),o(i,l),a(c)),o(i,l)}}function f(e,t,n,r){d||(d=e.FRAMEBUFFER_UNSUPPORTED,m=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,g=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,v=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var o=e.getExtension("WEBGL_draw_buffers");if(!y&&o&&i(e,o),Array.isArray(t)&&(r=n,n=0|t[1],t=0|t[0]),"number"!=typeof t)throw new Error("gl-fbo: Missing shape parameter");var a=e.getParameter(e.MAX_RENDERBUFFER_SIZE);if(0>t||t>a||0>n||n>a)throw new Error("gl-fbo: Parameters are too large for FBO");r=r||{};var s=1;if("color"in r){if(s=Math.max(0|r.color,0),0>s)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(s>1){if(!o)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(s>e.getParameter(o.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+s+" draw buffers")}}var l=e.UNSIGNED_BYTE,u=e.getExtension("OES_texture_float");if(r["float"]&&s>0){if(!u)throw new Error("gl-fbo: Context does not support floating point textures");l=e.FLOAT}else r.preferFloat&&s>0&&u&&(l=e.FLOAT);var p=!0;"depth"in r&&(p=!!r.depth);var f=!1;return"stencil"in r&&(f=!!r.stencil),new c(e,t,n,l,s,p,f,o)}var h=e("gl-texture2d");t.exports=f;var d,m,g,v,y=null,_=c.prototype;Object.defineProperties(_,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(e){if(Array.isArray(e)||(e=[0|e,0|e]),2!==e.length)throw new Error("gl-fbo: Shape vector must be length 2");var t=0|e[0],n=0|e[1];return p(this,t,n),[t,n]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(e){return e=0|e,p(this,e,this._shape[1]),e},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(e){return e=0|e,p(this,this._shape[0],e),e},enumerable:!1}}),_.bind=function(){if(!this._destroyed){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.handle),e.viewport(0,0,this._shape[0],this._shape[1])}},_.dispose=function(){if(!this._destroyed){this._destroyed=!0;var e=this.gl;e.deleteFramebuffer(this.handle),this.handle=null,
|
|
this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(e.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var t=0;t<this.color.length;++t)this.color[t].dispose(),this.color[t]=null;this._color_rb&&(e.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{"gl-texture2d":34}],9:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}};t.exports=function(e){var t=function(e){function t(){r(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),t}(e.Component);return t}},{}],10:[function(e,t,n){"use strict";var r=e("invariant");t.exports=function(e){var t=1,n={create:function(n){r("object"==typeof n,"config must be an object");var o={};for(var i in n){var a=n[i];r("object"==typeof a&&"string"==typeof a.frag,"invalid shader given to Shaders.create(). A valid shader is a { frag: String }");var s=t++;a.name||(a.name=i),e(s,a),o[i]=s}return o},exists:function(e){return"number"==typeof e&&e>=1&&t>e}};return n}},{invariant:35}],11:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},s=e("invariant");t.exports=function(e){var t=e.Component,n=e.PropTypes,l=function(e){function t(){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"render",value:function(){s(!1,"GL.Target elements are for GL.View configuration only and should not be rendered")}}]),t}(t);return l.displayName="GL.Target",l.propTypes={children:n.any.isRequired,uniform:n.string.isRequired},l}},{invariant:35}],12:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}function i(e){return{type:"target",id:e}}function a(e){return"string"==typeof e&&(e={uri:e}),{type:"image",value:e}}function s(e){return{type:"framebuffer",id:e}}var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},p=e("invariant");t.exports=function(e,t,n,f,h,d,m){function g(t){return 1===e.Children.count(t)?t instanceof Array?t[0]:t:null}function v(r,o,l,u,c,h){p(t.exists(r),"Shader #%s does not exists",r);var m={};for(var y in o){var _=o[y];!_||"string"!=typeof _&&("object"!=typeof _||_ instanceof Array)||(_=a(_)),m[y]=_}var x={shader:r,uniforms:m,width:l,height:u,children:[]};return e.Children.forEach(c,function(t){p(t.type===n,"GL.View can only contains children of type GL.Target. Got '%s'",t.type&&t.type.displayName||t);var r=t.props,o=r.uniform,c=r.children,m=r.style;p("string"==typeof o&&o,"GL.Target must define an uniform String."),p(!(o in x.uniforms),"The uniform '%s' set by GL.Target is already defined in {uniforms} props");var y=g(c);if(y){if(!e.isValidElement(y))return void(x.uniforms[o]=a(y));var _=void 0,E=y;do{if(E.type===b){_=E;break}if("function"!=typeof E.type)break;var C=new E.type;if(!(C instanceof f))break;if(C.props=E.props,E=g(C.render()),E.type===b){_=E;break}}while(E);if(_){var w=x.children.length,T=_.props,R=T.shader,D=T.uniforms,S=T.children,M=v(R,D,l,u,S,h);return x.children.push(M),void(x.uniforms[o]=s(w))}}var I=h.length;x.uniforms[o]=i(I),h.push(d(m,l,u,I,c))}),x}var y=e.Component,_=e.PropTypes,b=function(e){function t(){r(this,t),c(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.style,n=e.width,r=e.height,o=e.children,i=e.shader,a=e.uniforms,s=l({},e);delete s.style,delete s.width,delete s.height,delete s.shader,delete s.uniforms,delete s.children;var u=[],c=v(i,a,n,r,o,u);return h(t,n,r,u,m(s,n,r,c,u.length))}}]),t}(y);return b.displayName="GL.View",b.propTypes={shader:_.number.isRequired,width:_.number.isRequired,height:_.number.isRequired,uniforms:_.object,opaque:_.bool},b.defaultProps={opaque:!0},b}},{invariant:35}],13:[function(e,t,n){"use strict";var r=e("./createComponent"),o=e("./createShaders"),i=e("./createTarget"),a=e("./createView");t.exports={createComponent:r,createShaders:o,createTarget:i,createView:a}},{"./createComponent":9,"./createShaders":10,"./createTarget":11,"./createView":12}],14:[function(e,t,n){"use strict";function r(e){this.gl=e,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}function o(e,t){return e.name<t.name?-1:1}function i(e,t,n,o,i){var a=new r(e);return a.update(t,n,o,i),a}var a=e("./lib/create-uniforms"),s=e("./lib/create-attributes"),l=e("./lib/reflect"),u=e("./lib/shader-cache"),c=e("./lib/runtime-reflect"),p=r.prototype;p.bind=function(){this.program||this._relink(),this.gl.useProgram(this.program)},p.dispose=function(){this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},p.update=function(e,t,n,r){function i(){f.program=u.program(h,f._vref,f._fref,_,b);for(var e=0;e<n.length;++e)D[e]=h.getUniformLocation(f.program,n[e].name)}if(!t||1===arguments.length){var p=e;e=p.vertex,t=p.fragment,n=p.uniforms,r=p.attributes}var f=this,h=f.gl,d=f._vref;f._vref=u.shader(h,h.VERTEX_SHADER,e),d&&d.dispose(),f.vertShader=f._vref.shader;var m=this._fref;if(f._fref=u.shader(h,h.FRAGMENT_SHADER,t),m&&m.dispose(),f.fragShader=f._fref.shader,!n||!r){var g=h.createProgram();if(h.attachShader(g,f.fragShader),h.attachShader(g,f.vertShader),h.linkProgram(g),!h.getProgramParameter(g,h.LINK_STATUS)){var v=h.getProgramInfoLog(g);throw console.error("gl-shader: Error linking program:",v),new Error("gl-shader: Error linking program:"+v)}n=n||c.uniforms(h,g),r=r||c.attributes(h,g),h.deleteProgram(g)}r=r.slice(),r.sort(o);for(var y=[],_=[],b=[],x=0;x<r.length;++x){var E=r[x];if(E.type.indexOf("mat")>=0){for(var C=0|E.type.charAt(E.type.length-1),w=new Array(C),T=0;C>T;++T)w[T]=b.length,_.push(E.name+"["+T+"]"),"number"==typeof E.location?b.push(E.location+T):Array.isArray(E.location)&&E.location.length===C&&"number"==typeof E.location[T]?b.push(0|E.location[T]):b.push(-1);y.push({name:E.name,type:E.type,locations:w})}else y.push({name:E.name,type:E.type,locations:[b.length]}),_.push(E.name),"number"==typeof E.location?b.push(0|E.location):b.push(-1)}for(var R=0,x=0;x<b.length;++x)if(b[x]<0){for(;b.indexOf(R)>=0;)R+=1;b[x]=R}var D=new Array(n.length);i(),f._relink=i,f.types={uniforms:l(n),attributes:l(r)},f.attributes=s(h,f,y,b),Object.defineProperty(f,"uniforms",a(h,f,n,D))},t.exports=i},{"./lib/create-attributes":15,"./lib/create-uniforms":16,"./lib/reflect":17,"./lib/runtime-reflect":18,"./lib/shader-cache":19}],15:[function(e,t,n){"use strict";function r(e,t,n,r,o,i){this._gl=e,this._wrapper=t,this._index=n,this._locations=r,this._dimension=o,this._constFunc=i}function o(e,t,n,o,i,a,s){for(var l=["gl","v"],u=[],c=0;i>c;++c)l.push("x"+c),u.push("x"+c);l.push("if(x0.length===void 0){return gl.vertexAttrib"+i+"f(v,"+u.join()+")}else{return gl.vertexAttrib"+i+"fv(v,x0)}");var p=Function.apply(null,l),f=new r(e,t,n,o,i,p);Object.defineProperty(a,s,{set:function(t){return e.disableVertexAttribArray(o[n]),p(e,o[n],t),t},get:function(){return f},enumerable:!0})}function i(e,t,n,r,i,a,s){for(var l=new Array(i),u=new Array(i),c=0;i>c;++c)o(e,t,n[c],r,i,l,c),u[c]=l[c];Object.defineProperty(l,"location",{set:function(e){if(Array.isArray)for(var t=0;i>t;++t)u[t].location=e[t];else for(var t=0;i>t;++t)result[t]=u[t].location=e+t;return e},get:function(){for(var e=new Array(i),t=0;i>t;++t)e[t]=r[n[t]];return e},enumerable:!0}),l.pointer=function(t,o,a,s){t=t||e.FLOAT,o=!!o,a=a||i*i,s=s||0;for(var l=0;i>l;++l){var u=r[n[l]];e.vertexAttribPointer(u,i,t,o,a,s+l*i),e.enableVertexAttribArray(u)}};var p=new Array(i),f=e["vertexAttrib"+i+"fv"];Object.defineProperty(a,s,{set:function(t){for(var o=0;i>o;++o){var a=r[n[o]];if(e.disableVertexAttribArray(a),Array.isArray(t[0]))f.call(e,a,t[o]);else{for(var s=0;i>s;++s)p[s]=t[i*o+s];f.call(e,a,p)}}return t},get:function(){return l},enumerable:!0})}function a(e,t,n,r){for(var a={},s=0,l=n.length;l>s;++s){var u=n[s],c=u.name,p=u.type,f=u.locations;switch(p){case"bool":case"int":case"float":o(e,t,f[0],r,1,a,c);break;default:if(p.indexOf("vec")>=0){var h=p.charCodeAt(p.length-1)-48;if(2>h||h>4)throw new Error("gl-shader: Invalid data type for attribute "+c+": "+p);o(e,t,f[0],r,h,a,c)}else{if(!(p.indexOf("mat")>=0))throw new Error("gl-shader: Unknown data type for attribute "+c+": "+p);var h=p.charCodeAt(p.length-1)-48;if(2>h||h>4)throw new Error("gl-shader: Invalid data type for attribute "+c+": "+p);i(e,t,f,r,h,a,c)}}}return a}t.exports=a;var s=r.prototype;s.pointer=function(e,t,n,r){var o=this,i=o._gl,a=o._locations[o._index];i.vertexAttribPointer(a,o._dimension,e||i.FLOAT,!!t,n||0,r||0),i.enableVertexAttribArray(a)},s.set=function(e,t,n,r){return this._constFunc(this._locations[this._index],e,t,n,r)},Object.defineProperty(s,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}})},{}],16:[function(e,t,n){"use strict";function r(e){var t=new Function("y","return function(){return y}");return t(e)}function o(e,t){for(var n=new Array(e),r=0;e>r;++r)n[r]=t;return n}function i(e,t,n,i){function s(n){var r=new Function("gl","wrapper","locations","return function(){return gl.getUniform(wrapper.program,locations["+n+"])}");return r(e,t,i)}function l(e,t,n){switch(n){case"bool":case"int":case"sampler2D":case"samplerCube":return"gl.uniform1i(locations["+t+"],obj"+e+")";case"float":return"gl.uniform1f(locations["+t+"],obj"+e+")";default:var r=n.indexOf("vec");if(!(r>=0&&1>=r&&n.length===4+r)){if(0===n.indexOf("mat")&&4===n.length){var o=n.charCodeAt(n.length-1)-48;if(2>o||o>4)throw new Error("gl-shader: Invalid uniform dimension type for matrix "+name+": "+n);return"gl.uniformMatrix"+o+"fv(locations["+t+"],false,obj"+e+")"}throw new Error("gl-shader: Unknown uniform data type for "+name+": "+n)}var o=n.charCodeAt(n.length-1)-48;if(2>o||o>4)throw new Error("gl-shader: Invalid data type");switch(n.charAt(0)){case"b":case"i":return"gl.uniform"+o+"iv(locations["+t+"],obj"+e+")";case"v":return"gl.uniform"+o+"fv(locations["+t+"],obj"+e+")";default:throw new Error("gl-shader: Unrecognized data type for vector "+name+": "+n)}}}function u(e,t){if("object"!=typeof t)return[[e,t]];var n=[];for(var r in t){var o=t[r],i=e;i+=parseInt(r)+""===r?"["+r+"]":"."+r,"object"==typeof o?n.push.apply(n,u(i,o)):n.push([i,o])}return n}function c(t){for(var r=["return function updateProperty(obj){"],o=u("",t),a=0;a<o.length;++a){var s=o[a],c=s[0],p=s[1];i[p]&&r.push(l(c,p,n[p].type))}r.push("return obj}");var f=new Function("gl","locations",r.join("\n"));return f(e,i)}function p(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var t=e.indexOf("vec");if(t>=0&&1>=t&&e.length===4+t){var n=e.charCodeAt(e.length-1)-48;if(2>n||n>4)throw new Error("gl-shader: Invalid data type");return"b"===e.charAt(0)?o(n,!1):o(n,0)}if(0===e.indexOf("mat")&&4===e.length){var n=e.charCodeAt(e.length-1)-48;if(2>n||n>4)throw new Error("gl-shader: Invalid uniform dimension type for matrix "+name+": "+e);return o(n*n,0)}throw new Error("gl-shader: Unknown uniform data type for "+name+": "+e)}}function f(e,t,o){if("object"==typeof o){var a=h(o);Object.defineProperty(e,t,{get:r(a),set:c(o),enumerable:!0,configurable:!1})}else i[o]?Object.defineProperty(e,t,{get:s(o),set:c(o),enumerable:!0,configurable:!1}):e[t]=p(n[o].type)}function h(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var n=0;n<e.length;++n)f(t,n,e[n])}else{t={};for(var r in e)f(t,r,e[r])}return t}var d=a(n,!0);return{get:r(h(d)),set:c(d),enumerable:!0,configurable:!0}}var a=e("./reflect");t.exports=i},{"./reflect":17}],17:[function(e,t,n){"use strict";function r(e,t){for(var n={},r=0;r<e.length;++r)for(var o=e[r].name,i=o.split("."),a=n,s=0;s<i.length;++s){var l=i[s].split("[");if(l.length>1){l[0]in a||(a[l[0]]=[]),a=a[l[0]];for(var u=1;u<l.length;++u){var c=parseInt(l[u]);u<l.length-1||s<i.length-1?(c in a||(u<l.length-1?a[c]=[]:a[c]={}),a=a[c]):t?a[c]=r:a[c]=e[r].type}}else s<i.length-1?(l[0]in a||(a[l[0]]={}),a=a[l[0]]):t?a[l[0]]=r:a[l[0]]=e[r].type}return n}t.exports=r},{}],18:[function(e,t,n){"use strict";function r(e,t){if(!s){var n=Object.keys(a);s={};for(var r=0;r<n.length;++r){var o=n[r];s[e[o]]=a[o]}}return s[t]}function o(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=[],i=0;n>i;++i){var a=e.getActiveUniform(t,i);if(a){var s=r(e,a.type);if(a.size>1)for(var l=0;l<a.size;++l)o.push({name:a.name.replace("[0]","["+l+"]"),type:s});else o.push({name:a.name,type:s})}}return o}function i(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=[],i=0;n>i;++i){var a=e.getActiveAttrib(t,i);a&&o.push({name:a.name,type:r(e,a.type)})}return o}n.uniforms=o,n.attributes=i;var a={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},s=null},{}],19:[function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){this.id=e,this.src=t,this.type=n,this.shader=r,this.count=i,this.programs=[],this.cache=a}function o(e){this.gl=e,this.shaders=[{},{}],this.programs={}}function i(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(r);throw console.error("gl-shader: Error compiling shader:",o),new Error("gl-shader: Error compiling shader:"+o)}return r}function a(e,t,n,r,o){var i=e.createProgram();e.attachShader(i,t),e.attachShader(i,n);for(var a=0;a<r.length;++a)e.bindAttribLocation(i,o[a],r[a]);if(e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS)){var s=e.getProgramInfoLog(i);throw console.error("gl-shader: Error linking program:",s),new Error("gl-shader: Error linking program:"+s)}return i}function s(e){var t=p.get(e);return t||(t=new o(e),p.set(e,t)),t}function l(e,t,n){return s(e).getShaderReference(t,n)}function u(e,t,n,r,o){return s(e).getProgram(t,n,r,o)}n.shader=l,n.program=u;var c="undefined"==typeof WeakMap?e("weakmap-shim"):WeakMap,p=new c,f=0;r.prototype.dispose=function(){if(0===--this.count){for(var e=this.cache,t=e.gl,n=this.programs,r=0,o=n.length;o>r;++r){var i=e.programs[n[r]];i&&(delete e.programs[r],t.deleteProgram(i))}t.deleteShader(this.shader),delete e.shaders[this.type===t.FRAGMENT_SHADER|0][this.src]}};var h=o.prototype;h.getShaderReference=function(e,t){var n=this.gl,o=this.shaders[e===n.FRAGMENT_SHADER|0],a=o[t];if(a&&n.isShader(a.shader))a.count+=1;else{var s=i(n,e,t);a=o[t]=new r(f++,t,e,s,[],1,this)}return a},h.getProgram=function(e,t,n,r){var o=[e.id,t.id,n.join(":"),r.join(":")].join("@"),i=this.programs[o];return i&&this.gl.isProgram(i)||(this.programs[o]=i=a(this.gl,e.shader,t.shader,n,r),e.programs.push(o),t.programs.push(o)),i}},{"weakmap-shim":22}],20:[function(e,t,n){function r(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:o(t,e)}}var o=e("./hidden-store.js");t.exports=r},{"./hidden-store.js":21}],21:[function(e,t,n){function r(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}t.exports=r},{}],22:[function(e,t,n){function r(){var e=o();return{get:function(t,n){var r=e(t);return r.hasOwnProperty("value")?r.value:n},set:function(t,n){e(t).value=n},has:function(t){return"value"in e(t)},"delete":function(t){return delete e(t).value}}}var o=e("./create-store.js");t.exports=r},{"./create-store.js":20}],23:[function(e,t,n){"use strict";function r(e){if(!e)return s;for(var t=0;t<e.args.length;++t){var n=e.args[t];0===t?e.args[t]={name:n,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:e.args[t]={name:n,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function o(e){return a({args:e.args,pre:r(e.pre),body:r(e.body),post:r(e.proc),funcName:e.funcName})}function i(e){for(var t=[],n=0;n<e.args.length;++n)t.push("a"+n);var r=new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""));return r(o(e))}var a=e("cwise-compiler"),s={body:"",args:[],thisVars:[],localVars:[]},l={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var e in l){var t=l[e];n[e]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),n[e+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in u){var t=u[e];n[e]=i({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),n[e+"eq"]=i({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in c){var t=c[e];n[e]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),n[e+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var p=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;e<p.length;++e){var t=p[e];n[t]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),n[t+"eq"]=i({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}}();var f=["max","min","atan2","pow"];!function(){for(var e=0;e<f.length;++e){var t=f[e];n[t]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),n[t+"s"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),n[t+"eq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),n[t+"seq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["atan2","pow"];!function(){for(var e=0;e<h.length;++e){var t=h[e];n[t+"op"]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),n[t+"ops"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),n[t+"opeq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),n[t+"opseq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}}(),n.any=a({args:["array"],pre:s,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),n.all=a({args:["array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),n.sum=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),n.prod=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),n.norm2squared=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),n.norm2=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),n.norminf=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),n.norm1=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),n.sup=a({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.inf=a({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.argmin=a({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.argmax=a({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.random=i({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),n.assign=i({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),n.assigns=i({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),n.equals=a({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":24}],24:[function(e,t,n){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function o(e){var t=new r;t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var o=0;o<n.length;++o){var a=n[o];if("array"===a||"object"==typeof a&&a.blockIndices){if(t.argTypes[o]="array",t.arrayArgs.push(o),t.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),t.shimArgs.push("array"+o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array args");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)t.scalarArgs.push(o),t.shimArgs.push("scalar"+o);else if("index"===a){if(t.indexArgs.push(o),o<t.pre.args.length&&t.pre.args[o].count>0)throw new Error("cwise: pre() block may not reference array index");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array index");if(o<t.post.args.length&&t.post.args[o].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(t.shapeArgs.push(o),o<t.pre.args.length&&t.pre.args[o].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(o<t.body.args.length&&t.body.args[o].lvalue)throw new Error("cwise: body() block may not write to array shape");if(o<t.post.args.length&&t.post.args[o].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof a||!a.offset)throw new Error("cwise: Unknown argument type "+n[o]);t.argTypes[o]="offset",t.offsetArgs.push({array:a.array,offset:a.offset}),t.offsetArgIndex.push(o)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>n.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}var i=e("./lib/thunk.js");t.exports=o},{"./lib/thunk.js":26}],25:[function(e,t,n){"use strict";function r(e,t,n){var r,o,i=e.length,a=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,p=0;for(r=0;i>r;++r)u.push(["i",r,"=0"].join(""));for(o=0;a>o;++o)for(r=0;i>r;++r)p=c,c=e[r],0===r?u.push(["d",o,"s",r,"=t",o,"p",c].join("")):u.push(["d",o,"s",r,"=(t",o,"p",c,"-s",p,"*t",o,"p",p,")"].join(""));for(l.push("var "+u.join(",")),r=i-1;r>=0;--r)c=e[r],l.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(l.push(n),r=0;i>r;++r){for(p=c,c=e[r],o=0;a>o;++o)l.push(["p",o,"+=d",o,"s",r].join(""));s&&(r>0&&l.push(["index[",p,"]-=s",p].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function o(e,t,n,o){for(var i=t.length,a=n.arrayArgs.length,s=n.blockSize,l=n.indexArgs.length>0,u=[],c=0;a>c;++c)u.push(["var offset",c,"=p",c].join(""));for(var c=e;i>c;++c)u.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(var c=0;a>c;++c){for(var p=["offset"+c],f=e;i>f;++f)p.push(["j",f,"*t",c,"p",t[f]].join(""));u.push(["p",c,"=(",p.join("+"),")"].join(""))}u.push(r(t,n,o));for(var c=e;i>c;++c)u.push("}");return u.join("\n")}function i(e){for(var t=0,n=e[0].length;n>t;){for(var r=1;r<e.length;++r)if(e[r][t]!==e[0][t])return t;++t}return t}function a(e,t,n){for(var r=e.body,o=[],i=[],a=0;a<e.args.length;++a){var s=e.args[a];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=t.arrayArgs.indexOf(a);switch(t.argTypes[a]){case"offset":var p=t.offsetArgIndex.indexOf(a),f=t.offsetArgs[p];c=f.array,u="+q"+p;case"array":u="p"+c+u;var h="l"+a,d="a"+c;if(0===t.arrayBlockIndices[c])1===s.count?"generic"===n[c]?s.lvalue?(o.push(["var ",h,"=",d,".get(",u,")"].join("")),r=r.replace(l,h),i.push([d,".set(",u,",",h,")"].join(""))):r=r.replace(l,[d,".get(",u,")"].join("")):r=r.replace(l,[d,"[",u,"]"].join("")):"generic"===n[c]?(o.push(["var ",h,"=",d,".get(",u,")"].join("")),
|
|
r=r.replace(l,h),s.lvalue&&i.push([d,".set(",u,",",h,")"].join(""))):(o.push(["var ",h,"=",d,"[",u,"]"].join("")),r=r.replace(l,h),s.lvalue&&i.push([d,"[",u,"]=",h].join("")));else{for(var m=[s.name],g=[u],v=0;v<Math.abs(t.arrayBlockIndices[c]);v++)m.push("\\s*\\[([^\\]]+)\\]"),g.push("$"+(v+1)+"*t"+c+"b"+v);if(l=new RegExp(m.join(""),"g"),u=g.join("+"),"generic"===n[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");r=r.replace(l,[d,"[",u,"]"].join(""))}break;case"scalar":r=r.replace(l,"Y"+t.scalarArgs.indexOf(a));break;case"index":r=r.replace(l,"index");break;case"shape":r=r.replace(l,"shape")}}}return[o.join("\n"),r,i.join("\n")].join("\n").trim()}function s(e){for(var t=new Array(e.length),n=!0,r=0;r<e.length;++r){var o=e[r],i=o.match(/\d+/);i=i?i[0]:"",0===o.charAt(0)?t[r]="u"+o.charAt(1)+i:t[r]=o.charAt(0)+i,r>0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}function l(e,t){for(var n=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,l=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),p=0;p<e.arrayArgs.length;++p)c[p]=t[2*p],l[p]=t[2*p+1];for(var f=[],h=[],d=[],m=[],g=[],p=0;p<e.arrayArgs.length;++p){e.arrayBlockIndices[p]<0?(d.push(0),m.push(n),f.push(n),h.push(n+e.arrayBlockIndices[p])):(d.push(e.arrayBlockIndices[p]),m.push(e.arrayBlockIndices[p]+n),f.push(0),h.push(e.arrayBlockIndices[p]));for(var v=[],y=0;y<l[p].length;y++)d[p]<=l[p][y]&&l[p][y]<m[p]&&v.push(l[p][y]-d[p]);g.push(v)}for(var _=["SS"],b=["'use strict'"],x=[],y=0;n>y;++y)x.push(["s",y,"=SS[",y,"]"].join(""));for(var p=0;p<e.arrayArgs.length;++p){_.push("a"+p),_.push("t"+p),_.push("p"+p);for(var y=0;n>y;++y)x.push(["t",p,"p",y,"=t",p,"[",d[p]+y,"]"].join(""));for(var y=0;y<Math.abs(e.arrayBlockIndices[p]);++y)x.push(["t",p,"b",y,"=t",p,"[",f[p]+y,"]"].join(""))}for(var p=0;p<e.scalarArgs.length;++p)_.push("Y"+p);if(e.shapeArgs.length>0&&x.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var E=new Array(n),p=0;n>p;++p)E[p]="0";x.push(["index=[",E.join(","),"]"].join(""))}for(var p=0;p<e.offsetArgs.length;++p){for(var C=e.offsetArgs[p],w=[],y=0;y<C.offset.length;++y)0!==C.offset[y]&&(1===C.offset[y]?w.push(["t",C.array,"p",y].join("")):w.push([C.offset[y],"*t",C.array,"p",y].join("")));0===w.length?x.push("q"+p+"=0"):x.push(["q",p,"=",w.join("+")].join(""))}var T=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));x=x.concat(T),b.push("var "+x.join(","));for(var p=0;p<e.arrayArgs.length;++p)b.push("p"+p+"|=0");e.pre.body.length>3&&b.push(a(e.pre,e,c));var R=a(e.body,e,c),D=i(g);n>D?b.push(o(D,g[0],e,R)):b.push(r(g[0],e,R)),e.post.body.length>3&&b.push(a(e.post,e,c)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+b.join("\n")+"\n----------");var S=[e.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",D,s(c)].join(""),M=new Function(["function ",S,"(",_.join(","),"){",b.join("\n"),"} return ",S].join(""));return M()}var u=e("uniq");t.exports=l},{uniq:27}],26:[function(e,t,n){"use strict";function r(e){var t=["'use strict'","var CACHED={}"],n=[],r=e.funcName+"_cwise_thunk";t.push(["return function ",r,"(",e.shimArgs.join(","),"){"].join(""));for(var i=[],a=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c<e.arrayArgs.length;++c){var p=e.arrayArgs[c];n.push(["t",p,"=array",p,".dtype,","r",p,"=array",p,".order"].join("")),i.push("t"+p),i.push("r"+p),a.push("t"+p),a.push("r"+p+".join()"),s.push("array"+p+".data"),s.push("array"+p+".stride"),s.push("array"+p+".offset|0"),c>0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+p+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[c]))),u.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+p+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[c])+"]"))}e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),t.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}"));for(var c=0;c<e.scalarArgs.length;++c)s.push("scalar"+e.scalarArgs[c]);n.push(["type=[",a.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),t.push("var "+n.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",i.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("-----Generated thunk:\n"+t.join("\n")+"\n----------");var f=new Function("compile",t.join("\n"));return f(o.bind(void 0,e))}var o=e("./compile.js");t.exports=r},{"./compile.js":25}],27:[function(e,t,n){"use strict";function r(e,t){for(var n=1,r=e.length,o=e[0],i=e[0],a=1;r>a;++a)if(i=o,o=e[a],t(o,i)){if(a===n){n++;continue}e[n++]=o}return e.length=n,e}function o(e){for(var t=1,n=e.length,r=e[0],o=e[0],i=1;n>i;++i,o=r)if(o=r,r=e[i],r!==o){if(i===t){t++;continue}e[t++]=r}return e.length=t,e}function i(e,t,n){return 0===e.length?e:t?(n||e.sort(t),r(e,t)):(n||e.sort(),o(e))}t.exports=i},{}],28:[function(e,t,n){function r(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,n=new Array(t.length);for(e=0;e<n.length;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var o=new Array(n.length);for(e=0;e<o.length;++e)o[e]=n[e][1];return o}function i(e,t){var n=["View",t,"d",e].join("");0>t&&(n="View_Nil"+e);var r="generic"===e;if(-1===t){var i="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}",a=new Function(i);return a()}if(0===t){var i="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(r?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(r?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}",a=new Function("TrivialArray",i);return a(p[e][0])}var i=["'use strict'"],s=l(t),u=s.map(function(e){return"i"+e}),c="this.offset+"+s.map(function(e){return"this.stride["+e+"]*i"+e}).join("+"),f=s.map(function(e){return"b"+e}).join(","),h=s.map(function(e){return"c"+e}).join(",");i.push("function "+n+"(a,"+f+","+h+",d){this.data=a","this.shape=["+f+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),i.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+s.map(function(e){return"this.shape["+e+"]"}).join("*"),"}})"),1===t?i.push("proto.order=[0]"):(i.push("Object.defineProperty(proto,'order',{get:"),4>t?(i.push("function "+n+"_order(){"),2===t?i.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+u.join(",")+",v){"),r?i.push("return this.data.set("+c+",v)}"):i.push("return this.data["+c+"]=v}"),i.push("proto.get=function "+n+"_get("+u.join(",")+"){"),r?i.push("return this.data.get("+c+")}"):i.push("return this.data["+c+"]}"),i.push("proto.index=function "+n+"_index(",u.join(),"){return "+c+"}"),i.push("proto.hi=function "+n+"_hi("+u.join(",")+"){return new "+n+"(this.data,"+s.map(function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")}).join(",")+","+s.map(function(e){return"this.stride["+e+"]"}).join(",")+",this.offset)}");var d=s.map(function(e){return"a"+e+"=this.shape["+e+"]"}),m=s.map(function(e){return"c"+e+"=this.stride["+e+"]"});i.push("proto.lo=function "+n+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+d.join(",")+","+m.join(","));for(var g=0;t>g;++g)i.push("if(typeof i"+g+"==='number'&&i"+g+">=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");i.push("return new "+n+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"c"+e}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+u.join(",")+"){var "+s.map(function(e){return"a"+e+"=this.shape["+e+"]"}).join(",")+","+s.map(function(e){return"b"+e+"=this.stride["+e+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;t>g;++g)i.push("if(typeof i"+g+"==='number'){d=i"+g+"|0;if(d<0){c+=b"+g+"*(a"+g+"-1);a"+g+"=ceil(-a"+g+"/d)}else{a"+g+"=ceil(a"+g+"/d)}b"+g+"*=d}");i.push("return new "+n+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"b"+e}).join(",")+",c)}");for(var v=new Array(t),y=new Array(t),g=0;t>g;++g)v[g]="a[i"+g+"]",y[g]="b[i"+g+"]";i.push("proto.transpose=function "+n+"_transpose("+u+"){"+u.map(function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+v.join(",")+","+y.join(",")+",this.offset)}"),i.push("proto.pick=function "+n+"_pick("+u+"){var a=[],b=[],c=this.offset");for(var g=0;t>g;++g)i.push("if(typeof i"+g+"==='number'&&i"+g+">=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+s.map(function(e){return"shape["+e+"]"}).join(",")+","+s.map(function(e){return"stride["+e+"]"}).join(",")+",offset)}");var a=new Function("CTOR_LIST","ORDER",i.join("\n"));return a(p[e],o)}function a(e){if(u(e))return"buffer";if(c)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(e)?"array":"generic"}function s(e,t,n,r){if(void 0===e){var o=p.array[0];return o([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var s=t.length;if(void 0===n){n=new Array(s);for(var l=s-1,u=1;l>=0;--l)n[l]=u,u*=t[l]}if(void 0===r){r=0;for(var l=0;s>l;++l)n[l]<0&&(r-=(t[l]-1)*n[l])}for(var c=a(e),f=p[c];f.length<=s+1;)f.push(i(c,f.length-1));var o=f[s+1];return o(e,t,n,r)}var l=e("iota-array"),u=e("is-buffer"),c="undefined"!=typeof Float64Array,p={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=s},{"iota-array":29,"is-buffer":30}],29:[function(e,t,n){"use strict";function r(e){for(var t=new Array(e),n=0;e>n;++n)t[n]=n;return t}t.exports=r},{}],30:[function(e,t,n){t.exports=function(e){return!(null==e||!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))}},{}],31:[function(e,t,n){"use strict";"use restrict";function r(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}var o=32;n.INT_BITS=o,n.INT_MAX=2147483647,n.INT_MIN=-1<<o-1,n.sign=function(e){return(e>0)-(0>e)},n.abs=function(e){var t=e>>o-1;return(e^t)-t},n.min=function(e,t){return t^(e^t)&-(t>e)},n.max=function(e,t){return e^(e^t)&-(t>e)},n.isPow2=function(e){return!(e&e-1||!e)},n.log2=function(e){var t,n;return t=(e>65535)<<4,e>>>=t,n=(e>255)<<3,e>>>=n,t|=n,n=(e>15)<<2,e>>>=n,t|=n,n=(e>3)<<1,e>>>=n,t|=n,t|e>>1},n.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},n.popCount=function(e){return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1},n.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)},n.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var i=new Array(256);!function(e){for(var t=0;256>t;++t){var n=t,r=t,o=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--o;e[t]=r<<o&255}}(i),n.reverse=function(e){return i[255&e]<<24|i[e>>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},n.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},n.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),e=65535&(e|e>>>16),e<<16>>16},n.interleave3=function(e,t,n){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),e|n<<2},n.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),e=1023&(e|e>>>16),e<<22>>22},n.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},{}],32:[function(e,t,n){"use strict";function r(e,t,n){var o=0|e[n];if(0>=o)return[];var i,a=new Array(o);if(n===e.length-1)for(i=0;o>i;++i)a[i]=t;else for(i=0;o>i;++i)a[i]=r(e,t,n+1);return a}function o(e,t){var n,r;for(n=new Array(e),r=0;e>r;++r)n[r]=t;return n}function i(e,t){switch("undefined"==typeof t&&(t=0),typeof e){case"number":if(e>0)return o(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}t.exports=i},{}],33:[function(e,t,n){(function(t,r){"use strict";function o(e){if(e){var t=e.length||e.byteLength,n=y.log2(t);E[n].push(e)}}function i(e){o(e.buffer)}function a(e){var e=y.nextPow2(e),t=y.log2(e),n=E[t];return n.length>0?n.pop():new ArrayBuffer(e)}function s(e){return new Uint8Array(a(e),0,e)}function l(e){return new Uint16Array(a(2*e),0,e)}function u(e){return new Uint32Array(a(4*e),0,e)}function c(e){return new Int8Array(a(e),0,e)}function p(e){return new Int16Array(a(2*e),0,e)}function f(e){return new Int32Array(a(4*e),0,e)}function h(e){return new Float32Array(a(4*e),0,e)}function d(e){return new Float64Array(a(8*e),0,e)}function m(e){return b?new Uint8ClampedArray(a(e),0,e):s(e)}function g(e){return new DataView(a(e),0,e)}function v(e){e=y.nextPow2(e);var t=y.log2(e),n=C[t];return n.length>0?n.pop():new r(e)}var y=e("bit-twiddle"),_=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:_([32,0]),UINT16:_([32,0]),UINT32:_([32,0]),INT8:_([32,0]),INT16:_([32,0]),INT32:_([32,0]),FLOAT:_([32,0]),DOUBLE:_([32,0]),DATA:_([32,0]),UINT8C:_([32,0]),BUFFER:_([32,0])});var b="undefined"!=typeof Uint8ClampedArray,x=t.__TYPEDARRAY_POOL;x.UINT8C||(x.UINT8C=_([32,0])),x.BUFFER||(x.BUFFER=_([32,0]));var E=x.DATA,C=x.BUFFER;n.free=function(e){if(r.isBuffer(e))C[y.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|y.log2(t);E[n].push(e)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeInt8=n.freeInt16=n.freeInt32=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=i,n.freeArrayBuffer=o,n.freeBuffer=function(e){C[y.log2(e.length)].push(e)},n.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return a(e);switch(t){case"uint8":return s(e);case"uint16":return l(e);case"uint32":return u(e);case"int8":return c(e);case"int16":return p(e);case"int32":return f(e);case"float":case"float32":return h(e);case"double":case"float64":return d(e);case"uint8_clamped":return m(e);case"buffer":return v(e);case"data":case"dataview":return g(e);default:return null}return null},n.mallocArrayBuffer=a,n.mallocUint8=s,n.mallocUint16=l,n.mallocUint32=u,n.mallocInt8=c,n.mallocInt16=p,n.mallocInt32=f,n.mallocFloat32=n.mallocFloat=h,n.mallocFloat64=n.mallocDouble=d,n.mallocUint8Clamped=m,n.mallocDataView=g,n.mallocBuffer=v,n.clearCache=function(){for(var e=0;32>e;++e)x.UINT8[e].length=0,x.UINT16[e].length=0,x.UINT32[e].length=0,x.INT8[e].length=0,x.INT16[e].length=0,x.INT32[e].length=0,x.FLOAT[e].length=0,x.DOUBLE[e].length=0,x.UINT8C[e].length=0,E[e].length=0,C[e].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":31,buffer:2,dup:32}],34:[function(e,t,n){"use strict";function r(e){g=[e.LINEAR,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_NEAREST],v=[e.NEAREST,e.LINEAR,e.NEAREST_MIPMAP_NEAREST,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_LINEAR],y=[e.REPEAT,e.CLAMP_TO_EDGE,e.MIRRORED_REPEAT]}function o(e,t,n){var r=e.gl,o=r.getParameter(r.MAX_TEXTURE_SIZE);if(0>t||t>o||0>n||n>o)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,n],e.bind(),r.texImage2D(r.TEXTURE_2D,0,e.format,t,n,0,e.format,e.type,null),e._mipLevels=[0],e}function i(e,t,n,r,o,i){this.gl=e,this.handle=t,this.format=o,this.type=i,this._shape=[n,r],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(e){return a.wrapS=e}},{get:function(){return a._wrapT},set:function(e){return a.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(e){return a.width=e}},{get:function(){return a._shape[1]},set:function(e){return a.height=e}}]),this._shapeVector=l}function a(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function s(e,t,n,r,o,i,s,l){var u=l.dtype,c=l.shape.slice();if(c.length<2||c.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var p=0,f=0,g=a(c,l.stride.slice());"float32"===u?p=e.FLOAT:"float64"===u?(p=e.FLOAT,g=!1,u="float32"):"uint8"===u?p=e.UNSIGNED_BYTE:(p=e.UNSIGNED_BYTE,g=!1,u="uint8");var v=1;if(2===c.length)f=e.LUMINANCE,c=[c[0],c[1],1],l=h(l.data,c,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==c.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===c[2])f=e.ALPHA;else if(2===c[2])f=e.LUMINANCE_ALPHA;else if(3===c[2])f=e.RGB;else{if(4!==c[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=e.RGBA}v=c[2]}if(f!==e.LUMINANCE&&f!==e.ALPHA||o!==e.LUMINANCE&&o!==e.ALPHA||(f=o),f!==o)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=l.size,b=s.indexOf(r)<0;if(b&&s.push(r),p===i&&g)0===l.offset&&l.data.length===y?b?e.texImage2D(e.TEXTURE_2D,r,o,c[0],c[1],0,o,i,l.data):e.texSubImage2D(e.TEXTURE_2D,r,t,n,c[0],c[1],o,i,l.data):b?e.texImage2D(e.TEXTURE_2D,r,o,c[0],c[1],0,o,i,l.data.subarray(l.offset,l.offset+y)):e.texSubImage2D(e.TEXTURE_2D,r,t,n,c[0],c[1],o,i,l.data.subarray(l.offset,l.offset+y));else{var x;x=i===e.FLOAT?m.mallocFloat32(y):m.mallocUint8(y);var E=h(x,c,[c[2],c[2]*c[0],1]);p===e.FLOAT&&i===e.UNSIGNED_BYTE?_(E,l):d.assign(E,l),b?e.texImage2D(e.TEXTURE_2D,r,o,c[0],c[1],0,o,i,x.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,r,t,n,c[0],c[1],o,i,x.subarray(0,y)),i===e.FLOAT?m.freeFloat32(x):m.freeUint8(x)}}function l(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function u(e,t,n,r,o){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(0>t||t>a||0>n||n>a)throw new Error("gl-texture2d: Invalid texture shape");if(o===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var s=l(e);return e.texImage2D(e.TEXTURE_2D,0,r,t,n,0,r,o,null),new i(e,s,t,n,r,o)}function c(e,t,n,r){var o=l(e);return e.texImage2D(e.TEXTURE_2D,0,n,n,r,t),new i(e,o,0|t.width,0|t.height,n,r)}function p(e,t){var n=t.dtype,r=t.shape.slice(),o=e.getParameter(e.MAX_TEXTURE_SIZE);if(r[0]<0||r[0]>o||r[1]<0||r[1]>o)throw new Error("gl-texture2d: Invalid texture size");var s=a(r,t.stride.slice()),u=0;"float32"===n?u=e.FLOAT:"float64"===n?(u=e.FLOAT,s=!1,n="float32"):"uint8"===n?u=e.UNSIGNED_BYTE:(u=e.UNSIGNED_BYTE,s=!1,n="uint8");var c=0;if(2===r.length)c=e.LUMINANCE,r=[r[0],r[1],1],t=h(t.data,r,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==r.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===r[2])c=e.ALPHA;else if(2===r[2])c=e.LUMINANCE_ALPHA;else if(3===r[2])c=e.RGB;else{if(4!==r[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");c=e.RGBA}}u!==e.FLOAT||e.getExtension("OES_texture_float")||(u=e.UNSIGNED_BYTE,s=!1);var p,f,g=t.size;if(s)p=0===t.offset&&t.data.length===g?t.data:t.data.subarray(t.offset,t.offset+g);else{var v=[r[2],r[2]*r[0],1];f=m.malloc(g,n);var y=h(f,r,v,0);"float32"!==n&&"float64"!==n||u!==e.UNSIGNED_BYTE?d.assign(y,t):_(y,t),p=f.subarray(0,g)}var b=l(e);return e.texImage2D(e.TEXTURE_2D,0,c,r[0],r[1],0,c,u,p),s||m.free(f),new i(e,b,r[0],r[1],c,u)}function f(e){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(g||r(e),"number"==typeof arguments[1])return u(e,arguments[1],arguments[2],arguments[3]||e.RGBA,arguments[4]||e.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return u(e,0|arguments[1][0],0|arguments[1][1],arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var t=arguments[1];if(t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof HTMLVideoElement||t instanceof ImageData)return c(e,t,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(t.shape&&t.data&&t.stride)return p(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}var h=e("ndarray"),d=e("ndarray-ops"),m=e("typedarray-pool");t.exports=f;var g=null,v=null,y=null,_=function(e,t){d.muls(e,t,255)},b=i.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&g.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),v.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&g.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),v.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var n=gl.getExtension("EXT_texture_filter_anisotropic");n&&this.gl.texParameterf(this.gl.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),y.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),y.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;2>t;++t)if(y.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var n=this.gl;return this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this._wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return o(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return e=0|e,o(this,e,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e=0|e,o(this,this._shape[0],e),e}}}),b.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},b.setPixels=function(e,t,n,r){var o=this.gl;if(this.bind(),Array.isArray(t)?(r=n,n=0|t[1],t=0|t[0]):(t=t||0,n=n||0),r=r||0,e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLImageElement||e instanceof HTMLVideoElement){var i=this._mipLevels.indexOf(r)<0;i?(o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,this.type,e),this._mipLevels.push(r)):o.texSubImage2D(o.TEXTURE_2D,r,t,n,this.format,this.type,e)}else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>r||n+e.shape[0]>this._shape[0]>>>r||0>t||0>n)throw new Error("gl-texture2d: Texture dimensions are out of bounds");s(o,t,n,r,this.format,this.type,this._mipLevels,e)}}},{ndarray:28,"ndarray-ops":23,"typedarray-pool":33}],35:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,s],c=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[c++]}))}throw l.framesToPop=1,l}};t.exports=r},{}],36:[function(e,t,n){"use strict";var r=e("react"),o=e("gl-react-core"),i=o.createComponent;t.exports=i(r)},{"gl-react-core":13,react:228}],37:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}function i(e,t){for(var n in t)n in e||t[n].dispose()}function a(e,t){(e.shape[0]!==t[0]||e.shape[1]!==t[1])&&(e.shape=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},c=e("invariant"),p=e("react"),f=p.Component,h=p.PropTypes,d=e("gl-shader"),m=e("gl-texture2d"),g=e("gl-fbo"),v=e("./Shaders"),y=e("./GLImage"),_=e("./static.vert"),b=function(e){function t(e){r(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={scale:window.devicePixelRatio},this.handleDraw=this.handleDraw.bind(this),this.handleSyncData=this.handleSyncData.bind(this),this.onImageLoad=this.onImageLoad.bind(this),this._images={},this._shaders={},this._fbos={},this._targetTextures=[]}return o(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.style,o=this.state.scale,i=s({},r,{width:t+"px",height:n+"px"});return p.createElement("canvas",s({},this.props,{data:void 0,ref:"render",style:i,width:t*o,height:n*o}))}},{key:"componentDidMount",value:function(){var e=p.findDOMNode(this.refs.render),t={},n=e.getContext("webgl",t)||e.getContext("webgl-experimental",t)||e.getContext("experimental-webgl",t);if(n){this.gl=n,n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0);var r=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,r),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),n.STATIC_DRAW),this._buffer=r,this.resizeTargetTextures(this.props.nbTargets),this.syncBlendMode(this.props),this.syncData(this.props.data)}}},{key:"componentWillUnmount",value:function(){this._targetTextures.forEach(function(e){return e.dispose()}),[this._shaders,this._images,this._fbos].forEach(function(e){for(var t in e)e[t].dispose(),delete e[t]}),this.gl&&this.gl.deleteBuffer(this._buffer),this.shader=null,this.gl=null}},{key:"componentWillReceiveProps",value:function(e){var t=window.devicePixelRatio;this.state.devicePixelRatio!==t&&this.setState({devicePixelRatio:t}),e.opaque!==this.props.opaque&&this.syncBlendMode(e),e.nbTargets!==this.props.nbTargets&&this.resizeTargetTextures(e.nbTargets)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;this.syncData(e)}},{key:"syncData",value:function(e){function t(e,i){for(var h=e.shader,m=e.uniforms,b=e.children,x=e.width,E=e.height,C=[],w={},T=0,R=0;R<b.length;R++){var D=b[R];T===i&&T++,w[R]=T,C.push(t(D,T)),T++}var S=void 0;if(h in u)S=u[h];else if(h in a)S=u[h]=a[h];else{var M=v.get(h);c(M,"Shader #%s does not exists",h),S=d(n,_,M.frag),S.name=M.name,S.attributes._p.pointer(),u[h]=S}var I={},P={},O=0;for(var A in m){var N=m[A],L=S.types.uniforms[A];if(c(L,"Shader '%s': Uniform '%s' is not defined/used",S.name,A),!N||"sampler2D"!==L&&"samplerCube"!==L)I[A]=N;else switch(I[A]=O++,N.type){case"target":P[A]=o[N.id];break;case"framebuffer":var F=w[N.id],k=void 0;F in f?k=f[F]:F in l?k=f[F]=l[F]:(k=g(n,[2,2]),k.minFilter=k.magFilter=n.LINEAR,f[F]=k),P[A]=k.color[0];break;case"image":var U=N.value,j=U.uri;c(j&&"string"==typeof j,"Shader '%s': An image src is defined for uniform '%s'",S.name,A);var B=void 0;j in p?B=p[j]:j in s?B=p[j]=s[j]:(B=new y(n,r),p[j]=B),B.src=j,P[A]=B.getTexture();break;default:c(!1,"Shader '%s': invalid uniform '%s' value of type '%s'",S.name,A,N.type)}}var V=Object.keys(S.uniforms).filter(function(e){return!(e in I)});return c(0===V.length,"Shader '%s': All defined uniforms must be provided. Missing: '"+V.join("', '")+"'",S.name),{shader:S,uniforms:I,textures:P,children:C,width:x,height:E,frameIndex:i}}var n=this.gl;if(n){var r=this.onImageLoad,o=this._targetTextures,a=this._shaders,s=this._images,l=this._fbos,u={},p={},f={};this._renderData=t(e,-1),i(u,a),i(f,l),i(p,s),this._shaders=u,this._fbos=f,this._images=p,this._needsSyncData=!1,this.requestDraw()}}},{key:"draw",value:function(){function e(n){var s=n.shader,l=n.uniforms,u=n.textures,c=n.children,p=n.width,f=n.height,h=n.frameIndex,d=p*r,m=f*r;
|
|
if(c.forEach(e),-1===h)t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,d,m);else{var g=o[h];a(g,[d,m]),g.bind()}t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.bindBuffer(t.ARRAY_BUFFER,i);for(var v in u)u[v].bind(l[v]);for(var v in l)s.uniforms[v]=l[v];t.drawArrays(t.TRIANGLES,0,6)}var t=this.gl,n=this._renderData;if(t&&n){var r=this.state.scale,o=this._fbos,i=this._buffer;this.syncTargetTextures(),e(n)}}},{key:"onImageLoad",value:function(){this.requestSyncData()}},{key:"resizeTargetTextures",value:function(e){var t=this.gl,n=this._targetTextures,r=n.length;if(r!==e)if(r>e){for(var o=e;r>o;o++)n[o].dispose();n.length=e}else for(var o=n.length;e>o;o++){var i=m(t,[2,2]);i.minFilter=i.magFilter=t.LINEAR,n.push(i)}}},{key:"syncTargetTextures",value:function(){for(var e=this.getDrawingTargets(),t=this._targetTextures,n=0;n<e.length;n++){var r=e[n];this.syncTargetTexture(t[n],r)}}},{key:"syncTargetTexture",value:function(e,t){var n=t.width||t.videoWidth,r=t.height||t.videoHeight;n&&r?(a(e,[n,r]),e.setPixels(t)):e.shape=[2,2]}},{key:"syncBlendMode",value:function(e){var t=this.gl;t&&(e.opaque?t.disable(t.BLEND):(t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA)))}},{key:"getDrawingTargets",value:function(){var e=this.props.nbTargets;if(0===e)return[];for(var t=p.findDOMNode(this.refs.render).parentNode.children,n=[],r=0;e>r;r++)n[r]=t[r].firstChild;return n}},{key:"requestSyncData",value:function(){this._needsSyncData||(this._needsSyncData=!0,requestAnimationFrame(this.handleSyncData))}},{key:"handleSyncData",value:function(){this._needsSyncData&&this.syncData(this.props.data)}},{key:"requestDraw",value:function(){this._needsDraw||(this._needsDraw=!0,requestAnimationFrame(this.handleDraw))}},{key:"handleDraw",value:function(){this._needsDraw&&(this._needsDraw=!1,this.draw())}}]),t}(f);b.propTypes={width:h.number.isRequired,height:h.number.isRequired,data:h.object.isRequired,nbTargets:h.number.isRequired},t.exports=b},{"./GLImage":38,"./Shaders":39,"./static.vert":43,"gl-fbo":8,"gl-shader":14,"gl-texture2d":34,invariant:35,react:228}],38:[function(e,t,n){"use strict";function r(e,t,n){var r=new window.Image;return r.crossOrigin=!0,r.onload=function(){t(r)},r.onabort=r.onerror=n,r.src=e,function(){r.onload=null,r.onerror=null,r.onabort=null,r.src="",r=null}}function o(e,t){this.gl=e,this.image=null,this._onload=t,this.texture=i(e,[2,2]),this.texture.minFilter=this.texture.magFilter=e.LINEAR,this._textureImg=null}var i=e("gl-texture2d");o.prototype={dispose:function(){this._loading&&this._loading(),this.texture.dispose(),this.texture=null},reloadImage:function(){var e=this,t=this._src;this._loading&&this._loading(),this._loading=null,t?this._loading=r(t,function(t){e.clearImage(),e._loading=null,e.image=t,e._onload&&e._onload()},function(){e._loading=null,e.clearImage()}):this.clearImage()},getTexture:function(){var e=this.image,t=this.texture;return e!==this._textureImg&&(this._textureImg=e,e?(t.shape=[e.width,e.height],t.setPixels(e)):t.shape=[2,2]),t},clearImage:function(){this.image=null}},Object.defineProperty(o.prototype,"src",{set:function(e){e!==this._src&&(this._src=e,this.reloadImage())},get:function(){return this._src}}),t.exports=o},{"gl-texture2d":34}],39:[function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=e("gl-react-core"),i=o.createShaders,a=function(){},s={},l=i(function(e,t){try{a(t)}catch(n){var r=new Error("Shader '"+name+"': "+n.message);throw r.stack=n.stack,r.name=n.name,r.original=n,r}s[e]=t});t.exports=r({},l,{get:function(e){return s[e]}})},{"./static.vert":43,"gl-react-core":13,"gl-shader":14}],40:[function(e,t,n){"use strict";var r=e("gl-react-core"),o=r.createTarget,i=e("react");t.exports=o(i)},{"gl-react-core":13,react:228}],41:[function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=e("react"),i=e("./Shaders"),a=e("./Target"),s=e("./Component"),l=e("./GLCanvas"),u=e("gl-react-core"),c=u.createView,p=function(e,t,n,i,a){var s=o.Children.only(a),l={position:"absolute",top:0,left:0,width:t+"px",height:n+"px",visibility:"hidden"};return o.createElement("div",{key:"target-"+i,style:r({},l,e)},s)},f=function(e,t,n,i,a){return o.createElement(l,r({},e,{width:t,height:n,data:i,nbTargets:a}))},h=function(e,t,n,i,a){var s=r({},e,{position:"relative",width:t+"px",height:n+"px",overflow:"hidden"});return o.createElement("div",{style:s},i,a)};t.exports=c(o,i,a,s,h,p,f)},{"./Component":36,"./GLCanvas":37,"./Shaders":39,"./Target":40,"gl-react-core":13,react:228}],42:[function(e,t,n){"use strict";var r=e("./Shaders"),o=e("./View"),i=e("./Target"),a=e("./Component");t.exports={Shaders:r,View:o,Target:i,Component:a}},{"./Component":36,"./Shaders":39,"./Target":40,"./View":41}],43:[function(e,t,n){"use strict";t.exports="\nattribute vec2 _p;\nvarying vec2 uv;\nvoid main() {\n gl_Position = vec4(_p,0.0,1.0);\n uv = vec2(0.5, 0.5) * (_p+vec2(1.0, 1.0));\n}\n"},{}],44:[function(e,t,n){t.exports=e("./transitions.min.json")},{"./transitions.min.json":45}],45:[function(e,t,n){t.exports=[{id:"1f6e25d1075bb82e21db",name:"Blur",owner:"giangchau92",uniforms:{size:0},html_url:"https://gist.github.com/1f6e25d1075bb82e21db",created_at:"2015-05-03T16:04:27Z",updated_at:"2015-07-20T19:32:12Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define QUALITY 32\n\n#define N 20\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float size;const float GOLDEN_ANGLE=2.399963229728653;vec4 blur(sampler2D t,vec2 c,float radius){vec4 sum=vec4(0.0);float q=float(QUALITY);for(int i=0;i<QUALITY;++i){float fi=float(i);float a=fi*GOLDEN_ANGLE;float r=sqrt(fi/q)*radius;vec2 p=c+r*vec2(cos(a),sin(a));sum+=texture2D(t,p);}return sum/q;}vec4 blur2(sampler2D t,vec2 p){vec4 sum=vec4(0.0);int count=0;vec2 delta=vec2(1.0,1.0)/resolution.xy;for(int i=-N;i<N;i++){for(int j=-N;j<N;j++){vec2 uv;uv.x=p.x+float(i)*delta.x;uv.y=p.y+float(j)*delta.y;sum+=texture2D(t,uv);count++;}}return sum/float(count);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=blur2(from,p);}"},{id:"1b4862e4e2050a3abebe",name:"glitch displace",owner:"mattdesl",uniforms:{},html_url:"https://gist.github.com/1b4862e4e2050a3abebe",created_at:"2015-01-15T19:48:03Z",updated_at:"2015-07-20T19:18:06Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;highp float random(vec2 co){highp float a=12.9898;highp float b=78.233;highp float c=43758.5453;highp float dt=dot(co.xy,vec2(a,b));highp float sn=mod(dt,3.14);return fract(sin(sn)*c);}float voronoi(in vec2 x){vec2 p=floor(x);vec2 f=fract(x);float res=8.0;for(float j=-1.;j<=1.;j++)for(float i=-1.;i<=1.;i++){vec2 b=vec2(i,j);vec2 r=b-f+random(p+b);float d=dot(r,r);res=min(res,d);}return sqrt(res);}vec2 displace(vec4 tex,vec2 texCoord,float dotDepth,float textureDepth,float strength){float b=voronoi(.003*texCoord+2.0);float g=voronoi(0.2*texCoord);float r=voronoi(texCoord-1.0);vec4 dt=tex*1.0;vec4 dis=dt*dotDepth+1.0-tex*textureDepth;dis.x=dis.x-1.0+textureDepth*dotDepth;dis.y=dis.y-1.0+textureDepth*dotDepth;dis.x*=strength;dis.y*=strength;vec2 res_uv=texCoord;res_uv.x=res_uv.x+dis.x-0.0;res_uv.y=res_uv.y+dis.y;return res_uv;}float ease1(float t){return t==0.0||t==1.0?t:t<0.5?+0.5*pow(2.0,(20.0*t)-10.0):-0.5*pow(2.0,10.0-(t*20.0))+1.0;}float ease2(float t){return t==1.0?t:1.0-pow(2.0,-10.0*t);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 color1=texture2D(from,p);vec4 color2=texture2D(to,p);vec2 disp=displace(color1,p,0.33,0.7,1.0-ease1(progress));vec2 disp2=displace(color2,p,0.33,0.5,ease2(progress));vec4 dColor1=texture2D(to,disp);vec4 dColor2=texture2D(from,disp2);float val=ease1(progress);vec3 gray=vec3(dot(min(dColor2,dColor1).rgb,vec3(0.299,0.587,0.114)));dColor2=vec4(gray,1.0);dColor2*=2.0;color1=mix(color1,dColor2,smoothstep(0.0,0.5,progress));color2=mix(color2,dColor1,smoothstep(1.0,0.5,progress));gl_FragColor=mix(color1,color2,val);}"},{id:"04fd9a7de4012cbb03f6",name:"crosshatch",owner:"pthrasher",uniforms:{},html_url:"https://gist.github.com/04fd9a7de4012cbb03f6",created_at:"2014-12-17T03:04:51Z",updated_at:"2015-07-20T19:34:07Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;const vec2 center=vec2(0.5,0.5);float quadraticInOut(float t){float p=2.0*t*t;return t<0.5?p:-p+(4.0*t)-1.0;}float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;if(progress==0.0){gl_FragColor=texture2D(from,p);}else if(progress==1.0){gl_FragColor=texture2D(to,p);}else{float x=progress;float dist=distance(center,p);float r=x-min(rand(vec2(p.y,0.0)),rand(vec2(0.0,p.x)));float m=dist<=r?1.0:0.0;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),m);}}"},{id:"8e6226b215548ba12734",name:"undulating burn out",owner:"pthrasher",uniforms:{smoothness:.02},html_url:"https://gist.github.com/8e6226b215548ba12734",created_at:"2014-12-16T23:01:57Z",updated_at:"2015-07-20T19:33:16Z",stars:2,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define M_PI 3.14159265358979323846 /* pi */\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float smoothness;const vec2 center=vec2(0.5,0.5);float quadraticInOut(float t){float p=2.0*t*t;return t<0.5?p:-p+(4.0*t)-1.0;}float linearInterp(vec2 range,vec2 domain,float x){return mix(range.x,range.y,smoothstep(domain.x,domain.y,clamp(x,domain.x,domain.y)));}float getGradient(float r,float dist){float grad=smoothstep(-smoothness,0.0,r-dist*(1.0+smoothness));if(r-dist<0.005&&r-dist>-0.005){return -1.0;}else if(r-dist<0.01&&r-dist>-0.005){return -2.0;}return grad;}float round(float a){return floor(a+0.5);}float getWave(vec2 p){vec2 _p=p-center;float rads=atan(_p.y,_p.x);float degs=degrees(rads)+180.0;vec2 range=vec2(0.0,M_PI*30.0);vec2 domain=vec2(0.0,360.0);float ratio=(M_PI*30.0)/360.0;degs=degs*ratio;float x=progress;float magnitude=mix(0.02,0.09,smoothstep(0.0,1.0,x));float offset=mix(40.0,30.0,smoothstep(0.0,1.0,x));float ease_degs=quadraticInOut(sin(degs));float deg_wave_pos=(ease_degs*magnitude)*sin(x*offset);return x+deg_wave_pos;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;if(progress==0.0){gl_FragColor=texture2D(from,p);}else if(progress==1.0){gl_FragColor=texture2D(to,p);}else{float dist=distance(center,p);float m=getGradient(getWave(p),dist);if(m==-2.0){gl_FragColor=mix(texture2D(from,p),vec4(0.0,0.0,0.0,1.0),0.75);}else{gl_FragColor=mix(texture2D(from,p),texture2D(to,p),m);}}}"},{id:"b3aa4a8b4f88dc228d4a",name:"test",owner:"brandonyoyo",uniforms:{},html_url:"https://gist.github.com/b3aa4a8b4f88dc228d4a",created_at:"2014-10-26T16:46:18Z",updated_at:"2015-07-20T19:18:46Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),progress);}"},{id:"d1f891c5585fc40b55ea",name:"Star Wipe",owner:"MemoryStomp",uniforms:{},html_url:"https://gist.github.com/d1f891c5585fc40b55ea",created_at:"2014-07-01T06:58:45Z",updated_at:"2015-07-20T19:24:46Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;vec2 circlePoint(float ang){ang+=6.28318*0.15;return vec2(cos(ang),sin(ang));}float cross2d(vec2 a,vec2 b){return (a.x*b.y-a.y*b.x);}float star(vec2 p,float size){if(size<=0.0){return 0.0;}p/=size;vec2 p0=circlePoint(0.0);vec2 p1=circlePoint(6.28318*1.0/5.0);vec2 p2=circlePoint(6.28318*2.0/5.0);vec2 p3=circlePoint(6.28318*3.0/5.0);vec2 p4=circlePoint(6.28318*4.0/5.0);float s0=(cross2d(p1-p0,p-p0));float s1=(cross2d(p2-p1,p-p1));float s2=(cross2d(p3-p2,p-p2));float s3=(cross2d(p4-p3,p-p3));float s4=(cross2d(p0-p4,p-p4));float s5=min(min(min(s0,s1),min(s2,s3)),s4);float s=max(1.0-sign(s0*s1*s2*s3*s4)+sign(s5),0.0);s=sign(2.6-length(p))*s;return max(s,0.0);}void main(){vec2 p=(gl_FragCoord.xy/resolution.xy);vec2 o=p*2.0-1.0;float t=progress*1.4;float c1=star(o,t);float c2=star(o,t-0.1);float border=max(c1-c2,0.0);gl_FragColor=mix(texture2D(from,p),texture2D(to,p),c1)+vec4(border,border,border,0.0);}"},{id:"5a4d1fb6711076d17e2e",name:"morph",owner:"paniq",uniforms:{},html_url:"https://gist.github.com/5a4d1fb6711076d17e2e",created_at:"2014-07-01T04:52:25Z",updated_at:"2015-07-27T15:08:48Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;const float strength=0.1;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 ca=texture2D(from,p);vec4 cb=texture2D(to,p);vec2 oa=(((ca.rg+ca.b)*0.5)*2.0-1.0);vec2 ob=(((cb.rg+cb.b)*0.5)*2.0-1.0);vec2 oc=mix(oa,ob,0.5)*strength;float w0=progress;float w1=1.0-w0;gl_FragColor=mix(texture2D(from,p+oc*w0),texture2D(to,p-oc*w1),progress);}"},{id:"00973cee8e0353c73305",name:"LumaWipe",owner:"rectalogic",uniforms:{lumaTex:"conical-asym.png",invertLuma:!0,softness:.25},html_url:"https://gist.github.com/00973cee8e0353c73305",created_at:"2014-06-17T02:11:27Z",updated_at:"2015-07-20T19:31:54Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform sampler2D lumaTex;uniform bool invertLuma;uniform float softness;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float luma=texture2D(lumaTex,p).x;if(invertLuma) luma=1.0-luma;vec4 fromColor=texture2D(from,p);vec4 toColor=texture2D(to,p);float time=mix(0.0,1.0+softness,progress);if(luma<=time-softness) gl_FragColor=toColor;else if(luma>=time) gl_FragColor=fromColor;else{float alpha=(time-luma)/softness;gl_FragColor=mix(fromColor,toColor,alpha);}}"},{id:"0141a38779af3a652c22",name:"simple luma",owner:"gre",uniforms:{luma:"spiral-1.png"},html_url:"https://gist.github.com/0141a38779af3a652c22",created_at:"2014-06-13T08:16:10Z",updated_at:"2015-07-20T19:20:23Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform sampler2D luma;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),step(texture2D(luma,p).r,progress));}"},{id:"ee15128c2b87d0e74dee",name:"cube",owner:"gre",uniforms:{persp:.7,unzoom:.3,reflection:.4,floating:3},html_url:"https://gist.github.com/ee15128c2b87d0e74dee",created_at:"2014-06-12T17:13:17Z",updated_at:"2015-07-20T19:33:46Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float persp;uniform float unzoom;uniform float reflection;uniform float floating;vec2 project(vec2 p){return p*vec2(1.0,-1.2)+vec2(0.0,-floating/100.);}bool inBounds(vec2 p){return all(lessThan(vec2(0.0),p))&&all(lessThan(p,vec2(1.0)));}vec4 bgColor(vec2 p,vec2 pfr,vec2 pto){vec4 c=vec4(0.0,0.0,0.0,1.0);pfr=project(pfr);if(inBounds(pfr)){c+=mix(vec4(0.0),texture2D(from,pfr),reflection*mix(1.0,0.0,pfr.y));}pto=project(pto);if(inBounds(pto)){c+=mix(vec4(0.0),texture2D(to,pto),reflection*mix(1.0,0.0,pto.y));}return c;}vec2 xskew(vec2 p,float persp,float center){float x=mix(p.x,1.0-p.x,center);return ((vec2(x,(p.y-0.5*(1.0-persp)*x)/(1.0+(persp-1.0)*x))-vec2(0.5-distance(center,0.5),0.0))*vec2(0.5/distance(center,0.5)*(center<0.5?1.0:-1.0),1.0)+vec2(center<0.5?0.0:1.0,0.0));}void main(){vec2 op=gl_FragCoord.xy/resolution.xy;float uz=unzoom*2.0*(0.5-distance(0.5,progress));vec2 p=-uz*0.5+(1.0+uz)*op;vec2 fromP=xskew((p-vec2(progress,0.0))/vec2(1.0-progress,1.0),1.0-mix(progress,0.0,persp),0.0);vec2 toP=xskew(p/vec2(progress,1.0),mix(pow(progress,2.0),1.0,persp),1.0);if(inBounds(fromP)){gl_FragColor=texture2D(from,fromP);}else if(inBounds(toP)){gl_FragColor=texture2D(to,toP);}else{gl_FragColor=bgColor(op,fromP,toP);}}"},{id:"9b99fc01fd5705008a5b",name:"Glitch Memories",owner:"niseh",uniforms:{},html_url:"https://gist.github.com/9b99fc01fd5705008a5b",created_at:"2014-05-29T19:32:52Z",updated_at:"2015-07-20T19:33:58Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void glitch_memories(sampler2D pic){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 block=floor(gl_FragCoord.xy/vec2(16));vec2 uv_noise=block/vec2(64);uv_noise+=floor(vec2(progress)*vec2(1200.0,3500.0))/vec2(64);float block_thresh=pow(fract(progress*1200.0),2.0)*0.2;float line_thresh=pow(fract(progress*2200.0),3.0)*0.7;vec2 red=p,green=p,blue=p,o=p;vec2 dist=(fract(uv_noise)-0.5)*0.3;red+=dist*0.1;green+=dist*0.2;blue+=dist*0.125;gl_FragColor.r=texture2D(pic,red).r;gl_FragColor.g=texture2D(pic,green).g;gl_FragColor.b=texture2D(pic,blue).b;gl_FragColor.a=1.0;}void main(void){float smoothed=smoothstep(0.,1.,progress);if((smoothed<0.4&&smoothed>0.1)){glitch_memories(from);}else if((smoothed>0.6&&smoothed<0.9)){glitch_memories(to);}else{vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),progress);}}"},{id:"fe67b3b5149738069537",name:"potleaf",owner:"Flexi23",uniforms:{},html_url:"https://gist.github.com/fe67b3b5149738069537",created_at:"2014-05-28T09:58:30Z",updated_at:"2015-07-20T19:32:45Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 uv=gl_FragCoord.xy/resolution.xy;vec2 leaf_uv=(uv-vec2(0.5))/10./pow(progress,3.5);leaf_uv.y+=0.35;float r=0.18;float o=atan(leaf_uv.y,leaf_uv.x);gl_FragColor=mix(texture2D(from,uv),texture2D(to,uv),1.-step(1.-length(leaf_uv)+r*(1.+sin(o))*(1.+0.9*cos(8.*o))*(1.+0.1*cos(24.*o))*(0.9+0.05*cos(200.*o)),1.));}"},{id:"b86b90161503a0023231",name:"CrossZoom",owner:"rectalogic",uniforms:{strength:.4},html_url:"https://gist.github.com/b86b90161503a0023231",created_at:"2014-05-25T01:24:39Z",updated_at:"2015-07-20T19:33:57Z",stars:2,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float strength;const float PI=3.141592653589793;float Linear_ease(in float begin,in float change,in float duration,in float time){return change*time/duration+begin;}float Exponential_easeInOut(in float begin,in float change,in float duration,in float time){if(time==0.0) return begin;else if(time==duration) return begin+change;time=time/(duration/2.0);if(time<1.0) return change/2.0*pow(2.0,10.0*(time-1.0))+begin;return change/2.0*(-pow(2.0,-10.0*(time-1.0))+2.0)+begin;}float Sinusoidal_easeInOut(in float begin,in float change,in float duration,in float time){return -change/2.0*(cos(PI*time/duration)-1.0)+begin;}float random(in vec3 scale,in float seed){return fract(sin(dot(gl_FragCoord.xyz+seed,scale))*43758.5453+seed);}vec3 crossFade(in vec2 uv,in float dissolve){return mix(texture2D(from,uv).rgb,texture2D(to,uv).rgb,dissolve);}void main(){vec2 texCoord=gl_FragCoord.xy/resolution.xy;vec2 center=vec2(Linear_ease(0.25,0.5,1.0,progress),0.5);float dissolve=Exponential_easeInOut(0.0,1.0,1.0,progress);float strength=Sinusoidal_easeInOut(0.0,strength,0.5,progress);vec3 color=vec3(0.0);float total=0.0;vec2 toCenter=center-texCoord;float offset=random(vec3(12.9898,78.233,151.7182),0.0);for(float t=0.0;t<=40.0;t++){float percent=(t+offset)/40.0;float weight=4.0*(percent-percent*percent);color+=crossFade(texCoord+toCenter*percent*strength,dissolve)*weight;total+=weight;}gl_FragColor=vec4(color/total,1.0);}"},{id:"ce9279de351984f0ad27",name:"Slide",owner:"rectalogic",uniforms:{translateX:1,translateY:0},html_url:"https://gist.github.com/ce9279de351984f0ad27",created_at:"2014-05-25T01:13:20Z",updated_at:"2015-07-20T19:20:33Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float translateX;uniform float translateY;void main(){vec2 texCoord=gl_FragCoord.xy/resolution.xy;float x=progress*translateX;float y=progress*translateY;if(x>=0.0&&y>=0.0){if(texCoord.x>=x&&texCoord.y>=y){gl_FragColor=texture2D(from,texCoord-vec2(x,y));}else{vec2 uv;if(x>0.0) uv=vec2(x-1.0,y);else if(y>0.0) uv=vec2(x,y-1.0);gl_FragColor=texture2D(to,texCoord-uv);}}else if(x<=0.0&&y<=0.0){if(texCoord.x<=(1.0+x)&&texCoord.y<=(1.0+y)) gl_FragColor=texture2D(from,texCoord-vec2(x,y));else{vec2 uv;if(x<0.0) uv=vec2(x+1.0,y);else if(y<0.0) uv=vec2(x,y+1.0);gl_FragColor=texture2D(to,texCoord-uv);}}else gl_FragColor=vec4(0.0);}"},{id:"154a99fbe5300fb5c279",name:"pinwheel",owner:"mrspeaker",uniforms:{},html_url:"https://gist.github.com/154a99fbe5300fb5c279",created_at:"2014-05-23T21:56:59Z",updated_at:"2015-07-20T19:18:23Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float circPos=atan(p.y-0.5,p.x-0.5)+progress;float modPos=mod(circPos,3.1415/4.);float signed=sign(progress-modPos);float smoothed=smoothstep(0.,1.,signed);if(smoothed>0.5){gl_FragColor=texture2D(to,p);}else{gl_FragColor=texture2D(from,p);}}"},{id:"e54a807cdb66c8b16a34",name:"Kaleidoscope",owner:"nwoeanhinnogaehr",uniforms:{speed:1,angle:2,power:2},html_url:"https://gist.github.com/e54a807cdb66c8b16a34",created_at:"2014-05-23T19:02:46Z",updated_at:"2015-07-20T19:24:33Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float speed;uniform float angle;uniform float power;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 q=p;float t=pow(progress,power)*speed;p=p-0.5;for(int i=0;i<7;i++){p=vec2(sin(t)*p.x+cos(t)*p.y,sin(t)*p.y-cos(t)*p.x);t+=angle;p=abs(mod(p,2.0)-1.0);}abs(mod(p,1.0));gl_FragColor=mix(mix(texture2D(from,q),texture2D(to,q),progress),mix(texture2D(from,p),texture2D(to,p),progress),1.0-2.0*abs(progress-0.5));}"},{id:"408045772d255df97520",name:"SimpleFlip",owner:"nwoeanhinnogaehr",uniforms:{},html_url:"https://gist.github.com/408045772d255df97520",created_at:"2014-05-23T18:42:58Z",updated_at:"2015-07-20T19:19:51Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 q=p;p.x=(p.x-0.5)/abs(progress-0.5)*0.5+0.5;vec4 a=texture2D(from,p);vec4 b=texture2D(to,p);gl_FragColor=vec4(mix(a,b,step(0.5,progress)).rgb*step(abs(q.x-0.5),abs(progress-0.5)),1.0);}"},{id:"a070cbd69e2535e757f1",name:"DoomScreenTransition",owner:"zeh",uniforms:{barWidth:10,noise:.2,amplitude:2,frequency:1},html_url:"https://gist.github.com/a070cbd69e2535e757f1",created_at:"2014-05-23T18:00:18Z",updated_at:"2015-07-20T19:32:46Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform int barWidth;uniform float amplitude;uniform float noise;uniform float frequency;float rand(int num){return fract(mod(float(num)*67123.313,12.0)*sin(float(num)*10.3)*cos(float(num)));}float wave(int num){float fn=float(num)*frequency*0.1*float(barWidth);return cos(fn*0.5)*cos(fn*0.13)*sin((fn+10.0)*0.3)/2.0+0.5;}float pos(int num){return noise==0.0?wave(num):mix(wave(num),rand(num),noise);}void main(){int bar=int(gl_FragCoord.x)/barWidth;float scale=1.0+pos(bar)*amplitude;float phase=progress*scale;float posY=gl_FragCoord.y/resolution.y;vec2 p;vec4 c;if(phase+posY<1.0){p=vec2(gl_FragCoord.x,gl_FragCoord.y+mix(0.0,resolution.y,phase))/resolution.xy;c=texture2D(from,p);}else{p=gl_FragCoord.xy/resolution.xy;c=texture2D(to,p);}gl_FragColor=c;}"},{id:"a830822b23e846e25d2d",name:"DreamyZoom",owner:"zeh",uniforms:{rotation:6,scale:1.2},html_url:"https://gist.github.com/a830822b23e846e25d2d",created_at:"2014-05-23T15:27:25Z",updated_at:"2015-07-20T19:31:41Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define DEG2RAD 0.03926990816987241548078304229099 // 1/180*PI\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float rotation;uniform float scale;void main(){float phase=progress<0.5?progress*2.0:(progress-0.5)*2.0;float angleOffset=progress<0.5?mix(0.0,rotation*DEG2RAD,phase):mix(-rotation*DEG2RAD,0.0,phase);float newScale=progress<0.5?mix(1.0,scale,phase):mix(scale,1.0,phase);vec2 center=vec2(0,0);float maxRes=max(resolution.x,resolution.y);float resX=resolution.x/maxRes*0.5;float resY=resolution.y/maxRes*0.5;vec2 p=(gl_FragCoord.xy/maxRes-vec2(resX,resY))/newScale;float angle=atan(p.y,p.x)+angleOffset;float dist=distance(center,p);p.x=cos(angle)*dist+resX;p.y=sin(angle)*dist+resY;vec4 c=progress<0.5?texture2D(from,p):texture2D(to,p);gl_FragColor=c+(progress<0.5?mix(0.0,1.0,phase):mix(1.0,0.0,phase));}"},{id:"b6720916aa3f035949bc",name:"squareswipe",owner:"gre",uniforms:{squares:[10,10],direction:[1,-.5],smoothness:1.6},html_url:"https://gist.github.com/b6720916aa3f035949bc",created_at:"2014-05-23T12:09:38Z",updated_at:"2015-07-20T19:20:09Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform ivec2 squares;uniform vec2 direction;uniform float smoothness;const vec2 center=vec2(0.5,0.5);void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 v=normalize(direction);if(v!=vec2(0.0)) v/=abs(v.x)+abs(v.y);float d=v.x*center.x+v.y*center.y;float offset=smoothness;float pr=smoothstep(-offset,0.0,v.x*p.x+v.y*p.y-(d-0.5+progress*(1.+offset)));vec2 squarep=fract(p*vec2(squares));vec2 squaremin=vec2(pr/2.0);vec2 squaremax=vec2(1.0-pr/2.0);float a=all(lessThan(squaremin,squarep))&&all(lessThan(squarep,squaremax))?1.0:0.0;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),a);}"},{id:"169781bb76f310e2bfde",name:"TilesWaveBottomLeftToTopRight",owner:"numb3r23",uniforms:{tileSize:[64,64],checkerDistance:0,flipX:!1,flipY:!1,preTileSingleColor:!1,postTileSingleColor:!1},html_url:"https://gist.github.com/169781bb76f310e2bfde",created_at:"2014-05-21T22:50:48Z",updated_at:"2015-07-20T19:24:32Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform vec2 tileSize;uniform float checkerDistance;uniform bool flipX;uniform bool flipY;uniform bool preTileSingleColor;uniform bool postTileSingleColor;vec2 tile2Global(vec2 tex,vec2 tileNum,bool tileSingleColor){vec2 perTile=tileSize/resolution.xy;return tileNum*perTile+(tileSingleColor?vec2(0):tex*perTile);}void main(void){vec2 uv=gl_FragCoord.xy/resolution.xy;vec4 fragColor=vec4(1,1,0,1);vec2 posInTile=mod(vec2(gl_FragCoord),tileSize);vec2 tileNum=floor(vec2(gl_FragCoord)/tileSize);int num=int(tileNum.x);vec2 totalTiles=ceil(resolution.xy/tileSize);float countTiles=totalTiles.x*totalTiles.y;vec2 perTile=ceil(tileSize/resolution.xy);float offset=0.0;offset=(tileNum.y+tileNum.x*perTile.y)/(sqrt(countTiles)*2.0);float timeOffset=(progress-offset)*countTiles;timeOffset=clamp(timeOffset,0.0,0.5);float sinTime=1.0-abs(cos(fract(timeOffset)*3.1415926));fragColor.rg=uv;fragColor.b=sinTime;vec2 texC=posInTile/tileSize;if(sinTime<=0.5){if(flipX){if((texC.x<sinTime)||(texC.x>1.0-sinTime)){discard;}if(texC.x<0.5){texC.x=(texC.x-sinTime)*0.5/(0.5-sinTime);}else{texC.x=(texC.x-0.5)*0.5/(0.5-sinTime)+0.5;}}if(flipY){if((texC.y<sinTime)||(texC.y>1.0-sinTime)){discard;}if(texC.y<0.5){texC.y=(texC.y-sinTime)*0.5/(0.5-sinTime);}else{texC.y=(texC.y-0.5)*0.5/(0.5-sinTime)+0.5;}}fragColor=texture2D(from,tile2Global(texC,tileNum,preTileSingleColor));}else{if(flipX){if((texC.x>sinTime)||(texC.x<1.0-sinTime)){discard;}if(texC.x<0.5){texC.x=(texC.x-sinTime)*0.5/(0.5-sinTime);}else{texC.x=(texC.x-0.5)*0.5/(0.5-sinTime)+0.5;}texC.x=1.0-texC.x;}if(flipY){if((texC.y>sinTime)||(texC.y<1.0-sinTime)){discard;}if(texC.y<0.5){texC.y=(texC.y-sinTime)*0.5/(0.5-sinTime);}else{texC.y=(texC.y-0.5)*0.5/(0.5-sinTime)+0.5;}texC.y=1.0-texC.y;}fragColor.rgb=texture2D(to,tile2Global(texC,tileNum,postTileSingleColor)).rgb;}gl_FragColor=fragColor;}"},{id:"5ebd3442a208861c7a8a",name:"TilesScanline",owner:"numb3r23",uniforms:{},html_url:"https://gist.github.com/5ebd3442a208861c7a8a",created_at:"2014-05-21T22:49:22Z",updated_at:"2015-07-20T19:31:40Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;const vec2 tileSize=vec2(64,64);const float checkerDistance=0.015;const bool flipX=true;const bool flipY=false;const bool preTileSingleColor=false;const bool postTileSingleColor=false;vec2 tile2Global(vec2 tex,vec2 tileNum,bool tileSingleColor){vec2 perTile=tileSize/resolution.xy;return tileNum*perTile+(tileSingleColor?vec2(0):tex*perTile);}void main(void){vec2 uv=gl_FragCoord.xy/resolution.xy;vec4 fragColor=vec4(1,1,0,1);vec2 posInTile=mod(vec2(gl_FragCoord),tileSize);vec2 tileNum=floor(vec2(gl_FragCoord)/tileSize);int num=int(tileNum.x);vec2 totalTiles=ceil(resolution.xy/tileSize);float countTiles=totalTiles.x*totalTiles.y;vec2 perTile=ceil(tileSize/resolution.xy);float offset=0.0;offset=(tileNum.x+tileNum.y*totalTiles.x)/countTiles;float timeOffset=(progress-offset)*countTiles;timeOffset=clamp(timeOffset,0.0,0.5);float sinTime=1.0-abs(cos(fract(timeOffset)*3.1415926));fragColor.rg=uv;fragColor.b=sinTime;vec2 texC=posInTile/tileSize;if(sinTime<=0.5){if(flipX){if((texC.x<sinTime)||(texC.x>1.0-sinTime)){discard;}if(texC.x<0.5){texC.x=(texC.x-sinTime)*0.5/(0.5-sinTime);}else{texC.x=(texC.x-0.5)*0.5/(0.5-sinTime)+0.5;}}if(flipY){if((texC.y<sinTime)||(texC.y>1.0-sinTime)){discard;}if(texC.y<0.5){texC.y=(texC.y-sinTime)*0.5/(0.5-sinTime);}else{texC.y=(texC.y-0.5)*0.5/(0.5-sinTime)+0.5;}}fragColor=texture2D(from,tile2Global(texC,tileNum,preTileSingleColor));}else{if(flipX){if((texC.x>sinTime)||(texC.x<1.0-sinTime)){discard;}if(texC.x<0.5){texC.x=(texC.x-sinTime)*0.5/(0.5-sinTime);}else{texC.x=(texC.x-0.5)*0.5/(0.5-sinTime)+0.5;}texC.x=1.0-texC.x;}if(flipY){if((texC.y>sinTime)||(texC.y<1.0-sinTime)){discard;}if(texC.y<0.5){texC.y=(texC.y-sinTime)*0.5/(0.5-sinTime);}else{texC.y=(texC.y-0.5)*0.5/(0.5-sinTime)+0.5;}texC.y=1.0-texC.y;}fragColor.rgb=texture2D(to,tile2Global(texC,tileNum,postTileSingleColor)).rgb;}gl_FragColor=fragColor;}"},{id:"9e86d2712e123542758b",name:"Dreamy",owner:"mikolalysenko",uniforms:{},html_url:"https://gist.github.com/9e86d2712e123542758b",created_at:"2014-05-21T14:55:01Z",updated_at:"2015-07-20T19:34:01Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;vec2 offset(float progress,float x,float theta){float phase=progress*progress+progress+theta;float shifty=0.03*progress*cos(10.0*(progress+x));return vec2(0,shifty);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p+offset(progress,p.x,0.0)),texture2D(to,p+offset(1.0-progress,p.x,3.14)),progress);}"},{id:"21d2fdd24c706952dc8c",name:"AdvancedMosaic",owner:"corporateshark",uniforms:{},html_url:"https://gist.github.com/21d2fdd24c706952dc8c",created_at:"2014-05-21T14:45:52Z",updated_at:"2015-07-20T19:19:04Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(void){vec2 p=gl_FragCoord.xy/resolution.xy;float T=progress;float S0=1.0;float S1=50.0;float S2=1.0;float Half=0.5;float PixelSize=(T<Half)?mix(S0,S1,T/Half):mix(S1,S2,(T-Half)/Half);vec2 D=PixelSize/resolution.xy;vec2 UV=(p+vec2(-0.5))/D;vec2 Coord=clamp(D*(ceil(UV+vec2(-0.5)))+vec2(0.5),vec2(0.0),vec2(1.0));vec4 C0=texture2D(from,Coord);vec4 C1=texture2D(to,Coord);gl_FragColor=mix(C0,C1,T);}"},{id:"cacfedb8cca0f5ce3f7c",name:"Swirl",
|
|
owner:"corporateshark",uniforms:{},html_url:"https://gist.github.com/cacfedb8cca0f5ce3f7c",created_at:"2014-05-21T14:43:04Z",updated_at:"2015-07-20T19:16:21Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(void){float Radius=1.0;float T=progress;vec2 UV=gl_FragCoord.xy/resolution.xy;UV-=vec2(0.5,0.5);float Dist=length(UV);if(Dist<Radius){float Percent=(Radius-Dist)/Radius;float A=(T<=0.5)?mix(0.0,1.0,T/0.5):mix(1.0,0.0,(T-0.5)/0.5);float Theta=Percent*Percent*A*8.0*3.14159;float S=sin(Theta);float C=cos(Theta);UV=vec2(dot(UV,vec2(C,-S)),dot(UV,vec2(S,C)));}UV+=vec2(0.5,0.5);vec4 C0=texture2D(from,UV);vec4 C1=texture2D(to,UV);gl_FragColor=mix(C0,C1,T);}"},{id:"b9f8e5675c647e615419",name:"DefocusBlur",owner:"corporateshark",uniforms:{},html_url:"https://gist.github.com/b9f8e5675c647e615419",created_at:"2014-05-21T10:12:14Z",updated_at:"2015-07-20T19:18:32Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform float progress;uniform vec2 resolution;uniform sampler2D from;uniform sampler2D to;void main(void){vec2 p=gl_FragCoord.xy/resolution.xy;float T=progress;float S0=1.0;float S1=50.0;float S2=1.0;float Half=0.5;float PixelSize=(T<Half)?mix(S0,S1,T/Half):mix(S1,S2,(T-Half)/Half);vec2 D=PixelSize/resolution.xy;vec2 UV=(gl_FragCoord.xy/resolution.xy);const int NumTaps=12;vec2 Disk[NumTaps];Disk[0]=vec2(-.326,-.406);Disk[1]=vec2(-.840,-.074);Disk[2]=vec2(-.696,.457);Disk[3]=vec2(-.203,.621);Disk[4]=vec2(.962,-.195);Disk[5]=vec2(.473,-.480);Disk[6]=vec2(.519,.767);Disk[7]=vec2(.185,-.893);Disk[8]=vec2(.507,.064);Disk[9]=vec2(.896,.412);Disk[10]=vec2(-.322,-.933);Disk[11]=vec2(-.792,-.598);vec4 C0=texture2D(from,UV);vec4 C1=texture2D(to,UV);for(int i=0;i!=NumTaps;i++){C0+=texture2D(from,Disk[i]*D+UV);C1+=texture2D(to,Disk[i]*D+UV);}C0/=float(NumTaps+1);C1/=float(NumTaps+1);gl_FragColor=mix(C0,C1,T);}"},{id:"2a5fa2f77c883dd661f9",name:"colourDistance",owner:"P-Seebauer",uniforms:{interpolationPower:5},html_url:"https://gist.github.com/2a5fa2f77c883dd661f9",created_at:"2014-05-21T07:10:21Z",updated_at:"2015-07-20T19:31:18Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float interpolationPower;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 fTex=texture2D(from,p);vec4 tTex=texture2D(to,p);gl_FragColor=mix(distance(fTex,tTex)>progress?fTex:tTex,tTex,pow(progress,interpolationPower));}"},{id:"b93818de23d4511fde10",name:"Dissolve",owner:"nwoeanhinnogaehr",uniforms:{blocksize:1},html_url:"https://gist.github.com/b93818de23d4511fde10",created_at:"2014-05-20T23:40:57Z",updated_at:"2015-07-25T20:07:28Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float blocksize;float rand(vec2 co){return fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),step(rand(floor(gl_FragCoord.xy/blocksize)),progress));}"},{id:"b185145363d65751009b",name:"HSVfade",owner:"nwoeanhinnogaehr",uniforms:{},html_url:"https://gist.github.com/b185145363d65751009b",created_at:"2014-05-20T23:21:27Z",updated_at:"2015-07-20T19:18:54Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;vec3 hsv2rgb(vec3 c){const vec4 K=vec4(1.0,2.0/3.0,1.0/3.0,3.0);vec3 p=abs(fract(c.xxx+K.xyz)*6.0-K.www);return c.z*mix(K.xxx,clamp(p-K.xxx,0.0,1.0),c.y);}vec3 rgb2hsv(vec3 c){const vec4 K=vec4(0.0,-1.0/3.0,2.0/3.0,-1.0);vec4 p=mix(vec4(c.bg,K.wz),vec4(c.gb,K.xy),step(c.b,c.g));vec4 q=mix(vec4(p.xyw,c.r),vec4(c.r,p.yzx),step(p.x,c.r));float d=q.x-min(q.w,q.y);return vec3(abs(q.z+(q.w-q.y)/(6.0*d+0.001)),d/(q.x+0.001),q.x);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec3 a=rgb2hsv(texture2D(from,p).rgb);vec3 b=rgb2hsv(texture2D(to,p).rgb);vec3 m=mix(a,b,progress);gl_FragColor=vec4(hsv2rgb(m),1.0);}"},{id:"f6fc39f4cfcbb97f96a6",name:"Fold",owner:"nwoeanhinnogaehr",uniforms:{},html_url:"https://gist.github.com/f6fc39f4cfcbb97f96a6",created_at:"2014-05-20T23:14:23Z",updated_at:"2015-07-20T19:24:57Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 a=texture2D(from,(p-vec2(progress,0.0))/vec2(1.0-progress,1.0));vec4 b=texture2D(to,p/vec2(progress,1.0));gl_FragColor=mix(a,b,step(p.x,progress));}"},{id:"80c2d40cac3f98453176",name:"linearblur",owner:"gre",uniforms:{intensity:.1},html_url:"https://gist.github.com/80c2d40cac3f98453176",created_at:"2014-05-20T22:02:35Z",updated_at:"2015-07-20T19:18:37Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float intensity;const int PASSES=8;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 c1=vec4(0.0),c2=vec4(0.0);float disp=intensity*(0.5-distance(0.5,progress));for(int xi=0;xi<PASSES;++xi){float x=float(xi)/float(PASSES)-0.5;for(int yi=0;yi<PASSES;++yi){float y=float(yi)/float(PASSES)-0.5;vec2 v=vec2(x,y);float d=disp;c1+=texture2D(from,p+d*v);c2+=texture2D(to,p+d*v);}}c1/=float(PASSES*PASSES);c2/=float(PASSES*PASSES);gl_FragColor=mix(c1,c2,progress);}"},{id:"c528607361d90a072e98",name:"pixelize",owner:"benraziel",uniforms:{},html_url:"https://gist.github.com/c528607361d90a072e98",created_at:"2014-05-20T19:32:42Z",updated_at:"2015-07-20T19:18:15Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){float revProgress=(1.0-progress);float distFromEdges=min(progress,revProgress);float squareSize=(50.0*distFromEdges)+1.0;vec2 p=(floor((gl_FragCoord.xy+squareSize*0.5)/squareSize)*squareSize)/resolution.xy;vec4 fromColor=texture2D(from,p);vec4 toColor=texture2D(to,p);gl_FragColor=mix(fromColor,toColor,progress);}"},{id:"abd06f4d23ab2ff4ed7a",name:"random_squares",owner:"benraziel",uniforms:{},html_url:"https://gist.github.com/abd06f4d23ab2ff4ed7a",created_at:"2014-05-20T19:07:25Z",updated_at:"2015-07-20T19:18:29Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){float revProgress=(1.0-progress);float distFromEdges=min(progress,revProgress);vec2 p=gl_FragCoord.xy/resolution.xy;vec4 fromColor=texture2D(from,p);vec4 toColor=texture2D(to,p);float squareSize=20.0;float flickerSpeed=60.0;vec2 seed=floor(gl_FragCoord.xy/squareSize)*floor(distFromEdges*flickerSpeed);gl_FragColor=mix(fromColor,toColor,progress)+rand(seed)*distFromEdges*0.5;}"},{id:"791d0f058ae6a83e0c15",name:"PolkaDotsCurtain",owner:"bobylito",uniforms:{center:[1,1],dots:20},html_url:"https://gist.github.com/791d0f058ae6a83e0c15",created_at:"2014-05-20T16:55:46Z",updated_at:"2015-07-20T19:33:24Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;const float SQRT_2=1.414213562373;uniform float dots;uniform vec2 center;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float x=progress/2.0;bool nextImage=distance(fract(p*dots),vec2(0.5,0.5))<(2.0*x/distance(p,center));if(nextImage) gl_FragColor=texture2D(to,p);else gl_FragColor=texture2D(from,p);}"},{id:"166e496a19a4fdbf1aae",name:"PageCurl",owner:"corporateshark",uniforms:{},html_url:"https://gist.github.com/166e496a19a4fdbf1aae",created_at:"2014-05-20T12:37:15Z",updated_at:"2015-07-20T19:18:48Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;const float MIN_AMOUNT=-0.16;const float MAX_AMOUNT=1.3;float amount=progress*(MAX_AMOUNT-MIN_AMOUNT)+MIN_AMOUNT;const float PI=3.141592653589793;const float scale=512.0;const float sharpness=3.0;float cylinderCenter=amount;float cylinderAngle=2.0*PI*amount;const float cylinderRadius=1.0/PI/2.0;vec3 hitPoint(float hitAngle,float yc,vec3 point,mat3 rrotation){float hitPoint=hitAngle/(2.0*PI);point.y=hitPoint;return rrotation*point;}vec4 antiAlias(vec4 color1,vec4 color2,float distanc){distanc*=scale;if(distanc<0.0) return color2;if(distanc>2.0) return color1;float dd=pow(1.0-distanc/2.0,sharpness);return ((color2-color1)*dd)+color1;}float distanceToEdge(vec3 point){float dx=abs(point.x>0.5?1.0-point.x:point.x);float dy=abs(point.y>0.5?1.0-point.y:point.y);if(point.x<0.0) dx=-point.x;if(point.x>1.0) dx=point.x-1.0;if(point.y<0.0) dy=-point.y;if(point.y>1.0) dy=point.y-1.0;if((point.x<0.0||point.x>1.0)&&(point.y<0.0||point.y>1.0)) return sqrt(dx*dx+dy*dy);return min(dx,dy);}vec4 seeThrough(float yc,vec2 p,mat3 rotation,mat3 rrotation){float hitAngle=PI-(acos(yc/cylinderRadius)-cylinderAngle);vec3 point=hitPoint(hitAngle,yc,rotation*vec3(p,1.0),rrotation);if(yc<=0.0&&(point.x<0.0||point.y<0.0||point.x>1.0||point.y>1.0)){vec2 texCoord=gl_FragCoord.xy/resolution.xy;return texture2D(to,texCoord);}if(yc>0.0) return texture2D(from,p);vec4 color=texture2D(from,point.xy);vec4 tcolor=vec4(0.0);return antiAlias(color,tcolor,distanceToEdge(point));}vec4 seeThroughWithShadow(float yc,vec2 p,vec3 point,mat3 rotation,mat3 rrotation){float shadow=distanceToEdge(point)*30.0;shadow=(1.0-shadow)/3.0;if(shadow<0.0) shadow=0.0;else shadow*=amount;vec4 shadowColor=seeThrough(yc,p,rotation,rrotation);shadowColor.r-=shadow;shadowColor.g-=shadow;shadowColor.b-=shadow;return shadowColor;}vec4 backside(float yc,vec3 point){vec4 color=texture2D(from,point.xy);float gray=(color.r+color.b+color.g)/15.0;gray+=(8.0/10.0)*(pow(1.0-abs(yc/cylinderRadius),2.0/10.0)/2.0+(5.0/10.0));color.rgb=vec3(gray);return color;}vec4 behindSurface(float yc,vec3 point,mat3 rrotation){float shado=(1.0-((-cylinderRadius-yc)/amount*7.0))/6.0;shado*=1.0-abs(point.x-0.5);yc=(-cylinderRadius-cylinderRadius-yc);float hitAngle=(acos(yc/cylinderRadius)+cylinderAngle)-PI;point=hitPoint(hitAngle,yc,point,rrotation);if(yc<0.0&&point.x>=0.0&&point.y>=0.0&&point.x<=1.0&&point.y<=1.0&&(hitAngle<PI||amount>0.5)){shado=1.0-(sqrt(pow(point.x-0.5,2.0)+pow(point.y-0.5,2.0))/(71.0/100.0));shado*=pow(-yc/cylinderRadius,3.0);shado*=0.5;}else{shado=0.0;}vec2 texCoord=gl_FragCoord.xy/resolution.xy;return vec4(texture2D(to,texCoord).rgb-shado,1.0);}void main(){vec2 texCoord=gl_FragCoord.xy/resolution.xy;const float angle=30.0*PI/180.0;float c=cos(-angle);float s=sin(-angle);mat3 rotation=mat3(c,s,0,-s,c,0,0.12,0.258,1);c=cos(angle);s=sin(angle);mat3 rrotation=mat3(c,s,0,-s,c,0,0.15,-0.5,1);vec3 point=rotation*vec3(texCoord,1.0);float yc=point.y-cylinderCenter;if(yc<-cylinderRadius){gl_FragColor=behindSurface(yc,point,rrotation);return;}if(yc>cylinderRadius){gl_FragColor=texture2D(from,texCoord);return;}float hitAngle=(acos(yc/cylinderRadius)+cylinderAngle)-PI;float hitAngleMod=mod(hitAngle,2.0*PI);if((hitAngleMod>PI&&amount<0.5)||(hitAngleMod>PI/2.0&&amount<0.0)){gl_FragColor=seeThrough(yc,texCoord,rotation,rrotation);return;}point=hitPoint(hitAngle,yc,point,rrotation);if(point.x<0.0||point.y<0.0||point.x>1.0||point.y>1.0){gl_FragColor=seeThroughWithShadow(yc,texCoord,point,rotation,rrotation);return;}vec4 color=backside(yc,point);vec4 otherColor;if(yc<0.0){float shado=1.0-(sqrt(pow(point.x-0.5,2.0)+pow(point.y-0.5,2.0))/0.71);shado*=pow(-yc/cylinderRadius,3.0);shado*=0.5;otherColor=vec4(0.0,0.0,0.0,shado);}else{otherColor=texture2D(from,texCoord);}color=antiAlias(color,otherColor,cylinderRadius-abs(yc));vec4 cl=seeThroughWithShadow(yc,texCoord,point,rotation,rrotation);float dist=distanceToEdge(point);gl_FragColor=antiAlias(color,cl,dist);}"},{id:"06450f79cab706705bf9",name:"Polka_dots",owner:"bobylito",uniforms:{dots:5},html_url:"https://gist.github.com/06450f79cab706705bf9",created_at:"2014-05-20T12:09:38Z",updated_at:"2015-07-20T19:20:01Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float dots;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float x=progress;bool nextImage=distance(fract(p*dots),vec2(0.5,0.5))<x;if(nextImage) gl_FragColor=texture2D(to,p);else gl_FragColor=texture2D(from,p);}"},{id:"3da654388c3f3cd031c0",name:"burn",owner:"gre",uniforms:{color:[.9,.4,.2]},html_url:"https://gist.github.com/3da654388c3f3cd031c0",created_at:"2014-05-20T09:06:02Z",updated_at:"2015-07-20T19:16:43Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform vec3 color;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(texture2D(from,p)+vec4(progress*color,1.0),texture2D(to,p)+vec4((1.0-progress)*color,1.0),progress);}"},{id:"e5f807b5dffb09fc7527",name:"FinalGaussianNoise",owner:"mandubian",uniforms:{},html_url:"https://gist.github.com/e5f807b5dffb09fc7527",created_at:"2014-05-19T21:34:07Z",updated_at:"2015-07-20T19:32:13Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;float Rand(vec2 v){return fract(sin(dot(v.xy,vec2(12.9898,78.233)))*43758.5453);}float Gaussian(float p,float center,float c){return 0.75*exp(-pow((p-center)/c,2.));}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float c=cos(Gaussian(progress*(1.+Gaussian(progress*Rand(p),0.5,0.5)),0.5,0.25));vec2 d=p*c;gl_FragColor=mix(texture2D(from,d),texture2D(to,d),progress);}"},{id:"130bb7b7affedbda9df5",name:"Mosaic",owner:"Xaychru",uniforms:{endx:0,endy:-1},html_url:"https://gist.github.com/130bb7b7affedbda9df5",created_at:"2014-05-19T16:51:58Z",updated_at:"2015-07-20T19:15:37Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define PI 3.14159265358979323\n\n#define POW2(X) X*X\n\n#define POW3(X) X*X*X\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform int endx;uniform int endy;float Rand(vec2 v){return fract(sin(dot(v.xy,vec2(12.9898,78.233)))*43758.5453);}vec2 Rotate(vec2 v,float a){mat2 rm=mat2(cos(a),-sin(a),sin(a),cos(a));return rm*v;}float CosInterpolation(float x){return -cos(x*PI)/2.+.5;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy-.5;vec2 rp=p;float rpr=(progress*2.-1.);float z=-(rpr*rpr*2.)+3.;float az=abs(z);rp*=az;rp+=mix(vec2(.5,.5),vec2(float(endx)+.5,float(endy)+.5),POW2(CosInterpolation(progress)));vec2 mrp=mod(rp,1.);vec2 crp=rp;bool onEnd=int(floor(crp.x))==endx&&int(floor(crp.y))==endy;if(!onEnd){float ang=float(int(Rand(floor(crp))*4.))*.5*PI;mrp=vec2(.5)+Rotate(mrp-vec2(.5),ang);}if(onEnd||Rand(floor(crp))>.5){gl_FragColor=texture2D(to,mrp);}else{gl_FragColor=texture2D(from,mrp);}}"},{id:"ce1d48f0ce00bb379750",name:"Radial",owner:"Xaychru",uniforms:{},html_url:"https://gist.github.com/ce1d48f0ce00bb379750",created_at:"2014-05-19T15:18:28Z",updated_at:"2015-07-20T19:15:51Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define PI 3.141592653589\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 rp=p*2.-1.;float a=atan(rp.y,rp.x);float pa=progress*PI*2.5-PI*1.25;vec4 fromc=texture2D(from,p);vec4 toc=texture2D(to,p);if(a>pa){gl_FragColor=mix(toc,fromc,smoothstep(0.,1.,(a-pa)));}else{gl_FragColor=toc;}}"},{id:"c3bc914de09227713787",name:"ButterflyWaveScrawler",owner:"mandubian",uniforms:{amplitude:1,waves:30,colorSeparation:.3},html_url:"https://gist.github.com/c3bc914de09227713787",created_at:"2014-05-19T11:48:15Z",updated_at:"2015-07-20T19:33:28Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float amplitude;uniform float waves;uniform float colorSeparation;float PI=3.14159265358979323846264;float compute(vec2 p,float progress,vec2 center){vec2 o=p*sin(progress*amplitude)-center;vec2 h=vec2(1.,0.);float theta=acos(dot(o,h))*waves;return (exp(cos(theta))-2.*cos(4.*theta)+pow(sin((2.*theta-PI)/24.),5.))/10.;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float inv=1.-progress;vec2 dir=p-vec2(.5);float dist=length(dir);float disp=compute(p,progress,vec2(0.5,0.5));vec4 texTo=texture2D(to,p+inv*disp);vec4 texFrom=vec4(texture2D(from,p+progress*disp*(1.0-colorSeparation)).r,texture2D(from,p+progress*disp).g,texture2D(from,p+progress*disp*(1.0+colorSeparation)).b,1.0);gl_FragColor=texTo*progress+texFrom*inv;}"},{id:"4268c81d39bd4ca00ae2",name:"CrazyParametricFun",owner:"mandubian",uniforms:{a:4,b:1,amplitude:120,smoothness:.1},html_url:"https://gist.github.com/4268c81d39bd4ca00ae2",created_at:"2014-05-19T08:04:52Z",updated_at:"2015-07-20T19:20:51Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float a;uniform float b;uniform float amplitude;uniform float smoothness;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 dir=p-vec2(.5);float dist=length(dir);float x=(a-b)*cos(progress)+b*cos(progress*((a/b)-1.));float y=(a-b)*sin(progress)-b*sin(progress*((a/b)-1.));vec2 offset=dir*vec2(sin(progress*dist*amplitude*x),sin(progress*dist*amplitude*y))/smoothness;gl_FragColor=mix(texture2D(from,p+offset),texture2D(to,p),smoothstep(0.2,1.0,progress));}"},{id:"2bcfb59096fcaed82355",name:"powerdisformation",owner:"gre",uniforms:{power:3,powerDest:!0},html_url:"https://gist.github.com/2bcfb59096fcaed82355",created_at:"2014-05-17T10:58:29Z",updated_at:"2015-07-20T19:18:59Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from,to;uniform float progress;uniform vec2 resolution;uniform float power;uniform bool powerDest;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 p2=mix(p,vec2(pow(p.x,power),pow(p.y,power)),(powerDest?0.5:1.0)-distance(progress,powerDest?0.5:1.0));gl_FragColor=mix(texture2D(from,p2),texture2D(to,powerDest?p2:p),progress);}"},{id:"2a3f2e907e1c0a152e60",name:"swap",owner:"gre",uniforms:{reflection:.4,perspective:.2,depth:3},html_url:"https://gist.github.com/2a3f2e907e1c0a152e60",created_at:"2014-05-16T13:59:07Z",updated_at:"2015-07-20T19:31:24Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float reflection;uniform float perspective;uniform float depth;const vec4 black=vec4(0.0,0.0,0.0,1.0);const vec2 boundMin=vec2(0.0,0.0);const vec2 boundMax=vec2(1.0,1.0);bool inBounds(vec2 p){return all(lessThan(boundMin,p))&&all(lessThan(p,boundMax));}vec2 project(vec2 p){return p*vec2(1.0,-1.2)+vec2(0.0,-0.02);}vec4 bgColor(vec2 p,vec2 pfr,vec2 pto){vec4 c=black;pfr=project(pfr);if(inBounds(pfr)){c+=mix(black,texture2D(from,pfr),reflection*mix(1.0,0.0,pfr.y));}pto=project(pto);if(inBounds(pto)){c+=mix(black,texture2D(to,pto),reflection*mix(1.0,0.0,pto.y));}return c;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 pfr,pto=vec2(-1.);float size=mix(1.0,depth,progress);float persp=perspective*progress;pfr=(p+vec2(-0.0,-0.5))*vec2(size/(1.0-perspective*progress),size/(1.0-size*persp*p.x))+vec2(0.0,0.5);size=mix(1.0,depth,1.-progress);persp=perspective*(1.-progress);pto=(p+vec2(-1.0,-0.5))*vec2(size/(1.0-perspective*(1.0-progress)),size/(1.0-size*persp*(0.5-p.x)))+vec2(1.0,0.5);bool fromOver=progress<0.5;if(fromOver){if(inBounds(pfr)){gl_FragColor=texture2D(from,pfr);}else if(inBounds(pto)){gl_FragColor=texture2D(to,pto);}else{gl_FragColor=bgColor(p,pfr,pto);}}else{if(inBounds(pto)){gl_FragColor=texture2D(to,pto);}else if(inBounds(pfr)){gl_FragColor=texture2D(from,pfr);}else{gl_FragColor=bgColor(p,pfr,pto);}}}"},{id:"94ffa2725b65aa8b9979",name:"ripple",owner:"gre",uniforms:{amplitude:100,speed:50},html_url:"https://gist.github.com/94ffa2725b65aa8b9979",created_at:"2014-05-16T13:58:42Z",updated_at:"2015-07-20T19:17:37Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float amplitude;uniform float speed;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 dir=p-vec2(.5);float dist=length(dir);vec2 offset=dir*(sin(progress*dist*amplitude-progress*speed)+.5)/30.;gl_FragColor=mix(texture2D(from,p+offset),texture2D(to,p),smoothstep(0.2,1.0,progress));}"},{id:"99bced7d9b5311fd166e",name:"flash",owner:"gre",uniforms:{flashPhase:.3,flashIntensity:3,flashZoomEffect:.5},html_url:"https://gist.github.com/99bced7d9b5311fd166e",created_at:"2014-05-16T13:58:17Z",updated_at:"2015-07-20T19:32:11Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float flashPhase;uniform float flashIntensity;uniform float flashZoomEffect;const vec3 flashColor=vec3(1.0,0.8,0.3);const float flashVelocity=3.0;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 fc=texture2D(from,p);vec4 tc=texture2D(to,p);float intensity=mix(1.0,2.0*distance(p,vec2(0.5,0.5)),flashZoomEffect)*flashIntensity*pow(smoothstep(flashPhase,0.0,distance(0.5,progress)),flashVelocity);vec4 c=mix(texture2D(from,p),texture2D(to,p),smoothstep(0.5*(1.0-flashPhase),0.5*(1.0+flashPhase),progress));c+=intensity*vec4(flashColor,1.0);gl_FragColor=c;}"},{id:"81c6f2e6fce88f9075d2",name:"flyeye",owner:"gre",uniforms:{size:.04,zoom:30,colorSeparation:.3},html_url:"https://gist.github.com/81c6f2e6fce88f9075d2",created_at:"2014-05-16T13:56:53Z",updated_at:"2015-07-20T19:18:40Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float size;uniform float zoom;uniform float colorSeparation;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float inv=1.-progress;vec2 disp=size*vec2(cos(zoom*p.x),sin(zoom*p.y));vec4 texTo=texture2D(to,p+inv*disp);vec4 texFrom=vec4(texture2D(from,p+progress*disp*(1.0-colorSeparation)).r,texture2D(from,p+progress*disp).g,texture2D(from,p+progress*disp*(1.0+colorSeparation)).b,1.0);gl_FragColor=texTo*progress+texFrom*inv;}"},{id:"979934722820b5e715fa",name:"doorway",owner:"gre",uniforms:{reflection:.4,perspective:.4,depth:3},html_url:"https://gist.github.com/979934722820b5e715fa",created_at:"2014-05-16T13:54:38Z",updated_at:"2015-07-20T19:20:19Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float reflection;uniform float perspective;uniform float depth;const vec4 black=vec4(0.0,0.0,0.0,1.0);const vec2 boundMin=vec2(0.0,0.0);const vec2 boundMax=vec2(1.0,1.0);bool inBounds(vec2 p){return all(lessThan(boundMin,p))&&all(lessThan(p,boundMax));}vec2 project(vec2 p){return p*vec2(1.0,-1.2)+vec2(0.0,-0.02);}vec4 bgColor(vec2 p,vec2 pto){vec4 c=black;pto=project(pto);if(inBounds(pto)){c+=mix(black,texture2D(to,pto),reflection*mix(1.0,0.0,pto.y));}return c;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 pfr=vec2(-1.),pto=vec2(-1.);float middleSlit=2.0*abs(p.x-0.5)-progress;if(middleSlit>0.0){pfr=p+(p.x>0.5?-1.0:1.0)*vec2(0.5*progress,0.0);float d=1.0/(1.0+perspective*progress*(1.0-middleSlit));pfr.y-=d/2.;pfr.y*=d;pfr.y+=d/2.;}float size=mix(1.0,depth,1.-progress);pto=(p+vec2(-0.5,-0.5))*vec2(size,size)+vec2(0.5,0.5);if(inBounds(pfr)){gl_FragColor=texture2D(from,pfr);}else if(inBounds(pto)){gl_FragColor=texture2D(to,pto);}else{gl_FragColor=bgColor(p,pto);}}"},{id:"731fcad4f8956866f34a",name:"randomsquares",owner:"gre",uniforms:{size:[10,10],smoothness:.5},html_url:"https://gist.github.com/731fcad4f8956866f34a",created_at:"2014-05-16T13:52:46Z",updated_at:"2015-07-20T19:20:42Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform ivec2 size;uniform float smoothness;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float r=rand(floor(vec2(size)*p));float m=smoothstep(0.0,-smoothness,r-(progress*(1.0+smoothness)));gl_FragColor=mix(texture2D(from,p),texture2D(to,p),m);}"},{id:"df8797fd112e8e429064",name:"squeeze",owner:"gre",uniforms:{colorSeparation:.02},html_url:"https://gist.github.com/df8797fd112e8e429064",created_at:"2014-05-16T13:51:39Z",updated_at:"2015-07-20T19:17:38Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float colorSeparation;float progressY(float y){return 0.5+(y-0.5)/(1.0-progress);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float y=progressY(p.y);if(y<0.0||y>1.0){gl_FragColor=texture2D(to,p);}else{vec2 fp=vec2(p.x,y);vec3 c=vec3(texture2D(from,fp-progress*vec2(0.0,colorSeparation)).r,texture2D(from,fp).g,texture2D(from,fp+progress*vec2(0.0,colorSeparation)).b);gl_FragColor=vec4(c,1.0);}}"},{id:"90000743fedc953f11a4",name:"directionalwipe",owner:"gre",uniforms:{direction:[1,-1],smoothness:.5},html_url:"https://gist.github.com/90000743fedc953f11a4",created_at:"2014-05-16T13:50:51Z",updated_at:"2015-07-20T19:17:06Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform vec2 direction;uniform float smoothness;const vec2 center=vec2(0.5,0.5);void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec2 v=normalize(direction);v/=abs(v.x)+abs(v.y);float d=v.x*center.x+v.y*center.y;float m=smoothstep(-smoothness,0.0,v.x*p.x+v.y*p.y-(d-0.5+progress*(1.+smoothness)));gl_FragColor=mix(texture2D(to,p),texture2D(from,p),m);}"},{id:"7de3f4b9482d2b0bf7bb",name:"wind",owner:"gre",uniforms:{size:.2},html_url:"https://gist.github.com/7de3f4b9482d2b0bf7bb",created_at:"2014-05-16T13:49:36Z",updated_at:"2015-07-20T19:16:52Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float size;float rand(vec2 co){return fract(sin(dot(co.xy,vec2(12.9898,78.233)))*43758.5453);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float r=rand(vec2(0,p.y));float m=smoothstep(0.0,-size,p.x*(1.0-size)+size*r-(progress*(1.0+size)));gl_FragColor=mix(texture2D(from,p),texture2D(to,p),m);}"},{id:"d9f8b4df19584f1f0474",name:"fadegrayscale",owner:"gre",uniforms:{grayPhase:.3},html_url:"https://gist.github.com/d9f8b4df19584f1f0474",created_at:"2014-05-16T13:49:13Z",updated_at:"2015-07-20T19:31:17Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float grayPhase;vec3 grayscale(vec3 color){return vec3(0.2126*color.r+0.7152*color.g+0.0722*color.b);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;vec4 fc=texture2D(from,p);vec4 tc=texture2D(to,p);gl_FragColor=mix(mix(vec4(grayscale(fc.rgb),1.0),texture2D(from,p),smoothstep(1.0-grayPhase,0.0,progress)),mix(vec4(grayscale(tc.rgb),1.0),texture2D(to,p),smoothstep(grayPhase,1.0,progress)),progress);}"},{id:"206b96128ad6085f9911",name:"dispersionblur",owner:"gre",uniforms:{size:.6},html_url:"https://gist.github.com/206b96128ad6085f9911",created_at:"2014-05-16T13:47:09Z",updated_at:"2015-07-20T19:31:34Z",stars:1,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define QUALITY 32\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float size;const float GOLDEN_ANGLE=2.399963229728653;vec4 blur(sampler2D t,vec2 c,float radius){vec4 sum=vec4(0.0);float q=float(QUALITY);for(int i=0;i<QUALITY;++i){float fi=float(i);float a=fi*GOLDEN_ANGLE;float r=sqrt(fi/q)*radius;vec2 p=c+r*vec2(cos(a),sin(a));sum+=texture2D(t,p);}return sum/q;}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float inv=1.-progress;gl_FragColor=inv*blur(from,p,progress*size)+progress*blur(to,p,inv*size);}"},{id:"d71472a550601b96d69d",name:"heartwipe",owner:"gre",uniforms:{},html_url:"https://gist.github.com/d71472a550601b96d69d",created_at:"2014-05-16T13:46:31Z",updated_at:"2015-07-20T19:24:56Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;bool inHeart(vec2 p,vec2 center,float size){if(size==0.0) return false;vec2 o=(p-center)/(1.6*size);return pow(o.x*o.x+o.y*o.y-0.3,3.0)<o.x*o.x*pow(o.y,3.0);}void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float m=inHeart(p,vec2(0.5,0.4),progress)?1.0:0.0;gl_FragColor=mix(texture2D(from,p),texture2D(to,p),m);}"},{id:"f24651a01bf574e90122",name:"fadecolor",owner:"gre",uniforms:{color:[0,0,0],colorPhase:.4},html_url:"https://gist.github.com/f24651a01bf574e90122",created_at:"2014-05-16T13:45:46Z",updated_at:"2015-07-20T19:20:32Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform vec3 color;uniform float colorPhase;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;gl_FragColor=mix(mix(vec4(color,1.0),texture2D(from,p),smoothstep(1.0-colorPhase,0.0,progress)),mix(vec4(color,1.0),texture2D(to,p),smoothstep(colorPhase,1.0,progress)),progress);}"},{id:"35e8c18557995c77278e",name:"circleopen",owner:"gre",uniforms:{smoothness:.3,opening:!0},html_url:"https://gist.github.com/35e8c18557995c77278e",created_at:"2014-05-16T13:40:51Z",updated_at:"2015-07-20T19:17:16Z",stars:0,glsl:"\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D from;uniform sampler2D to;uniform float progress;uniform vec2 resolution;uniform float smoothness;uniform bool opening;const vec2 center=vec2(0.5,0.5);const float SQRT_2=1.414213562373;void main(){vec2 p=gl_FragCoord.xy/resolution.xy;float x=opening?progress:1.-progress;float m=smoothstep(-smoothness,0.0,SQRT_2*distance(center,p)-x*(1.+smoothness));gl_FragColor=mix(texture2D(from,p),texture2D(to,p),opening?1.-m:m);}"}]},{}],46:[function(e,t,n){"use strict";function r(e,t,n){this._canvas||(this._canvas=document.createElement("canvas")),this.width=e,this.height=t,this.scale=n||window.devicePixelRatio,this._canvas.width=this.width*this.scale,this._canvas.height=this.height*this.scale,this._canvas.getContext("2d").scale(this.scale,this.scale)}var o=e("react/lib/Object.assign");o(r.prototype,{getRawCanvas:function(){return this._canvas},getContext:function(){return this._canvas.getContext("2d")}}),r.poolSize=30,t.exports=r},{"react/lib/Object.assign":99}],47:[function(e,t,n){"use strict";function r(e,t,n,r,o,i,s){s=s||{},s.backgroundColor&&(e.save(),e.fillStyle=s.backgroundColor,e.fillRect(n,r,o,i),e.restore());var l,u,c,p=0,f=0,h=0,d=0,m=0,g=0,v=0,y=0,_=s.focusPoint;c={width:t.getWidth(),height:t.getHeight()},l=Math.max(o/c.width,i/c.height)||1,l=parseFloat(l.toFixed(4),10),u={width:c.width*l,height:c.height*l},_?s.originalHeight&&(_.x*=c.height/s.originalHeight,_.y*=c.height/s.originalHeight):_={x:.5*c.width,y:.5*c.height},m=Math.round(a(.5*o-_.x*l,o-u.width,0))*(-1/l),g=Math.round(a(.5*i-_.y*l,i-u.height,0))*(-1/l),v=Math.round(c.width-2*m),y=Math.round(c.height-2*g),h=Math.round(o),d=Math.round(i),p=Math.round(n),f=Math.round(r),e.drawImage(t.getRawImage(),m,g,v,y,p,f,h,d)}function o(e,t,n,r,o,i,a,l){var u,c,p=n,f=r,l=l||{};l.fontSize=l.fontSize||16,l.lineHeight=l.lineHeight||18,l.textAlign=l.textAlign||"left",l.backgroundColor=l.backgroundColor||"transparent",l.color=l.color||"#000",u=s(t,o,a,l.fontSize,l.lineHeight),e.save(),"transparent"!==l.backgroundColor&&(e.fillStyle=l.backgroundColor,e.fillRect(0,0,o,i)),e.fillStyle=l.color,e.font=a.attributes.style+" normal "+a.attributes.weight+" "+l.fontSize+"pt "+a.family,u.lines.forEach(function(t,a){switch(c=t.text,f=0===a?r+l.fontSize:r+l.fontSize+l.lineHeight*a,
|
|
l.textAlign){case"center":p=n+o/2-t.width/2;break;case"right":p=n+o-t.width;break;default:p=n}a<u.lines.length-1&&l.fontSize+l.lineHeight*(a+1)>i&&(c=c.replace(/\,?\s?\w+$/,"…")),i+r>=f&&e.fillText(c,p,f)}),e.restore()}function i(e,t,n,r,o,i,a,s,l,u){var c;e.save(),c=e.createLinearGradient(t,n,r,o),i.forEach(function(e){c.addColorStop(e.position,e.color)}),e.fillStyle=c,e.fillRect(a,s,l,u),e.restore()}var a=(e("./FontFace"),e("./clamp")),s=e("./measureText");t.exports={drawImage:r,drawText:o,drawGradient:i}},{"./FontFace":52,"./clamp":66,"./measureText":70}],48:[function(e,t,n){"use strict";var r=(e("react"),e("react/lib/ReactMultiChild")),o=e("react/lib/Object.assign"),i=e("react/lib/emptyObject"),a=o({},r.Mixin,{moveChild:function(e,t){var n=e._mountImage,r=this._mostRecentlyPlacedChild;null==r?n.previousSibling&&(this.node.firstChild?n.injectBefore(this.node.firstChild):n.inject(this.node)):r.nextSibling!==n&&(r.nextSibling?n.injectBefore(r.nextSibling):n.inject(this.node)),this._mostRecentlyPlacedChild=n},createChild:function(e,t){e._mountImage=t;var n=this._mostRecentlyPlacedChild;null==n?this.node.firstChild?t.injectBefore(this.node.firstChild):t.inject(this.node):n.nextSibling?t.injectBefore(n.nextSibling):t.inject(this.node),this._mostRecentlyPlacedChild=t},removeChild:function(e){e._mountImage.remove(),e._mountImage=null,this.node.invalidateLayout()},updateChildrenAtRoot:function(e,t){this.updateChildren(e,t,i)},mountAndInjectChildrenAtRoot:function(e,t){this.mountAndInjectChildren(e,t,i)},updateChildren:function(e,t,n){this._mostRecentlyPlacedChild=null,this._updateChildren(e,t,n)},mountAndInjectChildren:function(e,t,n){var r=this.mountChildren(e,t,n),o=0;for(var i in this._renderedChildren)if(this._renderedChildren.hasOwnProperty(i)){var a=this._renderedChildren[i];a._mountImage=r[o],r[o].inject(this.node),o++}}});t.exports=a},{react:228,"react/lib/Object.assign":99,"react/lib/ReactMultiChild":144,"react/lib/emptyObject":188}],49:[function(e,t,n){"use strict";function r(e){for(var t=0,n=E.length;n>t;t++)if(E[t].id===e)return E[t].canvas;return null}function o(e){for(var t=0,n=E.length;n>t;t++)if(E[t].id===e){E.splice(t,1);break}}function i(){E=[]}function a(e,t){if("image"===e.type&&e.imageUrl===t)return e;if(e.children)for(var n=0,r=e.children.length;r>n;n++)if(a(e.children[n],t))return e.children[n];return!1}function s(e,t){if("text"===e.type&&e.fontFace&&e.fontFace.id===t.id)return e;if(e.children)for(var n=0,r=e.children.length;r>n;n++)if(s(e.children[n],t))return e.children[n];return!1}function l(e){E.forEach(function(t){a(t.layer,e)&&o(t.id)})}function u(e){E.forEach(function(t){s(t.layer,e)&&o(t.id)})}function c(e,t){var n;if(!("number"==typeof t.alpha&&t.alpha<=0)){switch(t.type){case"image":n=d;break;case"text":n=m;break;case"gradient":n=g}var r=null!==t.alpha&&t.alpha<1||t.translateX||t.translateY;r&&(e.save(),null!==t.alpha&&t.alpha<1&&(e.globalAlpha=t.alpha),(t.translateX||t.translateY)&&e.translate(t.translateX||0,t.translateY||0)),t.backingStoreId?f(e,t,n):(e.save(),p(e,t),n&&n(e,t),e.restore(),t.children&&t.children.slice().sort(h).forEach(function(t){c(e,t)})),r&&e.restore()}}function p(e,t){var n=t.frame;t.borderRadius&&(e.beginPath(),e.moveTo(n.x+t.borderRadius,n.y),e.arcTo(n.x+n.width,n.y,n.x+n.width,n.y+n.height,t.borderRadius),e.arcTo(n.x+n.width,n.y+n.height,n.x,n.y+n.height,t.borderRadius),e.arcTo(n.x,n.y+n.height,n.x,n.y,t.borderRadius),e.arcTo(n.x,n.y,n.x+n.width,n.y,t.borderRadius),e.closePath(),"image"===t.type&&e.clip(),t.borderColor&&(e.lineWidth=t.borderWidth||1,e.strokeStyle=t.borderColor,e.stroke())),t.borderColor&&!t.borderRadius&&(e.lineWidth=t.borderWidth||1,e.strokeStyle=t.borderColor,e.strokeRect(n.x,n.y,n.width,n.height)),t.backgroundColor&&(e.fillStyle=t.backgroundColor,t.borderRadius?e.fill():e.fillRect(n.x,n.y,n.width,n.height))}function f(e,t,n){var o,i=r(t.backingStoreId),a=t.scale||window.devicePixelRatio,s=t.frame.y,l=t.frame.x;if(i||(E.length>=x.poolSize?(i=E[0].canvas,x.call(i,t.frame.width,t.frame.height,a),E[0].id=t.backingStoreId,E[0].canvas=i,E.push(E.shift())):(i=new x(t.frame.width,t.frame.height,a),E.push({id:t.backingStoreId,layer:t,canvas:i})),o=i.getContext("2d"),t.translate(-l,-s),o.save(),p(o,t),n&&n(o,t),o.restore(),t.children&&t.children.slice().sort(h).forEach(function(e){c(o,e)}),t.translate(l,s)),t.clipRect){var u=(t.clipRect.x-t.frame.x)*a,f=(t.clipRect.y-t.frame.y)*a,d=t.clipRect.width*a,m=t.clipRect.height*a,g=t.clipRect.x,v=t.clipRect.y,y=t.clipRect.width,_=t.clipRect.height;d>0&&m>0&&e.drawImage(i.getRawCanvas(),u,f,d,m,g,v,y,_)}else e.drawImage(i.getRawCanvas(),t.frame.x,t.frame.y,t.frame.width,t.frame.height)}function h(e,t){return(e.zIndex||0)-(t.zIndex||0)}function d(e,t){if(t.imageUrl){var n=v.get(t.imageUrl);n.isLoaded()&&b.drawImage(e,n,t.frame.x,t.frame.y,t.frame.width,t.frame.height)}}function m(e,t){var n=t.fontFace||_.Default();y.isFontLoaded(n)&&b.drawText(e,t.text,t.frame.x,t.frame.y,t.frame.width,t.frame.height,n,{fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:t.textAlign,color:t.color})}function g(e,t){var n=t.x1||t.frame.x,r=t.y1||t.frame.y,o=t.x2||t.frame.x,i=t.y2||t.frame.y+t.frame.height;b.drawGradient(e,n,r,o,i,t.colorStops,t.frame.x,t.frame.y,t.frame.width,t.frame.height)}var v=e("./ImageCache"),y=e("./FontUtils"),_=e("./FontFace"),b=(e("./FrameUtils"),e("./CanvasUtils")),x=e("./Canvas"),E=[];t.exports={drawRenderLayer:c,invalidateBackingStore:o,invalidateAllBackingStores:i,handleImageLoad:l,handleFontLoad:u,layerContainsImage:a,layerContainsFontFace:s}},{"./Canvas":46,"./CanvasUtils":47,"./FontFace":52,"./FontUtils":53,"./FrameUtils":54,"./ImageCache":57}],50:[function(e,t,n){var r={linear:function(e){return e},easeInQuad:function(e){return Math.pow(e,2)},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return.5>e?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return.5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}};t.exports=r},{}],51:[function(e,t,n){"use strict";t.exports={onTouchStart:"touchstart",onTouchMove:"touchmove",onTouchEnd:"touchend",onTouchCancel:"touchcancel",onClick:"click"}},{}],52:[function(e,t,n){"use strict";function r(e,t,n){var r,a;return n=n||{},n.style=n.style||"normal",n.weight=n.weight||400,a=o(e,t,n),r=i[a],r||(r={},r.id=a,r.family=e,r.url=t,r.attributes=n,i[a]=r),r}function o(e,t,n){return e+t+Object.keys(n).sort().map(function(e){return n[e]})}var i={};r.Default=function(e){return r("sans-serif",null,{weight:e})},t.exports=r},{}],53:[function(e,t,n){"use strict";function r(e){return void 0!==c[e.id]||!e.url}function o(e,t){var n,r,o;return c[e.id]?t(null):p[e.id]?t(p[e.id]):e.url?u[e.id]?void u[e.id].callbacks.push(t):(n=a("Helvetica",e.attributes),r=a(e.family,e.attributes),document.body.appendChild(r),document.body.appendChild(n),u[e.id]={startTime:Date.now(),defaultNode:n,testNode:r,callbacks:[t]},o=function(){var t=r.getBoundingClientRect().width,i=n.getBoundingClientRect().width,a=t!==i;a?s(e,null):Date.now()-u[e.id].startTime>=f?s(e,!0):requestAnimationFrame(o)},void o()):t(null)}function i(e,t){var n;return c[e.id]?t(null):p[e.id]?t(p[e.id]):e.url?u[e.id]?void u[e.id].callbacks.push(t):(u[e.id]={startTime:Date.now(),callbacks:[t]},n=new window.FontFace(e.family,"url("+e.url+")",e.attributes),void n.load().then(function(){c[e.id]=!0,t(null)},function(n){p[e.id]=n,t(n)})):t(null)}function a(e,t){var n=document.createElement("span");return n.setAttribute("data-fontfamily",e),n.style.cssText='position:absolute; left:-5000px; top:-5000px; visibility:hidden;font-size:100px; font-family:"'+e+'", Helvetica;font-weight: '+t.weight+";font-style:"+t.style+";",n.innerHTML="BESs",n}function s(e,t){var n=t?"Exceeded load timeout of "+f+"ms":null;n?p[e.id]=n:c[e.id]=!0,u[e.id].callbacks.forEach(function(e){e(n)}),u[e.id].defaultNode&&document.body.removeChild(u[e.id].defaultNode),u[e.id].testNode&&document.body.removeChild(u[e.id].testNode),delete u[e.id]}var l=(e("./FontFace"),"undefined"!=typeof window.FontFace),u={},c={},p={},f=3e3;t.exports={isFontLoaded:r,loadFont:l?i:o}},{"./FontFace":52}],54:[function(e,t,n){"use strict";function r(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r}function o(e,t,n,o){return new r(e,t,n,o)}function i(){return o(0,0,0,0)}function a(e){return o(e.x,e.y,e.width,e.height)}function s(e,t,n,r,o){var i=a(e);return"undefined"==typeof r&&(r=t,o=n),"undefined"==typeof n&&(n=r=o=t),i.x+=o,i.y+=t,i.height-=t+r,i.width-=o+n,i}function l(e,t){var n=Math.max(e.x,t.x),r=Math.min(e.x+e.width,t.x+t.width),i=Math.max(e.y,t.y),a=Math.min(e.y+e.height,t.y+t.height);return r>=n&&a>=i?o(n,i,r-n,a-i):null}function u(e,t){var n=Math.min(e.x,t.x),r=Math.max(e.x+e.width,t.x+t.width),i=Math.min(e.y,t.y),a=Math.max(e.y+e.height,t.y+t.height);return o(n,i,r-n,a-i)}function c(e,t){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}t.exports={make:o,zero:i,clone:a,inset:s,intersection:l,intersects:c,union:u}},{}],55:[function(e,t,n){"use strict";var r=e("./createComponent"),o=e("./ContainerMixin"),i=e("./LayerMixin"),a=(e("./RenderLayer"),r("Group",i,o,{mountComponent:function(e,t,n){var r=this._currentElement.props,o=this.node;return this.applyLayerProps({},r),this.mountAndInjectChildren(r.children,t,n),o},receiveComponent:function(e,t,n){var r=e.props,o=this._currentElement.props;this.applyLayerProps(o,r),this.updateChildren(r.children,t,n),this._currentElement=e},unmountComponent:function(){i.unmountComponent.call(this),this.unmountChildren()}}));t.exports=a},{"./ContainerMixin":48,"./LayerMixin":59,"./RenderLayer":63,"./createComponent":67}],56:[function(e,t,n){"use strict";var r=e("react"),o=e("react/lib/Object.assign"),i=e("./createComponent"),a=e("./LayerMixin"),s=(e("./Layer"),e("./Group")),l=e("./ImageCache"),u=e("./Easing"),c=e("./clamp"),p=200,f=i("Image",a,{applyImageProps:function(e,t){var n=this.node;n.type="image",n.imageUrl=t.src},mountComponent:function(e,t,n){var r=this._currentElement.props,o=this.node;return this.applyLayerProps({},r),this.applyImageProps({},r),o},receiveComponent:function(e,t,n){var r=this._currentElement.props,o=e.props;this.applyLayerProps(r,o),this._currentElement=e}}),h=r.createClass({propTypes:{src:r.PropTypes.string.isRequired,style:r.PropTypes.object,useBackingStore:r.PropTypes.bool,fadeIn:r.PropTypes.bool,fadeInDuration:r.PropTypes.number},getInitialState:function(){var e=l.get(this.props.src).isLoaded();return{loaded:e,imageAlpha:e?1:0}},componentDidMount:function(){l.get(this.props.src).on("load",this.handleImageLoad)},componentWillUnmount:function(){this._pendingAnimationFrame&&cancelAnimationFrame(this._pendingAnimationFrame),l.get(this.props.src).removeListener("load",this.handleImageLoad)},componentDidUpdate:function(e,t){this.refs.image&&this.refs.image.invalidateLayout()},render:function(){var e=o({},this.props.style),t=this.state.loaded?this.props.useBackingStore:!1;return e.alpha=this.state.imageAlpha,r.createElement(s,{ref:"main",style:this.props.style},r.createElement(f,{ref:"image",src:this.props.src,style:e,useBackingStore:t}))},handleImageLoad:function(){var e=1;this.props.fadeIn&&(e=0,this._animationStartTime=Date.now(),this._pendingAnimationFrame=requestAnimationFrame(this.stepThroughAnimation)),this.setState({loaded:!0,imageAlpha:e})},stepThroughAnimation:function(){var e=this.props.fadeInDuration||p,t=u.easeInCubic((Date.now()-this._animationStartTime)/e);t=c(t,0,1),this.setState({imageAlpha:t}),1>t&&(this._pendingAnimationFrame=requestAnimationFrame(this.stepThroughAnimation))}});t.exports=h},{"./Easing":50,"./Group":55,"./ImageCache":57,"./Layer":58,"./LayerMixin":59,"./clamp":66,"./createComponent":67,react:228,"react/lib/Object.assign":99}],57:[function(e,t,n){"use strict";function r(e){this._originalSrc=e,this._img=new Image,this._img.onload=this.emit.bind(this,"load"),this._img.onerror=this.emit.bind(this,"error"),this._img.src=e,this.on("error",s),this.setMaxListeners(100)}function o(e){for(var t=0,n=u.length;n>t;t++)if(u[t].getOriginalSrc()===e)return u[t];return null}var i=e("events"),a=e("react/lib/Object.assign"),s=function(){};a(r.prototype,i.prototype,{destructor:function(){this.removeAllListeners()},getOriginalSrc:function(){return this._originalSrc},getRawImage:function(){return this._img},getWidth:function(){return this._img.naturalWidth},getHeight:function(){return this._img.naturalHeight},isLoaded:function(){return this._img.naturalHeight>0}});var l=300,u=[],c={get:function(e){var t=o(e);return t||(t=new r(e),u.length>=l&&u.shift().destructor(),u.push(t)),t}};t.exports=c},{events:6,"react/lib/Object.assign":99}],58:[function(e,t,n){"use strict";var r=e("./createComponent"),o=e("./LayerMixin"),i=r("Layer",o,{mountComponent:function(e,t,n){var r=this._currentElement.props,o=this.node;return this.applyLayerProps({},r),o},receiveComponent:function(e,t,n){var r=this._currentElement.props,o=e.props;this.applyLayerProps(r,o),this._currentElement=e}});t.exports=i},{"./LayerMixin":59,"./createComponent":67}],59:[function(e,t,n){"use strict";var r=e("./FrameUtils"),o=e("./DrawingUtils"),i=e("./EventTypes"),a=0,s={construct:function(e){this._currentElement=e,this._layerId=a++},getPublicInstance:function(){return this.node},putEventListener:function(e,t){var n=this.subscriptions||(this.subscriptions={}),r=this.listeners||(this.listeners={});r[e]=t,t?n[e]||(n[e]=this.node.subscribe(e,t,this)):n[e]&&(n[e](),delete n[e])},handleEvent:function(e){},destroyEventListeners:function(){},applyLayerProps:function(e,t){var n=this.node,o=t&&t.style?t.style:{};n._originalStyle=o,n.alpha=o.alpha,n.backgroundColor=o.backgroundColor,n.borderColor=o.borderColor,n.borderRadius=o.borderRadius,n.clipRect=o.clipRect,n.frame=r.make(o.left||0,o.top||0,o.width||0,o.height||0),n.scale=o.scale,n.translateX=o.translateX,n.translateY=o.translateY,n.zIndex=o.zIndex,t.useBackingStore&&(n.backingStoreId=this._layerId);for(var a in i)this.putEventListener(i[a],t[a])},mountComponentIntoNode:function(e,t){throw new Error("You cannot render a Canvas component standalone. You need to wrap it in a Surface.")},unmountComponent:function(){var e=this.node;e.backingStoreId&&o.invalidateBackingStore(e.backingStoreId),this.destroyEventListeners()}};t.exports=s},{"./DrawingUtils":49,"./EventTypes":51,"./FrameUtils":54}],60:[function(e,t,n){var r=function(){function e(e){return e.charAt(0).toUpperCase()+e.slice(1)}function t(t,n,r,o){var i=n+e(o)+r;return i in t.style?t.style[i]:(i=n+r,i in t.style?t.style[i]:0)}function n(t,n,r,o){var i=n+e(o)+r;return i in t.style&&t.style[i]>=0?t.style[i]:(i=n+r,i in t.style&&t.style[i]>=0?t.style[i]:0)}function r(e){return void 0===e}function o(e,n){return t(e,"margin","",n)}function i(e,t){return n(e,"padding","",t)}function a(e,t){return n(e,"border","Width",t)}function s(e,t){return i(e,t)+a(e,t)}function l(e,t){return o(e,T[t])+o(e,R[t])}function u(e,t){return s(e,T[t])+s(e,R[t])}function c(e){return"justifyContent"in e.style?e.style.justifyContent:"flex-start"}function p(e,t){return"alignSelf"in t.style?t.style.alignSelf:"alignItems"in e.style?e.style.alignItems:"stretch"}function f(e){return"flexDirection"in e.style?e.style.flexDirection:"column"}function h(e){return"position"in e.style?e.style.position:"relative"}function d(e){return e.style.flex}function m(e){return h(e)===B&&d(e)>0}function g(e){return"wrap"===e.style.flexWrap}function v(e,t){return e.layout[S[t]]+l(e,t)}function y(e,t){return!r(e.style[S[t]])&&e.style[S[t]]>=0}function _(e,t){return!r(e.style[t])}function b(e){return"measure"in e.style}function x(e,t){return t in e.style?e.style[t]:0}function E(e,t){r(e.layout[S[t]])&&y(e,t)&&(e.layout[S[t]]=w(e.style[S[t]],u(e,t)))}function C(e,t){return T[t]in e.style?x(e,T[t]):-x(e,R[t])}function w(e,t){return e>t?e:t}var T={row:"left",column:"top"},R={row:"right",column:"bottom"},D={row:"left",column:"top"},S={row:"width",column:"height"},M=void 0,I="row",P="column",O="flex-start",A="center",N="flex-end",L="space-between",F="space-around",k="flex-start",U="center",j="stretch",B="relative",V="absolute";return function z(e,t){var n=f(e),i=n===I?P:I;if(E(e,n),E(e,i),e.layout[T[n]]+=o(e,T[n])+C(e,n),e.layout[T[i]]+=o(e,T[i])+C(e,i),b(e)){var H=M;H=y(e,I)?e.style.width:r(e.layout[S[I]])?t-l(e,I):e.layout[S[I]],H-=u(e,I);var q=!y(e,I)&&r(e.layout[S[I]]),G=!y(e,P)&&r(e.layout[S[P]]);if(q||G){var Y=e.style.measure(H);q&&(e.layout.width=Y.width+u(e,I)),G&&(e.layout.height=Y.height+u(e,P))}}else{for(var W=0;W<e.children.length;++W){var X=e.children[W];if(p(e,X)!==j||h(X)!==B||r(e.layout[S[i]])||y(X,i)){if(h(X)==V)for(var Z=0;2>Z;Z++){var K=0!=Z?I:P;!r(e.layout[S[K]])&&!y(X,K)&&_(X,T[K])&&_(X,R[K])&&(X.layout[S[K]]=w(e.layout[S[K]]-u(e,K)-l(X,K)-x(X,T[K])-x(X,R[K]),u(X,K)))}}else X.layout[S[i]]=w(e.layout[S[i]]-u(e,i)-l(X,i),u(X,i))}var Q=M;r(e.layout[S[n]])||(Q=e.layout[S[n]]-u(e,n));for(var J=0,$=0,ee=0,te=0,ne=0;$<e.children.length;){for(var re=0,oe=0,ie=0,ae=0,W=J;W<e.children.length;++W){var X=e.children[W],se=0;if(!r(e.layout[S[n]])&&m(X))oe++,ie+=d(X),se=u(X,n)+l(X,n);else{var le=M;n===I||(le=y(e,I)?e.layout[S[I]]-u(e,I):t-l(e,I)-u(e,I)),0===ee&&z(X,le),h(X)===B&&(ae++,se=v(X,n))}if(g(e)&&!r(e.layout[S[n]])&&re+se>Q&&W!==J){ee=1;break}ee=0,re+=se,$=W+1}var ue=0,ce=0,pe=0;if(pe=r(e.layout[S[n]])?w(re,0)-re:Q-re,0!==oe){var fe=pe/ie;0>fe&&(fe=0);for(var W=J;$>W;++W){var X=e.children[W];if(m(X)){X.layout[S[n]]=fe*d(X)+u(X,n);var le=M;n===I||(le=y(e,I)?e.layout[S[I]]-u(e,I):t-l(e,I)-u(e,I)),z(X,le)}}}else{var he=c(e);he===O||(he===A?ue=pe/2:he===N?ue=pe:he===L?(pe=w(pe,0),ce=oe+ae-1!==0?pe/(oe+ae-1):0):he===F&&(ce=pe/(oe+ae),ue=ce/2))}for(var de=0,me=ue+s(e,T[n]),W=J;$>W;++W){var X=e.children[W];h(X)===V&&_(X,T[n])?X.layout[D[n]]=x(X,T[n])+a(e,T[n])+o(X,T[n]):X.layout[D[n]]+=me,h(X)===B&&(me+=ce+v(X,n),de=w(de,v(X,i)))}var ge=e.layout[S[n]];r(e.layout[S[n]])&&(ge=w(me+s(e,R[n]),u(e,n)));var ve=e.layout[S[i]];r(e.layout[S[i]])&&(ve=w(de+u(e,i),u(e,i)));for(var W=J;$>W;++W){var X=e.children[W];if(h(X)===V&&_(X,T[i]))X.layout[D[i]]=x(X,T[i])+a(e,T[i])+o(X,T[i]);else{var ye=s(e,T[i]);if(h(X)===B){var _e=p(e,X);if(_e===k);else if(_e===j)y(X,i)||(X.layout[S[i]]=w(ve-u(e,i)-l(X,i),u(X,i)));else{var be=ve-u(e,i)-v(X,i);ye+=_e===U?be/2:be}}X.layout[D[i]]+=te+ye}}te+=de,ne=w(ne,me),J=$}r(e.layout[S[n]])&&(e.layout[S[n]]=w(ne+s(e,R[n]),u(e,n))),r(e.layout[S[i]])&&(e.layout[S[i]]=w(te+u(e,i),u(e,i)));for(var W=0;W<e.children.length;++W){var X=e.children[W];if(h(X)==V){for(var Z=0;2>Z;Z++){var K=0!==Z?I:P;!r(e.layout[S[K]])&&!y(X,K)&&_(X,T[K])&&_(X,R[K])&&(X.layout[S[K]]=w(e.layout[S[K]]-u(e,K)-l(X,K)-x(X,T[K])-x(X,R[K]),u(X,K)))}for(var Z=0;2>Z;Z++){var K=0!==Z?I:P;_(X,R[K])&&!_(X,T[K])&&(X.layout[T[K]]=e.layout[S[K]]-X.layout[S[K]]-x(X,R[K]))}}}}}}();"object"==typeof t&&(t.exports=r)},{}],61:[function(e,t,n){"use strict";var r=e("react"),o=(e("react/lib/Object.assign"),e("scroller")),i=e("./Group"),a=(e("./clamp"),r.createClass({propTypes:{style:r.PropTypes.object,numberOfItemsGetter:r.PropTypes.func.isRequired,itemHeightGetter:r.PropTypes.func.isRequired,itemGetter:r.PropTypes.func.isRequired,snapping:r.PropTypes.bool,scrollingDeceleration:r.PropTypes.number,scrollingPenetrationAcceleration:r.PropTypes.number,onScroll:r.PropTypes.func},getDefaultProps:function(){return{style:{left:0,top:0,width:0,height:0},snapping:!1,scrollingDeceleration:.95,scrollingPenetrationAcceleration:.08}},getInitialState:function(){return{scrollTop:0}},componentDidMount:function(){this.createScroller(),this.updateScrollingDimensions()},render:function(){var e=this.getVisibleItemIndexes().map(this.renderItem);return r.createElement(i,{style:this.props.style,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchEnd},e)},renderItem:function(e){var t=this.props.itemGetter(e,this.state.scrollTop),n=this.props.itemHeightGetter(),o={top:0,left:0,width:this.props.style.width,height:n,translateY:e*n-this.state.scrollTop,zIndex:e};return r.createElement(i,{style:o,key:e},t)},handleTouchStart:function(e){this.scroller&&this.scroller.doTouchStart(e.touches,e.timeStamp)},handleTouchMove:function(e){this.scroller&&(e.preventDefault(),this.scroller.doTouchMove(e.touches,e.timeStamp,e.scale))},handleTouchEnd:function(e){this.scroller&&(this.scroller.doTouchEnd(e.timeStamp),this.props.snapping&&this.updateScrollingDeceleration())},handleScroll:function(e,t){this.setState({scrollTop:t}),this.props.onScroll&&this.props.onScroll(t)},createScroller:function(){var e={scrollingX:!1,scrollingY:!0,decelerationRate:this.props.scrollingDeceleration,penetrationAcceleration:this.props.scrollingPenetrationAcceleration};this.scroller=new o(this.handleScroll,e)},updateScrollingDimensions:function(){var e=this.props.style.width,t=this.props.style.height,n=e,r=this.props.numberOfItemsGetter()*this.props.itemHeightGetter();this.scroller.setDimensions(e,t,n,r)},getVisibleItemIndexes:function(){for(var e=[],t=this.props.itemHeightGetter(),n=this.props.numberOfItemsGetter(),r=this.state.scrollTop,o=0,i=0;n>i;i++)o=i*t-r,o>=this.props.style.height||o<=-this.props.style.height||e.push(i);return e},updateScrollingDeceleration:function(){for(var e=this.scroller.__decelerationVelocityY,t=this.state.scrollTop,n=0,r=t;Math.abs(e).toFixed(6)>0;)r+=e,e*=this.props.scrollingDeceleration;for(var o,i=1/0,a=this.props.itemHeightGetter(),s=this.props.numberOfItemsGetter(),l=0,u=s;u>l;l++)o=a*l-r,Math.abs(o)<i&&(i=Math.abs(o),n=a*l);this.scroller.__minDecelerationScrollTop=n,this.scroller.__maxDecelerationScrollTop=n}}));t.exports=a},{"./Group":55,"./clamp":66,react:228,"react/lib/Object.assign":99,scroller:71}],62:[function(e,t,n){"use strict";var r={Surface:e("./Surface"),Layer:e("./Layer"),Group:e("./Group"),Image:e("./Image"),Text:e("./Text"),ListView:e("./ListView"),FontFace:e("./FontFace"),measureText:e("./measureText")};t.exports=r},{"./FontFace":52,"./Group":55,"./Image":56,"./Layer":58,"./ListView":61,"./Surface":64,"./Text":65,"./measureText":70}],63:[function(e,t,n){"use strict";function r(){this.children=[],this.frame=o.zero()}var o=e("./FrameUtils"),i=e("./DrawingUtils"),a=e("./EventTypes");r.prototype={getRootLayer:function(){for(var e=this;e.parentLayer;)e=e.parentLayer;return e},inject:function(e){this.parentLayer&&this.parentLayer!==e&&this.remove(),this.parentLayer||e.addChild(this)},injectBefore:function(e,t){this.inject(e)},addChild:function(e){e.parentLayer=this,this.children.push(e)},remove:function(){this.parentLayer&&this.parentLayer.children.splice(this.parentLayer.children.indexOf(this),1)},subscribe:function(e,t,n){for(var r in a)a[r]===e&&(this[r]=t);return this.removeEventListener.bind(this,e,t,n)},addEventListener:function(e,t,n){for(var r in a)a[r]===e&&delete this[r]},removeEventListener:function(e,t,n){var r,o=this.eventListeners[e];if(o)for(var i=0,a=o.length;a>i;i++)if(r=o[i],r.callback===t&&r.callbackScope===n){o.splice(i,1);break}},translate:function(e,t){this.frame&&(this.frame.x+=e,this.frame.y+=t),this.clipRect&&(this.clipRect.x+=e,this.clipRect.y+=t),this.children&&this.children.forEach(function(n){n.translate(e,t)})},invalidateLayout:function(){this.getRootLayer().draw()},invalidateBackingStore:function(){this.backingStoreId&&i.invalidateBackingStore(this.backingStoreId),this.invalidateLayout()},draw:function(){}},t.exports=r},{"./DrawingUtils":49,"./EventTypes":51,"./FrameUtils":54}],64:[function(e,t,n){(function(n){"use strict";var r=e("react"),o=e("react/lib/ReactUpdates"),i=e("react/lib/invariant"),a=e("./ContainerMixin"),s=e("./RenderLayer"),l=e("./FrameUtils"),u=e("./DrawingUtils"),c=e("./hitTest"),p=e("./layoutNode"),f=r.createClass({mixins:[a],propTypes:{top:r.PropTypes.number.isRequired,left:r.PropTypes.number.isRequired,width:r.PropTypes.number.isRequired,height:r.PropTypes.number.isRequired,scale:r.PropTypes.number.isRequired,enableCSSLayout:r.PropTypes.bool},getDefaultProps:function(){return{scale:window.devicePixelRatio||1}},componentDidMount:function(){this.scale(),this.node=new s,this.node.frame=l.make(this.props.left,this.props.top,this.props.width,this.props.height),this.node.draw=this.batchedTick;var e=o.ReactReconcileTransaction.getPooled();e.perform(this.mountAndInjectChildrenAtRoot,this,this.props.children,e),o.ReactReconcileTransaction.release(e),this.node.draw()},componentWillUnmount:function(){this.unmountChildren()},componentDidUpdate:function(e,t){var n=o.ReactReconcileTransaction.getPooled();n.perform(this.updateChildrenAtRoot,this,this.props.children,n),o.ReactReconcileTransaction.release(n),(e.width!==this.props.width||e.height!==this.props.height)&&this.scale(),this.node&&this.node.draw()},render:function(){var e=this.props.width*this.props.scale,t=this.props.height*this.props.scale,n={width:this.props.width,height:this.props.height};return r.createElement("canvas",{ref:"canvas",width:e,height:t,style:n,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchEnd,onClick:this.handleClick})},getContext:function(){return"production"!==n.env.NODE_ENV?i(this.isMounted(),"Tried to access drawing context on an unmounted Surface."):i(this.isMounted()),this.refs.canvas.getDOMNode().getContext("2d")},scale:function(){this.getContext().scale(this.props.scale,this.props.scale)},batchedTick:function(){return this._frameReady===!1?void(this._pendingTick=!0):void this.tick()},tick:function(){this._frameReady=!1,this.clear(),this.draw(),requestAnimationFrame(this.afterTick)},afterTick:function(){this._frameReady=!0,this._pendingTick&&(this.tick(),this._pendingTick=!1)},clear:function(){this.getContext().clearRect(0,0,this.props.width,this.props.height)},draw:function(){var e;this.node&&(this.props.enableCSSLayout&&(e=p(this.node)),u.drawRenderLayer(this.getContext(),this.node))},hitTest:function(e){var t=c(e,this.node,this.getDOMNode());t&&t[c.getHitHandle(e.type)](e)},handleTouchStart:function(e){var t,n=c(e,this.node,this.getDOMNode());if(n){this._touches=this._touches||{};for(var r=0,o=e.touches.length;o>r;r++)t=e.touches[r],this._touches[t.identifier]=n;n[c.getHitHandle(e.type)](e)}},handleTouchMove:function(e){this.hitTest(e)},handleTouchEnd:function(e){if(this._touches)for(var t,n=c.getHitHandle(e.type),r=0,o=e.changedTouches.length;o>r;r++)t=this._touches[e.changedTouches[r].identifier],t&&t[n]&&t[n](e),delete this._touches[e.changedTouches[r].identifier]},handleClick:function(e){this.hitTest(e)}});t.exports=f}).call(this,e("_process"))},{"./ContainerMixin":48,"./DrawingUtils":49,"./FrameUtils":54,"./RenderLayer":63,"./hitTest":68,"./layoutNode":69,_process:7,react:228,"react/lib/ReactUpdates":160,"react/lib/invariant":208}],65:[function(e,t,n){"use strict";function r(e){return e?"string"==typeof e?e:e.length?e.join("\n"):"":""}var o=e("./createComponent"),i=e("./LayerMixin"),a=o("Text",i,{applyTextProps:function(e,t){var n=t&&t.style?t.style:{},o=this.node;o.type="text",o.text=r(t.children),o.color=n.color,o.fontFace=n.fontFace,o.fontSize=n.fontSize,o.lineHeight=n.lineHeight,o.textAlign=n.textAlign},mountComponent:function(e,t,n){var r=this._currentElement.props,o=this.node;return this.applyLayerProps({},r),this.applyTextProps({},r),o},receiveComponent:function(e,t,n){var r=e.props,o=this._currentElement.props;this.applyLayerProps(o,r),this.applyTextProps(o,r),this._currentElement=e}});t.exports=a},{"./LayerMixin":59,"./createComponent":67}],66:[function(e,t,n){"use strict";t.exports=function(e,t,n){return Math.min(Math.max(e,t),n)}},{}],67:[function(e,t,n){"use strict";function r(e){var t=function(e){this.node=null,this.subscriptions=null,this.listeners=null,this.node=new i,this._mountImage=null,this._renderedChildren=null,this._mostRecentlyPlacedChild=null};t.displayName=e;for(var n=1,r=arguments.length;r>n;n++)o(t.prototype,arguments[n]);return t}var o=e("react/lib/Object.assign"),i=e("./RenderLayer");t.exports=r},{"./RenderLayer":63,"react/lib/Object.assign":99}],68:[function(e,t,n){"use strict";function r(e,t,n){var r,o=e.touches?e.touches[0]:e,i=o.pageX,l=o.pageY;return n&&(r=n.getBoundingClientRect(),i-=r.left,l-=r.top),a(t,e.type,s.make(i,l,1,1))}function o(e,t){return(t.zIndex||0)-(e.zIndex||0)}function i(e){var t;for(var n in l)if(l[n]===e){t=n;break}return t}function a(e,t,n){var r,l=null,u=i(t),c=e.frame;if("number"==typeof e.alpha&&e.alpha<.01)return null;if(e.children){r=e.children.slice().reverse().sort(o);for(var p=0,f=r.length;f>p&&!(l=a(r[p],t,n));p++);}return e.hitOutsets&&(c=s.inset(s.clone(c),-e.hitOutsets[0],-e.hitOutsets[1],-e.hitOutsets[2],-e.hitOutsets[3])),!l&&e[u]&&s.intersects(c,n)&&(l=e),l}var s=e("./FrameUtils"),l=e("./EventTypes");t.exports=r,t.exports.getHitHandle=i},{"./EventTypes":51,"./FrameUtils":54}],69:[function(e,t,n){"use strict";function r(e){var t=o(e);return a(t),i(t),t}function o(e){return{layer:e,layout:{width:void 0,height:void 0,top:0,left:0},style:e._originalStyle||{},children:(e.children||[]).map(o)}}function i(e,t,n){e.layer.frame.x=e.layout.left+(t||0),e.layer.frame.y=e.layout.top+(n||0),e.layer.frame.width=e.layout.width,e.layer.frame.height=e.layout.height,e.children&&e.children.length>0&&e.children.forEach(function(t){i(t,e.layout.left,e.layout.top)})}var a=e("./Layout");t.exports=r},{"./Layout":60}],70:[function(e,t,n){"use strict";function r(e){return e.split(" ")}function o(e,t,n,r,o){return e+t+n.id+r+o}var i=(e("./FontFace"),e("./FontUtils")),a=document.createElement("canvas"),s=a.getContext("2d"),l={},u={width:0,height:0,lines:[]};t.exports=function(e,t,n,a,c){var p=o(e,t,n,a,c),f=l[p];if(f)return f;if(!i.isFontLoaded(n))return u;var h,d,m,g,v,y={};if(s.font=n.attributes.style+" normal "+n.attributes.weight+" "+a+"pt "+n.family,h=s.measureText(e),y.width=h.width,y.height=c,y.lines=[],y.width<=t)y.lines.push({width:y.width,text:e});else for(y.width=t,m=r(e),v="";m.length;)g=v+m[0]+" ",h=s.measureText(g),h.width>t?(y.height+=c,y.lines.push({width:d,text:v.trim()}),v=m[0]+" ",d=s.measureText(v.trim()).width):(v=g,d=h.width),1===m.length&&(h=s.measureText(v.trim()),y.lines.push({width:h.width,text:v.trim()})),m.shift();return l[p]=y,y}},{"./FontFace":52,"./FontUtils":53}],71:[function(e,t,n){t.exports=e("./src/Scroller")},{"./src/Scroller":73}],72:[function(e,t,n){!function(e){var n=Date.now||function(){return+new Date},r=60,o=1e3,i={},a=1,s={effect:{}};s.effect.Animate={requestAnimationFrame:function(){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,n=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(n=!1),n)return function(e,n){t(e,n)};var r=60,o={},i=0,a=1,s=null,l=+new Date;return function(e,t){var n=a++;return o[n]=e,i++,null===s&&(s=setInterval(function(){var e=+new Date,t=o;o={},i=0;for(var n in t)t.hasOwnProperty(n)&&(t[n](e),l=e);e-l>2500&&(clearInterval(s),s=null)},1e3/r)),n}}(),stop:function(e){var t=null!=i[e];return t&&(i[e]=null),t},isRunning:function(e){return null!=i[e]},start:function(e,t,l,u,c,p){var f=n(),h=f,d=0,m=0,g=a++;if(p||(p=document.body),g%20===0){var v={};for(var y in i)v[y]=!0;i=v}var _=function(a){var v=a!==!0,y=n();if(!i[g]||t&&!t(g))return i[g]=null,void(l&&l(r-m/((y-f)/o),g,!1));if(v)for(var b=Math.round((y-h)/(o/r))-1,x=0;x<Math.min(b,4);x++)_(!0),m++;u&&(d=(y-f)/u,d>1&&(d=1));var E=c?c(d):d;e(E,y,v)!==!1&&1!==d||!v?v&&(h=y,s.effect.Animate.requestAnimationFrame(_,p)):(i[g]=null,l&&l(r-m/((y-f)/o),g,1===d||null==u))};return i[g]=!0,s.effect.Animate.requestAnimationFrame(_,p),g}},t.exports=s}("undefined"!=typeof window?window:this)},{}],73:[function(e,t,n){var r,o=e("./Animate");!function(){var e=function(){};r=function(t,n){this.__callback=t,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:e,decelerationRate:.95,
|
|
penetrationDeceleration:.03,penetrationAcceleration:.08};for(var r in n)this.options[r]=n[r]};var n=function(e){return Math.pow(e-1,3)+1},i=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},a={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,n,r){var o=this;e===+e&&(o.__clientWidth=e),t===+t&&(o.__clientHeight=t),n===+n&&(o.__contentWidth=n),r===+r&&(o.__contentHeight=r),o.__computeScrollMax(),o.scrollTo(o.__scrollLeft,o.__scrollTop,!0)},setPosition:function(e,t){var n=this;n.__clientLeft=e||0,n.__clientTop=t||0},setSnapSize:function(e,t){var n=this;n.__snapWidth=e,n.__snapHeight=t},activatePullToRefresh:function(e,t,n,r){var o=this;o.__refreshHeight=e,o.__refreshActivate=t,o.__refreshDeactivate=n,o.__refreshStart=r},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,t,n,r,i){var a=this;if(!a.options.zooming)throw new Error("Zooming is not enabled!");i&&(a.__zoomComplete=i),a.__isDecelerating&&(o.effect.Animate.stop(a.__isDecelerating),a.__isDecelerating=!1);var s=a.__zoomLevel;null==n&&(n=a.__clientWidth/2),null==r&&(r=a.__clientHeight/2),e=Math.max(Math.min(e,a.options.maxZoom),a.options.minZoom),a.__computeScrollMax(e);var l=(n+a.__scrollLeft)*e/s-n,u=(r+a.__scrollTop)*e/s-r;l>a.__maxScrollLeft?l=a.__maxScrollLeft:0>l&&(l=0),u>a.__maxScrollTop?u=a.__maxScrollTop:0>u&&(u=0),a.__publish(l,u,e,t)},zoomBy:function(e,t,n,r,o){var i=this;i.zoomTo(i.__zoomLevel*e,t,n,r,o)},scrollTo:function(e,t,n,r){var i=this;if(i.__isDecelerating&&(o.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1),null!=r&&r!==i.__zoomLevel){if(!i.options.zooming)throw new Error("Zooming is not enabled!");e*=r,t*=r,i.__computeScrollMax(r)}else r=i.__zoomLevel;i.options.scrollingX?i.options.paging?e=Math.round(e/i.__clientWidth)*i.__clientWidth:i.options.snapping&&(e=Math.round(e/i.__snapWidth)*i.__snapWidth):e=i.__scrollLeft,i.options.scrollingY?i.options.paging?t=Math.round(t/i.__clientHeight)*i.__clientHeight:i.options.snapping&&(t=Math.round(t/i.__snapHeight)*i.__snapHeight):t=i.__scrollTop,e=Math.max(Math.min(i.__maxScrollLeft,e),0),t=Math.max(Math.min(i.__maxScrollTop,t),0),e===i.__scrollLeft&&t===i.__scrollTop&&(n=!1),i.__publish(e,t,r,n)},scrollBy:function(e,t,n){var r=this,o=r.__isAnimating?r.__scheduledLeft:r.__scrollLeft,i=r.__isAnimating?r.__scheduledTop:r.__scrollTop;r.scrollTo(o+(e||0),i+(t||0),n)},doMouseZoom:function(e,t,n,r){var o=this,i=e>0?.97:1.03;return o.zoomTo(o.__zoomLevel*i,!1,n-o.__clientLeft,r-o.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var n=this;n.__interruptedAnimation=!0,n.__isDecelerating&&(o.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1,n.__interruptedAnimation=!0),n.__isAnimating&&(o.effect.Animate.stop(n.__isAnimating),n.__isAnimating=!1,n.__interruptedAnimation=!0);var r,i,a=1===e.length;a?(r=e[0].pageX,i=e[0].pageY):(r=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),n.__initialTouchLeft=r,n.__initialTouchTop=i,n.__zoomLevelStart=n.__zoomLevel,n.__lastTouchLeft=r,n.__lastTouchTop=i,n.__lastTouchMove=t,n.__lastScale=1,n.__enableScrollX=!a&&n.options.scrollingX,n.__enableScrollY=!a&&n.options.scrollingY,n.__isTracking=!0,n.__didDecelerationComplete=!1,n.__isDragging=!a,n.__isSingleTouch=a,n.__positions=[]},doTouchMove:function(e,t,n){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var r=this;if(r.__isTracking){var o,i;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,i=e[0].pageY);var a=r.__positions;if(r.__isDragging){var s=o-r.__lastTouchLeft,l=i-r.__lastTouchTop,u=r.__scrollLeft,c=r.__scrollTop,p=r.__zoomLevel;if(null!=n&&r.options.zooming){var f=p;if(p=p/r.__lastScale*n,p=Math.max(Math.min(p,r.options.maxZoom),r.options.minZoom),f!==p){var h=o-r.__clientLeft,d=i-r.__clientTop;u=(h+u)*p/f-h,c=(d+c)*p/f-d,r.__computeScrollMax(p)}}if(r.__enableScrollX){u-=s*this.options.speedMultiplier;var m=r.__maxScrollLeft;(u>m||0>u)&&(r.options.bouncing?u+=s/2*this.options.speedMultiplier:u=u>m?m:0)}if(r.__enableScrollY){c-=l*this.options.speedMultiplier;var g=r.__maxScrollTop;(c>g||0>c)&&(r.options.bouncing?(c+=l/2*this.options.speedMultiplier,r.__enableScrollX||null==r.__refreshHeight||(!r.__refreshActive&&c<=-r.__refreshHeight?(r.__refreshActive=!0,r.__refreshActivate&&r.__refreshActivate()):r.__refreshActive&&c>-r.__refreshHeight&&(r.__refreshActive=!1,r.__refreshDeactivate&&r.__refreshDeactivate()))):c=c>g?g:0)}a.length>60&&a.splice(0,30),a.push(u,c,t),r.__publish(u,c,p)}else{var v=r.options.locking?3:0,y=5,_=Math.abs(o-r.__initialTouchLeft),b=Math.abs(i-r.__initialTouchTop);r.__enableScrollX=r.options.scrollingX&&_>=v,r.__enableScrollY=r.options.scrollingY&&b>=v,a.push(r.__scrollLeft,r.__scrollTop,t),r.__isDragging=(r.__enableScrollX||r.__enableScrollY)&&(_>=y||b>=y),r.__isDragging&&(r.__interruptedAnimation=!1)}r.__lastTouchLeft=o,r.__lastTouchTop=i,r.__lastTouchMove=t,r.__lastScale=n}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);var t=this;if(t.__isTracking){if(t.__isTracking=!1,t.__isDragging)if(t.__isDragging=!1,t.__isSingleTouch&&t.options.animating&&e-t.__lastTouchMove<=100){for(var n=t.__positions,r=n.length-1,o=r,i=r;i>0&&n[i]>t.__lastTouchMove-100;i-=3)o=i;if(o===r&&n.length>5&&(o=2),o!==r){var a=n[r]-n[o],s=t.__scrollLeft-n[o-2],l=t.__scrollTop-n[o-1];t.__decelerationVelocityX=s/a*(1e3/60),t.__decelerationVelocityY=l/a*(1e3/60);var u=t.options.paging||t.options.snapping?4:1;(Math.abs(t.__decelerationVelocityX)>u||Math.abs(t.__decelerationVelocityY)>u)&&(t.__refreshActive||t.__startDeceleration(e))}else t.options.scrollingComplete()}else e-t.__lastTouchMove>100&&t.options.scrollingComplete();t.__isDecelerating||(t.__refreshActive&&t.__refreshStart?(t.__publish(t.__scrollLeft,-t.__refreshHeight,t.__zoomLevel,!0),t.__refreshStart&&t.__refreshStart()):((t.__interruptedAnimation||t.__isDragging)&&t.options.scrollingComplete(),t.scrollTo(t.__scrollLeft,t.__scrollTop,!0,t.__zoomLevel),t.__refreshActive&&(t.__refreshActive=!1,t.__refreshDeactivate&&t.__refreshDeactivate()))),t.__positions.length=0}},__publish:function(e,t,r,a){var s=this,l=s.__isAnimating;if(l&&(o.effect.Animate.stop(l),s.__isAnimating=!1),a&&s.options.animating){s.__scheduledLeft=e,s.__scheduledTop=t,s.__scheduledZoom=r;var u=s.__scrollLeft,c=s.__scrollTop,p=s.__zoomLevel,f=e-u,h=t-c,d=r-p,m=function(e,t,n){n&&(s.__scrollLeft=u+f*e,s.__scrollTop=c+h*e,s.__zoomLevel=p+d*e,s.__callback&&s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel))},g=function(e){return s.__isAnimating===e},v=function(e,t,n){t===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||n)&&s.options.scrollingComplete(),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))};s.__isAnimating=o.effect.Animate.start(m,g,v,s.options.animationDuration,l?n:i)}else s.__scheduledLeft=s.__scrollLeft=e,s.__scheduledTop=s.__scrollTop=t,s.__scheduledZoom=s.__zoomLevel=r,s.__callback&&s.__callback(e,t,r),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))},__computeScrollMax:function(e){var t=this;null==e&&(e=t.__zoomLevel),t.__maxScrollLeft=Math.max(t.__contentWidth*e-t.__clientWidth,0),t.__maxScrollTop=Math.max(t.__contentHeight*e-t.__clientHeight,0)},__startDeceleration:function(e){var t=this;if(t.options.paging){var n=Math.max(Math.min(t.__scrollLeft,t.__maxScrollLeft),0),r=Math.max(Math.min(t.__scrollTop,t.__maxScrollTop),0),i=t.__clientWidth,a=t.__clientHeight;t.__minDecelerationScrollLeft=Math.floor(n/i)*i,t.__minDecelerationScrollTop=Math.floor(r/a)*a,t.__maxDecelerationScrollLeft=Math.ceil(n/i)*i,t.__maxDecelerationScrollTop=Math.ceil(r/a)*a}else t.__minDecelerationScrollLeft=0,t.__minDecelerationScrollTop=0,t.__maxDecelerationScrollLeft=t.__maxScrollLeft,t.__maxDecelerationScrollTop=t.__maxScrollTop;var s=function(e,n,r){t.__stepThroughDeceleration(r)},l=t.options.snapping?4:.1,u=function(){var e=Math.abs(t.__decelerationVelocityX)>=l||Math.abs(t.__decelerationVelocityY)>=l;return e||(t.__didDecelerationComplete=!0),e},c=function(e,n,r){t.__isDecelerating=!1,t.__didDecelerationComplete&&t.options.scrollingComplete(),t.scrollTo(t.__scrollLeft,t.__scrollTop,t.options.snapping)};t.__isDecelerating=o.effect.Animate.start(s,u,c)},__stepThroughDeceleration:function(e){var t=this,n=t.__scrollLeft+t.__decelerationVelocityX,r=t.__scrollTop+t.__decelerationVelocityY;if(!t.options.bouncing){var o=Math.max(Math.min(t.__maxDecelerationScrollLeft,n),t.__minDecelerationScrollLeft);o!==n&&(n=o,t.__decelerationVelocityX=0);var i=Math.max(Math.min(t.__maxDecelerationScrollTop,r),t.__minDecelerationScrollTop);i!==r&&(r=i,t.__decelerationVelocityY=0)}if(e?t.__publish(n,r,t.__zoomLevel):(t.__scrollLeft=n,t.__scrollTop=r),!t.options.paging){var a=t.options.decelerationRate;t.__decelerationVelocityX*=a,t.__decelerationVelocityY*=a}if(t.options.bouncing){var s=0,l=0,u=t.options.penetrationDeceleration,c=t.options.penetrationAcceleration;n<t.__minDecelerationScrollLeft?s=t.__minDecelerationScrollLeft-n:n>t.__maxDecelerationScrollLeft&&(s=t.__maxDecelerationScrollLeft-n),r<t.__minDecelerationScrollTop?l=t.__minDecelerationScrollTop-r:r>t.__maxDecelerationScrollTop&&(l=t.__maxDecelerationScrollTop-r),0!==s&&(s*t.__decelerationVelocityX<=0?t.__decelerationVelocityX+=s*u:t.__decelerationVelocityX=s*c),0!==l&&(l*t.__decelerationVelocityY<=0?t.__decelerationVelocityY+=l*u:t.__decelerationVelocityY=l*c)}}};for(var s in a)r.prototype[s]=a[s];t.exports=r}()},{"./Animate":72}],74:[function(e,t,n){"use strict";var r=e("./focusNode"),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};t.exports=o},{"./focusNode":192}],75:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case S.topCompositionStart:return M.compositionStart;case S.topCompositionEnd:return M.compositionEnd;case S.topCompositionUpdate:return M.compositionUpdate}}function a(e,t){return e===S.topKeyDown&&t.keyCode===x}function s(e,t){switch(e){case S.topKeyUp:return-1!==b.indexOf(t.keyCode);case S.topKeyDown:return t.keyCode!==x;case S.topKeyPress:case S.topMouseDown:case S.topBlur:return!0;default:return!1}}function l(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function u(e,t,n,r){var o,u;if(E?o=i(e):P?s(e,r)&&(o=M.compositionEnd):a(e,r)&&(o=M.compositionStart),!o)return null;T&&(P||o!==M.compositionStart?o===M.compositionEnd&&P&&(u=P.getData()):P=g.getPooled(t));var c=v.getPooled(o,n,r);if(u)c.data=u;else{var p=l(r);null!==p&&(c.data=p)}return d.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case S.topCompositionEnd:return l(t);case S.topKeyPress:var n=t.which;return n!==R?null:(I=!0,D);case S.topTextInput:var r=t.data;return r===D&&I?null:r;default:return null}}function p(e,t){if(P){if(e===S.topCompositionEnd||s(e,t)){var n=P.getData();return g.release(P),P=null,n}return null}switch(e){case S.topPaste:return null;case S.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case S.topCompositionEnd:return T?null:t.data;default:return null}}function f(e,t,n,r){var o;if(o=w?c(e,r):p(e,r),!o)return null;var i=y.getPooled(M.beforeInput,n,r);return i.data=o,d.accumulateTwoPhaseDispatches(i),i}var h=e("./EventConstants"),d=e("./EventPropagators"),m=e("./ExecutionEnvironment"),g=e("./FallbackCompositionState"),v=e("./SyntheticCompositionEvent"),y=e("./SyntheticInputEvent"),_=e("./keyOf"),b=[9,13,27,32],x=229,E=m.canUseDOM&&"CompositionEvent"in window,C=null;m.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var w=m.canUseDOM&&"TextEvent"in window&&!C&&!r(),T=m.canUseDOM&&(!E||C&&C>8&&11>=C),R=32,D=String.fromCharCode(R),S=h.topLevelTypes,M={beforeInput:{phasedRegistrationNames:{bubbled:_({onBeforeInput:null}),captured:_({onBeforeInputCapture:null})},dependencies:[S.topCompositionEnd,S.topKeyPress,S.topTextInput,S.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:_({onCompositionEnd:null}),captured:_({onCompositionEndCapture:null})},dependencies:[S.topBlur,S.topCompositionEnd,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:_({onCompositionStart:null}),captured:_({onCompositionStartCapture:null})},dependencies:[S.topBlur,S.topCompositionStart,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:_({onCompositionUpdate:null}),captured:_({onCompositionUpdateCapture:null})},dependencies:[S.topBlur,S.topCompositionUpdate,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]}},I=!1,P=null,O={eventTypes:M,extractEvents:function(e,t,n,r){return[u(e,t,n,r),f(e,t,n,r)]}};t.exports=O},{"./EventConstants":87,"./EventPropagators":92,"./ExecutionEnvironment":93,"./FallbackCompositionState":94,"./SyntheticCompositionEvent":166,"./SyntheticInputEvent":170,"./keyOf":214}],76:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},{}],77:[function(e,t,n){"use strict";var r=e("./CSSProperty"),o=e("./ExecutionEnvironment"),i=(e("./camelizeStyleName"),e("./dangerousStyleValue")),a=e("./hyphenateStyleName"),s=e("./memoizeStringOnly"),l=(e("./warning"),s(function(e){return a(e)})),u="cssFloat";o.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(u="styleFloat");var c={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=u),a)n[o]=a;else{var s=r.shorthandPropertyExpansions[o];if(s)for(var l in s)n[l]="";else n[o]=""}}}};t.exports=c},{"./CSSProperty":76,"./ExecutionEnvironment":93,"./camelizeStyleName":181,"./dangerousStyleValue":186,"./hyphenateStyleName":206,"./memoizeStringOnly":216,"./warning":227}],78:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("./invariant");i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){a(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{"./Object.assign":99,"./PooledClass":100,"./invariant":208}],79:[function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=C.getPooled(S.change,I,e);b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(i,t)}function i(e){_.enqueueEvents(e),_.processEventQueue()}function a(e,t){M=e,I=t,M.attachEvent("onchange",o)}function s(){M&&(M.detachEvent("onchange",o),M=null,I=null)}function l(e,t,n){return e===D.topChange?n:void 0}function u(e,t,n){e===D.topFocus?(s(),a(t,n)):e===D.topBlur&&s()}function c(e,t){M=e,I=t,P=e.value,O=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(M,"value",L),M.attachEvent("onpropertychange",f)}function p(){M&&(delete M.value,M.detachEvent("onpropertychange",f),M=null,I=null,P=null,O=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==P&&(P=t,o(e))}}function h(e,t,n){return e===D.topInput?n:void 0}function d(e,t,n){e===D.topFocus?(p(),c(t,n)):e===D.topBlur&&p()}function m(e,t,n){return e!==D.topSelectionChange&&e!==D.topKeyUp&&e!==D.topKeyDown||!M||M.value===P?void 0:(P=M.value,I)}function g(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===D.topClick?n:void 0}var y=e("./EventConstants"),_=e("./EventPluginHub"),b=e("./EventPropagators"),x=e("./ExecutionEnvironment"),E=e("./ReactUpdates"),C=e("./SyntheticEvent"),w=e("./isEventSupported"),T=e("./isTextInputElement"),R=e("./keyOf"),D=y.topLevelTypes,S={change:{phasedRegistrationNames:{bubbled:R({onChange:null}),captured:R({onChangeCapture:null})},dependencies:[D.topBlur,D.topChange,D.topClick,D.topFocus,D.topInput,D.topKeyDown,D.topKeyUp,D.topSelectionChange]}},M=null,I=null,P=null,O=null,A=!1;x.canUseDOM&&(A=w("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;x.canUseDOM&&(N=w("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return O.get.call(this)},set:function(e){P=""+e,O.set.call(this,e)}},F={eventTypes:S,extractEvents:function(e,t,n,o){var i,a;if(r(t)?A?i=l:a=u:T(t)?N?i=h:(i=m,a=d):g(t)&&(i=v),i){var s=i(e,t,n);if(s){var c=C.getPooled(S.change,s,o);return b.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,n)}};t.exports=F},{"./EventConstants":87,"./EventPluginHub":89,"./EventPropagators":92,"./ExecutionEnvironment":93,"./ReactUpdates":160,"./SyntheticEvent":168,"./isEventSupported":209,"./isTextInputElement":211,"./keyOf":214}],80:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],81:[function(e,t,n){"use strict";function r(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var o=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./setTextContent"),s=e("./invariant"),l={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:a,processUpdates:function(e,t){for(var n,l=null,u=null,c=0;c<e.length;c++)if(n=e[c],n.type===i.MOVE_EXISTING||n.type===i.REMOVE_NODE){var p=n.fromIndex,f=n.parentNode.childNodes[p],h=n.parentID;s(f),l=l||{},l[h]=l[h]||[],l[h][p]=f,u=u||[],u.push(f)}var d=o.dangerouslyRenderMarkup(t);if(u)for(var m=0;m<u.length;m++)u[m].parentNode.removeChild(u[m]);for(var g=0;g<e.length;g++)switch(n=e[g],n.type){case i.INSERT_MARKUP:r(n.parentNode,d[n.markupIndex],n.toIndex);break;case i.MOVE_EXISTING:r(n.parentNode,l[n.parentID][n.fromIndex],n.toIndex);break;case i.TEXT_CONTENT:a(n.parentNode,n.textContent);break;case i.REMOVE_NODE:}}};t.exports=l},{"./Danger":84,"./ReactMultiChildUpdateTypes":145,"./invariant":208,"./setTextContent":222}],82:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e("./invariant"),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(e){var t=e.Properties||{},n=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var u in t){o(!s.isStandardName.hasOwnProperty(u)),s.isStandardName[u]=!0;var c=u.toLowerCase();if(s.getPossibleStandardName[c]=u,n.hasOwnProperty(u)){var p=n[u];s.getPossibleStandardName[p]=u,s.getAttributeName[u]=p}else s.getAttributeName[u]=c;s.getPropertyName[u]=a.hasOwnProperty(u)?a[u]:u,l.hasOwnProperty(u)?s.getMutationMethod[u]=l[u]:s.getMutationMethod[u]=null;var f=t[u];s.mustUseAttribute[u]=r(f,i.MUST_USE_ATTRIBUTE),s.mustUseProperty[u]=r(f,i.MUST_USE_PROPERTY),s.hasSideEffects[u]=r(f,i.HAS_SIDE_EFFECTS),s.hasBooleanValue[u]=r(f,i.HAS_BOOLEAN_VALUE),s.hasNumericValue[u]=r(f,i.HAS_NUMERIC_VALUE),s.hasPositiveNumericValue[u]=r(f,i.HAS_POSITIVE_NUMERIC_VALUE),s.hasOverloadedBooleanValue[u]=r(f,i.HAS_OVERLOADED_BOOLEAN_VALUE),o(!s.mustUseAttribute[u]||!s.mustUseProperty[u]),o(s.mustUseProperty[u]||!s.hasSideEffects[u]),o(!!s.hasBooleanValue[u]+!!s.hasNumericValue[u]+!!s.hasOverloadedBooleanValue[u]<=1)}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){var n=s._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=a[e];return r||(a[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:i};t.exports=s},{"./invariant":208}],83:[function(e,t,n){"use strict";function r(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasNumericValue[e]&&isNaN(t)||o.hasPositiveNumericValue[e]&&1>t||o.hasOverloadedBooleanValue[e]&&t===!1}var o=e("./DOMProperty"),i=e("./quoteAttributeValueForBrowser"),a=(e("./warning"),{createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,t))return"";var n=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&t===!0?n:n+"="+i(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+i(t):null},setValueForProperty:function(e,t,n){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,n);else if(r(t,n))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+n);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&""+e[a]==""+n||(e[a]=n)}}else o.isCustomAttribute(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,r);o.hasSideEffects[t]&&""+e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}});t.exports=a},{"./DOMProperty":82,"./quoteAttributeValueForBrowser":220,"./warning":227}],84:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e("./ExecutionEnvironment"),i=e("./createNodesFromMarkup"),a=e("./emptyFunction"),s=e("./getMarkupWrap"),l=e("./invariant"),u=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){l(o.canUseDOM);for(var t,n={},p=0;p<e.length;p++)l(e[p]),t=r(e[p]),t=s(t)?t:"*",n[t]=n[t]||[],n[t][p]=e[p];var f=[],h=0;for(t in n)if(n.hasOwnProperty(t)){var d,m=n[t];for(d in m)if(m.hasOwnProperty(d)){var g=m[d];m[d]=g.replace(u,"$1 "+c+'="'+d+'" ')}for(var v=i(m.join(""),a),y=0;y<v.length;++y){var _=v[y];_.hasAttribute&&_.hasAttribute(c)&&(d=+_.getAttribute(c),_.removeAttribute(c),l(!f.hasOwnProperty(d)),f[d]=_,h+=1)}}return l(h===f.length),l(f.length===e.length),f},dangerouslyReplaceNodeWithMarkup:function(e,t){l(o.canUseDOM),l(t),l("html"!==e.tagName.toLowerCase());var n=i(t,a)[0];e.parentNode.replaceChild(n,e)}};t.exports=p},{"./ExecutionEnvironment":93,"./createNodesFromMarkup":185,"./emptyFunction":187,"./getMarkupWrap":200,"./invariant":208}],85:[function(e,t,n){"use strict";var r=e("./keyOf"),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];t.exports=o},{"./keyOf":214}],86:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./EventPropagators"),i=e("./SyntheticMouseEvent"),a=e("./ReactMount"),s=e("./keyOf"),l=r.topLevelTypes,u=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]}},p=[null,null],f={eventTypes:c,extractEvents:function(e,t,n,r){if(e===l.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var s;if(t.window===t)s=t;else{var f=t.ownerDocument;s=f?f.defaultView||f.parentWindow:window}var h,d;if(e===l.topMouseOut?(h=t,d=u(r.relatedTarget||r.toElement)||s):(h=s,d=t),h===d)return null;var m=h?a.getID(h):"",g=d?a.getID(d):"",v=i.getPooled(c.mouseLeave,m,r);v.type="mouseleave",v.target=h,v.relatedTarget=d;var y=i.getPooled(c.mouseEnter,g,r);return y.type="mouseenter",y.target=d,y.relatedTarget=h,o.accumulateEnterLeaveDispatches(v,y,m,g),p[0]=v,p[1]=y,p}};t.exports=f},{"./EventConstants":87,"./EventPropagators":92,"./ReactMount":143,"./SyntheticMouseEvent":172,"./keyOf":214}],87:[function(e,t,n){"use strict";var r=e("./keyMirror"),o=r({bubbled:null,captured:null}),i=r({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};t.exports=a},{"./keyMirror":213}],88:[function(e,t,n){var r=e("./emptyFunction"),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{"./emptyFunction":187}],89:[function(e,t,n){"use strict";var r=e("./EventPluginRegistry"),o=e("./EventPluginUtils"),i=e("./accumulateInto"),a=e("./forEachAccumulated"),s=e("./invariant"),l={},u=null,c=function(e){if(e){var t=o.executeDispatch,n=r.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},p=null,f={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){s(!n||"function"==typeof n);var r=l[t]||(l[t]={});r[e]=n},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=l[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in l)delete l[t][e]},extractEvents:function(e,t,n,o){for(var a,s=r.plugins,l=0,u=s.length;u>l;l++){var c=s[l];if(c){var p=c.extractEvents(e,t,n,o);p&&(a=i(a,p))}}return a},enqueueEvents:function(e){e&&(u=i(u,e))},processEventQueue:function(){var e=u;u=null,a(e,c),s(!u)},__purge:function(){l={}},__getListenerBank:function(){return l}};t.exports=f},{"./EventPluginRegistry":90,"./EventPluginUtils":91,"./accumulateInto":178,"./forEachAccumulated":193,"./invariant":208}],90:[function(e,t,n){"use strict";function r(){if(s)for(var e in l){var t=l[e],n=s.indexOf(e);if(a(n>-1),!u.plugins[n]){a(t.extractEvents),u.plugins[n]=t;var r=t.eventTypes;for(var i in r)a(o(r[i],t,i))}}}function o(e,t,n){a(!u.eventNameDispatchConfigs.hasOwnProperty(n)),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){a(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=e("./invariant"),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];l.hasOwnProperty(n)&&l[n]===o||(a(!l[n]),l[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},{"./invariant":208}],91:[function(e,t,n){"use strict";function r(e){return e===g.topMouseUp||e===g.topTouchEnd||e===g.topTouchCancel}function o(e){return e===g.topMouseMove||e===g.topTouchMove}function i(e){return e===g.topMouseDown||e===g.topTouchStart}function a(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function s(e,t,n){e.currentTarget=m.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function l(e,t){a(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r];
|
|
}else if(t&&t(e,n))return n;return null}function c(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function p(e){var t=e._dispatchListeners,n=e._dispatchIDs;d(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function f(e){return!!e._dispatchListeners}var h=e("./EventConstants"),d=e("./invariant"),m={Mount:null,injectMount:function(e){m.Mount=e}},g=h.topLevelTypes,v={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:p,executeDispatch:s,executeDispatchesInOrder:l,executeDispatchesInOrderStopAtTrue:c,hasDispatches:f,injection:m,useTouchEvents:!1};t.exports=v},{"./EventConstants":87,"./invariant":208}],92:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return g(e,r)}function o(e,t,n){var o=t?m.bubbled:m.captured,i=r(e,n,o);i&&(n._dispatchListeners=h(n._dispatchListeners,i),n._dispatchIDs=h(n._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&f.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(e,r);o&&(n._dispatchListeners=h(n._dispatchListeners,o),n._dispatchIDs=h(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function l(e){d(e,i)}function u(e,t,n,r){f.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function c(e){d(e,s)}var p=e("./EventConstants"),f=e("./EventPluginHub"),h=e("./accumulateInto"),d=e("./forEachAccumulated"),m=p.PropagationPhases,g=f.getListener,v={accumulateTwoPhaseDispatches:l,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:u};t.exports=v},{"./EventConstants":87,"./EventPluginHub":89,"./accumulateInto":178,"./forEachAccumulated":193}],93:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],94:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("./getTextContentAccessor");i(r.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{"./Object.assign":99,"./PooledClass":100,"./getTextContentAccessor":203}],95:[function(e,t,n){"use strict";var r,o=e("./DOMProperty"),i=e("./ExecutionEnvironment"),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,l=o.injection.HAS_BOOLEAN_VALUE,u=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,f=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var h=document.implementation;r=h&&h.hasFeature&&h.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var d={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|l,allowTransparency:a,alt:null,async:l,autoComplete:null,autoPlay:l,cellPadding:null,cellSpacing:null,charSet:a,checked:s|l,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|l,coords:null,crossOrigin:null,data:null,dateTime:a,defer:l,dir:null,disabled:a|l,download:f,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:l,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|l,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|l,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|l,muted:s|l,name:null,noValidate:l,open:l,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|l,rel:null,required:l,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:l,scrolling:null,seamless:a|l,selected:s|l,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|u,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|l,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=d},{"./DOMProperty":82,"./ExecutionEnvironment":93}],96:[function(e,t,n){"use strict";function r(e){u(null==e.props.checkedLink||null==e.props.valueLink)}function o(e){r(e),u(null==e.props.value&&null==e.props.onChange)}function i(e){r(e),u(null==e.props.checked&&null==e.props.onChange)}function a(e){this.props.valueLink.requestChange(e.target.value)}function s(e){this.props.checkedLink.requestChange(e.target.checked)}var l=e("./ReactPropTypes"),u=e("./invariant"),c={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},p={Mixin:{propTypes:{value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:l.func}},getValue:function(e){return e.props.valueLink?(o(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(i(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(o(e),a):e.props.checkedLink?(i(e),s):e.props.onChange}};t.exports=p},{"./ReactPropTypes":151,"./invariant":208}],97:[function(e,t,n){"use strict";function r(e){e.remove()}var o=e("./ReactBrowserEventEmitter"),i=e("./accumulateInto"),a=e("./forEachAccumulated"),s=e("./invariant"),l={trapBubbledEvent:function(e,t){s(this.isMounted());var n=this.getDOMNode();s(n);var r=o.trapBubbledEvent(e,t,n);this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};t.exports=l},{"./ReactBrowserEventEmitter":103,"./accumulateInto":178,"./forEachAccumulated":193,"./invariant":208}],98:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./emptyFunction"),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};t.exports=a},{"./EventConstants":87,"./emptyFunction":187}],99:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var s in a)r.call(a,s)&&(n[s]=a[s])}}return n}t.exports=r},{}],100:[function(e,t,n){"use strict";var r=e("./invariant"),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},l=function(e){var t=this;r(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=10,c=o,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=u),n.release=l,n},f={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fiveArgumentPooler:s};t.exports=f},{"./invariant":208}],101:[function(e,t,n){"use strict";var r=e("./EventPluginUtils"),o=e("./ReactChildren"),i=e("./ReactComponent"),a=e("./ReactClass"),s=e("./ReactContext"),l=e("./ReactCurrentOwner"),u=e("./ReactElement"),c=(e("./ReactElementValidator"),e("./ReactDOM")),p=e("./ReactDOMTextComponent"),f=e("./ReactDefaultInjection"),h=e("./ReactInstanceHandles"),d=e("./ReactMount"),m=e("./ReactPerf"),g=e("./ReactPropTypes"),v=e("./ReactReconciler"),y=e("./ReactServerRendering"),_=e("./Object.assign"),b=e("./findDOMNode"),x=e("./onlyChild");f.inject();var E=u.createElement,C=u.createFactory,w=u.cloneElement,T=m.measure("React","render",d.render),R={Children:{map:o.map,forEach:o.forEach,count:o.count,only:x},Component:i,DOM:c,PropTypes:g,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createElement:E,cloneElement:w,createFactory:C,createMixin:function(e){return e},constructAndRenderComponent:d.constructAndRenderComponent,constructAndRenderComponentByID:d.constructAndRenderComponentByID,findDOMNode:b,render:T,renderToString:y.renderToString,renderToStaticMarkup:y.renderToStaticMarkup,unmountComponentAtNode:d.unmountComponentAtNode,isValidElement:u.isValidElement,withContext:s.withContext,__spread:_};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:l,InstanceHandles:h,Mount:d,Reconciler:v,TextComponent:p});R.version="0.13.3",t.exports=R},{"./EventPluginUtils":91,"./ExecutionEnvironment":93,"./Object.assign":99,"./ReactChildren":105,"./ReactClass":106,"./ReactComponent":107,"./ReactContext":111,"./ReactCurrentOwner":112,"./ReactDOM":113,"./ReactDOMTextComponent":124,"./ReactDefaultInjection":127,"./ReactElement":130,"./ReactElementValidator":131,"./ReactInstanceHandles":139,"./ReactMount":143,"./ReactPerf":148,"./ReactPropTypes":151,"./ReactReconciler":154,"./ReactServerRendering":157,"./findDOMNode":190,"./onlyChild":217}],102:[function(e,t,n){"use strict";var r=e("./findDOMNode"),o={getDOMNode:function(){return r(this)}};t.exports=o},{"./findDOMNode":190}],103:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,p[e[m]]={}),p[e[m]]}var o=e("./EventConstants"),i=e("./EventPluginHub"),a=e("./EventPluginRegistry"),s=e("./ReactEventEmitterMixin"),l=e("./ViewportMetrics"),u=e("./Object.assign"),c=e("./isEventSupported"),p={},f=!1,h=0,d={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=u({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],l=o.topLevelTypes,u=0,p=s.length;p>u;u++){var f=s[u];i.hasOwnProperty(f)&&i[f]||(f===l.topWheel?c("wheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",n):c("mousewheel")?g.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",n):f===l.topScroll?c("scroll",!0)?g.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):f===l.topFocus||f===l.topBlur?(c("focus",!0)?(g.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):c("focusin")&&(g.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",n)),i[l.topBlur]=!0,i[l.topFocus]=!0):d.hasOwnProperty(f)&&g.ReactEventListener.trapBubbledEvent(f,d[f],n),i[f]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!f){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});t.exports=g},{"./EventConstants":87,"./EventPluginHub":89,"./EventPluginRegistry":90,"./Object.assign":99,"./ReactEventEmitterMixin":134,"./ViewportMetrics":177,"./isEventSupported":209}],104:[function(e,t,n){"use strict";var r=e("./ReactReconciler"),o=e("./flattenChildren"),i=e("./instantiateReactComponent"),a=e("./shouldUpdateReactComponent"),s={instantiateChildren:function(e,t,n){var r=o(e);for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],l=i(s,null);r[a]=l}return r},updateChildren:function(e,t,n,s){var l=o(t);if(!l&&!e)return null;var u;for(u in l)if(l.hasOwnProperty(u)){var c=e&&e[u],p=c&&c._currentElement,f=l[u];if(a(p,f))r.receiveComponent(c,f,n,s),l[u]=c;else{c&&r.unmountComponent(c,u);var h=i(f,null);l[u]=h}}for(u in e)!e.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||r.unmountComponent(e[u]);return l},unmountChildren:function(e){for(var t in e){var n=e[t];r.unmountComponent(n)}}};t.exports=s},{"./ReactReconciler":154,"./flattenChildren":191,"./instantiateReactComponent":207,"./shouldUpdateReactComponent":224}],105:[function(e,t,n){"use strict";function r(e,t){this.forEachFunction=e,this.forEachContext=t}function o(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function i(e,t,n){if(null==e)return e;var i=r.getPooled(t,n);h(e,o,i),r.release(i)}function a(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function s(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function l(e,t,n){if(null==e)return e;var r={},o=a.getPooled(r,t,n);return h(e,s,o),a.release(o),f.create(r)}function u(e,t,n,r){return null}function c(e,t){return h(e,u,null)}var p=e("./PooledClass"),f=e("./ReactFragment"),h=e("./traverseAllChildren"),d=(e("./warning"),p.twoArgumentPooler),m=p.threeArgumentPooler;p.addPoolingTo(r,d),p.addPoolingTo(a,m);var g={forEach:i,map:l,count:c};t.exports=g},{"./PooledClass":100,"./ReactFragment":136,"./traverseAllChildren":226,"./warning":227}],106:[function(e,t,n){"use strict";function r(e,t){var n=w.hasOwnProperty(t)?w[t]:null;R.hasOwnProperty(t)&&y(n===E.OVERRIDE_BASE),e.hasOwnProperty(t)&&y(n===E.DEFINE_MANY||n===E.DEFINE_MANY_MERGED)}function o(e,t){if(t){y("function"!=typeof t),y(!f.isValidElement(t));var n=e.prototype;t.hasOwnProperty(x)&&T.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==x){var i=t[o];if(r(n,o),T.hasOwnProperty(o))T[o](e,i);else{var a=w.hasOwnProperty(o),u=n.hasOwnProperty(o),c=i&&i.__reactDontBind,p="function"==typeof i,h=p&&!a&&!u&&!c;if(h)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=i,n[o]=i;else if(u){var d=w[o];y(a&&(d===E.DEFINE_MANY_MERGED||d===E.DEFINE_MANY)),d===E.DEFINE_MANY_MERGED?n[o]=s(n[o],i):d===E.DEFINE_MANY&&(n[o]=l(n[o],i))}else n[o]=i}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in T;y(!o);var i=n in e;y(!i),e[n]=r}}}function a(e,t){y(e&&t&&"object"==typeof e&&"object"==typeof t);for(var n in t)t.hasOwnProperty(n)&&(y(void 0===e[n]),e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,h.guard(n,e.constructor.displayName+"."+t))}}var p=e("./ReactComponent"),f=(e("./ReactCurrentOwner"),e("./ReactElement")),h=e("./ReactErrorUtils"),d=e("./ReactInstanceMap"),m=e("./ReactLifeCycle"),g=(e("./ReactPropTypeLocations"),e("./ReactPropTypeLocationNames"),e("./ReactUpdateQueue")),v=e("./Object.assign"),y=e("./invariant"),_=e("./keyMirror"),b=e("./keyOf"),x=(e("./warning"),b({mixins:null})),E=_({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),C=[],w={mixins:E.DEFINE_MANY,statics:E.DEFINE_MANY,propTypes:E.DEFINE_MANY,contextTypes:E.DEFINE_MANY,childContextTypes:E.DEFINE_MANY,getDefaultProps:E.DEFINE_MANY_MERGED,getInitialState:E.DEFINE_MANY_MERGED,getChildContext:E.DEFINE_MANY_MERGED,render:E.DEFINE_ONCE,componentWillMount:E.DEFINE_MANY,componentDidMount:E.DEFINE_MANY,componentWillReceiveProps:E.DEFINE_MANY,shouldComponentUpdate:E.DEFINE_ONCE,componentWillUpdate:E.DEFINE_MANY,componentDidUpdate:E.DEFINE_MANY,componentWillUnmount:E.DEFINE_MANY,updateComponent:E.OVERRIDE_BASE},T={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=v({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=v({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=v({},e.propTypes,t)},statics:function(e,t){i(e,t)}},R={replaceState:function(e,t){g.enqueueReplaceState(this,e),t&&g.enqueueCallback(this,t)},isMounted:function(){var e=d.get(this);return e&&e!==m.currentlyMountingInstance},setProps:function(e,t){g.enqueueSetProps(this,e),t&&g.enqueueCallback(this,t)},replaceProps:function(e,t){g.enqueueReplaceProps(this,e),t&&g.enqueueCallback(this,t)}},D=function(){};v(D.prototype,p.prototype,R);var S={createClass:function(e){var t=function(e,t){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.state=null;var n=this.getInitialState?this.getInitialState():null;y("object"==typeof n&&!Array.isArray(n)),this.state=n};t.prototype=new D,t.prototype.constructor=t,C.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),y(t.prototype.render);for(var n in w)t.prototype[n]||(t.prototype[n]=null);return t.type=t,t},injection:{injectMixin:function(e){C.push(e)}}};t.exports=S},{"./Object.assign":99,"./ReactComponent":107,"./ReactCurrentOwner":112,"./ReactElement":130,"./ReactErrorUtils":133,"./ReactInstanceMap":140,"./ReactLifeCycle":141,"./ReactPropTypeLocationNames":149,"./ReactPropTypeLocations":150,"./ReactUpdateQueue":159,"./invariant":208,"./keyMirror":213,"./keyOf":214,"./warning":227}],107:[function(e,t,n){"use strict";function r(e,t){this.props=e,this.context=t}var o=e("./ReactUpdateQueue"),i=e("./invariant");e("./warning");r.prototype.setState=function(e,t){i("object"==typeof e||"function"==typeof e||null==e),o.enqueueSetState(this,e),t&&o.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)};t.exports=r},{"./ReactUpdateQueue":159,"./invariant":208,"./warning":227}],108:[function(e,t,n){"use strict";var r=e("./ReactDOMIDOperations"),o=e("./ReactMount"),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=i},{"./ReactDOMIDOperations":117,"./ReactMount":143}],109:[function(e,t,n){"use strict";var r=e("./invariant"),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){r(!o),i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=i},{"./invariant":208}],110:[function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var o=e("./ReactComponentEnvironment"),i=e("./ReactContext"),a=e("./ReactCurrentOwner"),s=e("./ReactElement"),l=(e("./ReactElementValidator"),e("./ReactInstanceMap")),u=e("./ReactLifeCycle"),c=e("./ReactNativeComponent"),p=e("./ReactPerf"),f=e("./ReactPropTypeLocations"),h=(e("./ReactPropTypeLocationNames"),e("./ReactReconciler")),d=e("./ReactUpdates"),m=e("./Object.assign"),g=e("./emptyObject"),v=e("./invariant"),y=e("./shouldUpdateReactComponent"),_=(e("./warning"),1),b={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=_++,this._rootNodeID=e;var r=this._processProps(this._currentElement.props),o=this._processContext(this._currentElement._context),i=c.getComponentClassForElement(this._currentElement),a=new i(r,o);a.props=r,a.context=o,a.refs=g,this._instance=a,l.set(a,this);var s=a.state;void 0===s&&(a.state=s=null),v("object"==typeof s&&!Array.isArray(s)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var p,f,d=u.currentlyMountingInstance;u.currentlyMountingInstance=this;try{a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),p=this._getValidatedChildContext(n),f=this._renderValidatedComponent(p)}finally{u.currentlyMountingInstance=d}this._renderedComponent=this._instantiateReactComponent(f,this._currentElement.type);var m=h.mountComponent(this._renderedComponent,e,t,this._mergeChildContext(n,p));return a.componentDidMount&&t.getReactMountReady().enqueue(a.componentDidMount,a),m},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=u.currentlyUnmountingInstance;u.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{u.currentlyUnmountingInstance=t}}h.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,l.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=s.cloneAndReplaceProps(n,m({},n.props,e)),d.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return g;var n=this._currentElement.type.contextTypes;if(!n)return g;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var t=this._maskContext(e);return t},_getValidatedChildContext:function(e){var t=this._instance,n=t.getChildContext&&t.getChildContext();if(n){v("object"==typeof t.constructor.childContextTypes);for(var r in n)v(r in t.constructor.childContextTypes);return n}return null},_mergeChildContext:function(e,t){return t?m({},e,t):e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var a;try{v("function"==typeof e[i]),a=e[i](t,i,o,n)}catch(s){a=s}if(a instanceof Error){r(this);n===f.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&h.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(e,t){e=this._maskContext(e),t=this._maskContext(t);for(var n=Object.keys(t).sort(),r=(this.getName()||"ReactCompositeComponent",0);r<n.length;r++){n[r]}},updateComponent:function(e,t,n,r,o){var i=this._instance,a=i.context,s=i.props;t!==n&&(a=this._processContext(n._context),s=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(s,a));var l=this._processPendingState(s,a),u=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(s,l,a);u?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,l,a,e,o)):(this._currentElement=n,this._context=o,i.props=s,i.state=l,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=m({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];m(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a=this._instance,s=a.props,l=a.state,u=a.context;a.componentWillUpdate&&a.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,a.props=t,a.state=n,a.context=r,this._updateRenderedComponent(o,i),a.componentDidUpdate&&o.getReactMountReady().enqueue(a.componentDidUpdate.bind(a,s,l,u),a)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._getValidatedChildContext(),i=this._renderValidatedComponent(o);if(y(r,i))h.receiveComponent(n,i,e,this._mergeChildContext(t,o));else{var a=this._rootNodeID,s=n._rootNodeID;h.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i,this._currentElement.type);var l=h.mountComponent(this._renderedComponent,a,e,this._mergeChildContext(t,o));this._replaceNodeWithMarkupByID(s,l)}},_replaceNodeWithMarkupByID:function(e,t){o.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(e){var t,n=i.current;i.current=this._mergeChildContext(this._currentElement._context,e),a.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=n,a.current=null}return v(null===t||t===!1||s.isValidElement(t)),t},attachRef:function(e,t){var n=this.getPublicInstance(),r=n.refs===g?n.refs={}:n.refs;r[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};p.measureMethods(b,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var x={Mixin:b};t.exports=x},{"./Object.assign":99,"./ReactComponentEnvironment":109,"./ReactContext":111,"./ReactCurrentOwner":112,"./ReactElement":130,"./ReactElementValidator":131,"./ReactInstanceMap":140,"./ReactLifeCycle":141,"./ReactNativeComponent":146,"./ReactPerf":148,"./ReactPropTypeLocationNames":149,"./ReactPropTypeLocations":150,"./ReactReconciler":154,"./ReactUpdates":160,"./emptyObject":188,"./invariant":208,"./shouldUpdateReactComponent":224,"./warning":227}],111:[function(e,t,n){"use strict";var r=e("./Object.assign"),o=e("./emptyObject"),i=(e("./warning"),{current:o,withContext:function(e,t){var n,o=i.current;i.current=r({},o,e);try{n=t()}finally{i.current=o}return n}});t.exports=i},{"./Object.assign":99,"./emptyObject":188,"./warning":227}],112:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],113:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e("./ReactElement"),i=(e("./ReactElementValidator"),e("./mapObject")),a=i({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=a},{"./ReactElement":130,"./ReactElementValidator":131,"./mapObject":215}],114:[function(e,t,n){"use strict";var r=e("./AutoFocusMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactClass"),a=e("./ReactElement"),s=e("./keyMirror"),l=a.createFactory("button"),u=s({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[r,o],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&u[t]||(e[t]=this.props[t]);return l(e,this.props.children)}});t.exports=c},{"./AutoFocusMixin":74,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130,"./keyMirror":213}],115:[function(e,t,n){"use strict";function r(e){e&&(null!=e.dangerouslySetInnerHTML&&(v(null==e.children),v("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML)),v(null==e.style||"object"==typeof e.style))}function o(e,t,n,r){var o=f.findReactContainerForID(e);if(o){var i=o.nodeType===w?o.ownerDocument:o;
|
|
b(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function i(e){M.call(S,e)||(v(D.test(e)),S[e]=!0)}function a(e){i(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var s=e("./CSSPropertyOperations"),l=e("./DOMProperty"),u=e("./DOMPropertyOperations"),c=e("./ReactBrowserEventEmitter"),p=e("./ReactComponentBrowserEnvironment"),f=e("./ReactMount"),h=e("./ReactMultiChild"),d=e("./ReactPerf"),m=e("./Object.assign"),g=e("./escapeTextContentForBrowser"),v=e("./invariant"),y=(e("./isEventSupported"),e("./keyOf")),_=(e("./warning"),c.deleteListener),b=c.listenTo,x=c.registrationNameModules,E={string:!0,number:!0},C=y({style:null}),w=1,T=null,R={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},D=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,S={},M={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e,r(this._currentElement.props);var o=R[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(x.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===C&&(i&&(i=this._previousStyleCopy=m({},t.style)),i=s.createMarkupForStyles(i));var a=u.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var l=u.createMarkupForID(this._rootNodeID);return n+" "+l+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=E[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+g(i);if(null!=a){var s=this.mountChildren(a,e,t);return n+s.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){r(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,r,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===C){var s=this._previousStyleCopy;for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="");this._previousStyleCopy=null}else x.hasOwnProperty(n)?_(this._rootNodeID,n):(l.isStandardName[n]||l.isCustomAttribute(n))&&T.deletePropertyByID(this._rootNodeID,n);for(n in a){var u=a[n],c=n===C?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&u!==c)if(n===C)if(u?u=this._previousStyleCopy=m({},u):this._previousStyleCopy=null,c){for(r in c)!c.hasOwnProperty(r)||u&&u.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in u)u.hasOwnProperty(r)&&c[r]!==u[r]&&(i=i||{},i[r]=u[r])}else i=u;else x.hasOwnProperty(n)?o(this._rootNodeID,n,u,t):(l.isStandardName[n]||l.isCustomAttribute(n))&&T.updatePropertyByID(this._rootNodeID,n,u)}i&&T.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=E[typeof e.children]?e.children:null,i=E[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,l=null!=o?null:e.children,u=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=l&&null==u?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&T.updateInnerHTMLByID(this._rootNodeID,s):null!=u&&this.updateChildren(u,t,n)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},d.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),m(a.prototype,a.Mixin,h.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=T=e}},t.exports=a},{"./CSSPropertyOperations":77,"./DOMProperty":82,"./DOMPropertyOperations":83,"./Object.assign":99,"./ReactBrowserEventEmitter":103,"./ReactComponentBrowserEnvironment":108,"./ReactMount":143,"./ReactMultiChild":144,"./ReactPerf":148,"./escapeTextContentForBrowser":189,"./invariant":208,"./isEventSupported":209,"./keyOf":214,"./warning":227}],116:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./LocalEventTrapMixin"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactClass"),s=e("./ReactElement"),l=s.createFactory("form"),u=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,o],render:function(){return l(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});t.exports=u},{"./EventConstants":87,"./LocalEventTrapMixin":97,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130}],117:[function(e,t,n){"use strict";var r=e("./CSSPropertyOperations"),o=e("./DOMChildrenOperations"),i=e("./DOMPropertyOperations"),a=e("./ReactMount"),s=e("./ReactPerf"),l=e("./invariant"),u=e("./setInnerHTML"),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,t,n){var r=a.getNode(e);l(!c.hasOwnProperty(t)),null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=a.getNode(e);l(!c.hasOwnProperty(t)),i.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var n=a.getNode(e);r.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);u(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);o.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);o.processUpdates(e,t)}};s.measureMethods(p,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=p},{"./CSSPropertyOperations":77,"./DOMChildrenOperations":81,"./DOMPropertyOperations":83,"./ReactMount":143,"./ReactPerf":148,"./invariant":208,"./setInnerHTML":221}],118:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./LocalEventTrapMixin"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactClass"),s=e("./ReactElement"),l=s.createFactory("iframe"),u=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,o],render:function(){return l(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load")}});t.exports=u},{"./EventConstants":87,"./LocalEventTrapMixin":97,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130}],119:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./LocalEventTrapMixin"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactClass"),s=e("./ReactElement"),l=s.createFactory("img"),u=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return l(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});t.exports=u},{"./EventConstants":87,"./LocalEventTrapMixin":97,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130}],120:[function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=e("./AutoFocusMixin"),i=e("./DOMPropertyOperations"),a=e("./LinkedValueUtils"),s=e("./ReactBrowserComponentMixin"),l=e("./ReactClass"),u=e("./ReactElement"),c=e("./ReactMount"),p=e("./ReactUpdates"),f=e("./Object.assign"),h=e("./invariant"),d=u.createFactory("input"),m={},g=l.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=f({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,d(e,this.props.children)},componentDidMount:function(){var e=c.getID(this.getDOMNode());m[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=c.getID(e);delete m[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var t,n=a.getOnChange(this);n&&(t=n.call(this,e)),p.asap(r,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),s=i;s.parentNode;)s=s.parentNode;for(var l=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),u=0,f=l.length;f>u;u++){var d=l[u];if(d!==i&&d.form===i.form){var g=c.getID(d);h(g);var v=m[g];h(v),p.asap(r,v)}}}return t}});t.exports=g},{"./AutoFocusMixin":74,"./DOMPropertyOperations":83,"./LinkedValueUtils":96,"./Object.assign":99,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130,"./ReactMount":143,"./ReactUpdates":160,"./invariant":208}],121:[function(e,t,n){"use strict";var r=e("./ReactBrowserComponentMixin"),o=e("./ReactClass"),i=e("./ReactElement"),a=(e("./warning"),i.createFactory("option")),s=o.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[r],componentWillMount:function(){},render:function(){return a(this.props,this.props.children)}});t.exports=s},{"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130,"./warning":227}],122:[function(e,t,n){"use strict";function r(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=s.getValue(this);null!=e&&this.isMounted()&&i(this,e)}}function o(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function i(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i.length&&(i[0].selected=!0)}}var a=e("./AutoFocusMixin"),s=e("./LinkedValueUtils"),l=e("./ReactBrowserComponentMixin"),u=e("./ReactClass"),c=e("./ReactElement"),p=e("./ReactUpdates"),f=e("./Object.assign"),h=c.createFactory("select"),d=u.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[a,s.Mixin,l],propTypes:{defaultValue:o,value:o},render:function(){var e=f({},this.props);return e.onChange=this._handleChange,e.value=null,h(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=s.getValue(this);null!=e?i(this,e):null!=this.props.defaultValue&&i(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=s.getValue(this);null!=t?(this._pendingUpdate=!1,i(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?i(this,this.props.defaultValue):i(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,n=s.getOnChange(this);return n&&(t=n.call(this,e)),this._pendingUpdate=!0,p.asap(r,this),t}});t.exports=d},{"./AutoFocusMixin":74,"./LinkedValueUtils":96,"./Object.assign":99,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130,"./ReactUpdates":160}],123:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),l=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),u=l?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var p=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),f=p?0:c.toString().length,h=f+u,d=document.createRange();d.setStart(n,o),d.setEnd(i,a);var m=d.collapsed;return{start:m?h:f,end:m?f:h}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=u(e,o),l=u(e,i);if(s&&l){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p))}}}var l=e("./ExecutionEnvironment"),u=e("./getNodeForCharacterOffset"),c=e("./getTextContentAccessor"),p=l.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:s};t.exports=f},{"./ExecutionEnvironment":93,"./getNodeForCharacterOffset":201,"./getTextContentAccessor":203}],124:[function(e,t,n){"use strict";var r=e("./DOMPropertyOperations"),o=e("./ReactComponentBrowserEnvironment"),i=e("./ReactDOMComponent"),a=e("./Object.assign"),s=e("./escapeTextContentForBrowser"),l=function(e){};a(l.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){this._rootNodeID=e;var o=s(this._stringText);return t.renderToStaticMarkup?o:"<span "+r.createMarkupForID(e)+">"+o+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=l},{"./DOMPropertyOperations":83,"./Object.assign":99,"./ReactComponentBrowserEnvironment":108,"./ReactDOMComponent":115,"./escapeTextContentForBrowser":189}],125:[function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=e("./AutoFocusMixin"),i=e("./DOMPropertyOperations"),a=e("./LinkedValueUtils"),s=e("./ReactBrowserComponentMixin"),l=e("./ReactClass"),u=e("./ReactElement"),c=e("./ReactUpdates"),p=e("./Object.assign"),f=e("./invariant"),h=(e("./warning"),u.createFactory("textarea")),d=l.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(f(null==e),Array.isArray(t)&&(f(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=a.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=p({},this.props);return f(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,h(e,this.state.initialValue)},componentDidUpdate:function(e,t,n){var r=a.getValue(this);if(null!=r){var o=this.getDOMNode();i.setValueForProperty(o,"value",""+r)}},_handleChange:function(e){var t,n=a.getOnChange(this);return n&&(t=n.call(this,e)),c.asap(r,this),t}});t.exports=d},{"./AutoFocusMixin":74,"./DOMPropertyOperations":83,"./LinkedValueUtils":96,"./Object.assign":99,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactElement":130,"./ReactUpdates":160,"./invariant":208,"./warning":227}],126:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e("./ReactUpdates"),i=e("./Transaction"),a=e("./Object.assign"),s=e("./emptyFunction"),l={initialize:s,close:function(){f.isBatchingUpdates=!1}},u={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[u,l];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=f.isBatchingUpdates;f.isBatchingUpdates=!0,i?e(t,n,r,o):p.perform(e,null,t,n,r,o)}};t.exports=f},{"./Object.assign":99,"./ReactUpdates":160,"./Transaction":176,"./emptyFunction":187}],127:[function(e,t,n){"use strict";function r(e){return d.createClass({tagName:e.toUpperCase(),render:function(){return new S(e,null,null,null,null,this.props)}})}function o(){I.EventEmitter.injectReactEventListener(M),I.EventPluginHub.injectEventPluginOrder(l),I.EventPluginHub.injectInstanceHandle(P),I.EventPluginHub.injectMount(O),I.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:F,EnterLeaveEventPlugin:u,ChangeEventPlugin:a,MobileSafariClickEventPlugin:f,SelectEventPlugin:N,BeforeInputEventPlugin:i}),I.NativeComponent.injectGenericComponentClass(v),I.NativeComponent.injectTextComponentClass(D),I.NativeComponent.injectAutoWrapper(r),I.Class.injectMixin(h),I.NativeComponent.injectComponentClasses({button:y,form:_,iframe:E,img:b,input:C,option:w,select:T,textarea:R,html:U("html"),head:U("head"),body:U("body")}),I.DOMProperty.injectDOMPropertyConfig(p),I.DOMProperty.injectDOMPropertyConfig(k),I.EmptyComponent.injectEmptyComponent("noscript"),I.Updates.injectReconcileTransaction(A),I.Updates.injectBatchingStrategy(g),I.RootIndex.injectCreateReactRootIndex(c.canUseDOM?s.createReactRootIndex:L.createReactRootIndex),I.Component.injectEnvironment(m),I.DOMComponent.injectIDOperations(x)}var i=e("./BeforeInputEventPlugin"),a=e("./ChangeEventPlugin"),s=e("./ClientReactRootIndex"),l=e("./DefaultEventPluginOrder"),u=e("./EnterLeaveEventPlugin"),c=e("./ExecutionEnvironment"),p=e("./HTMLDOMPropertyConfig"),f=e("./MobileSafariClickEventPlugin"),h=e("./ReactBrowserComponentMixin"),d=e("./ReactClass"),m=e("./ReactComponentBrowserEnvironment"),g=e("./ReactDefaultBatchingStrategy"),v=e("./ReactDOMComponent"),y=e("./ReactDOMButton"),_=e("./ReactDOMForm"),b=e("./ReactDOMImg"),x=e("./ReactDOMIDOperations"),E=e("./ReactDOMIframe"),C=e("./ReactDOMInput"),w=e("./ReactDOMOption"),T=e("./ReactDOMSelect"),R=e("./ReactDOMTextarea"),D=e("./ReactDOMTextComponent"),S=e("./ReactElement"),M=e("./ReactEventListener"),I=e("./ReactInjection"),P=e("./ReactInstanceHandles"),O=e("./ReactMount"),A=e("./ReactReconcileTransaction"),N=e("./SelectEventPlugin"),L=e("./ServerReactRootIndex"),F=e("./SimpleEventPlugin"),k=e("./SVGDOMPropertyConfig"),U=e("./createFullPageComponent");t.exports={inject:o}},{"./BeforeInputEventPlugin":75,"./ChangeEventPlugin":79,"./ClientReactRootIndex":80,"./DefaultEventPluginOrder":85,"./EnterLeaveEventPlugin":86,"./ExecutionEnvironment":93,"./HTMLDOMPropertyConfig":95,"./MobileSafariClickEventPlugin":98,"./ReactBrowserComponentMixin":102,"./ReactClass":106,"./ReactComponentBrowserEnvironment":108,"./ReactDOMButton":114,"./ReactDOMComponent":115,"./ReactDOMForm":116,"./ReactDOMIDOperations":117,"./ReactDOMIframe":118,"./ReactDOMImg":119,"./ReactDOMInput":120,"./ReactDOMOption":121,"./ReactDOMSelect":122,"./ReactDOMTextComponent":124,"./ReactDOMTextarea":125,"./ReactDefaultBatchingStrategy":126,"./ReactDefaultPerf":128,"./ReactElement":130,"./ReactEventListener":135,"./ReactInjection":137,"./ReactInstanceHandles":139,"./ReactMount":143,"./ReactReconcileTransaction":153,"./SVGDOMPropertyConfig":161,"./SelectEventPlugin":162,"./ServerReactRootIndex":163,"./SimpleEventPlugin":164,"./createFullPageComponent":184}],128:[function(e,t,n){"use strict";function r(e){return Math.floor(100*e)/100}function o(e,t,n){e[t]=(e[t]||0)+n}var i=e("./DOMProperty"),a=e("./ReactDefaultPerfAnalysis"),s=e("./ReactMount"),l=e("./ReactPerf"),u=e("./performanceNow"),c={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){c._injected||l.injection.injectMeasure(c.measure),c._allMeasurements.length=0,l.enableMeasure=!0},stop:function(){l.enableMeasure=!1},getLastMeasurements:function(){return c._allMeasurements},printExclusive:function(e){e=e||c._allMeasurements;var t=a.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":r(e.inclusive),"Exclusive mount time (ms)":r(e.exclusive),"Exclusive render time (ms)":r(e.render),"Mount time per instance (ms)":r(e.exclusive/e.count),"Render time per instance (ms)":r(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||c._allMeasurements;var t=a.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||c._allMeasurements,console.table(c.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||c._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[i.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=c._allMeasurements[c._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=[],i=0,a=arguments.length;a>i;i++)r.push(arguments[i]);var l,p,f;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return c._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),f=u(),p=n.apply(this,r),c._allMeasurements[c._allMeasurements.length-1].totalTime=u()-f,p;if("_mountImageIntoNode"===t||"ReactDOMIDOperations"===e){if(f=u(),p=n.apply(this,r),l=u()-f,"_mountImageIntoNode"===t){var h=s.getID(r[1]);c._recordWrite(h,t,l,r[0])}else"dangerouslyProcessChildrenUpdates"===t?r[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=r[1][e.markupIndex]),c._recordWrite(e.parentID,e.type,l,t)}):c._recordWrite(r[0],t,l,Array.prototype.slice.call(r,1));return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,r);if("string"==typeof this._currentElement.type)return n.apply(this,r);var d="mountComponent"===t?r[0]:this._rootNodeID,m="_renderValidatedComponent"===t,g="mountComponent"===t,v=c._mountStack,y=c._allMeasurements[c._allMeasurements.length-1];if(m?o(y.counts,d,1):g&&v.push(0),f=u(),p=n.apply(this,r),l=u()-f,m)o(y.render,d,l);else if(g){var _=v.pop();v[v.length-1]+=l,o(y.exclusive,d,l-_),o(y.inclusive,d,l)}else o(y.inclusive,d,l);return y.displayNames[d]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},p}}};t.exports=c},{"./DOMProperty":82,"./ReactDefaultPerfAnalysis":129,"./ReactMount":143,"./ReactPerf":148,"./performanceNow":219}],129:[function(e,t,n){function r(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];t+=r.totalTime}return t}function o(e){for(var t=[],n=0;n<e.length;n++){var r,o=e[n];for(r in o.writes)o.writes[r].forEach(function(e){t.push({id:r,type:c[e.type]||e.type,args:e.args})})}return t}function i(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r],i=l({},o.exclusive,o.inclusive);for(var a in i)t=o.displayNames[a].current,n[t]=n[t]||{componentName:t,inclusive:0,exclusive:0,render:0,count:0},o.render[a]&&(n[t].render+=o.render[a]),o.exclusive[a]&&(n[t].exclusive+=o.exclusive[a]),o.inclusive[a]&&(n[t].inclusive+=o.inclusive[a]),o.counts[a]&&(n[t].count+=o.counts[a])}var s=[];for(t in n)n[t].exclusive>=u&&s.push(n[t]);return s.sort(function(e,t){return t.exclusive-e.exclusive}),s}function a(e,t){for(var n,r={},o=0;o<e.length;o++){var i,a=e[o],c=l({},a.exclusive,a.inclusive);t&&(i=s(a));for(var p in c)if(!t||i[p]){var f=a.displayNames[p];n=f.owner+" > "+f.current,r[n]=r[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(r[n].time+=a.inclusive[p]),a.counts[p]&&(r[n].count+=a.counts[p])}}var h=[];for(n in r)r[n].time>=u&&h.push(r[n]);return h.sort(function(e,t){return t.time-e.time}),h}function s(e){var t={},n=Object.keys(e.writes),r=l({},e.exclusive,e.inclusive);for(var o in r){for(var i=!1,a=0;a<n.length;a++)if(0===n[a].indexOf(o)){i=!0;break}!i&&e.counts[o]>0&&(t[o]=!0)}return t}var l=e("./Object.assign"),u=1.2,c={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:i,getInclusiveSummary:a,getDOMSummary:o,getTotalTime:r};t.exports=p},{"./Object.assign":99}],130:[function(e,t,n){"use strict";var r=e("./ReactContext"),o=e("./ReactCurrentOwner"),i=e("./Object.assign"),a=(e("./warning"),{key:!0,ref:!0}),s=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};s.prototype={_isReactElement:!0},s.createElement=function(e,t,n){var i,l={},u=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,u=void 0===t.key?null:""+t.key;for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(l[i]=t[i])}var p=arguments.length-2;if(1===p)l.children=n;else if(p>1){for(var f=Array(p),h=0;p>h;h++)f[h]=arguments[h+2];l.children=f}if(e&&e.defaultProps){var d=e.defaultProps;for(i in d)"undefined"==typeof l[i]&&(l[i]=d[i])}return new s(e,u,c,o.current,r.current,l)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceProps=function(e,t){var n=new s(e.type,e.key,e.ref,e._owner,e._context,t);return n},s.cloneElement=function(e,t,n){var r,l=i({},e.props),u=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=o.current),void 0!==t.key&&(u=""+t.key);for(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(l[r]=t[r])}var f=arguments.length-2;if(1===f)l.children=n;else if(f>1){for(var h=Array(f),d=0;f>d;d++)h[d]=arguments[d+2];l.children=h}return new s(e.type,u,c,p,e._context,l)},s.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=s},{"./Object.assign":99,"./ReactContext":111,"./ReactCurrentOwner":112,"./warning":227}],131:[function(e,t,n){"use strict";function r(){if(y.current){var e=y.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function i(){var e=y.current;return e&&o(e)||void 0}function a(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,l('Each child in an array or iterator should have a unique "key" prop.',e,t))}function s(e,t,n){w.test(e)&&l("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function l(e,t,n){var r=i(),a="string"==typeof n?n:n.displayName||n.name,s=r||a,l=E[e]||(E[e]={});if(!l.hasOwnProperty(s)){l[s]=!0;var u="";if(t&&t._owner&&t._owner!==y.current){var c=o(t._owner);u=" It was passed a child from "+c+"."}}}function u(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];m.isValidElement(r)&&a(r,t)}else if(m.isValidElement(e))e._store.validated=!0;else if(e){var o=b(e);if(o){if(o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)m.isValidElement(i.value)&&a(i.value,t)}else if("object"==typeof e){var u=g.extractIfFragment(e);for(var c in u)u.hasOwnProperty(c)&&s(c,u[c],t)}}}function c(e,t,n,o){for(var i in t)if(t.hasOwnProperty(i)){var a;try{x("function"==typeof t[i]),a=t[i](n,i,e,o)}catch(s){a=s}if(a instanceof Error&&!(a.message in C)){C[a.message]=!0;r(this)}}}function p(e,t){var n=t.type,r="string"==typeof n?n:n.displayName,o=t._owner?t._owner.getPublicInstance().constructor.displayName:null,i=e+"|"+r+"|"+o;if(!T.hasOwnProperty(i)){T[i]=!0;var a="";r&&(a=" <"+r+" />");var s="";o&&(s=" The element was created by "+o+".")}}function f(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function h(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&f(t[r],n[r])||(p(r,e),t[r]=n[r]))}}function d(e){if(null!=e.type){var t=_.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&c(n,t.propTypes,e.props,v.prop),"function"==typeof t.getDefaultProps}}var m=e("./ReactElement"),g=e("./ReactFragment"),v=e("./ReactPropTypeLocations"),y=(e("./ReactPropTypeLocationNames"),e("./ReactCurrentOwner")),_=e("./ReactNativeComponent"),b=e("./getIteratorFn"),x=e("./invariant"),E=(e("./warning"),{}),C={},w=/^\d+$/,T={},R={checkAndWarnForMutatedProps:h,createElement:function(e,t,n){var r=m.createElement.apply(this,arguments);if(null==r)return r;for(var o=2;o<arguments.length;o++)u(arguments[o],e);return d(r),r},createFactory:function(e){var t=R.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=m.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)u(arguments[o],r.type);return d(r),r}};t.exports=R},{"./ReactCurrentOwner":112,"./ReactElement":130,"./ReactFragment":136,"./ReactNativeComponent":146,"./ReactPropTypeLocationNames":149,"./ReactPropTypeLocations":150,"./getIteratorFn":199,"./invariant":208,"./warning":227}],132:[function(e,t,n){"use strict";function r(e){c[e]=!0}function o(e){delete c[e]}function i(e){return!!c[e]}var a,s=e("./ReactElement"),l=e("./ReactInstanceMap"),u=e("./invariant"),c={},p={injectEmptyComponent:function(e){a=s.createFactory(e)}},f=function(){};f.prototype.componentDidMount=function(){var e=l.get(this);e&&r(e._rootNodeID)},f.prototype.componentWillUnmount=function(){var e=l.get(this);e&&o(e._rootNodeID)},f.prototype.render=function(){return u(a),a()};var h=s.createElement(f),d={emptyElement:h,injection:p,isNullComponentID:i};t.exports=d},{"./ReactElement":130,"./ReactInstanceMap":140,"./invariant":208}],133:[function(e,t,n){"use strict";var r={guard:function(e,t){return e}};t.exports=r},{}],134:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue()}var o=e("./EventPluginHub"),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};t.exports=i},{"./EventPluginHub":89}],135:[function(e,t,n){"use strict";function r(e){var t=p.getID(e),n=c.getReactRootIDFromNodeID(t),r=p.findReactContainerForID(n),o=p.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){for(var t=p.getFirstReactDOM(d(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=p.getID(t)||"";g._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function a(e){var t=m(window);e(t)}var s=e("./EventListener"),l=e("./ExecutionEnvironment"),u=e("./PooledClass"),c=e("./ReactInstanceHandles"),p=e("./ReactMount"),f=e("./ReactUpdates"),h=e("./Object.assign"),d=e("./getEventTarget"),m=e("./getUnboundedScrollPosition");h(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),u.addPoolingTo(o,u.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){
|
|
g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=g},{"./EventListener":88,"./ExecutionEnvironment":93,"./Object.assign":99,"./PooledClass":100,"./ReactInstanceHandles":139,"./ReactMount":143,"./ReactUpdates":160,"./getEventTarget":198,"./getUnboundedScrollPosition":204}],136:[function(e,t,n){"use strict";var r=(e("./ReactElement"),e("./warning"),{create:function(e){return e},extract:function(e){return e},extractIfFragment:function(e){return e}});t.exports=r},{"./ReactElement":130,"./warning":227}],137:[function(e,t,n){"use strict";var r=e("./DOMProperty"),o=e("./EventPluginHub"),i=e("./ReactComponentEnvironment"),a=e("./ReactClass"),s=e("./ReactEmptyComponent"),l=e("./ReactBrowserEventEmitter"),u=e("./ReactNativeComponent"),c=e("./ReactDOMComponent"),p=e("./ReactPerf"),f=e("./ReactRootIndex"),h=e("./ReactUpdates"),d={Component:i.injection,Class:a.injection,DOMComponent:c.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventEmitter:l.injection,NativeComponent:u.injection,Perf:p.injection,RootIndex:f.injection,Updates:h.injection};t.exports=d},{"./DOMProperty":82,"./EventPluginHub":89,"./ReactBrowserEventEmitter":103,"./ReactClass":106,"./ReactComponentEnvironment":109,"./ReactDOMComponent":115,"./ReactEmptyComponent":132,"./ReactNativeComponent":146,"./ReactPerf":148,"./ReactRootIndex":156,"./ReactUpdates":160}],138:[function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=e("./ReactDOMSelection"),i=e("./containsNode"),a=e("./focusNode"),s=e("./getActiveElement"),l={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:l.hasSelectionCapabilities(e)?l.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=l},{"./ReactDOMSelection":123,"./containsNode":182,"./focusNode":192,"./getActiveElement":194}],139:[function(e,t,n){"use strict";function r(e){return h+e.toString(36)}function o(e,t){return e.charAt(t)===h||t===e.length}function i(e){return""===e||e.charAt(0)===h&&e.charAt(e.length-1)!==h}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(h)):""}function l(e,t){if(f(i(e)&&i(t)),f(a(e,t)),e===t)return e;var n,r=e.length+d;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function u(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,a=0;n>=a;a++)if(o(e,a)&&o(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return f(i(s)),s}function c(e,t,n,r,o,i){e=e||"",t=t||"",f(e!==t);var u=a(t,e);f(u||a(e,t));for(var c=0,p=u?s:l,h=e;;h=p(h,t)){var d;if(o&&h===e||i&&h===t||(d=n(h,u,r)),d===!1||h===t)break;f(c++<m)}}var p=e("./ReactRootIndex"),f=e("./invariant"),h=".",d=h.length,m=100,g={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===h&&e.length>1){var t=e.indexOf(h,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=u(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:u,_getNextDescendantID:l,isAncestorIDOf:a,SEPARATOR:h};t.exports=g},{"./ReactRootIndex":156,"./invariant":208}],140:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],141:[function(e,t,n){"use strict";var r={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=r},{}],142:[function(e,t,n){"use strict";var r=e("./adler32"),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};t.exports=o},{"./adler32":179}],143:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){var t=M(e);return t&&H.getID(t)}function i(e){var t=a(e);if(t)if(F.hasOwnProperty(t)){var n=F[t];n!==e&&(P(!c(n,t)),F[t]=e)}else F[t]=e;return t}function a(e){return e&&e.getAttribute&&e.getAttribute(L)||""}function s(e,t){var n=a(e);n!==t&&delete F[n],e.setAttribute(L,t),F[t]=e}function l(e){return F.hasOwnProperty(e)&&c(F[e],e)||(F[e]=H.findReactNodeByID(e)),F[e]}function u(e){var t=x.get(e)._rootNodeID;return _.isNullComponentID(t)?null:(F.hasOwnProperty(t)&&c(F[t],t)||(F[t]=H.findReactNodeByID(t)),F[t])}function c(e,t){if(e){P(a(e)===t);var n=H.findReactContainerForID(t);if(n&&S(n,e))return!0}return!1}function p(e){delete F[e]}function f(e){var t=F[e];return t&&c(t,e)?void(z=t):!1}function h(e){z=null,b.traverseAncestors(e,f);var t=z;return z=null,t}function d(e,t,n,r,o){var i=w.mountComponent(e,t,r,D);e._isTopLevel=!0,H._mountImageIntoNode(i,n,o)}function m(e,t,n,r){var o=R.ReactReconcileTransaction.getPooled();o.perform(d,null,e,t,n,o,r),R.ReactReconcileTransaction.release(o)}var g=e("./DOMProperty"),v=e("./ReactBrowserEventEmitter"),y=(e("./ReactCurrentOwner"),e("./ReactElement")),_=(e("./ReactElementValidator"),e("./ReactEmptyComponent")),b=e("./ReactInstanceHandles"),x=e("./ReactInstanceMap"),E=e("./ReactMarkupChecksum"),C=e("./ReactPerf"),w=e("./ReactReconciler"),T=e("./ReactUpdateQueue"),R=e("./ReactUpdates"),D=e("./emptyObject"),S=e("./containsNode"),M=e("./getReactRootElementInContainer"),I=e("./instantiateReactComponent"),P=e("./invariant"),O=e("./setInnerHTML"),A=e("./shouldUpdateReactComponent"),N=(e("./warning"),b.SEPARATOR),L=g.ID_ATTRIBUTE_NAME,F={},k=1,U=9,j={},B={},V=[],z=null,H={_instancesByReactRootID:j,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return H.scrollMonitor(n,function(){T.enqueueElementInternal(e,t),r&&T.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){P(t&&(t.nodeType===k||t.nodeType===U)),v.ensureScrollValueMonitoring();var n=H.registerContainer(t);return j[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=I(e,null),o=H._registerComponent(r,t);return R.batchedUpdates(m,r,o,t,n),r},render:function(e,t,n){P(y.isValidElement(e));var r=j[o(t)];if(r){var i=r._currentElement;if(A(i,e))return H._updateRootComponent(r,e,t,n).getPublicInstance();H.unmountComponentAtNode(t)}var a=M(t),s=a&&H.isRenderedByReact(a),l=s&&!r,u=H._renderNewRootComponent(e,t,l).getPublicInstance();return n&&n.call(u),u},constructAndRenderComponent:function(e,t,n){var r=y.createElement(e,t);return H.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return P(r),H.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=o(e);return t&&(t=b.getReactRootIDFromNodeID(t)),t||(t=b.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){P(e&&(e.nodeType===k||e.nodeType===U));var t=o(e),n=j[t];return n?(H.unmountComponentFromNode(n,e),delete j[t],delete B[t],!0):!1},unmountComponentFromNode:function(e,t){for(w.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=b.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=H.findReactContainerForID(e);return H.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=H.getID(e);return t?t.charAt(0)===N:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(H.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=V,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var i,a=n[r++];a;){var s=H.getID(a);s?t===s?i=a:b.isAncestorIDOf(s,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,P(!1)},_mountImageIntoNode:function(e,t,n){if(P(t&&(t.nodeType===k||t.nodeType===U)),n){var o=M(t);if(E.canReuseMarkup(e,o))return;var i=o.getAttribute(E.CHECKSUM_ATTR_NAME);o.removeAttribute(E.CHECKSUM_ATTR_NAME);var a=o.outerHTML;o.setAttribute(E.CHECKSUM_ATTR_NAME,i);var s=r(e,a);" (client) "+e.substring(s-20,s+20)+"\n (server) "+a.substring(s-20,s+20);P(t.nodeType!==U)}P(t.nodeType!==U),O(t,e)},getReactRootID:o,getID:i,setID:s,getNode:l,getNodeFromInstance:u,purgeID:p};C.measureMethods(H,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=H},{"./DOMProperty":82,"./ReactBrowserEventEmitter":103,"./ReactCurrentOwner":112,"./ReactElement":130,"./ReactElementValidator":131,"./ReactEmptyComponent":132,"./ReactInstanceHandles":139,"./ReactInstanceMap":140,"./ReactMarkupChecksum":142,"./ReactPerf":148,"./ReactReconciler":154,"./ReactUpdateQueue":159,"./ReactUpdates":160,"./containsNode":182,"./emptyObject":188,"./getReactRootElementInContainer":202,"./instantiateReactComponent":207,"./invariant":208,"./setInnerHTML":221,"./shouldUpdateReactComponent":224,"./warning":227}],144:[function(e,t,n){"use strict";function r(e,t,n){d.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:m.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){d.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){d.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){d.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){d.length&&(u.processChildrenUpdates(d,m),l())}function l(){d.length=0,m.length=0}var u=e("./ReactComponentEnvironment"),c=e("./ReactMultiChildUpdateTypes"),p=e("./ReactReconciler"),f=e("./ReactChildReconciler"),h=0,d=[],m=[],g={Mixin:{mountChildren:function(e,t,n){var r=f.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],l=this._rootNodeID+a,u=p.mountComponent(s,l,t,n);s._mountIndex=i,o.push(u),i++}return o},updateTextContent:function(e){h++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{h--,h||(t?l():s())}},updateChildren:function(e,t,n){h++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{h--,h||(r?l():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=f.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var l=r&&r[i],u=o[i];l===u?(this.moveChild(l,s,a),a=Math.max(l._mountIndex,a),l._mountIndex=s):(l&&(a=Math.max(l._mountIndex,a),this._unmountChildByName(l,i)),this._mountChildByNameAtIndex(u,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;f.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){i(this._rootNodeID,e._mountIndex)},setTextContent:function(e){a(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,a=p.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,a)},_unmountChildByName:function(e,t){this.removeChild(e),e._mountIndex=null}}};t.exports=g},{"./ReactChildReconciler":104,"./ReactComponentEnvironment":109,"./ReactMultiChildUpdateTypes":145,"./ReactReconciler":154}],145:[function(e,t,n){"use strict";var r=e("./keyMirror"),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=o},{"./keyMirror":213}],146:[function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=u(t)),n}function o(e){return l(c),new c(e.type,e.props)}function i(e){return new f(e)}function a(e){return e instanceof f}var s=e("./Object.assign"),l=e("./invariant"),u=null,c=null,p={},f=null,h={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){s(p,e)},injectAutoWrapper:function(e){u=e}},d={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:h};t.exports=d},{"./Object.assign":99,"./invariant":208}],147:[function(e,t,n){"use strict";var r=e("./invariant"),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){r(o.isValidOwner(n)),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(o.isValidOwner(n)),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};t.exports=o},{"./invariant":208}],148:[function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],149:[function(e,t,n){"use strict";var r={};t.exports=r},{}],150:[function(e,t,n){"use strict";var r=e("./keyMirror"),o=r({prop:null,context:null,childContext:null});t.exports=o},{"./keyMirror":213}],151:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i){if(o=o||x,null==n[r]){var a=_[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o){var i=t[n],a=m(i);if(a!==e){var s=_[o],l=g(i);return new Error("Invalid "+s+" `"+n+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return r(t)}function i(){return r(b.thatReturns(null))}function a(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=_[o],s=m(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<i.length;l++){var u=e(i,l,r,o);if(u instanceof Error)return u}return null}return r(t)}function s(){function e(e,t,n,r){if(!v.isValidElement(e[t])){var o=_[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return r(e)}function l(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=_[o],a=e.name||x;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}return null}return r(t)}function u(e){function t(t,n,r,o){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return null;var s=_[o],l=JSON.stringify(e);return new Error("Invalid "+s+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return r(t)}function c(e){function t(t,n,r,o){var i=t[n],a=m(i);if("object"!==a){var s=_[o];return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var l in i)if(i.hasOwnProperty(l)){var u=e(i,l,r,o);if(u instanceof Error)return u}return null}return r(t)}function p(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,r,o))return null}var s=_[o];return new Error("Invalid "+s+" `"+n+"` supplied to "+("`"+r+"`."))}return r(t)}function f(){function e(e,t,n,r){if(!d(e[t])){var o=_[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function h(e){function t(t,n,r,o){var i=t[n],a=m(i);if("object"!==a){var s=_[o];return new Error("Invalid "+s+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var u=e[l];if(u){var c=u(i,l,r,o);if(c)return c}}return null}return r(t)}function d(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(d);if(null===e||v.isValidElement(e))return!0;e=y.extractIfFragment(e);for(var t in e)if(!d(e[t]))return!1;return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function g(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var v=e("./ReactElement"),y=e("./ReactFragment"),_=e("./ReactPropTypeLocationNames"),b=e("./emptyFunction"),x="<<anonymous>>",E=s(),C=f(),w={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:E,instanceOf:l,node:C,objectOf:c,oneOf:u,oneOfType:p,shape:h};t.exports=w},{"./ReactElement":130,"./ReactFragment":136,"./ReactPropTypeLocationNames":149,"./emptyFunction":187}],152:[function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=e("./PooledClass"),i=e("./ReactBrowserEventEmitter"),a=e("./Object.assign");a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];i.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{"./Object.assign":99,"./PooledClass":100,"./ReactBrowserEventEmitter":103}],153:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.putListenerQueue=l.getPooled()}var o=e("./CallbackQueue"),i=e("./PooledClass"),a=e("./ReactBrowserEventEmitter"),s=e("./ReactInputSelection"),l=e("./ReactPutListenerQueue"),u=e("./Transaction"),c=e("./Object.assign"),p={initialize:s.getSelectionInformation,close:s.restoreSelection},f={initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},h={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},m=[d,p,f,h],g={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,l.release(this.putListenerQueue),this.putListenerQueue=null}};c(r.prototype,u.Mixin,g),i.addPoolingTo(r),t.exports=r},{"./CallbackQueue":78,"./Object.assign":99,"./PooledClass":100,"./ReactBrowserEventEmitter":103,"./ReactInputSelection":138,"./ReactPutListenerQueue":152,"./Transaction":176}],154:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e("./ReactRef"),i=(e("./ReactElementValidator"),{mountComponent:function(e,t,n,o){var i=e.mountComponent(t,n,o);return n.getReactMountReady().enqueue(r,e),i},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||null==t._owner){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});t.exports=i},{"./ReactElementValidator":131,"./ReactRef":155}],155:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e("./ReactOwner"),a={};a.attachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},a.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){var n=t.ref;null!=n&&o(n,e,t._owner)},t.exports=a},{"./ReactOwner":147}],156:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],157:[function(e,t,n){"use strict";function r(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=l.getPooled(!1),t.perform(function(){var r=c(e,null),o=r.mountComponent(n,t,u);return s.addChecksumToMarkup(o)},null)}finally{l.release(t)}}function o(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=l.getPooled(!0),t.perform(function(){var r=c(e,null);return r.mountComponent(n,t,u)},null)}finally{l.release(t)}}var i=e("./ReactElement"),a=e("./ReactInstanceHandles"),s=e("./ReactMarkupChecksum"),l=e("./ReactServerRenderingTransaction"),u=e("./emptyObject"),c=e("./instantiateReactComponent"),p=e("./invariant");t.exports={renderToString:r,renderToStaticMarkup:o}},{"./ReactElement":130,"./ReactInstanceHandles":139,"./ReactMarkupChecksum":142,"./ReactServerRenderingTransaction":158,"./emptyObject":188,"./instantiateReactComponent":207,"./invariant":208}],158:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=e("./PooledClass"),i=e("./CallbackQueue"),a=e("./ReactPutListenerQueue"),s=e("./Transaction"),l=e("./Object.assign"),u=e("./emptyFunction"),c={initialize:function(){this.reactMountReady.reset()},close:u},p={initialize:function(){this.putListenerQueue.reset()},close:u},f=[p,c],h={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};l(r.prototype,s.Mixin,h),o.addPoolingTo(r),t.exports=r},{"./CallbackQueue":78,"./Object.assign":99,"./PooledClass":100,"./ReactPutListenerQueue":152,"./Transaction":176,"./emptyFunction":187}],159:[function(e,t,n){"use strict";function r(e){e!==i.currentlyMountingInstance&&u.enqueueUpdate(e)}function o(e,t){p(null==a.current);var n=l.get(e);return n?n===i.currentlyUnmountingInstance?null:n:null}var i=e("./ReactLifeCycle"),a=e("./ReactCurrentOwner"),s=e("./ReactElement"),l=e("./ReactInstanceMap"),u=e("./ReactUpdates"),c=e("./Object.assign"),p=e("./invariant"),f=(e("./warning"),{enqueueCallback:function(e,t){p("function"==typeof t);var n=o(e);return n&&n!==i.currentlyMountingInstance?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){p("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement,a=c({},i.props,t);n._pendingElement=s.cloneAndReplaceProps(i,a),r(n)}},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement;n._pendingElement=s.cloneAndReplaceProps(i,t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});t.exports=f},{"./Object.assign":99,"./ReactCurrentOwner":112,"./ReactElement":130,"./ReactInstanceMap":140,"./ReactLifeCycle":141,"./ReactUpdates":160,"./invariant":208,"./warning":227}],160:[function(e,t,n){"use strict";function r(){g(R.ReactReconcileTransaction&&b)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=R.ReactReconcileTransaction.getPooled()}function i(e,t,n,o,i){r(),b.batchedUpdates(e,t,n,o,i)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;g(t===v.length),v.sort(a);for(var n=0;t>n;n++){var r=v[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,h.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var i=0;i<o.length;i++)e.callbackQueue.enqueue(o[i],r.getPublicInstance())}}function l(e){return r(),b.isBatchingUpdates?void v.push(e):void b.batchedUpdates(l,e)}function u(e,t){g(b.isBatchingUpdates),y.enqueue(e,t),_=!0}var c=e("./CallbackQueue"),p=e("./PooledClass"),f=(e("./ReactCurrentOwner"),e("./ReactPerf")),h=e("./ReactReconciler"),d=e("./Transaction"),m=e("./Object.assign"),g=e("./invariant"),v=(e("./warning"),[]),y=c.getPooled(),_=!1,b=null,x={initialize:function(){this.dirtyComponentsLength=v.length},close:function(){this.dirtyComponentsLength!==v.length?(v.splice(0,this.dirtyComponentsLength),w()):v.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[x,E];m(o.prototype,d.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,R.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return d.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var w=function(){for(;v.length||_;){if(v.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(_){_=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}};w=f.measure("ReactUpdates","flushBatchedUpdates",w);var T={injectReconcileTransaction:function(e){g(e),R.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){g(e),g("function"==typeof e.batchedUpdates),g("boolean"==typeof e.isBatchingUpdates),b=e}},R={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:l,flushBatchedUpdates:w,injection:T,asap:u};t.exports=R},{"./CallbackQueue":78,"./Object.assign":99,"./PooledClass":100,"./ReactCurrentOwner":112,"./ReactPerf":148,"./ReactReconciler":154,"./Transaction":176,"./invariant":208,"./warning":227}],161:[function(e,t,n){"use strict";var r=e("./DOMProperty"),o=r.injection.MUST_USE_ATTRIBUTE,i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=i},{"./DOMProperty":82}],162:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e){if(y||null==m||m!==u())return null;var t=r(m);if(!v||!f(v,t)){v=t;var n=l.getPooled(d.select,g,e);return n.type="select",n.target=m,a.accumulateTwoPhaseDispatches(n),n}}var i=e("./EventConstants"),a=e("./EventPropagators"),s=e("./ReactInputSelection"),l=e("./SyntheticEvent"),u=e("./getActiveElement"),c=e("./isTextInputElement"),p=e("./keyOf"),f=e("./shallowEqual"),h=i.topLevelTypes,d={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},m=null,g=null,v=null,y=!1,_={eventTypes:d,extractEvents:function(e,t,n,r){switch(e){case h.topFocus:(c(t)||"true"===t.contentEditable)&&(m=t,g=n,v=null);break;case h.topBlur:m=null,g=null,v=null;break;case h.topMouseDown:y=!0;break;case h.topContextMenu:case h.topMouseUp:return y=!1,o(r);case h.topSelectionChange:case h.topKeyDown:case h.topKeyUp:return o(r)}}};t.exports=_},{"./EventConstants":87,"./EventPropagators":92,"./ReactInputSelection":138,"./SyntheticEvent":168,"./getActiveElement":194,"./isTextInputElement":211,"./keyOf":214,"./shallowEqual":223}],163:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],164:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./EventPluginUtils"),i=e("./EventPropagators"),a=e("./SyntheticClipboardEvent"),s=e("./SyntheticEvent"),l=e("./SyntheticFocusEvent"),u=e("./SyntheticKeyboardEvent"),c=e("./SyntheticMouseEvent"),p=e("./SyntheticDragEvent"),f=e("./SyntheticTouchEvent"),h=e("./SyntheticUIEvent"),d=e("./SyntheticWheelEvent"),m=e("./getEventCharCode"),g=e("./invariant"),v=e("./keyOf"),y=(e("./warning"),r.topLevelTypes),_={blur:{phasedRegistrationNames:{bubbled:v({onBlur:!0}),captured:v({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:v({onClick:!0}),captured:v({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:v({onContextMenu:!0}),captured:v({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:v({onCopy:!0}),captured:v({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:v({onCut:!0}),captured:v({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:v({onDoubleClick:!0}),captured:v({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:v({onDrag:!0}),captured:v({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:v({onDragEnd:!0}),captured:v({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:v({onDragEnter:!0}),captured:v({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:v({onDragExit:!0}),captured:v({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:v({onDragLeave:!0}),captured:v({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:v({onDragOver:!0}),captured:v({onDragOverCapture:!0
|
|
})}},dragStart:{phasedRegistrationNames:{bubbled:v({onDragStart:!0}),captured:v({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:v({onDrop:!0}),captured:v({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:v({onFocus:!0}),captured:v({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:v({onInput:!0}),captured:v({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:v({onKeyDown:!0}),captured:v({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:v({onKeyPress:!0}),captured:v({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:v({onKeyUp:!0}),captured:v({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:v({onLoad:!0}),captured:v({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:v({onError:!0}),captured:v({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:v({onMouseDown:!0}),captured:v({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:v({onMouseMove:!0}),captured:v({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:v({onMouseOut:!0}),captured:v({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:v({onMouseOver:!0}),captured:v({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:v({onMouseUp:!0}),captured:v({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:v({onPaste:!0}),captured:v({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:v({onReset:!0}),captured:v({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:v({onScroll:!0}),captured:v({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:v({onSubmit:!0}),captured:v({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:v({onTouchCancel:!0}),captured:v({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:v({onTouchEnd:!0}),captured:v({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:v({onTouchMove:!0}),captured:v({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:v({onTouchStart:!0}),captured:v({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:v({onWheel:!0}),captured:v({onWheelCapture:!0})}}},b={topBlur:_.blur,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topReset:_.reset,topScroll:_.scroll,topSubmit:_.submit,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topWheel:_.wheel};for(var x in b)b[x].dependencies=[x];var E={eventTypes:_,executeDispatch:function(e,t,n){var r=o.executeDispatch(e,t,n);r===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,r){var o=b[e];if(!o)return null;var v;switch(e){case y.topInput:case y.topLoad:case y.topError:case y.topReset:case y.topSubmit:v=s;break;case y.topKeyPress:if(0===m(r))return null;case y.topKeyDown:case y.topKeyUp:v=u;break;case y.topBlur:case y.topFocus:v=l;break;case y.topClick:if(2===r.button)return null;case y.topContextMenu:case y.topDoubleClick:case y.topMouseDown:case y.topMouseMove:case y.topMouseOut:case y.topMouseOver:case y.topMouseUp:v=c;break;case y.topDrag:case y.topDragEnd:case y.topDragEnter:case y.topDragExit:case y.topDragLeave:case y.topDragOver:case y.topDragStart:case y.topDrop:v=p;break;case y.topTouchCancel:case y.topTouchEnd:case y.topTouchMove:case y.topTouchStart:v=f;break;case y.topScroll:v=h;break;case y.topWheel:v=d;break;case y.topCopy:case y.topCut:case y.topPaste:v=a}g(v);var _=v.getPooled(o,n,r);return i.accumulateTwoPhaseDispatches(_),_}};t.exports=E},{"./EventConstants":87,"./EventPluginUtils":91,"./EventPropagators":92,"./SyntheticClipboardEvent":165,"./SyntheticDragEvent":167,"./SyntheticEvent":168,"./SyntheticFocusEvent":169,"./SyntheticKeyboardEvent":171,"./SyntheticMouseEvent":172,"./SyntheticTouchEvent":173,"./SyntheticUIEvent":174,"./SyntheticWheelEvent":175,"./getEventCharCode":195,"./invariant":208,"./keyOf":214,"./warning":227}],165:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":168}],166:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":168}],167:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticMouseEvent"),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticMouseEvent":172}],168:[function(e,t,n){"use strict";function r(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("./emptyFunction"),s=e("./getEventTarget"),l={type:null,target:s,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=l,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),t.exports=r},{"./Object.assign":99,"./PooledClass":100,"./emptyFunction":187,"./getEventTarget":198}],169:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticUIEvent":174}],170:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":168}],171:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),i=e("./getEventCharCode"),a=e("./getEventKey"),s=e("./getEventModifierState"),l={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,l),t.exports=r},{"./SyntheticUIEvent":174,"./getEventCharCode":195,"./getEventKey":196,"./getEventModifierState":197}],172:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),i=e("./ViewportMetrics"),a=e("./getEventModifierState"),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),t.exports=r},{"./SyntheticUIEvent":174,"./ViewportMetrics":177,"./getEventModifierState":197}],173:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),i=e("./getEventModifierState"),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},{"./SyntheticUIEvent":174,"./getEventModifierState":197}],174:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),i=e("./getEventTarget"),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),t.exports=r},{"./SyntheticEvent":168,"./getEventTarget":198}],175:[function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticMouseEvent"),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticMouseEvent":172}],176:[function(e,t,n){"use strict";var r=e("./invariant"),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,s,l){r(!this.isInTransaction());var u,c;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),c=e.call(t,n,o,i,a,s,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){r(this.isInTransaction());for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],s=this.wrapperInitData[n];try{o=!0,s!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,s),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(l){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};t.exports=i},{"./invariant":208}],177:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],178:[function(e,t,n){"use strict";function r(e,t){if(o(null!=t),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=e("./invariant");t.exports=r},{"./invariant":208}],179:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0;r<e.length;r++)t=(t+e.charCodeAt(r))%o,n=(n+t)%o;return t|n<<16}var o=65521;t.exports=r},{}],180:[function(e,t,n){function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],181:[function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=e("./camelize"),i=/^-ms-/;t.exports=r},{"./camelize":180}],182:[function(e,t,n){function r(e,t){return e&&t?e===t?!0:o(e)?!1:o(t)?r(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var o=e("./isTextNode");t.exports=r},{"./isTextNode":212}],183:[function(e,t,n){function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():i(e):[e]}var i=e("./toArray");t.exports=o},{"./toArray":225}],184:[function(e,t,n){"use strict";function r(e){var t=i.createFactory(e),n=o.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){a(!1)},render:function(){return t(this.props)}});return n}var o=e("./ReactClass"),i=e("./ReactElement"),a=e("./invariant");t.exports=r},{"./ReactClass":106,"./ReactElement":130,"./invariant":208}],185:[function(e,t,n){function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=u;l(!!u);var o=r(e),i=o&&s(o);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(l(t),a(p).forEach(t));for(var f=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=e("./ExecutionEnvironment"),a=e("./createArrayFromMixed"),s=e("./getMarkupWrap"),l=e("./invariant"),u=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{"./ExecutionEnvironment":93,"./createArrayFromMixed":183,"./getMarkupWrap":200,"./invariant":208}],186:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e("./CSSProperty"),i=o.isUnitlessNumber;t.exports=r},{"./CSSProperty":76}],187:[function(e,t,n){function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],188:[function(e,t,n){"use strict";var r={};t.exports=r},{}],189:[function(e,t,n){"use strict";function r(e){return i[e]}function o(e){return(""+e).replace(a,r)}var i={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;t.exports=o},{}],190:[function(e,t,n){"use strict";function r(e){return null==e?null:s(e)?e:o.has(e)?i.getNodeFromInstance(e):(a(null==e.render||"function"!=typeof e.render),void a(!1))}var o=(e("./ReactCurrentOwner"),e("./ReactInstanceMap")),i=e("./ReactMount"),a=e("./invariant"),s=e("./isNode");e("./warning");t.exports=r},{"./ReactCurrentOwner":112,"./ReactInstanceMap":140,"./ReactMount":143,"./invariant":208,"./isNode":210,"./warning":227}],191:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return i(e,r,t),t}var i=e("./traverseAllChildren");e("./warning");t.exports=o},{"./traverseAllChildren":226,"./warning":227}],192:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],193:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],194:[function(e,t,n){function r(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],195:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],196:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e("./getEventCharCode"),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{"./getEventCharCode":195}],197:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],198:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],199:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],200:[function(e,t,n){function r(e){return i(!!a),f.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var o=e("./ExecutionEnvironment"),i=e("./invariant"),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,"<svg>","</svg>"],f={"*":[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:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};t.exports=r},{"./ExecutionEnvironment":93,"./invariant":208}],201:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,t>=i&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],202:[function(e,t,n){"use strict";function r(e){return e?e.nodeType===o?e.documentElement:e.firstChild:null}var o=9;t.exports=r},{}],203:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e("./ExecutionEnvironment"),i=null;t.exports=r},{"./ExecutionEnvironment":93}],204:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],205:[function(e,t,n){function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],206:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e("./hyphenate"),i=/^ms-/;t.exports=r},{"./hyphenate":205}],207:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e,t){var n;if((null===e||e===!1)&&(e=a.emptyElement),"object"==typeof e){var o=e;n=t===o.type&&"string"==typeof o.type?s.createInternalComponent(o):r(o.type)?new o.type(o):new c}else"string"==typeof e||"number"==typeof e?n=s.createInstanceForText(e):u(!1);return n.construct(e),n._mountIndex=0,n._mountImage=null,n}var i=e("./ReactCompositeComponent"),a=e("./ReactEmptyComponent"),s=e("./ReactNativeComponent"),l=e("./Object.assign"),u=e("./invariant"),c=(e("./warning"),function(){});l(c.prototype,i.Mixin,{_instantiateReactComponent:o}),t.exports=o},{"./Object.assign":99,"./ReactCompositeComponent":110,"./ReactEmptyComponent":132,"./ReactNativeComponent":146,"./invariant":208,"./warning":227}],208:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,s],c=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[c++]}))}throw l.framesToPop=1,l}};t.exports=r},{}],209:[function(e,t,n){"use strict";function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e("./ExecutionEnvironment");i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{"./ExecutionEnvironment":93}],210:[function(e,t,n){function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],211:[function(e,t,n){"use strict";function r(e){return e&&("INPUT"===e.nodeName&&o[e.type]||"TEXTAREA"===e.nodeName)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],212:[function(e,t,n){function r(e){return o(e)&&3==e.nodeType}var o=e("./isNode");t.exports=r},{"./isNode":210}],213:[function(e,t,n){"use strict";var r=e("./invariant"),o=function(e){var t,n={};r(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{"./invariant":208}],214:[function(e,t,n){var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],215:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],216:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],217:[function(e,t,n){"use strict";function r(e){return i(o.isValidElement(e)),e}var o=e("./ReactElement"),i=e("./invariant");t.exports=r},{"./ReactElement":130,"./invariant":208}],218:[function(e,t,n){"use strict";var r,o=e("./ExecutionEnvironment");o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),t.exports=r||{}},{"./ExecutionEnvironment":93}],219:[function(e,t,n){var r=e("./performance");r&&r.now||(r=Date);var o=r.now.bind(r);t.exports=o},{"./performance":218}],220:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e("./escapeTextContentForBrowser");t.exports=r},{"./escapeTextContentForBrowser":189}],221:[function(e,t,n){"use strict";var r=e("./ExecutionEnvironment"),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=a},{"./ExecutionEnvironment":93}],222:[function(e,t,n){"use strict";var r=e("./ExecutionEnvironment"),o=e("./escapeTextContentForBrowser"),i=e("./setInnerHTML"),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),t.exports=a},{"./ExecutionEnvironment":93,"./escapeTextContentForBrowser":189,"./setInnerHTML":221}],223:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=r},{}],224:[function(e,t,n){"use strict";function r(e,t){if(null!=e&&null!=t){var n=typeof e,r=typeof t;if("string"===n||"number"===n)return"string"===r||"number"===r;if("object"===r&&e.type===t.type&&e.key===t.key){var o=e._owner===t._owner;return o}}return!1}e("./warning");t.exports=r},{"./warning":227}],225:[function(e,t,n){function r(e){var t=e.length;if(o(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),o("number"==typeof t),o(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),i=0;t>i;i++)r[i]=e[i];return r}var o=e("./invariant");t.exports=r},{"./invariant":208}],226:[function(e,t,n){"use strict";function r(e){return g[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(v,r)}function a(e){return"$"+i(e)}function s(e,t,n,r,i){var l=typeof e;if(("undefined"===l||"boolean"===l)&&(e=null),null===e||"string"===l||"number"===l||u.isValidElement(e))return r(i,e,""===t?d+o(e,0):t,n),1;var p,g,v,y=0;if(Array.isArray(e))for(var _=0;_<e.length;_++)p=e[_],g=(""!==t?t+m:d)+o(p,_),v=n+y,y+=s(p,g,v,r,i);else{var b=f(e);if(b){var x,E=b.call(e);if(b!==e.entries)for(var C=0;!(x=E.next()).done;)p=x.value,g=(""!==t?t+m:d)+o(p,C++),v=n+y,y+=s(p,g,v,r,i);else for(;!(x=E.next()).done;){var w=x.value;w&&(p=w[1],g=(""!==t?t+m:d)+a(w[0])+m+o(p,0),v=n+y,y+=s(p,g,v,r,i))}}else if("object"===l){h(1!==e.nodeType);var T=c.extract(e);for(var R in T)T.hasOwnProperty(R)&&(p=T[R],g=(""!==t?t+m:d)+a(R)+m+o(p,0),v=n+y,y+=s(p,g,v,r,i))}}return y}function l(e,t,n){return null==e?0:s(e,"",0,t,n)}var u=e("./ReactElement"),c=e("./ReactFragment"),p=e("./ReactInstanceHandles"),f=e("./getIteratorFn"),h=e("./invariant"),d=(e("./warning"),p.SEPARATOR),m=":",g={"=":"=0",".":"=1",":":"=2"},v=/[=.:]/g;t.exports=l},{"./ReactElement":130,"./ReactFragment":136,"./ReactInstanceHandles":139,"./getIteratorFn":199,"./invariant":208,"./warning":227}],227:[function(e,t,n){"use strict";var r=e("./emptyFunction"),o=r;t.exports=o},{"./emptyFunction":187}],228:[function(e,t,n){t.exports=e("./lib/React")},{"./lib/React":101}],229:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},s=e("react"),l=e("gl-react"),u=l.Shaders.create({banner:{frag:"\nprecision highp float;\nvarying vec2 uv;\nuniform float time;\nvoid main( void ) {\n float color = 0.0;\n color += sin( uv.x * cos( time / 15.0 ) * 80.0 ) + cos( uv.y * cos( time / 15.0 ) * 10.0 );\n color += sin( uv.y * sin( time / 10.0 ) * 40.0 ) + cos( uv.x * sin( time / 25.0 ) * 40.0 );\n color += sin( uv.x * sin( time / 5.0 ) * 10.0 ) + sin( uv.y * sin( time / 35.0 ) * 80.0 );\n color *= sin( time / 10.0 );\n gl_FragColor = vec4(\n smoothstep(0.8, 1.6, color),\n smoothstep(0.1, 0.3, color),\n smoothstep(1.0, 0.2, color) - smoothstep(0.1, 0.0, color),\n color\n ) * (pow(uv.y, 0.8));\n}\n"}}),c=function(e){function t(){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.time;return s.createElement(l.View,{shader:u.banner,width:t,height:n,uniforms:{time:r},opaque:!1})}}]),t}(s.Component);t.exports=c},{"gl-react":42,react:228}],230:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},s=e("react"),l=e("gl-react"),u=e("react-canvas"),c=u.Surface,p=u.Layer,f=u.Text,h=u.Group,d=l.Shaders.create({drunkEffect:{frag:"\nprecision highp float;\nvarying vec2 uv;\n\nuniform float time;\nuniform float amp;\nuniform float freq;\nuniform float colorSeparation;\nuniform sampler2D texture;\nuniform float moving;\n\nvec2 lookup (vec2 offset) {\n return mod(\n uv + amp * vec2(cos(freq*(uv.x+offset.x)+time),sin(freq*(uv.y+offset.x)+time)) + vec2(moving * time/10.0, 0.0),\n vec2(1.0));\n}\n\nvoid main() {\n vec3 col = vec3(\n texture2D(texture, lookup(vec2(colorSeparation))).r,\n texture2D(texture, lookup(vec2(-colorSeparation))).g,\n texture2D(texture, lookup(vec2(0.0))).b);\n gl_FragColor = vec4(\n col,\n pow((col.x + col.y + col.z) / 3.0, 0.05));\n}\n"}}),m=function(e){function t(){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.time,n=e.fps,r=e.width,o=e.height,i=(r-20)/3;return s.createElement(l.View,{shader:d.drunkEffect,width:r,height:o,opaque:!1,uniforms:{time:t,freq:20-14*Math.sin(t/7),amp:.05-.03*Math.cos(t/4),colorSeparation:.02,moving:1}},s.createElement(l.Target,{uniform:"texture"},s.createElement(c,{width:r,height:o,left:0,top:0,enableCSSLayout:!0},s.createElement(h,{style:{width:r,height:o,flexDirection:"column",alignItems:"center",justifyContent:"center"}},s.createElement(f,{style:{width:r,height:o/2,color:"#00BDF3",fontSize:32,letterSpacing:-1}},"GL REACT"),s.createElement(h,{style:{width:r,height:o/2,flexDirection:"row",alignItems:"center",justifyContent:"center"}},s.createElement(p,{style:{backgroundColor:"#00FF66",marginRight:8,width:14,height:14,borderRadius:7,opacity:.6>t%1?1:0}}),s.createElement(f,{style:{width:i,height:20,color:"#00FF66",fontSize:14}},t.toFixed(2),"s"),s.createElement(f,{style:{width:i,height:20,color:"#fff",fontSize:14}},n.toFixed(0)," fps"),s.createElement(f,{style:{width:i,height:20,color:"#999",fontSize:14}},"<Text />"))))))}}]),t}(s.Component);t.exports=m},{"gl-react":42,react:228,"react-canvas":62}],231:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,
|
|
r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},s=e("react"),l=e("gl-react"),u=e("./TransitionGenerator"),c=e("./Transition"),p=l.Shaders.create(u.shaders),f=function(e){function t(e){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._currentTransition=-1}return o(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.transitionDuration,n=e.pauseDuration,r=e.width,o=e.height,i=e.time,a=e.images,l=t+n,f=i/l,d=Math.min(1,l/t*(f%1)),m=a[Math.floor(f)%a.length],g=a[Math.floor(f+1)%a.length],v=Math.floor(f);if(v!==this._currentTransition){this._currentTransition=v;var y=u.random(),_=y.name,b=y.uniforms;this._name=_,this._shader=p[_],this._uniforms=b}var x=this._name,E=this._shader,C=this._uniforms;return s.createElement("div",{style:h.root},s.createElement(c,{width:r,height:o,progress:d,from:m,to:g,shader:E,uniforms:C}),s.createElement("div",{style:h.legend},s.createElement("span",{style:h.textName},x),s.createElement("span",{style:h.textInfo},"(GLSL.io)")))}}]),t}(s.Component),h={root:{position:"relative"},legend:{position:"absolute",bottom:5,right:4,backgroundColor:"transparent",flexDirection:"row"},textName:{color:"#fff",fontWeight:"bold"},textInfo:{color:"#fff",marginLeft:8,opacity:.5}};t.exports=f},{"./Transition":232,"./TransitionGenerator":233,"gl-react":42,react:228}],232:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},l=e("react"),u=e("gl-react"),c=function(e){function t(){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.shader,o=e.progress,a=e.from,s=e.to,c=e.uniforms,p=window.devicePixelRatio;return l.createElement(u.View,{shader:r,width:t,height:n,opaque:!1,uniforms:i({progress:o,from:a,to:s},c,{resolution:[t*p,n*p]})})}}]),t}(l.Component);t.exports=c},{"gl-react":42,react:228}],233:[function(e,t,n){"use strict";function r(){var e=Math.floor(Math.random()*s.length),t=s[e],n=t.genUniforms&&t.genUniforms()||{};return{name:t.name,uniforms:n}}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=e("glsl-transitions"),a={};i.forEach(function(e){a[e.name]=e});var s=[["cube",function(){return{persp:.9-Math.random()*Math.random(),unzoom:Math.random()*Math.random()}}],"undulating burn out",["CrossZoom",function(){return{strength:.5*Math.random()}}],"glitch displace",["Mosaic",function(){var e=Math.round(6*Math.random()-3),t=Math.round(6*Math.random()-3);return 0===e&&0===t&&(t=-1),{endx:e,endy:t}}],["DoomScreenTransition",function(){return{barWidth:Math.round(6+20*Math.random()),amplitude:2*Math.random(),noise:.5*Math.random(),frequency:Math.random()}}],["colourDistance",function(){return{interpolationPower:6*Math.random()}}],"swap",["doorway",function(){return{perspective:Math.random()*Math.random(),depth:1+10*Math.random()*Math.random()}}],"Star Wipe","pinwheel","SimpleFlip","TilesScanline","Dreamy","Swirl","burn","Radial",["ripple",function(){return{amplitude:200*Math.random(),speed:200*Math.random()}}],"morph",["ButterflyWaveScrawler",function(){return{amplitude:Math.random(),waves:50*Math.random()*Math.random(),colorSeparation:.8*Math.random()*Math.random()}}],["flash",function(){return{flashIntensity:4*Math.random()}}],["randomsquares",function(){var e=Math.round(4+20*Math.random());return{size:[e,e],smoothness:Math.random()}}],["flyeye",function(){return{size:Math.random()*Math.random(),zoom:200*Math.random()*Math.random(),colorSeparation:.8*Math.random()*Math.random()}}],"squeeze",["directionalwipe",function(){var e=2*Math.random()*Math.PI;return{direction:[Math.cos(e),Math.sin(e)]}}],"circleopen",["wind",function(){return{size:.1+.2*Math.random()}}]].map(function(e){var t=void 0,n=void 0;if("string"==typeof e?t=e:(t=e[0],n=e[1]),!(t in a))throw new Error("no transition called "+t);var r=a[t];return{transition:r,name:t,genUniforms:function(){return n?o({},r.uniforms,n()):r.uniforms}}}),l={};s.forEach(function(e){l[e.name]={frag:e.transition.glsl}}),t.exports={shaders:l,random:r}},{"glsl-transitions":44}],234:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},s=e("react"),l=e("gl-react"),u=l.Shaders.create({imageVignette:{frag:"\nprecision highp float;\nvarying vec2 uv;\n\nuniform float time;\nuniform float amp;\nuniform float freq;\nuniform sampler2D texture;\nuniform float moving;\n\nuniform vec2 finger;\n\nvec2 lookup (vec2 offset, float amp2) {\n return mod(\n uv + amp2 * amp * vec2(cos(freq*(uv.x+offset.x)+time),sin(freq*(uv.y+offset.x)+time)) + vec2(moving * time/10.0, 0.0),\n vec2(1.0));\n}\n\nvoid main() {\n float dist = distance(uv, finger);\n float amp2 = pow(1.0 - dist, 2.0);\n float colorSeparation = 0.02 * mix(amp2, 1.0, 0.5);\n vec2 orientation = vec2(1.0, 0.0);\n gl_FragColor = vec4(\n vec3(\n texture2D(texture, lookup(colorSeparation * orientation, amp2)).r,\n texture2D(texture, lookup(-colorSeparation * orientation, amp2)).g,\n texture2D(texture, lookup(vec2(0.0), amp2)).b),\n 1.0-min(0.95, pow(1.8 * distance(uv, finger), 4.0) + 0.5 * pow(distance(fract(50.0 * uv.y), 0.5), 2.0)));\n}\n"}}),c=function(e){function t(e){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.onMouseMove=this.onMouseMove.bind(this),this.state={finger:[.5,.5]}}return o(t,e),i(t,[{key:"onMouseMove",value:function(e){var t=this.props,n=t.width,r=t.height,o=e.clientX,i=e.clientY,a=s.findDOMNode(this.refs.view).getBoundingClientRect(),l=a.left,u=a.top,c=o-l,p=i-u;this.setState({finger:[c/n,1-p/r]})}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.time,o=e.source,i=this.state.finger;return s.createElement(l.View,{ref:"view",onMouseMove:this.onMouseMove,shader:u.imageVignette,width:t,height:n,opaque:!1,uniforms:{time:r,freq:10+2*Math.sin(.7*r),texture:o,amp:.05+Math.max(0,.03*Math.cos(r)),moving:0,finger:i}})}}]),t}(s.Component);t.exports=c},{"gl-react":42,react:228}],235:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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)}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;s=u=l=void 0,r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return void 0;e=u,t=i,n=a,r=!0}},l=e("react"),u=e("./Banner"),c=e("./Intro"),p=e("./Vignette"),f=e("./Slideshow"),h={root:{position:"relative",display:"block",margin:"0px auto",backgroundColor:"#111"}},d=function(e){function t(e){r(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={time:.02,frames:1,embeddedImage:"http://i.imgur.com/MQtLWbD.jpg",images:"wxqlQkh,G2Whuq3,0bUSEBX,giP58XN,iKdXwVm,IvpoR40,zJIxPEo,CKlmtPs,fnMylHI,vGXYiYy,MnOB9Le,YqsZKgc,0BJobQo,Otbz312".split(",").map(function(e){return"http://i.imgur.com/"+e+".jpg"})}}return o(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this,t=void 0,n=function r(n){requestAnimationFrame(r),t||(t=n);var o=(n-t)/1e3;e.setState({time:o,frames:e.state.frames+1})};requestAnimationFrame(n)}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=this.state,o=r.time,a=r.frames,s=r.images,d=r.embeddedImage,m=1,g=Math.floor(t/m),v=Math.floor(2/3*t/m),y=100,_=Math.floor(2/3*t);return l.createElement("div",{style:i({},h.root,{width:t+"px",height:n+"px"})},l.createElement(u,{time:o,width:t,height:n-y-v-_}),l.createElement(c,{time:o,fps:a/o,width:t,height:y}),l.createElement(p,{time:o,width:g,height:v,source:d}),l.createElement(f,{time:o,width:t,height:_,images:s.slice(2),pauseDuration:.5,transitionDuration:1.5}))}}]),t}(l.Component);t.exports=d},{"./Banner":229,"./Intro":230,"./Slideshow":231,"./Vignette":234,react:228}]},{},[1]);
|