From 73e5d14569ecb661ca5492b3c2bde2aa513dfca0 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Mon, 23 Oct 2017 23:16:22 -0400 Subject: [PATCH] various tweaks and adjustments to demo; bugfix for select/input changes (#149) --- dist/image-sequencer.js | 2 + dist/image-sequencer.min.js | 2 +- examples/demo.css | 22 +++++------ examples/demo.js | 50 +++++++++++++++---------- src/modules/Dynamic/info.json | 1 + src/modules/SegmentedColormap/info.json | 1 + 6 files changed, 44 insertions(+), 34 deletions(-) diff --git a/dist/image-sequencer.js b/dist/image-sequencer.js index 4e115316..05d7ea7d 100755 --- a/dist/image-sequencer.js +++ b/dist/image-sequencer.js @@ -38428,6 +38428,7 @@ module.exports = function Dynamic(options,UI) { },{"../_nomodule/PixelManipulation.js":148}],136:[function(require,module,exports){ module.exports={ "name": "Dynamic", + "description": "A module which accepts JavaScript math expressions to produce each color channel based on the original image's color. See Infragrammar.", "inputs": { "red": { "type": "input", @@ -38936,6 +38937,7 @@ var colormaps = { },{}],147:[function(require,module,exports){ module.exports={ "name": "Segmented Colormap", + "description": "Maps brightness values (average of red, green & blue) to a given color lookup table, made up of a set of one more color gradients.", "inputs": { "colormap": { "type": "select", diff --git a/dist/image-sequencer.min.js b/dist/image-sequencer.min.js index 8590f546..2b05dde5 100644 --- a/dist/image-sequencer.min.js +++ b/dist/image-sequencer.min.js @@ -1 +1 @@ -!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o=0;a--)if(o[a]!=s[a])return!1;for(a=o.length-1;a>=0;a--)if(i=o[a],!l(e[i],t[i]))return!1;return!0}function f(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;h.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&o(i,n,"Missing expected exception"+r),!e&&f(i,n)&&o(i,n,"Got unwanted exception"+r),e&&i&&n&&!f(i,n)||!e&&i)throw i}var h=e("util/"),d=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=t.exports=s;m.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=a(this),this.generatedMessage=!0);var t=e.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},h.inherits(m.AssertionError,Error),m.fail=o,m.ok=s,m.equal=function(e,t,n){e!=t&&o(e,t,n,"==",m.equal)},m.notEqual=function(e,t,n){e==t&&o(e,t,n,"!=",m.notEqual)},m.deepEqual=function(e,t,n){l(e,t)||o(e,t,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(e,t,n){l(e,t)&&o(e,t,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(e,t,n){e!==t&&o(e,t,n,"===",m.strictEqual)},m.notStrictEqual=function(e,t,n){e===t&&o(e,t,n,"!==",m.notStrictEqual)},m.throws=function(e,t,n){p.apply(this,[!0].concat(d.call(arguments)))},m.doesNotThrow=function(e,t){p.apply(this,[!1].concat(d.call(arguments)))},m.ifError=function(e){if(e)throw e};var v=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":119}],2:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function a(e,t,n){for(var r,a=[],o=t;o0?c-4:c;var f=0;for(t=0,n=0;t>16&255,u[f++]=a>>8&255,u[f++]=255&a;return 2===o?(a=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,u[f++]=255&a):1===o&&(a=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,u[f++]=a>>8&255,u[f++]=255&a),u},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",s=[],l=0,u=n-r;lu?u:l+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),s.push(i),s.join("")};for(var o=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;cn.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var n=0;nn.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsn.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.leveln.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLeveln.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=n.Z_FILTERED&&e.strategy!=n.Z_HUFFMAN_ONLY&&e.strategy!=n.Z_RLE&&e.strategy!=n.Z_FIXED&&e.strategy!=n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new g.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var r=new Error(e);r.errno=t,r.code=n.codes[t],i.emit("error",r)};var a=n.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=n.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||n.Z_DEFAULT_WINDOWBITS,a,e.memLevel||n.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new r(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),g=e("./binding"),m=e("util"),v=e("assert").ok;g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION,Object.keys(g).forEach(function(e){e.match(/^Z/)&&(n[e]=g[e])}),n.codes={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ERROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},Object.keys(n.codes).forEach(function(e){n.codes[n.codes[e]]=e}),n.Deflate=o,n.Inflate=s,n.Gzip=l,n.Gunzip=u,n.DeflateRaw=c,n.InflateRaw=f,n.Unzip=p,n.createDeflate=function(e){return new o(e)},n.createInflate=function(e){return new s(e)},n.createDeflateRaw=function(e){return new c(e)},n.createInflateRaw=function(e){return new f(e)},n.createGzip=function(e){return new l(e)},n.createGunzip=function(e){return new u(e)},n.createUnzip=function(e){return new p(e)},n.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new o(t),e,n)},n.deflateSync=function(e,t){return a(new o(t),e)},n.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new l(t),e,n)},n.gzipSync=function(e,t){return a(new l(t),e)},n.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new c(t),e,n)},n.deflateRawSync=function(e,t){return a(new c(t),e)},n.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new p(t),e,n)},n.unzipSync=function(e,t){return a(new p(t),e)},n.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new s(t),e,n)},n.inflateSync=function(e,t){return a(new s(t),e)},n.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new u(t),e,n)},n.gunzipSync=function(e,t){return a(new u(t),e)},n.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new f(t),e,n)},n.inflateRawSync=function(e,t){return a(new f(t),e)},m.inherits(h,d),h.prototype.params=function(e,r,i){if(en.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=n.Z_FILTERED&&r!=n.Z_HUFFMAN_ONLY&&r!=n.Z_RLE&&r!=n.Z_FIXED&&r!=n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var a=this;this.flush(g.Z_SYNC_FLUSH,function(){a._binding.params(e,r),a._hadError||(a._level=e,a._strategy=r,i&&i())})}else t.nextTick(i)},h.prototype.reset=function(){return this._binding.reset()},h.prototype._flush=function(e){this._transform(new r(0),"",e)},h.prototype.flush=function(e,n){var i=this._writableState;if(("function"==typeof e||void 0===e&&!n)&&(n=e,e=g.Z_FULL_FLUSH),i.ended)n&&t.nextTick(n);else if(i.ending)n&&this.once("end",n);else if(i.needDrain){var a=this;this.once("drain",function(){a.flush(n)})}else this._flushFlag=e,this.write(new r(0),"",n)},h.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var n=this;t.nextTick(function(){n.emit("close")})}},h.prototype._transform=function(e,t,n){var i,a=this._writableState,o=(a.ending||a.ended)&&(!e||a.length===e.length);if(null===!e&&!r.isBuffer(e))return n(new Error("invalid input"));o?i=g.Z_FINISH:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH));this._processChunk(e,i,n)},h.prototype._processChunk=function(e,t,n){function i(c,h){if(!l._hadError){var d=o-h;if(v(d>=0,"have should not go down"),d>0){var g=l._buffer.slice(l._offset,l._offset+d);l._offset+=d,u?l.push(g):(f.push(g),p+=g.length)}if((0===h||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=new r(l._chunkSize)),0===h){if(s+=a-c,a=c,!u)return!0;var m=l._binding.write(t,e,s,a,l._buffer,l._offset,l._chunkSize);return m.callback=i,void(m.buffer=e)}if(!u)return!1;n()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,l=this,u="function"==typeof n;if(!u){var c,f=[],p=0;this.on("error",function(e){c=e});do{var h=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o)}while(!this._hadError&&i(h[0],h[1]));if(this._hadError)throw c;var d=r.concat(f,p);return this.close(),d}var g=this._binding.write(t,e,s,a,this._buffer,this._offset,o);g.buffer=e,g.callback=i},m.inherits(o,h),m.inherits(s,h),m.inherits(l,h),m.inherits(u,h),m.inherits(c,h),m.inherits(f,h),m.inherits(p,h)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":4,_process:94,_stream_transform:105,assert:1,buffer:7,util:119}],6:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],7:[function(e,t,n){(function(t){"use strict";function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()=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(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(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 H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;us&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;pi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return C(r)}function C(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function P(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,i){return i||P(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return i||P(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function F(e){if((e=U(e).replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function V(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function G(e){return X.toByteArray(F(e))}function Z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var X=e("base64-js"),$=e("ieee754"),Q=e("isarray");n.Buffer=a,n.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),$.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),$.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),$.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),$.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},a.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&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;oo)throw new RangeError("size is too large");var r=n,a=t;void 0===a&&(r=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var l=new i(a,r),u=l.length,c=-1;++co)throw new RangeError("size is too large");return new i(e)},n.from=function(e,n,r){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new i(e);void 0===a&&(a=0);var o=r;if(void 0===o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},n.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:7}],10:[function(e,t,n){(function(n){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);i.call(this,t),null!==e&&void 0!==e||(e=String(e)),this._obj=e}var i=e("readable-stream").Readable,a=e("util");t.exports=r,a.inherits(r,i),r.prototype._read=function(e){var t=this._obj;"string"==typeof t?this.push(new n(t)):n.isBuffer(t)?this.push(t):this.push(new n(JSON.stringify(t))),this.push(null)}}).call(this,e("buffer").Buffer)},{buffer:7,"readable-stream":17,util:119}],11:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],12:[function(e,t,n){(function(n){function r(e){if(!(this instanceof r))return new r(e);s.call(this,e),l.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}t.exports=r;var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},o=e("core-util-is");o.inherits=e("inherits");var s=e("./_stream_readable"),l=e("./_stream_writable");o.inherits(r,s),function(e,t){for(var n=0,r=e.length;n0)if(t.ended&&!i){s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&f(e),h(e,t);else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=R)e=R;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return E.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?f(e):y(e)}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?n.nextTick(function(){p(e)}):p(e))}function p(e){e.emit("readable")}function h(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){d(e,t)}))}function d(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length0)return;if(0===r.pipesCount)return r.flowing=!1,void(T.listenerCount(e,"data")>0&&w(e));r.ranOut=!0}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function w(e,t){if(e._readableState.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){i=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,i?n.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function b(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,o=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(o)n=r.shift();else if(!e||e>=i)n=a?r.join(""):E.concat(r,i),r.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;n0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f(this),null;if(0===(e=l(e,t))&&t.ended)return n=null,t.length>0&&t.decoder&&(n=b(e,t),t.length-=n.length),0===t.length&&y(this),n;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=l(r,t)),null===(n=e>0?b(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&y(this),n},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){e===c&&a()}function i(){e.end()}function a(){e.removeListener("close",s),e.removeListener("finish",l),e.removeListener("drain",h),e.removeListener("error",o),e.removeListener("unpipe",r),c.removeListener("end",i),c.removeListener("end",a),e._writableState&&!e._writableState.needDrain||h()}function o(t){u(),e.removeListener("error",o),0===T.listenerCount(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",l),u()}function l(){e.removeListener("close",s),u()}function u(){c.unpipe(e)}var c=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1;var p=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?i:a;f.endEmitted?n.nextTick(p):c.once("end",p),e.on("unpipe",r);var h=g(c);return e.on("drain",h),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(o):e._events.error=[o,e._events.error]:e.on("error",o),e.once("close",s),e.once("finish",l),e.emit("pipe",c),f.flowing||(this.on("readable",v),f.flowing=!0,n.nextTick(function(){m(c)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;i=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var r=(t+=e.toString(this.encoding,0,r)).length-1,i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,r)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:7}],19:[function(e,t,n){(function(e){function t(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===t(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===t(e)},n.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":49}],20:[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}var i=e("./lib/thunk.js");t.exports=function(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 a=0;a0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(a),t.shimArgs.push("scalar"+a);else if("index"===o){if(t.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(a),an.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)}},{"./lib/thunk.js":22}],21:[function(e,t,n){"use strict";function r(e,t,n){var r,i,a=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,f=0;for(r=0;r=0;--r)c=e[r],l.push(["for(i",r,"=0;i",r,"0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(e,t,n,i){for(var a=t.length,o=n.arrayArgs.length,s=n.blockSize,l=n.indexArgs.length>0,u=[],c=0;c0;){"].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(c=0;c0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}var l=e("uniq");t.exports=function(e,t){for(var n=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,u=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),f=0;f0&&_.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var x=new Array(n),f=0;f3&&y.push(o(e.pre,e,c));var S=o(e.body,e,c),A=a(m);A3&&y.push(o(e.post,e,c)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+y.join("\n")+"\n----------");var C=[e.funcName||"unnamed","_cwise_loop_",u[0].join("s"),"m",A,s(c)].join("");return new Function(["function ",C,"(",b.join(","),"){",y.join("\n"),"} return ",C].join(""))()}},{uniq:114}],22:[function(e,t,n){"use strict";var r=e("./compile.js");t.exports=function(e){var t=["'use strict'","var CACHED={}"],n=[],i=e.funcName+"_cwise_thunk";t.push(["return function ",i,"(",e.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],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;c0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+f+".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"+f+".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--\x3e0;) {"),t.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}"));for(c=0;c0&&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()),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(!i(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,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)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],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],25:[function(e,t,n){var r=function(t){function n(e,t){if(h.hasOwnProperty(e))return h[e];var n=new XMLHttpRequest;if(t)n.addEventListener("readystatechange",function(){4===n.readyState&&(200===n.status?t(null,n.responseText):t(new Error("fail to load!")))}),n.open("GET",e,!0),n.send(null);else if(n.open("GET",e,!1),n.send(null),200==n.status)return n.responseText}function r(e,t,n,r){return r=r||e.createTexture(),e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),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),e.bindTexture(e.TEXTURE_2D,null),n&&n(null,r),r}function i(e,n,i){var a=e.createTexture(),s=new Image;return s.addEventListener("load",function(){r(e,s,i,a),t.width=s.width,t.height=s.height,o(t.width,t.height)}),s.src=n,a}function a(e,n){function r(o){a||(a=o);var s=o-a;a=o,t.runner(s),n&&n(),!0===e&&i(r)}var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;if(!0===e){if(!i)throw new Error("do not support 'requestAnimationFram'");i(r)}else i(r);var a=null}function o(e,t){p.viewport(0,0,e,t),p.canvas.width=e,p.canvas.height=t}function s(e,n){S=i(p,e,function(){a(t.animate,n)})}(t=t||{}).width=t.width||800,t.height=t.height||600;var l=t.model||{vertex:[-1,-1,0,1,-1,0,1,1,0,-1,1,0],indices:[0,1,2,0,2,3,2,1,0,3,2,0],textureCoords:[0,0,1,0,1,1,0,1]},u=t.lens||{a:1,b:1,Fx:0,Fy:0,scale:1.5},c=t.fov||{x:1,y:1},f=t.image||"images/barrel-distortion.png",p=function(e){var t=document.querySelector(e);if(null==t)throw new Error("there is no canvas on this page");for(var n=["webgl","experimental-webgl","webkit-3d","moz-webgl"],r=0;r 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],28:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat correctionRadius = 0.5;\n\tfloat distance = sqrt(vPosition.x * vPosition.x + vPosition.y * vPosition.y) / correctionRadius;\n\tfloat theta = 1.0;\n\tif(distance != 0.0){\n\t\ttheta = atan(distance);\n\t}\n\tvec2 vMapping = theta * vPosition.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\t\t\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],29:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec3 uLensS;\nuniform vec2 uLensF;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord * vec2(1.0, -1.0)/ 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat scale = uLensS.z;\n\tvec3 vPos = vPosition;\n\tfloat Fx = uLensF.x;\n\tfloat Fy = uLensF.y;\n\tvec2 vMapping = vPos.xy;\n\tvMapping.x = vMapping.x + ((pow(vPos.y, 2.0)/scale)*vPos.x/scale)*-Fx;\n\tvMapping.y = vMapping.y + ((pow(vPos.x, 2.0)/scale)*vPos.y/scale)*-Fy;\n\tvMapping = vMapping * uLensS.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping/scale);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tgl_FragColor = texture;\n}\n"},{}],30:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TODO insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],31:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TOD insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],32:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvoid main(void){\n\tvPosition = aVertexPosition;\n\tvTextureCoord = aTextureCoord;\n\tgl_Position = vec4(vPosition,1.0);\n}\n"},{}],33:[function(e,t,n){(function(n,r){"use strict";function i(e,t){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height;var r=e.getContext("2d");r.drawImage(n,0,0);var i=r.getImageData(0,0,n.width,n.height);t(null,c(new Uint8Array(i.data),[n.width,n.height,4],[4,4*n.width,1],0))},n.onerror=function(e){t(e)},n.src=e}function a(e,t){var n;try{n=new f(e)}catch(e){return void t(e)}if(n.numFrames()>0){var r=[n.numFrames(),n.height,n.width,4],i=new Uint8Array(r[0]*r[1]*r[2]*r[3]),a=c(i,r);try{for(var o=0;o=0&&(this.dispose=e)},i.prototype.setRepeat=function(e){this.repeat=e},i.prototype.setTransparent=function(e){this.transparent=e},i.prototype.analyzeImage=function(e){this.setImagePixels(this.removeAlphaChannel(e)),this.analyzePixels()},i.prototype.writeImageInfo=function(){this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.firstFrame=!1},i.prototype.outputImage=function(){this.writePixels()},i.prototype.addFrame=function(e){this.emit("frame#start"),this.analyzeImage(e),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")},i.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")},i.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},i.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")},i.prototype.analyzePixels=function(){var e=this.pixels.length/3;this.indexedPixels=new Uint8Array(e);var t=new s(this.pixels,this.sample);t.buildColormap(),this.colorTab=t.getColormap();for(var n=0,r=0;r>16,n=(65280&e)>>8,r=255&e,i=0,a=16777216,o=this.colorTab.length,s=0;s=0&&(t=7&dispose),t<<=2,this.writeByte(0|t|e),this.writeShort(this.delay),this.writeByte(this.transIndex),this.writeByte(0)},i.prototype.writeImageDesc=function(){this.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.writeByte(0):this.writeByte(128|this.palSize)},i.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)},i.prototype.writeNetscapeExt=function(){this.writeByte(33),this.writeByte(255),this.writeByte(11),this.writeUTFBytes("NETSCAPE2.0"),this.writeByte(3),this.writeByte(1),this.writeShort(this.repeat),this.writeByte(0)},i.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t>8&255)},i.prototype.writePixels=function(){new l(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this)},i.prototype.stream=function(){return this},i.ByteCapacitor=r,t.exports=i}).call(this,e("buffer").Buffer)},{"./LZWEncoder.js":36,"./TypedNeuQuant.js":37,assert:1,buffer:7,events:24,"readable-stream":44,util:119}],36:[function(e,t,n){var r=-1,i=12,a=5003,o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];t.exports=function(e,t,n,s){function l(e,t){S[v++]=e,v>=254&&p(t)}function u(e){c(a),M=k+2,L=!0,g(k,e)}function c(e){for(var t=0;t=0){f=p-s,0===s&&(f=1);do{if((s-=f)<0&&(s+=p),A[s]===n){l=C[s];continue e}}while(A[s]>=0)}g(l,t),l=o,M<1<0&&(e.writeByte(v),e.writeBytes(S,0,v),v=0)}function h(e){return(1<0?m|=e<=8;)l(255&m,t),m>>=8,R-=8;if((M>w||L)&&(L?(w=h(_=x),L=!1):w=++_==i?1<0;)l(255&m,t),m>>=8,R-=8;p(t)}}var m,v,w,b,y,_,x,k,E,T=Math.max(2,s),S=new Uint8Array(256),A=new Int32Array(a),C=new Int32Array(a),R=0,M=0,L=!1;this.encode=function(n){n.writeByte(T),b=e*t,y=0,f(T+1,n),n.writeByte(0)}}},{}],37:[function(e,t,n){var r=100,i=256,a=i-1,o=4,s=16,l=1<>c,p=l<>3)*(1<>3);var e,t;for(e=0;e>=o,M[e][1]>>=o,M[e][2]>>=o,M[e][3]=e}function T(e,t,n,r,i){M[t][0]-=e*(M[t][0]-n)/m,M[t][1]-=e*(M[t][1]-r)/m,M[t][2]-=e*(M[t][2]-i)/m}function S(e,t,n,r,a){for(var o,s,l=Math.abs(t-e),u=Math.min(t+e,i),c=t+1,f=t-1,p=1;cl;)s=D[p++],cl&&((o=M[f--])[0]-=s*(o[0]-n)/w,o[1]-=s*(o[1]-r)/w,o[2]-=s*(o[2]-a)/w)}function A(e,t,n){var r,a,l,h,d,g=~(1<<31),m=g,v=-1,w=v;for(r=0;r>s-o))>c,I[r]-=d,j[r]+=d<>1,t=l+1;t>1,t=l+1;t<256;t++)L[t]=a}function R(){var n,i=e.length,a=30+(t-1)/3,s=i/(3*t),l=~~(s/r),u=m,c=d,f=c>>h;for(f<=1&&(f=0),n=0;n=i&&(M-=i),n++,0===l&&(l=1),n%l==0)for(u-=u/a,(f=(c-=c/g)>>h)<=1&&(f=0),R=0;R=0;)u=s?u=i:(u++,o<0&&(o=-o),(r=a[0]-e)<0&&(r=-r),(o+=r)=0&&((o=t-(a=M[c])[1])>=s?c=-1:(c--,o<0&&(o=-o),(r=a[0]-e)<0&&(r=-r),(o+=r)0)if(t.ended&&!i){s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e)),h(e,t);else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=M)e=M;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||A.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return A.isBuffer(t)||A.isString(t)||A.isNullOrUndefined(t)||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(R("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(function(){p(e)}):p(e))}function p(e){R("emit readable"),e.emit("readable"),w(e)}function h(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){d(e,t)}))}function d(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=i)n=a?r.join(""):E.concat(r,i),r.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;n0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return R("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):f(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&y(this),null;var r=t.needReadable;R("need readable",r),(0===t.length||t.length-e0?b(e,t):null,A.isNull(i)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&y(this),A.isNull(i)||this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){R("onunpipe"),e===f&&a()}function i(){R("onend"),e.end()}function a(){R("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",d),e.removeListener("error",s),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",a),f.removeListener("data",o),!p.awaitDrain||e._writableState&&!e._writableState.needDrain||d()}function o(t){R("ondata"),!1===e.write(t)&&(R("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,f.pause())}function s(t){R("onerror",t),c(),e.removeListener("error",s),0===T.listenerCount(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",u),c()}function u(){R("onfinish"),e.removeListener("close",l),c()}function c(){R("unpipe"),f.unpipe(e)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,R("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?i:a;p.endEmitted?n.nextTick(h):f.once("end",h),e.on("unpipe",r);var d=g(f);return e.on("drain",d),f.on("data",o),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",f),p.flowing||(R("pipe resume"),f.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i1){for(var n=[],r=0;r>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=p,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(o=o<0;e[n+h]=255&o,h+=d,o/=256,u-=8);e[n+h-d]|=128*g}},{}],47:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],48:[function(e,t,n){"use strict";t.exports=function(e){for(var t=new Array(e),n=0;n0&&t-1 in e)}function r(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(he.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return J.call(t,e)>-1!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return re.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function o(){Y.removeEventListener("DOMContentLoaded",o),e.removeEventListener("load",o),re.ready()}function s(){this.expando=re.expando+s.uid++}function l(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ee.test(n)?re.parseJSON(n):n)}catch(e){}ke.set(e,t,n)}else n=void 0;return n}function u(e,t,n,r){var i,a=1,o=20,s=r?function(){return r.cur()}:function(){return re.css(e,t,"")},l=s(),u=n&&n[3]||(re.cssNumber[t]?"":"px"),c=(re.cssNumber[t]||"px"!==u&&+l)&&Ae.exec(re.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{c/=a=a||".5",re.style(e,t,c+u)}while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function c(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],n):n}function f(e,t){for(var n=0,r=e.length;n-1)i&&i.push(a);else if(u=re.contains(a.ownerDocument,a),o=c(h.appendChild(a),"script"),u&&f(o),n)for(p=0;a=o[p++];)je.test(a.type||"")&&n.push(a);return h}function h(){return!0}function d(){return!1}function g(){try{return Y.activeElement}catch(e){}}function m(e,t,n,r,i,a){var o,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)m(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=d;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return re().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=re.guid++)),e.each(function(){re.event.add(this,t,i,r,n)})}function v(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function w(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function b(e){var t=Ue.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){var n,r,i,a,o,s,l,u;if(1===t.nodeType){if(xe.hasData(e)&&(a=xe.access(e),o=xe.set(t,a),u=a.events)){delete o.handle,o.events={};for(i in u)for(n=0,r=u[i].length;n1&&"string"==typeof g&&!ne.checkClone&&Fe.test(g))return e.each(function(i){var a=e.eq(i);m&&(t[0]=g.call(this,i,a.html())),x(a,t,n,r)});if(h&&(i=p(t,e[0].ownerDocument,!1,e,r),a=i.firstChild,1===i.childNodes.length&&(i=a),a||r)){for(s=(o=re.map(c(i,"script"),w)).length;f")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=E(e,t),He.detach()),Ve[e]=n),n}function S(e,t,n){var r,i,a,o,s=e.style;return n=n||Ze(e),""!==(o=n?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||re.contains(e.ownerDocument,e)||(o=re.style(e,t)),n&&!ne.pixelMarginRight()&&Ge.test(o)&&We.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a),void 0!==o?o+"":o}function A(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function C(e){if(e in et)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in et)return e}function R(e,t,n){var r=Ae.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function M(e,t,n,r,i){for(var a=n===(r?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=re.css(e,n+Ce[a],!0,i)),r?("content"===n&&(o-=re.css(e,"padding"+Ce[a],!0,i)),"margin"!==n&&(o-=re.css(e,"border"+Ce[a]+"Width",!0,i))):(o+=re.css(e,"padding"+Ce[a],!0,i),"padding"!==n&&(o+=re.css(e,"border"+Ce[a]+"Width",!0,i)));return o}function L(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=Ze(e),o="border-box"===re.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(((i=S(e,t,a))<0||null==i)&&(i=e.style[t]),Ge.test(i))return i;r=o&&(ne.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+M(e,t,n||(o?"border":"content"),r,a)+"px"}function j(e,t){for(var n,r,i,a=[],o=0,s=e.length;o=0&&n=0},isPlainObject:function(e){var t;if("object"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||te.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?K[ee.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=re.trim(e))&&(1===e.indexOf("use strict")?((t=Y.createElement("script")).text=e,Y.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(oe,se)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iy.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=n.length;r--;)y.attrHandle[n[r]]=t}function o(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||W)-(~e.sourceIndex||W);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function c(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,a=n.length;i-1&&(r[u]=!(o[u]=f))}}else b=d(b===o?b.splice(m,b.length):b),a?a(null,o,b,l):$.apply(o,b)})}function m(e){for(var t,n,r,i=e.length,a=y.relative[e[0].type],o=a||y.relative[" "],s=a?1:0,l=f(function(e){return e===t},o,!0),u=f(function(e){return J(t,e)>-1},o,!0),h=[function(e,n,r){var i=!a&&(r||n!==S)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];s1&&p(h),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,a=e.length>0,o=function(r,o,s,l,u){var c,f,p,h=0,g="0",m=r&&[],v=[],w=S,b=r||a&&y.find.TAG("*",u),_=z+=null==w?1:Math.random()||.1,x=b.length;for(u&&(S=o===M||o||u);g!==x&&null!=(c=b[g]);g++){if(a&&c){for(f=0,o||c.ownerDocument===M||(R(c),s=!j);p=e[f++];)if(p(c,o||M,s)){l.push(c);break}u&&(z=_)}i&&((c=!p&&c)&&h--,r&&m.push(c))}if(h+=g,i&&g!==h){for(f=0;p=n[f++];)p(m,v,o,s);if(r){if(h>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(l));v=d(v)}$.apply(l,v),u&&!r&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(z=_,S=w),m};return i?r(o):o}var w,b,y,_,x,k,E,T,S,A,C,R,M,L,j,I,D,B,N,P="sizzle"+1*new Date,O=e.document,z=0,F=0,U=n(),q=n(),H=n(),V=function(e,t){return e===t&&(C=!0),0},W=1<<31,G={}.hasOwnProperty,Z=[],Y=Z.pop,X=Z.push,$=Z.push,Q=Z.slice,J=function(e,t){for(var n=0,r=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ye=function(){R()};try{$.apply(Z=Q.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(e){$={apply:Z.length?function(e,t){X.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},R=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:O;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,L=M.documentElement,j=!x(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ye,!1):n.attachEvent&&n.attachEvent("onunload",ye)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(M.getElementsByClassName),b.getById=i(function(e){return L.appendChild(e).id=P,!M.getElementsByName||!M.getElementsByName(P).length}),b.getById?(y.find.ID=function(e,t){if(void 0!==t.getElementById&&j){var n=t.getElementById(e);return n?[n]:[]}},y.filter.ID=function(e){var t=e.replace(we,be);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var t=e.replace(we,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),y.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[i++];)1===n.nodeType&&r.push(n);return r}return a},y.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&j)return t.getElementsByClassName(e)},D=[],I=[],(b.qsa=de.test(M.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||I.push("\\["+ee+"*(?:value|"+K+")"),e.querySelectorAll("[id~="+P+"-]").length||I.push("~="),e.querySelectorAll(":checked").length||I.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||I.push(".#.+[+~]")}),i(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&I.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),I.push(",.*:")})),(b.matchesSelector=de.test(B=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){b.disconnectedMatch=B.call(e,"div"),B.call(e,"[s!='']:x"),D.push("!=",re)}),I=I.length&&new RegExp(I.join("|")),D=D.length&&new RegExp(D.join("|")),t=de.test(L.compareDocumentPosition),N=t||de.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return C=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===O&&N(O,e)?-1:t===M||t.ownerDocument===O&&N(O,t)?1:A?J(A,e)-J(A,t):0:4&n?-1:1)}:function(e,t){if(e===t)return C=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!i||!a)return e===M?-1:t===M?1:i?-1:a?1:A?J(A,e)-J(A,t):0;if(i===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?o(s[r],l[r]):s[r]===O?-1:l[r]===O?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&R(e),n=n.replace(le,"='$1']"),b.matchesSelector&&j&&!H[n+" "]&&(!D||!D.test(n))&&(!I||!I.test(n)))try{var r=B.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&R(e),N(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&R(e);var n=y.attrHandle[t.toLowerCase()],r=n&&G.call(y.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==r?r:b.attributes||!j?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(C=!b.detectDuplicates,A=!b.sortStable&&e.slice(0),e.sort(V),C){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return A=null,e},_=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=_(t);return n},(y=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,be),e[3]=(e[3]||e[4]||e[5]||"").replace(we,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var a=t.attr(i,e);return null==a?"!="===n:!n||(a+="","="===n?a===r:"!="===n?a!==r:"^="===n?r&&0===a.indexOf(r):"*="===n?r&&a.indexOf(r)>-1:"$="===n?r&&a.slice(-r.length)===r:"~="===n?(" "+a.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(a===r||a.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,p,h,d,g=a!==o?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),w=!l&&!s,b=!1;if(m){if(a){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&w){for(b=(h=(u=(c=(f=(p=m)[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===z&&u[1])&&u[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(b=h=0)||d.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[z,h,b];break}}else if(w&&(b=h=(u=(c=(f=(p=t)[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===z&&u[1]),!1===b)for(;(p=++h&&p&&p[g]||(b=h=0)||d.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(w&&((c=(f=p[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[z,b]),p!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,n){var i,a=y.pseudos[e]||y.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[P]?a(n):a.length>1?(i=[e,e,"",n],y.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=a(e,n),o=i.length;o--;)e[r=J(e,i[o])]=!(t[r]=i[o])}):function(e){return a(e,0,i)}):a}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(ae,"$1"));return i[P]?r(function(e,t,n,r){for(var a,o=i(e,null,r,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,r,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,be),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,be).toLowerCase(),function(t){var n;do{if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!y.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(o=a[0]).type&&b.getById&&9===t.nodeType&&j&&y.relative[a[1].type]){if(!(t=(y.find.ID(o.matches[0].replace(we,be),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=fe.needsContext.test(e)?0:a.length;i--&&(o=a[i],!y.relative[s=o.type]);)if((u=y.find[s])&&(r=u(o.matches[0].replace(we,be),me.test(a[0].type)&&l(t.parentNode)||t))){if(a.splice(i,1),!(e=r.length&&c(a)))return $.apply(n,r),n;break}}return(f||E(e,p))(r,t,!j,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=P.split("").sort(V).join("")===P,b.detectDuplicates=!!C,R(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(K,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);re.find=le,re.expr=le.selectors,re.expr[":"]=re.expr.pseudos,re.uniqueSort=re.unique=le.uniqueSort,re.text=le.getText,re.isXMLDoc=le.isXML,re.contains=le.contains;var ue=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&re(e).is(n))break;r.push(e)}return r},ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},fe=re.expr.match.needsContext,pe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,he=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?re.find.matchesSelector(r,e)?[r]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;t1?re.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&fe.test(e)?re(e):e||[],!1).length}});var de,ge=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(re.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ge.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Y,!0)),pe.test(r[1])&&re.isPlainObject(t))for(r in t)re.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=Y.getElementById(r[2]))&&i.parentNode&&(this.length=1,this[0]=i),this.context=Y,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==n.ready?n.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))}).prototype=re.fn,de=re(Y);var me=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};re.fn.extend({has:function(e){var t=re(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&re.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?re.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(re(e),this[0]):J.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.uniqueSort(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return ce((e.parentNode||{}).firstChild,e)},children:function(e){return ce(e.firstChild)},contents:function(e){return e.contentDocument||re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(n,r){var i=re.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=re.filter(r,i)),this.length>1&&(ve[e]||re.uniqueSort(i),me.test(e)&&i.reverse()),this.pushStack(i)}});var we=/\S+/g;re.Callbacks=function(e){e="string"==typeof e?a(e):re.extend({},e);var t,n,r,i,o=[],s=[],l=-1,u=function(){for(i=e.once,r=t=!0;s.length;l=-1)for(n=s.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?re.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},re.extend({Deferred:function(e){var t=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(n){re.each(t,function(t,a){var o=re.isFunction(e[t])&&e[t];i[a[1]](function(){var e=o&&o.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[a[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,r):r}},i={};return r.pipe=r.then,re.each(t,function(e,a){var o=a[2],s=a[3];r[a[1]]=o.add,s&&o.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[a[0]]=function(){return i[a[0]+"With"](this===i?r:this,arguments),this},i[a[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,a=X.call(arguments),o=a.length,s=1!==o||e&&re.isFunction(e.promise)?o:0,l=1===s?e:re.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?X.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(o>1)for(t=new Array(o),n=new Array(o),r=new Array(o);i0||(be.resolveWith(Y,[re]),re.fn.triggerHandler&&(re(Y).triggerHandler("ready"),re(Y).off("ready"))))}}),re.ready.promise=function(t){return be||(be=re.Deferred(),"complete"===Y.readyState||"loading"!==Y.readyState&&!Y.documentElement.doScroll?e.setTimeout(re.ready):(Y.addEventListener("DOMContentLoaded",o),e.addEventListener("load",o))),be.promise(t)},re.ready.promise();var ye=function(e,t,n,r,i,a,o){var s=0,l=e.length,u=null==n;if("object"===re.type(n)){i=!0;for(s in n)ye(e,t,s,n[s],!0,a,o)}else if(void 0!==r&&(i=!0,re.isFunction(r)||(o=!0),u&&(o?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(re(e),n)})),t))for(;s-1&&void 0!==n&&ke.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ke.remove(this,e)})}}),re.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=xe.get(e,t),n&&(!r||re.isArray(n)?r=xe.access(e,t,re.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=re.queue(e,t),r=n.length,i=n.shift(),a=re._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,function(){re.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return xe.get(e,n)||xe.access(e,n,{empty:re.Callbacks("once memory").add(function(){xe.remove(e,[t+"queue",n])})})}}),re.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ie.optgroup=Ie.option,Ie.tbody=Ie.tfoot=Ie.colgroup=Ie.caption=Ie.thead,Ie.th=Ie.td;var De=/<|&#?\w+;/;!function(){var e=Y.createDocumentFragment().appendChild(Y.createElement("div")),t=Y.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),ne.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",ne.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Be=/^key/,Ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pe=/^([^.]*)(?:\.(.+)|)/;re.event={global:{},add:function(e,t,n,r,i){var a,o,s,l,u,c,f,p,h,d,g,m=xe.get(e);if(m)for(n.handler&&(n=(a=n).handler,i=a.selector),n.guid||(n.guid=re.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==re&&re.event.triggered!==t.type?re.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(we)||[""]).length;u--;)h=g=(s=Pe.exec(t[u])||[])[1],d=(s[2]||"").split(".").sort(),h&&(f=re.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=re.event.special[h]||{},c=re.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&re.expr.match.needsContext.test(i),namespace:d.join(".")},a),(p=l[h])||((p=l[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,d,o)||e.addEventListener&&e.addEventListener(h,o)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),re.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,l,u,c,f,p,h,d,g,m=xe.hasData(e)&&xe.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(we)||[""]).length;u--;)if(s=Pe.exec(t[u])||[],h=g=s[1],d=(s[2]||"").split(".").sort(),h){for(f=re.event.special[h]||{},p=l[h=(r?f.delegateType:f.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=p.length;a--;)c=p[a],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(a,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));o&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,d,m.handle)||re.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)re.event.remove(e,h+t[u],n,r,!0);re.isEmptyObject(l)&&xe.remove(e,"handle events")}},dispatch:function(e){e=re.event.fix(e);var t,n,r,i,a,o=[],s=X.call(arguments),l=(xe.get(this,"events")||{})[e.type]||[],u=re.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,e)){for(o=re.event.handlers.call(this,e,l),t=0;(i=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(r=((re.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],n=0;n-1:re.find(i,this,null,[l]).length),r[i]&&r.push(a);r.length&&o.push({elem:l,handlers:r})}return s]*)\/>/gi,ze=/\s*$/g;re.extend({htmlPrefilter:function(e){return e.replace(Oe,"<$1>")},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),l=re.contains(e.ownerDocument,e);if(!(ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(o=c(s),r=0,i=(a=c(e)).length;r0&&f(o,!l&&c(e,"script")),s},cleanData:function(e){for(var t,n,r,i=re.event.special,a=0;void 0!==(n=e[a]);a++)if(_e(n)){if(t=n[xe.expando]){if(t.events)for(r in t.events)i[r]?re.event.remove(n,r):re.removeEvent(n,r,t.handle);n[xe.expando]=void 0}n[ke.expando]&&(n[ke.expando]=void 0)}}}),re.fn.extend({domManip:x,detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(e){return ye(this,function(e){return void 0===e?re.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return x(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||v(this,e).appendChild(e)})},prepend:function(){return x(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(re.cleanData(c(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return ye(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ze.test(e)&&!Ie[(Le.exec(e)||["",""])[1].toLowerCase()]){e=re.htmlPrefilter(e);try{for(;n1)},show:function(){return j(this,!0)},hide:function(){return j(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?re(this).show():re(this).hide()})}}),re.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||re.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(re.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=re.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=re.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[re.cssProps[e.prop]]&&!re.cssHooks[e.prop]?e.elem[e.prop]=e.now:re.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},re.fx=I.prototype.init,re.fx.step={};var tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;re.Animation=re.extend(O,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return u(n.elem,e,Ae.exec(t),n),n}]},tweener:function(e,t){re.isFunction(e)?(t=e,e=["*"]):e=e.match(we);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?re.prop(e,t,n):(1===a&&re.isXMLDoc(e)||(t=t.toLowerCase(),i=re.attrHooks[t]||(re.expr.match.bool.test(t)?at:void 0)),void 0!==n?null===n?void re.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=re.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&re.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,a=t&&t.match(we);if(a&&1===e.nodeType)for(;n=a[i++];)r=re.propFix[n]||n,re.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),at={set:function(e,t,n){return!1===t?re.removeAttr(e,n):e.setAttribute(n,n),n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||re.find.attr;ot[t]=function(e,t,r){var i,a;return r||(a=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=a),i}});var st=/^(?:input|select|textarea|button)$/i,lt=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return ye(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[re.propFix[e]||e]})}}),re.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&re.isXMLDoc(e)||(t=re.propFix[t]||t,i=re.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,"tabindex");return t?parseInt(t,10):st.test(e.nodeName)||lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ne.optSelected||(re.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this});var ut=/[\t\r\n\f]/g;re.fn.extend({addClass:function(e){var t,n,r,i,a,o,s,l=0;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(ut," ")){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=re.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,l=0;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(ut," ")){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=re.trim(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(n){re(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,a;if("string"===n)for(r=0,i=re(this),a=e.match(we)||[];t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=z(this))&&xe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":xe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(ut," ").indexOf(t)>-1)return!0;return!1}});var ct=/\r/g,ft=/[\x20\t\r\n\f]+/g;re.fn.extend({val:function(e){var t,n,r,i=this[0];if(arguments.length)return r=re.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,re(this).val()):e)?i="":"number"==typeof i?i+="":re.isArray(i)&&(i=re.map(i,function(e){return null==e?"":e+""})),(t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=re.valHooks[i.type]||re.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ct,""):null==n?"":n}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,"value");return null!=t?t:re.trim(re.text(e)).replace(ft," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],s=a?i+1:r.length,l=i<0?s:a?i:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(e,t){if(re.isArray(t))return e.checked=re.inArray(re(e).val(),t)>-1}},ne.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var pt=/^(?:focusinfocus|focusoutblur)$/;re.extend(re.event,{trigger:function(t,n,r,i){var a,o,s,l,u,c,f,p=[r||Y],h=te.call(t,"type")?t.type:t,d=te.call(t,"namespace")?t.namespace.split("."):[];if(o=s=r=r||Y,3!==r.nodeType&&8!==r.nodeType&&!pt.test(h+re.event.triggered)&&(h.indexOf(".")>-1&&(h=(d=h.split(".")).shift(),d.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[re.expando]?t:new re.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:re.makeArray(n,[t]),f=re.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!re.isWindow(r)){for(l=f.delegateType||h,pt.test(l+h)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(r.ownerDocument||Y)&&p.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=p[a++])&&!t.isPropagationStopped();)t.type=a>1?l:f.bindType||h,(c=(xe.get(o,"events")||{})[t.type]&&xe.get(o,"handle"))&&c.apply(o,n),(c=u&&o[u])&&c.apply&&_e(o)&&(t.result=c.apply(o,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),n)||!_e(r)||u&&re.isFunction(r[h])&&!re.isWindow(r)&&((s=r[u])&&(r[u]=null),re.event.triggered=h,r[h](),re.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=re.extend(new re.Event,n,{type:e,isSimulated:!0});re.event.trigger(r,null,t)}}),re.fn.extend({trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return re.event.trigger(e,t,n,!0)}}),re.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){re.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ne.focusin="onfocusin"in e,ne.focusin||re.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){re.event.simulate(t,e.target,re.event.fix(e))};re.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=xe.access(r,t);i||r.addEventListener(e,n,!0),xe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=xe.access(r,t)-1;i?xe.access(r,t,i):(r.removeEventListener(e,n,!0),xe.remove(r,t))}}});var ht=e.location,dt=re.now(),gt=/\?/;re.parseJSON=function(e){return JSON.parse(e+"")},re.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+t),n};var mt=/#.*$/,vt=/([?&])_=[^&]*/,wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yt=/^(?:GET|HEAD)$/,_t=/^\/\//,xt={},kt={},Et="*/".concat("*"),Tt=Y.createElement("a");Tt.href=ht.href,re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht.href,type:"GET",isLocal:bt.test(ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Et,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,re.ajaxSettings),t):q(re.ajaxSettings,e)},ajaxPrefilter:F(xt),ajaxTransport:F(kt),ajax:function(t,n){function r(t,n,r,s){var u,f,w,b,_,k=n;2!==y&&(y=2,l&&e.clearTimeout(l),i=void 0,o=s||"",x.readyState=t>0?4:0,u=t>=200&&t<300||304===t,r&&(b=H(p,x,r)),b=V(p,b,x,u),u?(p.ifModified&&((_=x.getResponseHeader("Last-Modified"))&&(re.lastModified[a]=_),(_=x.getResponseHeader("etag"))&&(re.etag[a]=_)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=b.state,f=b.data,u=!(w=b.error))):(w=k,!t&&k||(k="error",t<0&&(t=0))),x.status=t,x.statusText=(n||k)+"",u?g.resolveWith(h,[f,k,x]):g.rejectWith(h,[x,k,w]),x.statusCode(v),v=void 0,c&&d.trigger(u?"ajaxSuccess":"ajaxError",[x,p,u?f:w]),m.fireWith(h,[x,k]),c&&(d.trigger("ajaxComplete",[x,p]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,a,o,s,l,u,c,f,p=re.ajaxSetup({},n),h=p.context||p,d=p.context&&(h.nodeType||h.jquery)?re(h):re.event,g=re.Deferred(),m=re.Callbacks("once memory"),v=p.statusCode||{},w={},b={},y=0,_="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!s)for(s={};t=wt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=b[n]=b[n]||e,w[e]=t),this},overrideMimeType:function(e){return y||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||_;return i&&i.abort(t),r(0,t),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,p.url=((t||p.url||ht.href)+"").replace(mt,"").replace(_t,ht.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=re.trim(p.dataType||"*").toLowerCase().match(we)||[""],null==p.crossDomain){u=Y.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Tt.protocol+"//"+Tt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=re.param(p.data,p.traditional)),U(xt,p,n,x),2===y)return x;(c=re.event&&p.global)&&0==re.active++&&re.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!yt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(gt.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=vt.test(a)?a.replace(vt,"$1_="+dt++):a+(gt.test(a)?"&":"?")+"_="+dt++)),p.ifModified&&(re.lastModified[a]&&x.setRequestHeader("If-Modified-Since",re.lastModified[a]),re.etag[a]&&x.setRequestHeader("If-None-Match",re.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Et+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)x.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,x,p)||2===y))return x.abort();_="abort";for(f in{success:1,error:1,complete:1})x[f](p[f]);if(i=U(kt,p,n,x)){if(x.readyState=1,c&&d.trigger("ajaxSend",[x,p]),2===y)return x;p.async&&p.timeout>0&&(l=e.setTimeout(function(){x.abort("timeout")},p.timeout));try{y=1,i.send(w,r)}catch(e){if(!(y<2))throw e;r(-1,e)}}else r(-1,"No Transport");return x},getJSON:function(e,t,n){return re.get(e,t,n,"json")},getScript:function(e,t){return re.get(e,void 0,t,"script")}}),re.each(["get","post"],function(e,t){re[t]=function(e,n,r,i){return re.isFunction(n)&&(i=i||r,r=n,n=void 0),re.ajax(re.extend({url:e,type:t,dataType:i,data:n,success:r},re.isPlainObject(e)&&e))}}),re._evalUrl=function(e){return re.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},re.fn.extend({wrapAll:function(e){var t;return re.isFunction(e)?this.each(function(t){re(this).wrapAll(e.call(this,t))}):(this[0]&&(t=re(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(n){re(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return!re.expr.filters.visible(e)},re.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var St=/%20/g,At=/\[\]$/,Ct=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var n,r=[],i=function(e,t){t=re.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquery&&!re.isPlainObject(e))re.each(e,function(){i(this.name,this.value)});else for(n in e)W(n,e[n],t,i);return r.join("&").replace(St,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,"elements");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(":disabled")&&Mt.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!Me.test(e))}).map(function(e,t){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}}):{name:t.name,value:n.replace(Ct,"\r\n")}}).get()}}),re.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},jt=re.ajaxSettings.xhr();ne.cors=!!jt&&"withCredentials"in jt,ne.ajax=jt=!!jt,re.ajaxTransport(function(t){var n,r;if(ne.cors||jt&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)s.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Lt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return re.globalEval(e),e}}}),re.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),re.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=re("