UNPKG

forerunnerdb

Version:

A NoSQL document store database for browsers and Node.js.

19 lines 67.8 kB
/*! * Astrobench - 0.1.2 * Library for JavaScript benchmarks based on Benchmark.js * * https://github.com/kupriyanenko/astrobench * * Copyright Alexey Kupriyanenko <a.kupriyanenko@gmail.com> * Released under the MIT license. */ !function n(t,e,r){function i(u,a){if(!e[u]){if(!t[u]){var c="function"==typeof require&&require;if(!a&&c)return c(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=e[u]={exports:{}};t[u][0].call(l.exports,function(n){var e=t[u][1][n];return i(e?e:n)},l,l.exports,n,t,e,r)}return e[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(n,t){/*! * jBone v1.0.16 - 2014-05-07 - Library for DOM manipulation * * https://github.com/kupriyanenko/jbone * * Copyright 2014 Alexey Kupriyanenko * Released under the MIT license. */ !function(n){function e(t){var e=t.length,r=typeof t;return m(r)||t===n?!1:1===t.nodeType&&e?!0:g(r)||0===e||"number"==typeof e&&e>0&&e-1 in t}function r(n,t){var e,r;this.originalEvent=n,r=function(n,t){this[n]="preventDefault"===n?function(){return this.defaultPrevented=!0,t[n]()}:m(t[n])?function(){return t[n]()}:t[n]};for(e in n)(n[e]||"function"==typeof n[e])&&r.call(this,e,n);v.extend(this,t)}var i,o=n.$,u=n.jBone,a=/^<(\w+)\s*\/?>$/,c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,l=[].slice,s=[].splice,f=Object.keys,p=document,h=function(n){return"string"==typeof n},d=function(n){return n instanceof Object},m=function(n){var t={};return n&&"[object Function]"===t.toString.call(n)},g=function(n){return Array.isArray(n)},v=function(n,t){return new i.init(n,t)};v.noConflict=function(){return n.$=o,n.jBone=u,v},i=v.fn=v.prototype={init:function(n,t){var e,r,i,o;if(!n)return this;if(h(n)){if(r=a.exec(n))return this[0]=p.createElement(r[1]),this.length=1,d(t)&&this.attr(t),this;if((r=c.exec(n))&&r[1]){for(o=p.createDocumentFragment(),i=p.createElement("div"),i.innerHTML=n;i.lastChild;)o.appendChild(i.firstChild);return e=l.call(o.childNodes),v.merge(this,e)}if(v.isElement(t))return v(t).find(n);try{return e=p.querySelectorAll(n),v.merge(this,e)}catch(u){return this}}return n.nodeType?(this[0]=n,this.length=1,this):m(n)?n():n instanceof v?n:v.makeArray(n,this)},pop:[].pop,push:[].push,reverse:[].reverse,shift:[].shift,sort:[].sort,splice:[].splice,slice:[].slice,indexOf:[].indexOf,forEach:[].forEach,unshift:[].unshift,concat:[].concat,join:[].join,every:[].every,some:[].some,filter:[].filter,map:[].map,reduce:[].reduce,reduceRight:[].reduceRight,length:0},i.constructor=v,i.init.prototype=i,v.setId=function(t){var e=t.jid;t===n?e="window":void 0===t.jid&&(t.jid=e=++v._cache.jid),v._cache.events[e]||(v._cache.events[e]={})},v.getData=function(t){t=t instanceof v?t[0]:t;var e=t===n?"window":t.jid;return{jid:e,events:v._cache.events[e]}},v.isElement=function(n){return n&&n instanceof v||n instanceof HTMLElement||h(n)},v._cache={events:{},jid:0},v.merge=function(n,t){for(var e=t.length,r=n.length,i=0;e>i;)n[r++]=t[i++];return n.length=r,n},v.contains=function(n,t){var e;return n.reverse().some(function(n){return n.contains(t)?e=n:void 0}),e},v.extend=function(n){var t,e,r,i;return s.call(arguments,1).forEach(function(o){if(o)for(t=f(o),e=t.length,r=0,i=n;e>r;r++)i[t[r]]=o[t[r]]}),n},v.makeArray=function(n,t){var r=t||[];return null!==n&&(e(n)?v.merge(r,h(n)?[n]:n):r.push(n)),r},v.Event=function(n,t){var e,r;return n.type&&!t&&(t=n,n=n.type),e=n.split(".").splice(1).join("."),r=n.split(".")[0],n=p.createEvent("Event"),n.initEvent(r,!0,!0),v.extend(n,{namespace:e,isDefaultPrevented:function(){return n.defaultPrevented}},t)},i.on=function(n){var t,e,i,o,u,a,c,l,s=arguments,f=this.length,p=0;for(2===s.length?t=s[1]:(e=s[1],t=s[2]),l=function(l){v.setId(l),u=v.getData(l).events,n.split(" ").forEach(function(n){a=n.split(".")[0],i=n.split(".").splice(1).join("."),u[a]=u[a]||[],o=function(n){n.namespace&&n.namespace!==i||(c=null,e?(~v(l).find(e).indexOf(n.target)||(c=v.contains(v(l).find(e),n.target)))&&(c=c||n.target,n=new r(n,{currentTarget:c}),t.call(c,n)):t.call(l,n))},u[a].push({namespace:i,fn:o,originfn:t}),l.addEventListener&&l.addEventListener(a,o,!1)})};f>p;p++)l(this[p]);return this},i.one=function(n){var t,e,r,i=arguments,o=0,u=this.length;for(2===i.length?t=i[1]:(e=i[1],t=i[2]),r=function(r){n.split(" ").forEach(function(n){var i=function(e){v(r).off(n,i),t.call(r,e)};e?v(r).on(n,e,i):v(r).on(n,i)})};u>o;o++)r(this[o]);return this},i.trigger=function(n){var t,e=[],r=0,i=this.length;if(!n)return this;for(h(n)?e=n.split(" ").map(function(n){return v.Event(n)}):(n=n instanceof Event?n:v.Event(n),e=[n]),t=function(n){e.forEach(function(t){t.type&&n.dispatchEvent&&n.dispatchEvent(t)})};i>r;r++)t(this[r]);return this},i.off=function(n,t){var e,r,i,o,u=0,a=this.length,c=function(n,e,r,i,o){var u;(t&&o.originfn===t||!t)&&(u=o.fn),n[e][r].fn===u&&(i.removeEventListener(e,u),v._cache.events[v.getData(i).jid][e].splice(r,1))};for(i=function(t){var i,u,a;return(e=v.getData(t).events)?!n&&e?f(e).forEach(function(n){for(u=e[n],i=u.length;i--;)c(e,n,i,t,u[i])}):void n.split(" ").forEach(function(n){if(o=n.split(".")[0],r=n.split(".").splice(1).join("."),e[o])for(u=e[o],i=u.length;i--;)a=u[i],(!r||r&&a.namespace===r)&&c(e,o,i,t,a);else r&&f(e).forEach(function(n){for(u=e[n],i=u.length;i--;)a=u[i],a.namespace.split(".")[0]===r.split(".")[0]&&c(e,n,i,t,a)})}):void 0};a>u;u++)i(this[u]);return this},i.find=function(n){for(var t=[],e=0,r=this.length,i=function(e){m(e.querySelectorAll)&&[].forEach.call(e.querySelectorAll(n),function(n){t.push(n)})};r>e;e++)i(this[e]);return v(t)},i.get=function(n){return this[n]},i.eq=function(n){return v(this[n])},i.parent=function(){for(var n,t=[],e=0,r=this.length;r>e;e++)!~t.indexOf(n=this[e].parentElement)&&n&&t.push(n);return v(t)},i.toArray=function(){return l.call(this)},i.is=function(){var n=arguments;return this.some(function(t){return t.tagName.toLowerCase()===n[0]})},i.has=function(){var n=arguments;return this.some(function(t){return t.querySelectorAll(n[0]).length})},i.attr=function(n,t){var e,r=arguments,i=0,o=this.length;if(h(n)&&1===r.length)return this[0]&&this[0].getAttribute(n);for(2===r.length?e=function(e){e.setAttribute(n,t)}:d(n)&&(e=function(t){f(n).forEach(function(e){t.setAttribute(e,n[e])})});o>i;i++)e(this[i]);return this},i.val=function(n){var t=0,e=this.length;if(0===arguments.length)return this[0]&&this[0].value;for(;e>t;t++)this[t].value=n;return this},i.css=function(t,e){var r,i=arguments,o=0,u=this.length;if(h(t)&&1===i.length)return this[0]&&n.getComputedStyle(this[0])[t];for(2===i.length?r=function(n){n.style[t]=e}:d(t)&&(r=function(n){f(t).forEach(function(e){n.style[e]=t[e]})});u>o;o++)r(this[o]);return this},i.data=function(n,t){var e,r=arguments,i={},o=0,u=this.length,a=function(n,t,e){d(e)?(n.jdata=n.jdata||{},n.jdata[t]=e):n.dataset[t]=e},c=function(n){return"true"===n?!0:"false"===n?!1:n};if(0===r.length)return this[0].jdata&&(i=this[0].jdata),f(this[0].dataset).forEach(function(n){i[n]=c(this[0].dataset[n])},this),i;if(1===r.length&&h(n))return this[0]&&c(this[0].dataset[n]||this[0].jdata&&this[0].jdata[n]);for(1===r.length&&d(n)?e=function(t){f(n).forEach(function(e){a(t,e,n[e])})}:2===r.length&&(e=function(e){a(e,n,t)});u>o;o++)e(this[o]);return this},i.html=function(n){var t,e=arguments;return 1===e.length&&void 0!==n?this.empty().append(n):0===e.length&&(t=this[0])?t.innerHTML:this},i.append=function(n){var t,e=0,r=this.length;for(h(n)&&c.exec(n)?n=v(n):d(n)||(n=document.createTextNode(n)),n instanceof Node?t=function(t){t.appendChild(n)}:(n=n instanceof v?n:v(n),t=function(t,e){n.forEach(function(n){t.appendChild(e?n.cloneNode():n)})});r>e;e++)t(this[e],e);return this},i.appendTo=function(n){return v(n).append(this),this},i.empty=function(){for(var n,t=0,e=this.length;e>t;t++)for(n=this[t];n.lastChild;)n.removeChild(n.lastChild);return this},i.remove=function(){var n,t=0,e=this.length;for(this.off();e>t;t++)n=this[t],delete n.jdata,n.parentNode&&n.parentNode.removeChild(n);return this},"object"==typeof t&&t&&"object"==typeof t.exports?t.exports=v:"function"==typeof define&&define.amd?(define(function(){return v}),n.jBone=n.$=v):"object"==typeof n&&"object"==typeof n.document&&(n.jBone=n.$=v)}(window)},{}],2:[function(n,t,e){(function(n){(function(){function r(n,t,e){for(var r=(e||0)-1,i=n?n.length:0;++r<i;)if(n[r]===t)return r;return-1}function i(n,t){var e=typeof t;if(n=n.cache,"boolean"==e||null==t)return n[t]?0:-1;"number"!=e&&"string"!=e&&(e="object");var i="number"==e?t:_+t;return n=(n=n[e])&&n[i],"object"==e?n&&r(n,t)>-1?0:-1:n?0:-1}function o(n){var t=this.cache,e=typeof n;if("boolean"==e||null==n)t[n]=!0;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:_+n,i=t[e]||(t[e]={});"object"==e?(i[r]||(i[r]=[])).push(n):i[r]=!0}}function u(n){return n.charCodeAt(0)}function a(n,t){for(var e=n.criteria,r=t.criteria,i=-1,o=e.length;++i<o;){var u=e[i],a=r[i];if(u!==a){if(u>a||"undefined"==typeof u)return 1;if(a>u||"undefined"==typeof a)return-1}}return n.index-t.index}function c(n){var t=-1,e=n.length,r=n[0],i=n[e/2|0],u=n[e-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var a=f();a["false"]=a["null"]=a["true"]=a.undefined=!1;var c=f();for(c.array=n,c.cache=a,c.push=o;++t<e;)c.push(n[t]);return c}function l(n){return"\\"+G[n]}function s(){return v.pop()||[]}function f(){return y.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function p(n){n.length=0,v.length<j&&v.push(n)}function h(n){var t=n.cache;t&&h(t),n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null,y.length<j&&y.push(n)}function d(n,t,e){t||(t=0),"undefined"==typeof e&&(e=n?n.length:0);for(var r=-1,i=e-t||0,o=Array(0>i?0:i);++r<i;)o[r]=n[t+r];return o}function m(n){function t(n){return n&&"object"==typeof n&&!Qr(n)&&Fr.call(n,"__wrapped__")?n:new e(n)}function e(n,t){this.__chain__=!!t,this.__wrapped__=n}function o(n){function t(){if(r){var n=d(r);Nr.apply(n,arguments)}if(this instanceof t){var o=y(e.prototype),u=e.apply(o,n||arguments);return Tt(u)?u:o}return e.apply(i,n||arguments)}var e=n[0],r=n[2],i=n[4];return Gr(t,n),t}function v(n,t,e,r,i){if(e){var o=e(n);if("undefined"!=typeof o)return o}var u=Tt(n);if(!u)return n;var a=Sr.call(n);if(!U[a])return n;var c=Vr[a];switch(a){case R:case P:return new c(+n);case M:case H:return new c(n);case K:return o=c(n.source,O.exec(n)),o.lastIndex=n.lastIndex,o}var l=Qr(n);if(t){var f=!r;r||(r=s()),i||(i=s());for(var h=r.length;h--;)if(r[h]==n)return i[h];o=l?c(n.length):{}}else o=l?d(n):ii({},n);return l&&(Fr.call(n,"index")&&(o.index=n.index),Fr.call(n,"input")&&(o.input=n.input)),t?(r.push(n),i.push(o),(l?Gt:ai)(n,function(n,u){o[u]=v(n,t,e,r,i)}),f&&(p(r),p(i)),o):o}function y(n){return Tt(n)?Rr(n):{}}function j(n,t,e){if("function"!=typeof n)return Qe;if("undefined"==typeof t||!("prototype"in n))return n;var r=n.__bindData__;if("undefined"==typeof r&&(Zr.funcNames&&(r=!n.name),r=r||!Zr.funcDecomp,!r)){var i=Ar.call(n);Zr.funcNames||(r=!E.test(i)),r||(r=F.test(i),Gr(n,r))}if(r===!1||r!==!0&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,i){return n.call(t,e,r,i)};case 4:return function(e,r,i,o){return n.call(t,e,r,i,o)}}return Ne(n,t)}function G(n){function t(){var n=c?u:this;if(i){var h=d(i);Nr.apply(h,arguments)}if((o||s)&&(h||(h=d(arguments)),o&&Nr.apply(h,o),s&&h.length<a))return r|=16,G([e,f?r:-4&r,h,null,u,a]);if(h||(h=arguments),l&&(e=n[p]),this instanceof t){n=y(e.prototype);var m=e.apply(n,h);return Tt(m)?m:n}return e.apply(n,h)}var e=n[0],r=n[1],i=n[2],o=n[3],u=n[4],a=n[5],c=1&r,l=2&r,s=4&r,f=8&r,p=e;return Gr(t,n),t}function X(n,t){var e=-1,o=ct(),u=n?n.length:0,a=u>=w&&o===r,l=[];if(a){var s=c(t);s?(o=i,t=s):a=!1}for(;++e<u;){var f=n[e];o(t,f)<0&&l.push(f)}return a&&h(t),l}function Y(n,t,e,r){for(var i=(r||0)-1,o=n?n.length:0,u=[];++i<o;){var a=n[i];if(a&&"object"==typeof a&&"number"==typeof a.length&&(Qr(a)||pt(a))){t||(a=Y(a,t,e));var c=-1,l=a.length,s=u.length;for(u.length+=l;++c<l;)u[s++]=a[c]}else e||u.push(a)}return u}function nt(n,t,e,r,i,o){if(e){var u=e(n,t);if("undefined"!=typeof u)return!!u}if(n===t)return 0!==n||1/n==1/t;var a=typeof n,c=typeof t;if(!(n!==n||n&&Z[a]||t&&Z[c]))return!1;if(null==n||null==t)return n===t;var l=Sr.call(n),f=Sr.call(t);if(l==q&&(l=W),f==q&&(f=W),l!=f)return!1;switch(l){case R:case P:return+n==+t;case M:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case K:case H:return n==wr(t)}var h=l==L;if(!h){var d=Fr.call(n,"__wrapped__"),m=Fr.call(t,"__wrapped__");if(d||m)return nt(d?n.__wrapped__:n,m?t.__wrapped__:t,e,r,i,o);if(l!=W)return!1;var g=n.constructor,v=t.constructor;if(g!=v&&!(Et(g)&&g instanceof g&&Et(v)&&v instanceof v)&&"constructor"in n&&"constructor"in t)return!1}var y=!i;i||(i=s()),o||(o=s());for(var b=i.length;b--;)if(i[b]==n)return o[b]==t;var _=0;if(u=!0,i.push(n),o.push(t),h){if(b=n.length,_=t.length,u=_==b,u||r)for(;_--;){var w=b,j=t[_];if(r)for(;w--&&!(u=nt(n[w],j,e,r,i,o)););else if(!(u=nt(n[_],j,e,r,i,o)))break}}else ui(t,function(t,a,c){return Fr.call(c,a)?(_++,u=Fr.call(n,a)&&nt(n[a],t,e,r,i,o)):void 0}),u&&!r&&ui(n,function(n,t,e){return Fr.call(e,t)?u=--_>-1:void 0});return i.pop(),o.pop(),y&&(p(i),p(o)),u}function tt(n,t,e,r,i){(Qr(t)?Gt:ai)(t,function(t,o){var u,a,c=t,l=n[o];if(t&&((a=Qr(t))||ci(t))){for(var s=r.length;s--;)if(u=r[s]==t){l=i[s];break}if(!u){var f;e&&(c=e(l,t),(f="undefined"!=typeof c)&&(l=c)),f||(l=a?Qr(l)?l:[]:ci(l)?l:{}),r.push(t),i.push(l),f||tt(l,t,e,r,i)}}else e&&(c=e(l,t),"undefined"==typeof c&&(c=t)),"undefined"!=typeof c&&(l=c);n[o]=l})}function rt(n,t){return n+Tr(Jr()*(t-n+1))}function it(n,t,e){var o=-1,u=ct(),a=n?n.length:0,l=[],f=!t&&a>=w&&u===r,d=e||f?s():l;if(f){var m=c(d);u=i,d=m}for(;++o<a;){var g=n[o],v=e?e(g,o,n):g;(t?!o||d[d.length-1]!==v:u(d,v)<0)&&((e||f)&&d.push(v),l.push(g))}return f?(p(d.array),h(d)):e&&p(d),l}function ot(n){return function(e,r,i){var o={};r=t.createCallback(r,i,3);var u=-1,a=e?e.length:0;if("number"==typeof a)for(;++u<a;){var c=e[u];n(o,c,r(c,u,e),e)}else ai(e,function(t,e,i){n(o,t,r(t,e,i),i)});return o}}function ut(n,t,e,r,i,u){var a=1&t,c=2&t,l=4&t,s=16&t,f=32&t;if(!c&&!Et(n))throw new jr;s&&!e.length&&(t&=-17,s=e=!1),f&&!r.length&&(t&=-33,f=r=!1);var p=n&&n.__bindData__;if(p&&p!==!0)return p=d(p),p[2]&&(p[2]=d(p[2])),p[3]&&(p[3]=d(p[3])),!a||1&p[1]||(p[4]=i),!a&&1&p[1]&&(t|=8),!l||4&p[1]||(p[5]=u),s&&Nr.apply(p[2]||(p[2]=[]),e),f&&qr.apply(p[3]||(p[3]=[]),r),p[1]|=t,ut.apply(null,p);var h=1==t||17===t?o:G;return h([n,t,e,r,i,u])}function at(n){return ni[n]}function ct(){var n=(n=t.indexOf)===ve?r:n;return n}function lt(n){return"function"==typeof n&&Cr.test(n)}function st(n){var t,e;return n&&Sr.call(n)==W&&(t=n.constructor,!Et(t)||t instanceof t)?(ui(n,function(n,t){e=t}),"undefined"==typeof e||Fr.call(n,e)):!1}function ft(n){return ti[n]}function pt(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Sr.call(n)==q||!1}function ht(n,t,e,r){return"boolean"!=typeof t&&null!=t&&(r=e,e=t,t=!1),v(n,t,"function"==typeof e&&j(e,r,1))}function dt(n,t,e){return v(n,!0,"function"==typeof t&&j(t,e,1))}function mt(n,t){var e=y(n);return t?ii(e,t):e}function gt(n,e,r){var i;return e=t.createCallback(e,r,3),ai(n,function(n,t,r){return e(n,t,r)?(i=t,!1):void 0}),i}function vt(n,e,r){var i;return e=t.createCallback(e,r,3),bt(n,function(n,t,r){return e(n,t,r)?(i=t,!1):void 0}),i}function yt(n,t,e){var r=[];ui(n,function(n,t){r.push(t,n)});var i=r.length;for(t=j(t,e,3);i--&&t(r[i--],r[i],n)!==!1;);return n}function bt(n,t,e){var r=Yr(n),i=r.length;for(t=j(t,e,3);i--;){var o=r[i];if(t(n[o],o,n)===!1)break}return n}function _t(n){var t=[];return ui(n,function(n,e){Et(n)&&t.push(e)}),t.sort()}function wt(n,t){return n?Fr.call(n,t):!1}function jt(n){for(var t=-1,e=Yr(n),r=e.length,i={};++t<r;){var o=e[t];i[n[o]]=o}return i}function $t(n){return n===!0||n===!1||n&&"object"==typeof n&&Sr.call(n)==R||!1}function xt(n){return n&&"object"==typeof n&&Sr.call(n)==P||!1}function kt(n){return n&&1===n.nodeType||!1}function St(n){var t=!0;if(!n)return t;var e=Sr.call(n),r=n.length;return e==L||e==H||e==q||e==W&&"number"==typeof r&&Et(n.splice)?!r:(ai(n,function(){return t=!1}),t)}function Ct(n,t,e,r){return nt(n,t,"function"==typeof e&&j(e,r,2))}function Ot(n){return zr(n)&&!Mr(parseFloat(n))}function Et(n){return"function"==typeof n}function Tt(n){return!(!n||!Z[typeof n])}function At(n){return Ft(n)&&n!=+n}function Bt(n){return null===n}function Ft(n){return"number"==typeof n||n&&"object"==typeof n&&Sr.call(n)==M||!1}function Nt(n){return n&&"object"==typeof n&&Sr.call(n)==K||!1}function It(n){return"string"==typeof n||n&&"object"==typeof n&&Sr.call(n)==H||!1}function Dt(n){return"undefined"==typeof n}function qt(n,e,r){var i={};return e=t.createCallback(e,r,3),ai(n,function(n,t,r){i[t]=e(n,t,r)}),i}function Lt(n){var t=arguments,e=2;if(!Tt(n))return n;if("number"!=typeof t[2]&&(e=t.length),e>3&&"function"==typeof t[e-2])var r=j(t[--e-1],t[e--],2);else e>2&&"function"==typeof t[e-1]&&(r=t[--e]);for(var i=d(arguments,1,e),o=-1,u=s(),a=s();++o<e;)tt(n,i[o],r,u,a);return p(u),p(a),n}function Rt(n,e,r){var i={};if("function"!=typeof e){var o=[];ui(n,function(n,t){o.push(t)}),o=X(o,Y(arguments,!0,!1,1));for(var u=-1,a=o.length;++u<a;){var c=o[u];i[c]=n[c]}}else e=t.createCallback(e,r,3),ui(n,function(n,t,r){e(n,t,r)||(i[t]=n)});return i}function Pt(n){for(var t=-1,e=Yr(n),r=e.length,i=hr(r);++t<r;){var o=e[t];i[t]=[o,n[o]]}return i}function zt(n,e,r){var i={};if("function"!=typeof e)for(var o=-1,u=Y(arguments,!0,!1,1),a=Tt(n)?u.length:0;++o<a;){var c=u[o];c in n&&(i[c]=n[c])}else e=t.createCallback(e,r,3),ui(n,function(n,t,r){e(n,t,r)&&(i[t]=n)});return i}function Mt(n,e,r,i){var o=Qr(n);if(null==r)if(o)r=[];else{var u=n&&n.constructor,a=u&&u.prototype;r=y(a)}return e&&(e=t.createCallback(e,i,4),(o?Gt:ai)(n,function(n,t,i){return e(r,n,t,i)})),r}function Wt(n){for(var t=-1,e=Yr(n),r=e.length,i=hr(r);++t<r;)i[t]=n[e[t]];return i}function Kt(n){for(var t=arguments,e=-1,r=Y(t,!0,!1,1),i=t[2]&&t[2][t[1]]===n?1:r.length,o=hr(i);++e<i;)o[e]=n[r[e]];return o}function Ht(n,t,e){var r=-1,i=ct(),o=n?n.length:0,u=!1;return e=(0>e?Kr(0,o+e):e)||0,Qr(n)?u=i(n,t,e)>-1:"number"==typeof o?u=(It(n)?n.indexOf(t,e):i(n,t,e))>-1:ai(n,function(n){return++r>=e?!(u=n===t):void 0}),u}function Ut(n,e,r){var i=!0;e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;++o<u&&(i=!!e(n[o],o,n)););else ai(n,function(n,t,r){return i=!!e(n,t,r)});return i}function Jt(n,e,r){var i=[];e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;++o<u;){var a=n[o];e(a,o,n)&&i.push(a)}else ai(n,function(n,t,r){e(n,t,r)&&i.push(n)});return i}function Vt(n,e,r){e=t.createCallback(e,r,3);var i=-1,o=n?n.length:0;if("number"!=typeof o){var u;return ai(n,function(n,t,r){return e(n,t,r)?(u=n,!1):void 0}),u}for(;++i<o;){var a=n[i];if(e(a,i,n))return a}}function Zt(n,e,r){var i;return e=t.createCallback(e,r,3),Qt(n,function(n,t,r){return e(n,t,r)?(i=n,!1):void 0}),i}function Gt(n,t,e){var r=-1,i=n?n.length:0;if(t=t&&"undefined"==typeof e?t:j(t,e,3),"number"==typeof i)for(;++r<i&&t(n[r],r,n)!==!1;);else ai(n,t);return n}function Qt(n,t,e){var r=n?n.length:0;if(t=t&&"undefined"==typeof e?t:j(t,e,3),"number"==typeof r)for(;r--&&t(n[r],r,n)!==!1;);else{var i=Yr(n);r=i.length,ai(n,function(n,e,o){return e=i?i[--r]:--r,t(o[e],e,o)})}return n}function Xt(n,t){var e=d(arguments,2),r=-1,i="function"==typeof t,o=n?n.length:0,u=hr("number"==typeof o?o:0);return Gt(n,function(n){u[++r]=(i?t:n[t]).apply(n,e)}),u}function Yt(n,e,r){var i=-1,o=n?n.length:0;if(e=t.createCallback(e,r,3),"number"==typeof o)for(var u=hr(o);++i<o;)u[i]=e(n[i],i,n);else u=[],ai(n,function(n,t,r){u[++i]=e(n,t,r)});return u}function ne(n,e,r){var i=-1/0,o=i;if("function"!=typeof e&&r&&r[e]===n&&(e=null),null==e&&Qr(n))for(var a=-1,c=n.length;++a<c;){var l=n[a];l>o&&(o=l)}else e=null==e&&It(n)?u:t.createCallback(e,r,3),Gt(n,function(n,t,r){var u=e(n,t,r);u>i&&(i=u,o=n)});return o}function te(n,e,r){var i=1/0,o=i;if("function"!=typeof e&&r&&r[e]===n&&(e=null),null==e&&Qr(n))for(var a=-1,c=n.length;++a<c;){var l=n[a];o>l&&(o=l)}else e=null==e&&It(n)?u:t.createCallback(e,r,3),Gt(n,function(n,t,r){var u=e(n,t,r);i>u&&(i=u,o=n)});return o}function ee(n,e,r,i){if(!n)return r;var o=arguments.length<3;e=t.createCallback(e,i,4);var u=-1,a=n.length;if("number"==typeof a)for(o&&(r=n[++u]);++u<a;)r=e(r,n[u],u,n);else ai(n,function(n,t,i){r=o?(o=!1,n):e(r,n,t,i)});return r}function re(n,e,r,i){var o=arguments.length<3;return e=t.createCallback(e,i,4),Qt(n,function(n,t,i){r=o?(o=!1,n):e(r,n,t,i)}),r}function ie(n,e,r){return e=t.createCallback(e,r,3),Jt(n,function(n,t,r){return!e(n,t,r)})}function oe(n,t,e){if(n&&"number"!=typeof n.length&&(n=Wt(n)),null==t||e)return n?n[rt(0,n.length-1)]:g;var r=ue(n);return r.length=Hr(Kr(0,t),r.length),r}function ue(n){var t=-1,e=n?n.length:0,r=hr("number"==typeof e?e:0);return Gt(n,function(n){var e=rt(0,++t);r[t]=r[e],r[e]=n}),r}function ae(n){var t=n?n.length:0;return"number"==typeof t?t:Yr(n).length}function ce(n,e,r){var i;e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;++o<u&&!(i=e(n[o],o,n)););else ai(n,function(n,t,r){return!(i=e(n,t,r))});return!!i}function le(n,e,r){var i=-1,o=Qr(e),u=n?n.length:0,c=hr("number"==typeof u?u:0);for(o||(e=t.createCallback(e,r,3)),Gt(n,function(n,t,r){var u=c[++i]=f();o?u.criteria=Yt(e,function(t){return n[t]}):(u.criteria=s())[0]=e(n,t,r),u.index=i,u.value=n}),u=c.length,c.sort(a);u--;){var l=c[u];c[u]=l.value,o||p(l.criteria),h(l)}return c}function se(n){return n&&"number"==typeof n.length?d(n):Wt(n)}function fe(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var i=n[t];i&&r.push(i)}return r}function pe(n){return X(n,Y(arguments,!0,!0,1))}function he(n,e,r){var i=-1,o=n?n.length:0;for(e=t.createCallback(e,r,3);++i<o;)if(e(n[i],i,n))return i;return-1}function de(n,e,r){var i=n?n.length:0;for(e=t.createCallback(e,r,3);i--;)if(e(n[i],i,n))return i;return-1}function me(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=-1;for(e=t.createCallback(e,r,3);++u<o&&e(n[u],u,n);)i++}else if(i=e,null==i||r)return n?n[0]:g;return d(n,0,Hr(Kr(0,i),o))}function ge(n,t,e,r){return"boolean"!=typeof t&&null!=t&&(r=e,e="function"!=typeof t&&r&&r[t]===n?null:t,t=!1),null!=e&&(n=Yt(n,e,r)),Y(n,t)}function ve(n,t,e){if("number"==typeof e){var i=n?n.length:0;e=0>e?Kr(0,i+e):e||0}else if(e){var o=Se(n,t);return n[o]===t?o:-1}return r(n,t,e)}function ye(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=o;for(e=t.createCallback(e,r,3);u--&&e(n[u],u,n);)i++}else i=null==e||r?1:e||i;return d(n,0,Hr(Kr(0,o-i),o))}function be(){for(var n=[],t=-1,e=arguments.length,o=s(),u=ct(),a=u===r,l=s();++t<e;){var f=arguments[t];(Qr(f)||pt(f))&&(n.push(f),o.push(a&&f.length>=w&&c(t?n[t]:l)))}var d=n[0],m=-1,g=d?d.length:0,v=[];n:for(;++m<g;){var y=o[0];if(f=d[m],(y?i(y,f):u(l,f))<0){for(t=e,(y||l).push(f);--t;)if(y=o[t],(y?i(y,f):u(n[t],f))<0)continue n;v.push(f)}}for(;e--;)y=o[e],y&&h(y);return p(o),p(l),v}function _e(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=o;for(e=t.createCallback(e,r,3);u--&&e(n[u],u,n);)i++}else if(i=e,null==i||r)return n?n[o-1]:g;return d(n,Kr(0,o-i))}function we(n,t,e){var r=n?n.length:0;for("number"==typeof e&&(r=(0>e?Kr(0,r+e):Hr(e,r-1))+1);r--;)if(n[r]===t)return r;return-1}function je(n){for(var t=arguments,e=0,r=t.length,i=n?n.length:0;++e<r;)for(var o=-1,u=t[e];++o<i;)n[o]===u&&(Dr.call(n,o--,1),i--);return n}function $e(n,t,e){n=+n||0,e="number"==typeof e?e:+e||1,null==t&&(t=n,n=0);for(var r=-1,i=Kr(0,Or((t-n)/(e||1))),o=hr(i);++r<i;)o[r]=n,n+=e;return o}function xe(n,e,r){var i=-1,o=n?n.length:0,u=[];for(e=t.createCallback(e,r,3);++i<o;){var a=n[i];e(a,i,n)&&(u.push(a),Dr.call(n,i--,1),o--)}return u}function ke(n,e,r){if("number"!=typeof e&&null!=e){var i=0,o=-1,u=n?n.length:0;for(e=t.createCallback(e,r,3);++o<u&&e(n[o],o,n);)i++}else i=null==e||r?1:Kr(0,e);return d(n,i)}function Se(n,e,r,i){var o=0,u=n?n.length:o;for(r=r?t.createCallback(r,i,1):Qe,e=r(e);u>o;){var a=o+u>>>1;r(n[a])<e?o=a+1:u=a}return o}function Ce(){return it(Y(arguments,!0,!0))}function Oe(n,e,r,i){return"boolean"!=typeof e&&null!=e&&(i=r,r="function"!=typeof e&&i&&i[e]===n?null:e,e=!1),null!=r&&(r=t.createCallback(r,i,3)),it(n,e,r)}function Ee(n){return X(n,d(arguments,1))}function Te(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if(Qr(e)||pt(e))var r=r?it(X(r,e).concat(X(e,r))):e}return r||[]}function Ae(){for(var n=arguments.length>1?arguments:arguments[0],t=-1,e=n?ne(pi(n,"length")):0,r=hr(0>e?0:e);++t<e;)r[t]=pi(n,t);return r}function Be(n,t){var e=-1,r=n?n.length:0,i={};for(t||!r||Qr(n[0])||(t=[]);++e<r;){var o=n[e];t?i[o]=t[e]:o&&(i[o[0]]=o[1])}return i}function Fe(n,t){if(!Et(t))throw new jr;return function(){return--n<1?t.apply(this,arguments):void 0}}function Ne(n,t){return arguments.length>2?ut(n,17,d(arguments,2),null,t):ut(n,1,null,null,t)}function Ie(n){for(var t=arguments.length>1?Y(arguments,!0,!1,1):_t(n),e=-1,r=t.length;++e<r;){var i=t[e];n[i]=ut(n[i],1,null,null,n)}return n}function De(n,t){return arguments.length>2?ut(t,19,d(arguments,2),null,n):ut(t,3,null,null,n)}function qe(){for(var n=arguments,t=n.length;t--;)if(!Et(n[t]))throw new jr;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}}function Le(n,t){return t="number"==typeof t?t:+t||n.length,ut(n,4,null,null,null,t)}function Re(n,t,e){var r,i,o,u,a,c,l,s=0,f=!1,p=!0;if(!Et(n))throw new jr;if(t=Kr(0,t)||0,e===!0){var h=!0;p=!1}else Tt(e)&&(h=e.leading,f="maxWait"in e&&(Kr(t,e.maxWait)||0),p="trailing"in e?e.trailing:p);var d=function(){var e=t-(di()-u);if(0>=e){i&&Er(i);var f=l;i=c=l=g,f&&(s=di(),o=n.apply(a,r),c||i||(r=a=null))}else c=Ir(d,e)},m=function(){c&&Er(c),i=c=l=g,(p||f!==t)&&(s=di(),o=n.apply(a,r),c||i||(r=a=null))};return function(){if(r=arguments,u=di(),a=this,l=p&&(c||!h),f===!1)var e=h&&!c;else{i||h||(s=u);var g=f-(u-s),v=0>=g;v?(i&&(i=Er(i)),s=u,o=n.apply(a,r)):i||(i=Ir(m,g))}return v&&c?c=Er(c):c||t===f||(c=Ir(d,t)),e&&(v=!0,o=n.apply(a,r)),!v||c||i||(r=a=null),o}}function Pe(n){if(!Et(n))throw new jr;var t=d(arguments,1);return Ir(function(){n.apply(g,t)},1)}function ze(n,t){if(!Et(n))throw new jr;var e=d(arguments,2);return Ir(function(){n.apply(g,e)},t)}function Me(n,t){if(!Et(n))throw new jr;var e=function(){var r=e.cache,i=t?t.apply(this,arguments):_+arguments[0];return Fr.call(r,i)?r[i]:r[i]=n.apply(this,arguments)};return e.cache={},e}function We(n){var t,e;if(!Et(n))throw new jr;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}}function Ke(n){return ut(n,16,d(arguments,1))}function He(n){return ut(n,32,null,d(arguments,1))}function Ue(n,t,e){var r=!0,i=!0;if(!Et(n))throw new jr;return e===!1?r=!1:Tt(e)&&(r="leading"in e?e.leading:r,i="trailing"in e?e.trailing:i),J.leading=r,J.maxWait=t,J.trailing=i,Re(n,t,J)}function Je(n,t){return ut(t,16,[n])}function Ve(n){return function(){return n}}function Ze(n,t,e){var r=typeof n;if(null==n||"function"==r)return j(n,t,e);if("object"!=r)return tr(n);var i=Yr(n),o=i[0],u=n[o];return 1!=i.length||u!==u||Tt(u)?function(t){for(var e=i.length,r=!1;e--&&(r=nt(t[i[e]],n[i[e]],null,!0)););return r}:function(n){var t=n[o];return u===t&&(0!==u||1/u==1/t)}}function Ge(n){return null==n?"":wr(n).replace(ri,at)}function Qe(n){return n}function Xe(n,r,i){var o=!0,u=r&&_t(r);r&&(i||u.length)||(null==i&&(i=r),a=e,r=n,n=t,u=_t(r)),i===!1?o=!1:Tt(i)&&"chain"in i&&(o=i.chain);var a=n,c=Et(a);Gt(u,function(t){var e=n[t]=r[t];c&&(a.prototype[t]=function(){var t=this.__chain__,r=this.__wrapped__,i=[r];Nr.apply(i,arguments);var u=e.apply(n,i);if(o||t){if(r===u&&Tt(u))return this;u=new a(u),u.__chain__=t}return u})})}function Ye(){return n._=kr,this}function nr(){}function tr(n){return function(t){return t[n]}}function er(n,t,e){var r=null==n,i=null==t;if(null==e&&("boolean"==typeof n&&i?(e=n,n=1):i||"boolean"!=typeof t||(e=t,i=!0)),r&&i&&(t=1),n=+n||0,i?(t=n,n=0):t=+t||0,e||n%1||t%1){var o=Jr();return Hr(n+o*(t-n+parseFloat("1e-"+((o+"").length-1))),t)}return rt(n,t)}function rr(n,t){if(n){var e=n[t];return Et(e)?n[t]():e}}function ir(n,e,r){var i=t.templateSettings;n=wr(n||""),r=oi({},r,i);var o,u=oi({},r.imports,i.imports),a=Yr(u),c=Wt(u),s=0,f=r.interpolate||B,p="__p += '",h=_r((r.escape||B).source+"|"+f.source+"|"+(f===T?C:B).source+"|"+(r.evaluate||B).source+"|$","g");n.replace(h,function(t,e,r,i,u,a){return r||(r=i),p+=n.slice(s,a).replace(N,l),e&&(p+="' +\n__e("+e+") +\n'"),u&&(o=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=a+t.length,t}),p+="';\n";var d=r.variable,m=d;m||(d="obj",p="with ("+d+") {\n"+p+"\n}\n"),p=(o?p.replace(x,""):p).replace(k,"$1").replace(S,"$1;"),p="function("+d+") {\n"+(m?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+D++ +"]")+"\n*/";try{var y=gr(a,"return "+p+v).apply(g,c)}catch(b){throw b.source=p,b}return e?y(e):(y.source=p,y)}function or(n,t,e){n=(n=+n)>-1?n:0;var r=-1,i=hr(n);for(t=j(t,e,1);++r<n;)i[r]=t(r);return i}function ur(n){return null==n?"":wr(n).replace(ei,ft)}function ar(n){var t=++b;return wr(null==n?"":n)+t}function cr(n){return n=new e(n),n.__chain__=!0,n}function lr(n,t){return t(n),n}function sr(){return this.__chain__=!0,this}function fr(){return wr(this.__wrapped__)}function pr(){return this.__wrapped__}n=n?et.defaults(Q.Object(),n,et.pick(Q,I)):Q;var hr=n.Array,dr=n.Boolean,mr=n.Date,gr=n.Function,vr=n.Math,yr=n.Number,br=n.Object,_r=n.RegExp,wr=n.String,jr=n.TypeError,$r=[],xr=br.prototype,kr=n._,Sr=xr.toString,Cr=_r("^"+wr(Sr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Or=vr.ceil,Er=n.clearTimeout,Tr=vr.floor,Ar=gr.prototype.toString,Br=lt(Br=br.getPrototypeOf)&&Br,Fr=xr.hasOwnProperty,Nr=$r.push,Ir=n.setTimeout,Dr=$r.splice,qr=$r.unshift,Lr=function(){try{var n={},t=lt(t=br.defineProperty)&&t,e=t(n,n,n)&&t}catch(r){}return e}(),Rr=lt(Rr=br.create)&&Rr,Pr=lt(Pr=hr.isArray)&&Pr,zr=n.isFinite,Mr=n.isNaN,Wr=lt(Wr=br.keys)&&Wr,Kr=vr.max,Hr=vr.min,Ur=n.parseInt,Jr=vr.random,Vr={};Vr[L]=hr,Vr[R]=dr,Vr[P]=mr,Vr[z]=gr,Vr[W]=br,Vr[M]=yr,Vr[K]=_r,Vr[H]=wr,e.prototype=t.prototype;var Zr=t.support={};Zr.funcDecomp=!lt(n.WinRTError)&&F.test(m),Zr.funcNames="string"==typeof gr.name,t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:t}},Rr||(y=function(){function t(){}return function(e){if(Tt(e)){t.prototype=e;var r=new t;t.prototype=null}return r||n.Object()}}());var Gr=Lr?function(n,t){V.value=t,Lr(n,"__bindData__",V)}:nr,Qr=Pr||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Sr.call(n)==L||!1},Xr=function(n){var t,e=n,r=[];if(!e)return r;if(!Z[typeof n])return r;for(t in e)Fr.call(e,t)&&r.push(t);return r},Yr=Wr?function(n){return Tt(n)?Wr(n):[]}:Xr,ni={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ti=jt(ni),ei=_r("("+Yr(ti).join("|")+")","g"),ri=_r("["+Yr(ni).join("")+"]","g"),ii=function(n,t,e){var r,i=n,o=i;if(!i)return o;var u=arguments,a=0,c="number"==typeof e?2:u.length;if(c>3&&"function"==typeof u[c-2])var l=j(u[--c-1],u[c--],2);else c>2&&"function"==typeof u[c-1]&&(l=u[--c]);for(;++a<c;)if(i=u[a],i&&Z[typeof i])for(var s=-1,f=Z[typeof i]&&Yr(i),p=f?f.length:0;++s<p;)r=f[s],o[r]=l?l(o[r],i[r]):i[r];return o},oi=function(n,t,e){var r,i=n,o=i;if(!i)return o;for(var u=arguments,a=0,c="number"==typeof e?2:u.length;++a<c;)if(i=u[a],i&&Z[typeof i])for(var l=-1,s=Z[typeof i]&&Yr(i),f=s?s.length:0;++l<f;)r=s[l],"undefined"==typeof o[r]&&(o[r]=i[r]);return o},ui=function(n,t,e){var r,i=n,o=i;if(!i)return o;if(!Z[typeof i])return o;t=t&&"undefined"==typeof e?t:j(t,e,3);for(r in i)if(t(i[r],r,n)===!1)return o;return o},ai=function(n,t,e){var r,i=n,o=i;if(!i)return o;if(!Z[typeof i])return o;t=t&&"undefined"==typeof e?t:j(t,e,3);for(var u=-1,a=Z[typeof i]&&Yr(i),c=a?a.length:0;++u<c;)if(r=a[u],t(i[r],r,n)===!1)return o;return o},ci=Br?function(n){if(!n||Sr.call(n)!=W)return!1;var t=n.valueOf,e=lt(t)&&(e=Br(t))&&Br(e);return e?n==e||Br(n)==e:st(n)}:st,li=ot(function(n,t,e){Fr.call(n,e)?n[e]++:n[e]=1}),si=ot(function(n,t,e){(Fr.call(n,e)?n[e]:n[e]=[]).push(t)}),fi=ot(function(n,t,e){n[e]=t}),pi=Yt,hi=Jt,di=lt(di=mr.now)&&di||function(){return(new mr).getTime()},mi=8==Ur($+"08")?Ur:function(n,t){return Ur(It(n)?n.replace(A,""):n,t||0)};return t.after=Fe,t.assign=ii,t.at=Kt,t.bind=Ne,t.bindAll=Ie,t.bindKey=De,t.chain=cr,t.compact=fe,t.compose=qe,t.constant=Ve,t.countBy=li,t.create=mt,t.createCallback=Ze,t.curry=Le,t.debounce=Re,t.defaults=oi,t.defer=Pe,t.delay=ze,t.difference=pe,t.filter=Jt,t.flatten=ge,t.forEach=Gt,t.forEachRight=Qt,t.forIn=ui,t.forInRight=yt,t.forOwn=ai,t.forOwnRight=bt,t.functions=_t,t.groupBy=si,t.indexBy=fi,t.initial=ye,t.intersection=be,t.invert=jt,t.invoke=Xt,t.keys=Yr,t.map=Yt,t.mapValues=qt,t.max=ne,t.memoize=Me,t.merge=Lt,t.min=te,t.omit=Rt,t.once=We,t.pairs=Pt,t.partial=Ke,t.partialRight=He,t.pick=zt,t.pluck=pi,t.property=tr,t.pull=je,t.range=$e,t.reject=ie,t.remove=xe,t.rest=ke,t.shuffle=ue,t.sortBy=le,t.tap=lr,t.throttle=Ue,t.times=or,t.toArray=se,t.transform=Mt,t.union=Ce,t.uniq=Oe,t.values=Wt,t.where=hi,t.without=Ee,t.wrap=Je,t.xor=Te,t.zip=Ae,t.zipObject=Be,t.collect=Yt,t.drop=ke,t.each=Gt,t.eachRight=Qt,t.extend=ii,t.methods=_t,t.object=Be,t.select=Jt,t.tail=ke,t.unique=Oe,t.unzip=Ae,Xe(t),t.clone=ht,t.cloneDeep=dt,t.contains=Ht,t.escape=Ge,t.every=Ut,t.find=Vt,t.findIndex=he,t.findKey=gt,t.findLast=Zt,t.findLastIndex=de,t.findLastKey=vt,t.has=wt,t.identity=Qe,t.indexOf=ve,t.isArguments=pt,t.isArray=Qr,t.isBoolean=$t,t.isDate=xt,t.isElement=kt,t.isEmpty=St,t.isEqual=Ct,t.isFinite=Ot,t.isFunction=Et,t.isNaN=At,t.isNull=Bt,t.isNumber=Ft,t.isObject=Tt,t.isPlainObject=ci,t.isRegExp=Nt,t.isString=It,t.isUndefined=Dt,t.lastIndexOf=we,t.mixin=Xe,t.noConflict=Ye,t.noop=nr,t.now=di,t.parseInt=mi,t.random=er,t.reduce=ee,t.reduceRight=re,t.result=rr,t.runInContext=m,t.size=ae,t.some=ce,t.sortedIndex=Se,t.template=ir,t.unescape=ur,t.uniqueId=ar,t.all=Ut,t.any=ce,t.detect=Vt,t.findWhere=Vt,t.foldl=ee,t.foldr=re,t.include=Ht,t.inject=ee,Xe(function(){var n={}; return ai(t,function(e,r){t.prototype[r]||(n[r]=e)}),n}(),!1),t.first=me,t.last=_e,t.sample=oe,t.take=me,t.head=me,ai(t,function(n,r){var i="sample"!==r;t.prototype[r]||(t.prototype[r]=function(t,r){var o=this.__chain__,u=n(this.__wrapped__,t,r);return o||null!=t&&(!r||i&&"function"==typeof t)?new e(u,o):u})}),t.VERSION="2.4.1",t.prototype.chain=sr,t.prototype.toString=fr,t.prototype.value=pr,t.prototype.valueOf=pr,Gt(["join","pop","shift"],function(n){var r=$r[n];t.prototype[n]=function(){var n=this.__chain__,t=r.apply(this.__wrapped__,arguments);return n?new e(t,n):t}}),Gt(["push","reverse","sort","unshift"],function(n){var e=$r[n];t.prototype[n]=function(){return e.apply(this.__wrapped__,arguments),this}}),Gt(["concat","slice","splice"],function(n){var r=$r[n];t.prototype[n]=function(){return new e(r.apply(this.__wrapped__,arguments),this.__chain__)}}),t}var g,v=[],y=[],b=0,_=+new Date+"",w=75,j=40,$=" \f \n\r\u2028\u2029 ᠎              ",x=/\b__p \+= '';/g,k=/\b(__p \+=) '' \+/g,S=/(__e\(.*?\)|\b__t\)) \+\n'';/g,C=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O=/\w*$/,E=/^\s*function[ \n\r\t]+\w/,T=/<%=([\s\S]+?)%>/g,A=RegExp("^["+$+"]*0+(?=.$)"),B=/($^)/,F=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,I=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=0,q="[object Arguments]",L="[object Array]",R="[object Boolean]",P="[object Date]",z="[object Function]",M="[object Number]",W="[object Object]",K="[object RegExp]",H="[object String]",U={};U[z]=!1,U[q]=U[L]=U[R]=U[P]=U[M]=U[W]=U[K]=U[H]=!0;var J={leading:!1,maxWait:0,trailing:!1},V={configurable:!1,enumerable:!1,value:null,writable:!1},Z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},Q=Z[typeof window]&&window||this,X=Z[typeof e]&&e&&!e.nodeType&&e,Y=Z[typeof t]&&t&&!t.nodeType&&t,nt=Y&&Y.exports===X&&X,tt=Z[typeof n]&&n;!tt||tt.global!==tt&&tt.window!==tt||(Q=tt);var et=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Q._=et,define(function(){return et})):X&&Y?nt?(Y.exports=et)._=et:X._=et:Q._=et}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t,e){var r=n("lodash"),i=n("./ui"),o={describes:[],currentSuite:null,running:!1,aborted:!1,index:0},u=function(n,t){o.describes.push(this),o.currentSuite=this,this.id=r.uniqueId("suite"),this.sandbox={},this.suite=new Benchmark.Suite({name:n}),setTimeout(function(){i.drawSuite(this)}.bind(this)),t(this.sandbox)};u.prototype={setup:function(n){this.setupFn=n,n.call(this,this)},add:function(n,t,e){var r=new Benchmark(n,t,e);r.originFn=t,r.originOption=e,setTimeout(function(){i.drawBench(this,r),this.suite.add(r)}.bind(this))},run:function(){var n=!this.suite.running;this.suite.abort(),n&&(this.suite.aborted=!1,this.suite.run({async:!0}))},runBenchmark:function(n){this.suite.filter(function(t){if(t.id===n){var e=!t.running;t.abort(),e&&t.run({async:!0})}})}};var a=function(n,t,e){o.currentSuite.add(n,t,e)},c=function(n){o.currentSuite.setup(n)},l=function(n){var t=o.describes[o.index],e=function(){o.index++,t.suite.off("complete",e),l(n)};t&&!o.aborted?(o.running=!0,t.run(),t.suite.on("complete",e)):(o.index=0,o.running=!1,o.aborted=!1,n&&n.onStop&&n.onStop())},s=function(){o.describes[o.index].suite.abort(),o.running===!0&&(o.aborted=!0)};e.state=o,e.run=l,e.abort=s,window.suite=function(n,t){return new u(n,t)},window.setup=c,window.bench=a,window.astrobench=l},{"./ui":7,lodash:2}],4:[function(require,module,exports){module.exports=function(obj){{var __t,__p="";Array.prototype.join}with(obj||{})__p+='<a href="#" class="btn btn-run fn-run-tests">'+(null==(__t=dictionary.runAll)?"":__t)+'</a>\n<div class="fn-suites"></div>\n';return __p}},{}],5:[function(require,module,exports){module.exports=function(obj){{var __t,__p="";Array.prototype.join}with(obj||{}){__p+='<div class="bench" id="bench-'+(null==(__t=bench.id)?"":__t)+'">\n <div class="bench-background"></div>\n <div class="bench-title fn-show-source">\n <h2 class="bench-title-text">\n <div>'+(null==(__t=bench.name)?"":__t)+'</div>\n <span class="fn-bench-state bench-state">ready</span>\n <span class="fn-bench-result bench-result"></span>\n <span class="fn-bench-status bench-status"></span>\n </h2>\n <div class="bench-controls">\n <a href="#" class="fn-run-bench">'+(null==(__t=dictionary.runBenchmark)?"":__t)+"</a>\n </div>\n </div>\n ";var code="";bench.originOption&&(code+=hilite("// options\n"),code+=hilite(JSON.stringify(bench.originOption,null,2))+"\n\n",code+=hilite("// test\n")),code+=hilite(fnstrip(bench.originFn)),__p+='\n <pre class="bench-source hidden"><code>'+(null==(__t=code)?"":__t)+"</code></pre>\n</div>\n"}return __p}},{}],6:[function(require,module,exports){module.exports=function(obj){{var __t,__p="";Array.prototype.join}with(obj||{})__p+='<div class="suite" id="'+(null==(__t=suite.id)?"":__t)+'">\n <div class="suite-title fn-show-setup">\n <h1 class="suite-title-text">'+(null==(__t=suite.suite.name)?"":__t)+'</h1>\n <span class="suite-controls">\n <a href="#" class="fn-run-suite">'+(null==(__t=dictionary.runSuite)?"":__t)+'</a>\n </span>\n </div>\n <div class="suite-setup hidden">\n ',__p+=suite.setupFn?"\n <pre><code>"+(null==(__t=hilite("// Preparation code\n")+hilite(fnstrip(suite.setupFn)))?"":__t)+"</code></pre>\n ":"\n <pre><code>"+(null==(__t=hilite("// No preparation code"))?"":__t)+"</code></pre>\n ",__p+='\n </div>\n <div class="fn-benchs suite-bench-list"></div>\n</div>\n';return __p}},{}],7:[function(n,t,e){var r=n("jbone"),i=(n("lodash"),n("./astrobench"));tmplApp=n("./templates/app.html"),tmplSuite=n("./templates/suite.html"),tmplBench=n("./templates/bench.html");var o={runSuite:"Run suite",stopSuite:"Stop suite",runBenchmark:"Run benchmark",stopBenchmark:"Stop benchmark",runAll:"Run all tests",stopAll:"Stop all tests"};r("#astrobench").html(tmplApp({dictionary:o})),r(".fn-run-tests").on("click",function(n){n.preventDefault(),i.abort(),r(".fn-run-tests").html(o.stopAll),i.state.running||i.run({onStop:function(){r(".fn-run-tests").html(o.runAll)}})});var u=function(n){return n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\/\/(.*)/gm,'<span class="comment">//$1</span>').replace(/('.*?')/gm,'<span class="string">$1</span>').replace(/(\d+\.\d+)/gm,'<span class="number">$1</span>').replace(/(\d+)/gm,'<span class="number">$1</span>').replace(/\bnew *(\w+)/gm,'<span class="keyword">new</span> <span class="init">$1</span>').replace(/\b(function|new|throw|return|var|if|else)\b/gm,'<span class="keyword">$1</span>')},a=function(n){str=n.toString().replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/^\uFEFF/,"").replace(/^function *\(.*\) *{/,"").replace(/\s+\}$/,"");var t=str.match(/^\n?( *)/)[1].length,e=str.match(/^\n?(\t*)/)[1].length,r=new RegExp("^\n?"+(e?" ":" ")+"{"+(e?e:t)+"}","gm");return str=str.replace(r,""),str.trim()},c=function(n,t){var e=n.target,i=e.error,u=e.hz,a=e.id,c=e.stats,s=Benchmark.support.java?"+/-":"±",f="",p=r("#bench-"+a),h=p.find(".fn-bench-result");if(p.find(".fn-run-bench").html(o.runBenchmark),i)f+=i.toString(),p[0].classList.add("warning"),h[0].classList.add("error");else{if(e.aborted)return p.find(".fn-bench-state").html("aborted");f+=" x "+Benchmark.formatNumber(u.toFixed(100>u?2:0))+" ops/sec "+s+c.rme.toFixed(2)+"%"}t&&t.suite.running===!1&&l.call(t.suite,n,t),h.html(f)},l=function(n,t){if(t.$el.find(".fn-run-suite").html(o.runSuite),!n.target.aborted){var e,i,u,a=this.filter("fastest");this.forEach(function(n){if(0!==n.stats.rme){if(u=r("#bench-"+n.id),-1!==a.indexOf(n))return u[0].classList.add("fastest"),void u.find(".fn-bench-status").html("(fastest)");i=a.length>1?a.pluck("hz").reduce(function(n,t){return n+t},0)/a.length:a.pluck("hz"),e=(Math.abs(n.hz-i)/i*100).toFixed(2),u[0].classList.remove("fastest"),u.find(".fn-bench-status").html("("+e+"% slower)"),u.find(".bench-background").css("width",n.hz/i*100+"%")}})}};e.drawSuite=function(n){n.$el=r(tmplSuite({fnstrip:a,hilite:u,suite:n,dictionary:o})),r(".fn-suites").append(n.$el),n.$el.on("click",".fn-run-suite",function(t){t.preventDefault(),n.run()}).on("click",".fn-show-setup",function(t){t.defaultPrevented||r(".suite-setup",n.$el)[0].classList.toggle("hidden")}),n.suite.on("start",function(){n.$el.find(".fn-run-suite").html(o.stopSuite)}).on("complete",function(t){l.call(n.suite,t,n)}).on("cycle",c)},e.drawBench=function(n,t){var e=r(tmplBench({bench:t,fnstrip:a,hilite:u,dictionary:o})),i=e.find(".fn-bench-state"),l=function(t){c(t,n)};n.$el.find(".fn-benchs").append(e),e.on("click",".fn-run-bench",function(e){e.preventDefault(),n.runBenchmark(t.id)}).on("click",".fn-show-source",function(n){n.defaultPrevented||e[0].classList.toggle("opened")}),t.on("start",function(n){e[0].classList.remove("fastest"),e[0].classList.remove("warning"),e.find(".fn-bench-status, .fn-bench-result").html(""),e.find(".fn-run-bench").html(o.stopBenchmark),n.target.off("complete",l),n.target.on("complete",l)}).on("cycle",function(){i.html(Benchmark.formatNumber(this.count)+" ("+this.stats.sample.length+" samples)")})}},{"./astrobench":3,"./templates/app.html":4,"./templates/bench.html":5,"./templates/suite.html":6,jbone:1,lodash:2}]},{},[7]),function(n,t){"use strict";function e(n,t,r){var i=this;return null==i||i.constructor!=e?new e(n,t,r):($(n,"Object")?r=n:$(n,"Function")?(r=t,t=n):$(t,"Object")?(r=t,t=null,i.name=n):i.name=n,A(i,r),i.id||(i.id=++ht),null==i.fn&&(i.fn=t),i.stats=F(i.stats),void(i.times=F(i.times)))}function r(n){var t=this;return null==t||t.constructor!=r?new r(n):(t.benchmark=n,void lt(t))}function i(n){var t=this;return null==t||t.constructor!=i?new i(n):n instanceof i?n:I(t,{timeStamp:+new Date},"string"==typeof n?{type:n}:n)}function o(n,t){var e=this;return null==e||e.constructor!=o?new o(n,t):($(n,"Object")?t=n:e.name=n,void A(e,t))}function u(){for(var n,t=-1,e=arguments.length,r=s.call(this),i=r.length;++t<e;)if(n=arguments[t],$(n,"Array"))for(var o=0,u=n.length;u>o;o++,i++)o in n&&(r[i]=n[o]);else r[i++]=n;return r}function a(n,t,e){for(var r=n+t,i=e?e.length:0,o=n-1,u=n+i,a=this,c=Array(t),l=s.call(a,r);++o<r;)o in a&&(c[o-n]=a[o],delete a[o]);for(o=n-1;++o<u;)a[o]=e[o-n];for(n=o--,u=Mt(0,(a.length>>>0)-t+i);++o<u;)o-n in l?a[o]=l[o-n]:o in a&&delete a[o];for(t=t>i?t-i:0;t--;)o=u+t,o in a&&delete a[o];return a.length=u,c}function c(){var n,t,e=-1,r=Object(this),i=r.length>>>0,o=zt(i/2);if(i>1)for(;++e<o;)n=i-e-1,t=n in r?r[n]:Tt,e in r?r[n]=r[e]:delete r[n],t!=Tt?r[e]=t:delete r[e];return r}function l(){return a.call(this,0,1)[0]}function s(n,t){var e=-1,r=Object(this),i=r.length>>>0,o=[];for(n=p(n),n=0>n?Mt(i+n,0):Wt(n,i),n--,t=null==t?i:p(t),t=0>t?Mt(i+t,0):Wt(t,i);++e,++n<t;)n in r&&(o[e]=r[n]);return o}function f(n,t){var e=Object(this),r=e.length>>>0;return n=p(n),n=0>n?Mt(r+n,0):Wt(n,r),t=1==arguments.length?r-n:Wt(Mt(p(t),0),r-n),a.call(e,n,t,s.call(arguments,2))}function p(n){return n=+n,0!==n&&isFinite(n)?n-n%1:n||0}function h(){var n=Object(this);return a.call(n,0,0,arguments),n.length}function d(n,t){return function(){n.apply(t,arguments)}}function m(){return m=function(n,t){var r,i=mt?define.amd:e,o=Tt+"createFunction";return T((mt?"define.amd.":"Benchmark.")+o+"=function("+n+"){"+t+"}"),r=i[o],delete i[o],r},m=It.browser&&(m("",'return"'+Tt+'"')||O)()==Tt?m:Function,m.apply(null,arguments)}function g(n,t){n._timerId=setTimeout(t,1e3*n.delay)}function v(n){Et.appendChild(n),Et.innerHTML=""}function y(){var n,e,r=!0,i=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];return function(t,i){function o(){this.valueOf=0}o.prototype.valueOf=0;for(i in new o)t+="valueOf"==i?1:0;for(i in arguments)"0"==i&&(r=!1);e=2==t,n=!t}(0),y=function(o,u,a){a||(a={});var c=o;o=Object(o);var l,s,f,p,h=!c,m=a.which,g="all"==m,v=-1,y=o,b=o.length,_=g||"own"==m,w={},x=$(o,"Function"),k=a.bind;if(k!==t&&(u=d(u,k)),g&&It.getAllKeys)for(v=0,f=yt(o),b=f.length;b>v&&(s=f[v],u(o[s],s,o)!==!1);v++);else{for(s in o)if(h=!(x&&"prototype"==s||e&&(P(w,s)||!(w[s]=!0))||!(!_||_&&P(o,s))||u(o[s],s,o)!==!1))break;if(!h&&(r&&j(o)||(Lt||Rt)&&$(o,"String")&&(y=Lt?o.split(""):o)))for(;++v<b&&!(h=u(y[v],String(v),o)===!1););if(!h&&n)for(l=o.constructor,p=l&&l.prototype&&l.prototype.constructor===l,v=0;7>v&&(s=i[v],p&&"constructor"==s||!P(o,s)||u(o[s],s,o)!==!1);v++);}return c},y.apply(null,arguments)}function b(n){return!P(n,"toString")&&(/^[\s(]*function[^(]*\(([^\s,)]+)/.exec(n)||0)[1]||""}function _(n){return J(n,function(n,t){return n+t})/n.length||0}function w(n,t){var e=t;return S(n)?e=String(n):It.decompilation&&(e=(/^[^{]+\{([\s\S]*)}\s*$/.exec(n)||0)[1]),e=(e||"").replace(/^\s+|\s+$/g,""),/^(?:\/\*+[\w|\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(e)?"":e}function j(){return j=function(n){return"[object Arguments]"==Ot.call(n)},qt&&(j=function(n){return P(n,"callee")&&!(St&&St.call(n,"callee"))}),j(arguments[0])}function $(n,t){return null!=n&&Ot.call(n)=="[object "+t+"]"}function x(n,t){var e=null!=n?typeof n[t]:"number";return!/^(?:boolean|number|string|undefined)$/.test(e)&&("object"==e?!!n[t]:!0)}function k(n){var t=!1;if(!n||"object"!=typeof n||qt&&j(n))return t;var e=n.constructor;return!It.nodeClass&&"function"!=typeof n.toString&&"string"==typeof(n+"")||$(e,"Function")&&!(e instanceof e)?t:It.iteratesOwnFirst?(y(n,function(n,e){t=e}),t===!1||P(n,t)):(y(n,function(e,r){return t=!P(n,r),!1}),t===!1)}function S(n){return P(n,"toString")||$(n,"String")}function C(n){return function(){var t=[this];return t.push.apply(t,arguments),n.apply(null,t)}}function O(){}function E(n){try{var t=gt&&vt(n)}catch(e){}return t||null}function T(n){var t=mt?define.amd:e,r=dt.createElement("script"),i=dt.getElementsByTagName("script")[0],o=i.parentNode,u=Tt+"runScript",a="("+(mt?"define.amd.":"Benchmark.")+u+"||function(){})();";try{r.appendChild(dt.createTextNode(a+n)),t[u]=function(){v(r)}}catch(c){o=o.cloneNode(!1),i=null,r.text=n}o.insertBefore(r,i),delete t[u]}function A(n,t){t=I({},n.constructor.options,t),n.options=L(t,function(t,e){null!=t&&(/^on[A-Z]/.test(e)?q(e.split(" "),function(e){n.on(e.slice(2).toLowerCase(),t)}):P(n,e)||(n[e]=F(t)))})}function B(){var n=this,t=n.benchmark,e=t._original;e.aborted?(n.teardown(),t.running=!1,ft(n)):++n.cycles<t.count?It.timeout?setTimeout(function(){t.compiled.call(n,Dt)},0):t.compiled.call(n,Dt):(Dt.stop(n),n.teardown(),g(t,function(){ft(n)}))}function F(n){function t(n){this.raw=n}function e(e,r){if(!e||e.constructor!=t)if(e===Object(e))w[w.length++]={key:r,parent:u,source:n};else try{u[r]=e}catch(i){}}function r(n){for(var e=Tt;n[e]&&n[e].constructor!=t;)e+=1;return e}var i,o,u,a,c,l,s,f,p,h,d,m,g,v={value:n},b=0,_=[],w={length:0},j=[];do{if(s=v.key,h=v.parent,m=v.source,u=n=m?m[s]:v.value,i=o=c=!1,n===Object(n)){if($(n.deepClone,"Function"))u=n.deepClone();else switch(a=n.constructor,Ot.call(n)){case"[object Array]":u=new a(n.length);break;case"[object Boolean]":u=new a(1==n);break;case"[object Date]":u=new a(+n);break;case"[object Object]":k(n)&&(u={});break;case"[object Number]":case"[object String]":u=new a(n);break;case"[object RegExp]":u=a(n.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":""))}if(u&&u!=n&&(c=m&&It.descriptors&&bt(m,s),!(i=c&&(c