-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheyetribe-0.1.4.min.js
1 lines (1 loc) · 28.4 KB
/
eyetribe-0.1.4.min.js
1
!function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(t){var n=e[u][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e){var n,r,i,o,u={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o=t("underscore"),r=t("events").EventEmitter,i=1e3,n=function(t){function e(t){null==t&&(t={}),t=o.defaults(t,n),this.host=t.host,this.port=t.port,this.allowReconnect=t.allowReconnect,this.reconnectionInterval=t.reconnectionInterval}var n,r,u,a;return s(e,t),n={host:"$SERVER_HOST",port:parseInt("$SERVER_PORT"),allowReconnect:!0,reconnectionInterval:500},e.prototype.connect=function(){var t;return this.socket||(t=this,this.socket=new WebSocket("ws://"+this.host+":"+this.port),this.socket.onopen=function(){},this.socket.onclose=function(e){return r.call(t,e.code,e.reason)},this.socket.onmessage=function(e){return"OK"===e.data?u.call(t):a.call(t,e.data)},this.socket.onerror=function(t){return console.log("onerror",t)}),this},u=function(){return this.stopReconnection(),this.connected=!0,this.emit("connect")},r=function(t,e){return delete this.socket,this.connected&&(this.connected=!1,this.emit("disconnect",t,e)),t!==i&&this.allowReconnect?this.reconnect(this.reconnectionInterval):void 0},a=function(t){var e,n,r,i,o,u;for(o=t.split("\n"),u=[],r=0,i=o.length;i>r;r++)e=o[r],e.length>0?(n=JSON.parse(e),u.push(this.emit(n.category,n))):u.push(void 0);return u},e.prototype.disconnect=function(){var t;return this.stopReconnection(),null!=(t=this.socket)?t.close(i):void 0},e.prototype.reconnect=function(t){var e;return null==t&&(t=this.reconnectionInterval),e=this,this.reconnecting=setTimeout(function(){return e.connect()},t)},e.prototype.stopReconnection=function(){return this.reconnecting=clearTimeout(this.reconnecting)},e.prototype.send=function(t){return this.socket?(t instanceof Object&&(t=JSON.stringify(t)),this.socket.send(t)):void 0},e}(r),e.exports=n},{events:10,underscore:11}],2:[function(t,e){var n,r,i,o,u={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o=t("./point2d"),r=function(){function t(t){this.data=t,this.timestampString=t.timestamp,this.timestamp=t.time,this.state=t.state,this.raw=this.rawCoordinates=new o(t.raw),this.average=this.smoothedCoordinates=new o(t.avg),this.leftEye=new n(n.LEFT,t.lefteye),this.rightEye=new n(n.RIGHT,t.righteye),this.eyes=[this.leftEye,this.rightEye],this.isFixated=t.fix}return t.STATE_TRACKING_GAZE=1,t.STATE_TRACKING_EYES=2,t.STATE_TRACKING_PRESENCE=4,t.STATE_TRACKING_FAIL=8,t.STATE_TRACKING_LOST=16,t.prototype.dump=function(){return"Gaze Data:<br>Frame [ state:"+this.state+" | timestamp:"+this.timestamp+" | fixated:"+this.isFixated+" | raw:"+this.raw.toString()+" | average:"+this.average.toString()+" ]<br><br>Eyes:<br>"+this.leftEye.dump()+"<br>"+this.rightEye.dump()+"<br><br>Raw JSON: "+JSON.stringify(this.data)+"<br>"},t}(),n=function(){function t(t,e){this.type=t,this.data=e,this.raw=this.rawCoordinates=new o(e.raw),this.average=this.smoothedCoordinates=new o(e.avg),this.pupilCenter=this.pupilCenterCoordinates=new o(e.pcenter),this.pupilSize=e.psize}return t.LEFT=0,t.RIGHT=1,t.prototype.dump=function(){var e;return e=function(){switch(this.type){case t.LEFT:return"left";case t.RIGHT:return"right"}}.call(this),"Eye("+e+") [ raw:"+this.raw.toString()+" | average:"+this.average.toString()+" | pupilSize:"+this.pupilSize+" | pupilCenter:"+this.pupilCenter.toString()+" ]"},t}(),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.Eye=n,e}(r),e.exports=i},{"./point2d":6}],3:[function(t,e){var n,r,i,o;r=t("./gazedata"),n=r.Eye,o=t("./point2d"),i=function(){function t(){}var e,n;return t.getEyesCenterNormalized=function(t,e){var n;return t instanceof r&&(n=t,t=n.leftEye,e=n.rightEye),null!=t&&null!=e?t.pupilCenter.add(e.pupilCenter).divide(2):null!=t?t.pupilCenter:null!=e?e.pupilCenter:void 0},t.getEyesCenterPixels=function(t,e,n,i){var o;return t instanceof r&&(t=arguments[0],n=arguments[1],i=arguments[2]),o=this.getEyesCenterNormalized(t,e),this.getRelativeToScreenSpace(o,n,i)},n=.1,e=.3,t.getEyesDistanceNormalized=function(t,i){var o,u;return t instanceof r&&(u=t,t=u.leftEye,i=u.rightEye),o=Math.abs(this.getDistancePoint2D(t.pupilCenter,i.pupilCenter)),n>o&&(n=o),o>e&&(e=o),o/(e-n)},t.getDistancePoint2D=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},t.getRelativeToScreenSpace=function(t,e,n){return null!=t?new o(Math.round(t.x*e),Math.round(t.y*n)):void 0},t.getNormalizedCoords=function(t,e,n){return null!=t?new o(t.x/e,t.y/n):void 0},t.getNormalizedMapping=function(t,e,n){return t=this.getNormalizedCoords(t,n,n),null!=t?new o(2*t.x-1,2*t.y-1):void 0},t}(),e.exports=i},{"./gazedata":2,"./point2d":6}],4:[function(t,e){var n;n=function(){function t(t){var e;this.tracker=t,e=this,t.on("heartbeatinterval",function(t){return e.restart(t)})}return t.prototype.start=function(t){var e,n;return this.intervalMillis=t,n=this,e=this.tracker.connection,null!=t?(null==this.intervalId&&(this.intervalId=setInterval(function(){return e.send('{"category":"heartbeat"}')},t)),e.once("disconnect",function(){return n.stop()})):this.tracker.get("heartbeatinterval"),this},t.prototype.restart=function(t){return this.intervalMillis!==t&&this.stop(),this.start(t)},t.prototype.stop=function(){return this.intervalId=clearInterval(this.intervalId)},t}(),e.exports=n},{}],5:[function(t,e){var n;n=function(){function e(){}return e.version=t("./version"),e.Tracker=t("./tracker"),e.Protocol=t("./protocol"),e.GazeData=t("./gazedata"),e.GazeUtils=t("./gazeutils"),e.Point2D=t("./point2d"),e._=t("underscore"),e.loop=function(t,e){var n;return"function"==typeof t&&(n=[t,{}],e=n[0],t=n[1]),this.loopTracker=new this.Tracker(t).loop(e)},e}(),e.exports=n},{"./gazedata":2,"./gazeutils":3,"./point2d":6,"./protocol":7,"./tracker":8,"./version":9,underscore:11}],6:[function(t,e){var n;n=function(){function t(t,e){var n,r,i;null!=t&&null==e&&(t instanceof Array?(n=t,t=n[0],e=n[1]):null!=t.x?(r=t,t=r.x,e=r.y):null!=t.left&&(i=t,t=i.left,e=i.top)),this.x=t||0,this.y=e||0}return t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.subtract=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.multiply=function(e){return new t(this.x*e,this.y*e)},t.prototype.divide=function(e){return new t(this.x/e,this.y/e)},t.prototype.average=function(){return(this.x+this.y)/2},t.prototype.toString=function(){return""+this.x+", "+this.y},t}(),e.exports=n},{}],7:[function(t,e){var n;n=function(){function t(){}return t.CATEGORIES=["tracker","calibration","hertbeat"],t.STATUSCODE_SUCCESS=200,t.STATUSCODE_NOT_FOUND=400,t.STATUSCODE_FAILURE=500,t.STATUSCODE_CALIBRATION_UPDATE=800,t.STATUSCODE_SCREEN_UPDATE=801,t.STATUSCODE_TRACKER_UPDATE=802,t.MUTABLE_CONFIG_KEYS=["version","push","screenindex","screenresw","screenresh","screenpsyw","screenpsyh"],t.CONFIG_KEYS=t.MUTABLE_CONFIG_KEYS.concat(["heartbeatinterval","trackerstate","framerate","iscalibrated","iscalibrating","calibresult"]),t.PROPERTY_KEYS=t.CONFIG_KEYS.concat(["frame"]),t.TRACKER_CONNECTED=0,t.TRACKER_NOT_CONNECTED=1,t.TRACKER_CONNECTED_BADFW=2,t.TRACKER_CONNECTED_NOUSB3=3,t.TRACKER_CONNECTED_NOSTREAM=4,t.prototype.request=function(t,e,n){return JSON.stringify({category:t,request:e,values:n})},t.prototype.response=function(){return{category:category,request:request,values:values}},t}(),e.exports=n},{}],8:[function(t,e){var n,r,i,o,u,s,a,c={}.hasOwnProperty,l=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};a=t("underscore"),n=t("./connection"),o=t("./heartbeat"),u=t("./protocol"),i=t("./gazedata"),r=t("events").EventEmitter,s=function(t){function e(t){null==t&&(t={}),this.config=a.defaults(t,r),this.heartbeat=new o(this)}var r,s,c,f;return l(e,t),r={version:1,push:!0},e.prototype.connect=function(t){var e;return null==t&&(t=this.config),e=this,null==this.connection&&(this.connection=new n(t).connect().on("tracker",function(){return c.apply(e,arguments)}).on("connect",function(){return s.apply(e,arguments)}).on("disconnect",function(){return f.apply(e,arguments)})),this},s=function(){return this.set(this.config),this.get(u.CONFIG_KEYS,function(t){return a.extend(this.config,t)}),this.heartbeat.start(),this.emit("connect")},f=function(t,e){return this.emit("disconnect",t,e),this.removeAllListeners("__values__")},e.prototype.disconnect=function(){var t;return null!=(t=this.connection)&&t.disconnect(),delete this.connection},c=function(t){var e,n,r,o;if("get"===t.request&&null!=t.values){e=t.values.frame,this.frame=e?new i(e):void 0,this.emit("__values__",t.values),o=t.values;for(n in o)r=o[n],"frame"!==n&&this.emit(n,r);if(this.frame)return this.emit("frame",this.frame)}},e.prototype.set=function(t){return t=a.pick(t,u.MUTABLE_CONFIG_KEYS),this.connection.send({category:"tracker",request:"set",values:t}),this},e.prototype.get=function(t,e){var n,r;if(a.isString(t)&&(!function(n){return(t={})[n]=e}(t),e=void 0),a.isArray(t))null!=e&&(r=function(t){return e.call(this,t)?this.removeListener("__values__",r):void 0},this.on("__values__",r));else{for(n in t)e=t[n],e&&this.once(n,e);t=a.keys(t)}return this.connection.send({category:"tracker",request:"get",values:t}),this},e.prototype.loop=function(t){return this.on("frame",t).connect()},e}(r),e.exports=s},{"./connection":1,"./gazedata":2,"./heartbeat":4,"./protocol":7,events:10,underscore:11}],9:[function(t,e){e.exports={full:"0.1.4",major:0,minor:1,dot:4}},{}],10:[function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,a,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],u(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];n.apply(this,s)}else if(o(n)){for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];for(c=n.slice(),i=c.length,a=0;i>a;a++)c[a].apply(this,s)}return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=u(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,u,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],u=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=u;s-->0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?r(t._events[e])?1:t._events[e].length:0}},{}],11:[function(t,e,n){(function(){var t=this,r=t._,i=Array.prototype,o=Object.prototype,u=Function.prototype,s=i.push,a=i.slice,c=i.concat,l=o.toString,f=o.hasOwnProperty,h=Array.isArray,p=Object.keys,v=u.bind,g=function(t){return t instanceof g?t:this instanceof g?void(this._wrapped=t):new g(t)};"undefined"!=typeof n?("undefined"!=typeof e&&e.exports&&(n=e.exports=g),n._=g):t._=g,g.VERSION="1.7.0";var y=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}};g.iteratee=function(t,e,n){return null==t?g.identity:g.isFunction(t)?y(t,e,n):g.isObject(t)?g.matches(t):g.property(t)},g.each=g.forEach=function(t,e,n){if(null==t)return t;e=y(e,n);var r,i=t.length;if(i===+i)for(r=0;i>r;r++)e(t[r],r,t);else{var o=g.keys(t);for(r=0,i=o.length;i>r;r++)e(t[o[r]],o[r],t)}return t},g.map=g.collect=function(t,e,n){if(null==t)return[];e=g.iteratee(e,n);for(var r,i=t.length!==+t.length&&g.keys(t),o=(i||t).length,u=Array(o),s=0;o>s;s++)r=i?i[s]:s,u[s]=e(t[r],r,t);return u};var m="Reduce of empty array with no initial value";g.reduce=g.foldl=g.inject=function(t,e,n,r){null==t&&(t=[]),e=y(e,r,4);var i,o=t.length!==+t.length&&g.keys(t),u=(o||t).length,s=0;if(arguments.length<3){if(!u)throw new TypeError(m);n=t[o?o[s++]:s++]}for(;u>s;s++)i=o?o[s]:s,n=e(n,t[i],i,t);return n},g.reduceRight=g.foldr=function(t,e,n,r){null==t&&(t=[]),e=y(e,r,4);var i,o=t.length!==+t.length&&g.keys(t),u=(o||t).length;if(arguments.length<3){if(!u)throw new TypeError(m);n=t[o?o[--u]:--u]}for(;u--;)i=o?o[u]:u,n=e(n,t[i],i,t);return n},g.find=g.detect=function(t,e,n){var r;return e=g.iteratee(e,n),g.some(t,function(t,n,i){return e(t,n,i)?(r=t,!0):void 0}),r},g.filter=g.select=function(t,e,n){var r=[];return null==t?r:(e=g.iteratee(e,n),g.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r)},g.reject=function(t,e,n){return g.filter(t,g.negate(g.iteratee(e)),n)},g.every=g.all=function(t,e,n){if(null==t)return!0;e=g.iteratee(e,n);var r,i,o=t.length!==+t.length&&g.keys(t),u=(o||t).length;for(r=0;u>r;r++)if(i=o?o[r]:r,!e(t[i],i,t))return!1;return!0},g.some=g.any=function(t,e,n){if(null==t)return!1;e=g.iteratee(e,n);var r,i,o=t.length!==+t.length&&g.keys(t),u=(o||t).length;for(r=0;u>r;r++)if(i=o?o[r]:r,e(t[i],i,t))return!0;return!1},g.contains=g.include=function(t,e){return null==t?!1:(t.length!==+t.length&&(t=g.values(t)),g.indexOf(t,e)>=0)},g.invoke=function(t,e){var n=a.call(arguments,2),r=g.isFunction(e);return g.map(t,function(t){return(r?e:t[e]).apply(t,n)})},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matches(e))},g.findWhere=function(t,e){return g.find(t,g.matches(e))},g.max=function(t,e,n){var r,i,o=-1/0,u=-1/0;if(null==e&&null!=t){t=t.length===+t.length?t:g.values(t);for(var s=0,a=t.length;a>s;s++)r=t[s],r>o&&(o=r)}else e=g.iteratee(e,n),g.each(t,function(t,n,r){i=e(t,n,r),(i>u||i===-1/0&&o===-1/0)&&(o=t,u=i)});return o},g.min=function(t,e,n){var r,i,o=1/0,u=1/0;if(null==e&&null!=t){t=t.length===+t.length?t:g.values(t);for(var s=0,a=t.length;a>s;s++)r=t[s],o>r&&(o=r)}else e=g.iteratee(e,n),g.each(t,function(t,n,r){i=e(t,n,r),(u>i||1/0===i&&1/0===o)&&(o=t,u=i)});return o},g.shuffle=function(t){for(var e,n=t&&t.length===+t.length?t:g.values(t),r=n.length,i=Array(r),o=0;r>o;o++)e=g.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},g.sample=function(t,e,n){return null==e||n?(t.length!==+t.length&&(t=g.values(t)),t[g.random(t.length-1)]):g.shuffle(t).slice(0,Math.max(0,e))},g.sortBy=function(t,e,n){return e=g.iteratee(e,n),g.pluck(g.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index-e.index}),"value")};var d=function(t){return function(e,n,r){var i={};return n=g.iteratee(n,r),g.each(e,function(r,o){var u=n(r,o,e);t(i,r,u)}),i}};g.groupBy=d(function(t,e,n){g.has(t,n)?t[n].push(e):t[n]=[e]}),g.indexBy=d(function(t,e,n){t[n]=e}),g.countBy=d(function(t,e,n){g.has(t,n)?t[n]++:t[n]=1}),g.sortedIndex=function(t,e,n,r){n=g.iteratee(n,r,1);for(var i=n(e),o=0,u=t.length;u>o;){var s=o+u>>>1;n(t[s])<i?o=s+1:u=s}return o},g.toArray=function(t){return t?g.isArray(t)?a.call(t):t.length===+t.length?g.map(t,g.identity):g.values(t):[]},g.size=function(t){return null==t?0:t.length===+t.length?t.length:g.keys(t).length},g.partition=function(t,e,n){e=g.iteratee(e,n);var r=[],i=[];return g.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},g.first=g.head=g.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:0>e?[]:a.call(t,0,e)},g.initial=function(t,e,n){return a.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},g.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:a.call(t,Math.max(t.length-e,0))},g.rest=g.tail=g.drop=function(t,e,n){return a.call(t,null==e||n?1:e)},g.compact=function(t){return g.filter(t,g.identity)};var _=function(t,e,n,r){if(e&&g.every(t,g.isArray))return c.apply(r,t);for(var i=0,o=t.length;o>i;i++){var u=t[i];g.isArray(u)||g.isArguments(u)?e?s.apply(r,u):_(u,e,n,r):n||r.push(u)}return r};g.flatten=function(t,e){return _(t,e,!1,[])},g.without=function(t){return g.difference(t,a.call(arguments,1))},g.uniq=g.unique=function(t,e,n,r){if(null==t)return[];g.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=g.iteratee(n,r));for(var i=[],o=[],u=0,s=t.length;s>u;u++){var a=t[u];if(e)u&&o===a||i.push(a),o=a;else if(n){var c=n(a,u,t);g.indexOf(o,c)<0&&(o.push(c),i.push(a))}else g.indexOf(i,a)<0&&i.push(a)}return i},g.union=function(){return g.uniq(_(arguments,!0,!0,[]))},g.intersection=function(t){if(null==t)return[];for(var e=[],n=arguments.length,r=0,i=t.length;i>r;r++){var o=t[r];if(!g.contains(e,o)){for(var u=1;n>u&&g.contains(arguments[u],o);u++);u===n&&e.push(o)}}return e},g.difference=function(t){var e=_(a.call(arguments,1),!0,!0,[]);return g.filter(t,function(t){return!g.contains(e,t)})},g.zip=function(t){if(null==t)return[];for(var e=g.max(arguments,"length").length,n=Array(e),r=0;e>r;r++)n[r]=g.pluck(arguments,r);return n},g.object=function(t,e){if(null==t)return{};for(var n={},r=0,i=t.length;i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},g.indexOf=function(t,e,n){if(null==t)return-1;var r=0,i=t.length;if(n){if("number"!=typeof n)return r=g.sortedIndex(t,e),t[r]===e?r:-1;r=0>n?Math.max(0,i+n):n}for(;i>r;r++)if(t[r]===e)return r;return-1},g.lastIndexOf=function(t,e,n){if(null==t)return-1;var r=t.length;for("number"==typeof n&&(r=0>n?r+n+1:Math.min(r,n+1));--r>=0;)if(t[r]===e)return r;return-1},g.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;r>o;o++,t+=n)i[o]=t;return i};var E=function(){};g.bind=function(t,e){var n,r;if(v&&t.bind===v)return v.apply(t,a.call(arguments,1));if(!g.isFunction(t))throw new TypeError("Bind must be called on a function");return n=a.call(arguments,2),r=function(){if(!(this instanceof r))return t.apply(e,n.concat(a.call(arguments)));E.prototype=t.prototype;var i=new E;E.prototype=null;var o=t.apply(i,n.concat(a.call(arguments)));return g.isObject(o)?o:i}},g.partial=function(t){var e=a.call(arguments,1);return function(){for(var n=0,r=e.slice(),i=0,o=r.length;o>i;i++)r[i]===g&&(r[i]=arguments[n++]);for(;n<arguments.length;)r.push(arguments[n++]);return t.apply(this,r)}},g.bindAll=function(t){var e,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(e=1;r>e;e++)n=arguments[e],t[n]=g.bind(t[n],t);return t},g.memoize=function(t,e){var n=function(r){var i=n.cache,o=e?e.apply(this,arguments):r;return g.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},g.delay=function(t,e){var n=a.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},g.defer=function(t){return g.delay.apply(g,[t,1].concat(a.call(arguments,1)))},g.throttle=function(t,e,n){var r,i,o,u=null,s=0;n||(n={});var a=function(){s=n.leading===!1?0:g.now(),u=null,o=t.apply(r,i),u||(r=i=null)};return function(){var c=g.now();s||n.leading!==!1||(s=c);var l=e-(c-s);return r=this,i=arguments,0>=l||l>e?(clearTimeout(u),u=null,s=c,o=t.apply(r,i),u||(r=i=null)):u||n.trailing===!1||(u=setTimeout(a,l)),o}},g.debounce=function(t,e,n){var r,i,o,u,s,a=function(){var c=g.now()-u;e>c&&c>0?r=setTimeout(a,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,u=g.now();var c=n&&!r;return r||(r=setTimeout(a,e)),c&&(s=t.apply(o,i),o=i=null),s}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},g.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},g.before=function(t,e){var n;return function(){return--t>0?n=e.apply(this,arguments):e=null,n}},g.once=g.partial(g.before,2),g.keys=function(t){if(!g.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)g.has(t,n)&&e.push(n);return e},g.values=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=t[e[i]];return r},g.pairs=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=[e[i],t[e[i]]];return r},g.invert=function(t){for(var e={},n=g.keys(t),r=0,i=n.length;i>r;r++)e[t[n[r]]]=n[r];return e},g.functions=g.methods=function(t){var e=[];for(var n in t)g.isFunction(t[n])&&e.push(n);return e.sort()},g.extend=function(t){if(!g.isObject(t))return t;for(var e,n,r=1,i=arguments.length;i>r;r++){e=arguments[r];for(n in e)f.call(e,n)&&(t[n]=e[n])}return t},g.pick=function(t,e,n){var r,i={};if(null==t)return i;if(g.isFunction(e)){e=y(e,n);for(r in t){var o=t[r];e(o,r,t)&&(i[r]=o)}}else{var u=c.apply([],a.call(arguments,1));t=new Object(t);for(var s=0,l=u.length;l>s;s++)r=u[s],r in t&&(i[r]=t[r])}return i},g.omit=function(t,e,n){if(g.isFunction(e))e=g.negate(e);else{var r=g.map(c.apply([],a.call(arguments,1)),String);e=function(t,e){return!g.contains(r,e)}}return g.pick(t,e,n)},g.defaults=function(t){if(!g.isObject(t))return t;for(var e=1,n=arguments.length;n>e;e++){var r=arguments[e];for(var i in r)void 0===t[i]&&(t[i]=r[i])}return t},g.clone=function(t){return g.isObject(t)?g.isArray(t)?t.slice():g.extend({},t):t},g.tap=function(t,e){return e(t),t};var w=function(t,e,n,r){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof g&&(t=t._wrapped),e instanceof g&&(e=e._wrapped);var i=l.call(t);if(i!==l.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}if("object"!=typeof t||"object"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]===t)return r[o]===e;var u=t.constructor,s=e.constructor;if(u!==s&&"constructor"in t&&"constructor"in e&&!(g.isFunction(u)&&u instanceof u&&g.isFunction(s)&&s instanceof s))return!1;n.push(t),r.push(e);var a,c;if("[object Array]"===i){if(a=t.length,c=a===e.length)for(;a--&&(c=w(t[a],e[a],n,r)););}else{var f,h=g.keys(t);if(a=h.length,c=g.keys(e).length===a)for(;a--&&(f=h[a],c=g.has(e,f)&&w(t[f],e[f],n,r)););}return n.pop(),r.pop(),c};g.isEqual=function(t,e){return w(t,e,[],[])},g.isEmpty=function(t){if(null==t)return!0;if(g.isArray(t)||g.isString(t)||g.isArguments(t))return 0===t.length;for(var e in t)if(g.has(t,e))return!1;return!0},g.isElement=function(t){return!(!t||1!==t.nodeType)},g.isArray=h||function(t){return"[object Array]"===l.call(t)},g.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},g.each(["Arguments","Function","String","Number","Date","RegExp"],function(t){g["is"+t]=function(e){return l.call(e)==="[object "+t+"]"}}),g.isArguments(arguments)||(g.isArguments=function(t){return g.has(t,"callee")}),"function"!=typeof/./&&(g.isFunction=function(t){return"function"==typeof t||!1}),g.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},g.isNaN=function(t){return g.isNumber(t)&&t!==+t},g.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===l.call(t)},g.isNull=function(t){return null===t},g.isUndefined=function(t){return void 0===t},g.has=function(t,e){return null!=t&&f.call(t,e)},g.noConflict=function(){return t._=r,this},g.identity=function(t){return t},g.constant=function(t){return function(){return t}},g.noop=function(){},g.property=function(t){return function(e){return e[t]}},g.matches=function(t){var e=g.pairs(t),n=e.length;return function(t){if(null==t)return!n;t=new Object(t);for(var r=0;n>r;r++){var i=e[r],o=i[0];if(i[1]!==t[o]||!(o in t))return!1}return!0}},g.times=function(t,e,n){var r=Array(Math.max(0,t));e=y(e,n,1);for(var i=0;t>i;i++)r[i]=e(i);return r},g.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},g.now=Date.now||function(){return(new Date).getTime()};var b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=g.invert(b),x=function(t){var e=function(e){return t[e]},n="(?:"+g.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};g.escape=x(b),g.unescape=x(T),g.result=function(t,e){if(null==t)return void 0;var n=t[e];return g.isFunction(n)?t[e]():n};var A=0;g.uniqueId=function(t){var e=++A+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var S=/(.)^/,C={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,k=function(t){return"\\"+C[t]};g.template=function(t,e,n){!e&&n&&(e=n),e=g.defaults({},e,g.templateSettings);var r=RegExp([(e.escape||S).source,(e.interpolate||S).source,(e.evaluate||S).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,u,s){return o+=t.slice(i,s).replace(O,k),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":u&&(o+="';\n"+u+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var u=new Function(e.variable||"obj","_",o)}catch(s){throw s.source=o,s}var a=function(t){return u.call(this,t,g)},c=e.variable||"obj";return a.source="function("+c+"){\n"+o+"}",a},g.chain=function(t){var e=g(t);return e._chain=!0,e};var N=function(t){return this._chain?g(t).chain():t};g.mixin=function(t){g.each(g.functions(t),function(e){var n=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),N.call(this,n.apply(g,t))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=i[t];g.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],N.call(this,n)}}),g.each(["concat","join","slice"],function(t){var e=i[t];g.prototype[t]=function(){return N.call(this,e.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return g})}).call(this)},{}],12:[function(t){window.EyeTribe=t("../lib/index")},{"../lib/index":5}]},{},[12]);