mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
5 lines
333 KiB
JavaScript
5 lines
333 KiB
JavaScript
require=function(r,e,n){function t(n,o){function i(r){return t(i.resolve(r))}function f(e){return r[n][1][e]||e}if(!e[n]){if(!r[n]){var c="function"==typeof require&&require;if(!o&&c)return c(n,!0);if(u)return u(n,!0);var l=new Error("Cannot find module '"+n+"'");throw l.code="MODULE_NOT_FOUND",l}i.resolve=f;var a=e[n]=new t.Module;r[n][0].call(a.exports,i,a,a.exports)}return e[n].exports}function o(){this.bundle=t,this.exports={}}var u="function"==typeof require&&require;t.Module=o,t.modules=r,t.cache=e,t.parent=u;for(var i=0;i<n.length;i++)t(n[i]);return t}({2:[function(require,module,exports) {
|
|
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(111));n(154);var i=r.default;for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);window&&(window.msa=i),t.exports=i},function(t,e,n){"use strict";t.exports.Model=n(41),t.exports.Collection=n(55),t.exports.Events=n(22),t.exports.extend=n(23)},function(t,e,n){"use strict";var r=n(60),i=n(58),o=n(59),s=n(5),u=function(t){this.cid=r.uniqueId("view"),t||(t={}),r.extend(this,r.pick(t,l)),this._ensureElement(),this.initialize.apply(this,arguments)},a=/^(\S+)\s*(.*)$/,l=["model","collection","el","id","attributes","className","tagName","events"];r.extend(u.prototype,i,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof s?t:s(t),this.el=this.$el[0]},delegateEvents:function(t){if(!t&&!(t=r.result(this,"events")))return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(r.isFunction(n)||(n=this[t[e]]),n){var i=e.match(a);this.delegate(i[1],i[2],r.bind(n,this))}}return this},delegate:function(t,e,n){this.$el.on(t+".delegateEvents"+this.cid,e,n)},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){this.$el.off(t+".delegateEvents"+this.cid,e,n)},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(r.result(this,"el"));else{var t=r.extend({},r.result(this,"attributes"));this.id&&(t.id=r.result(this,"id")),this.className&&(t.class=r.result(this,"className")),this.setElement(this._createElement(r.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),u.extend=o,t.exports=u},function(t,e,n){var r;(function(t,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function s(t,e){return t.set(e[0],e[1]),t}function u(t,e){return t.add(e),t}function a(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function l(t,e,n,r){for(var i=-1,o=t?t.length:0;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}function c(t,e){for(var n=-1,r=t?t.length:0;++n<r&&!1!==e(t[n],n,t););return t}function f(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(!e(t[n],n,t))return!1;return!0}function h(t,e){for(var n=-1,r=t?t.length:0,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function d(t,e){return!(!t||!t.length)&&w(t,e,0)>-1}function p(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function g(t,e){for(var n=-1,r=t?t.length:0,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function v(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function m(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function y(t,e,n,r){var i=t?t.length:0;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function _(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function b(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function x(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function w(t,e,n){if(e!=e)return q(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function S(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function k(t,e){var n=t?t.length:0;return n?O(t,e)/n:bt}function j(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function O(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==$&&(n=n===$?o:n+o)}return n}function E(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function M(t){return function(e){return t(e)}}function z(t,e){return g(e,function(e){return t[e]})}function A(t,e){return t.has(e)}function C(t,e){for(var n=-1,r=t.length;++n<r&&w(e,t[n],0)>-1;);return n}function T(t,e){for(var n=t.length;n--&&w(e,t[n],0)>-1;);return n}function I(t){return t&&t.Object===Object?t:null}function N(t){return mn[t]}function L(t){return yn[t]}function R(t){return"\\"+bn[t]}function q(t,e,n){for(var r=t.length,i=e+(n?1:-1);n?i--:++i<r;){var o=t[i];if(o!=o)return i}return-1}function F(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function P(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function B(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function W(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==J||(t[n]=J,o[i++]=n)}return o}function D(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function H(t){if(!t||!fn.test(t))return t.length;for(var e=ln.lastIndex=0;ln.test(t);)e++;return e}function U(t){return t.match(ln)}function V(t){return _n[t]}var $,G="4.13.1",K=200,X="Expected a function",Z="__lodash_hash_undefined__",J="__lodash_placeholder__",Y=1,Q=2,tt=4,et=8,nt=16,rt=32,it=64,ot=128,st=256,ut=512,at=1,lt=2,ct=30,ft="...",ht=150,dt=16,pt=1,gt=2,vt=3,mt=1/0,yt=9007199254740991,_t=1.7976931348623157e308,bt=NaN,xt=4294967295,wt=xt-1,St=xt>>>1,kt="[object Arguments]",jt="[object Array]",Ot="[object Boolean]",Et="[object Date]",Mt="[object Error]",zt="[object Function]",At="[object GeneratorFunction]",Ct="[object Map]",Tt="[object Number]",It="[object Object]",Nt="[object Promise]",Lt="[object RegExp]",Rt="[object Set]",qt="[object String]",Ft="[object Symbol]",Pt="[object WeakMap]",Bt="[object WeakSet]",Wt="[object ArrayBuffer]",Dt="[object DataView]",Ht="[object Float32Array]",Ut="[object Float64Array]",Vt="[object Int8Array]",$t="[object Int16Array]",Gt="[object Int32Array]",Kt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",Jt="[object Uint32Array]",Yt=/\b__p \+= '';/g,Qt=/\b(__p \+=) '' \+/g,te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ee=/&(?:amp|lt|gt|quot|#39|#96);/g,ne=/[&<>"'`]/g,re=RegExp(ee.source),ie=RegExp(ne.source),oe=/<%-([\s\S]+?)%>/g,se=/<%([\s\S]+?)%>/g,ue=/<%=([\s\S]+?)%>/g,ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,le=/^\w*$/,ce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,fe=/[\\^$.*+?()[\]{}|]/g,he=RegExp(fe.source),de=/^\s+|\s+$/g,pe=/^\s+/,ge=/\s+$/,ve=/[a-zA-Z0-9]+/g,me=/\\(\\)?/g,ye=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_e=/\w*$/,be=/^0x/i,xe=/^[-+]0x[0-9a-f]+$/i,we=/^0b[01]+$/i,Se=/^\[object .+?Constructor\]$/,ke=/^0o[0-7]+$/i,je=/^(?:0|[1-9]\d*)$/,Oe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ee=/($^)/,Me=/['\n\r\u2028\u2029\\]/g,ze="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe23",Ce="\\u20d0-\\u20f0",Te="\\u2700-\\u27bf",Ie="a-z\\xdf-\\xf6\\xf8-\\xff",Ne="A-Z\\xc0-\\xd6\\xd8-\\xde",Le="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qe="['’]",Fe="["+ze+"]",Pe="["+Re+"]",Be="["+Ae+Ce+"]",We="\\d+",De="["+Te+"]",He="["+Ie+"]",Ue="[^"+ze+Re+We+Te+Ie+Ne+"]",Ve="\\ud83c[\\udffb-\\udfff]",$e="[^"+ze+"]",Ge="(?:\\ud83c[\\udde6-\\uddff]){2}",Ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Xe="["+Ne+"]",Ze="\\u200d",Je="(?:"+He+"|"+Ue+")",Ye="(?:"+Xe+"|"+Ue+")",Qe="(?:['’](?:d|ll|m|re|s|t|ve))?",tn="(?:['’](?:D|LL|M|RE|S|T|VE))?",en="(?:"+Be+"|"+Ve+")"+"?",nn="["+Le+"]?",rn=nn+en+("(?:"+Ze+"(?:"+[$e,Ge,Ke].join("|")+")"+nn+en+")*"),on="(?:"+[De,Ge,Ke].join("|")+")"+rn,sn="(?:"+[$e+Be+"?",Be,Ge,Ke,Fe].join("|")+")",un=RegExp(qe,"g"),an=RegExp(Be,"g"),ln=RegExp(Ve+"(?="+Ve+")|"+sn+rn,"g"),cn=RegExp([Xe+"?"+He+"+"+Qe+"(?="+[Pe,Xe,"$"].join("|")+")",Ye+"+"+tn+"(?="+[Pe,Xe+Je,"$"].join("|")+")",Xe+"?"+Je+"+"+Qe,Xe+"+"+tn,We,on].join("|"),"g"),fn=RegExp("["+Ze+ze+Ae+Ce+Le+"]"),hn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","isFinite","parseInt","setTimeout"],pn=-1,gn={};gn[Ht]=gn[Ut]=gn[Vt]=gn[$t]=gn[Gt]=gn[Kt]=gn[Xt]=gn[Zt]=gn[Jt]=!0,gn[kt]=gn[jt]=gn[Wt]=gn[Ot]=gn[Dt]=gn[Et]=gn[Mt]=gn[zt]=gn[Ct]=gn[Tt]=gn[It]=gn[Lt]=gn[Rt]=gn[qt]=gn[Pt]=!1;var vn={};vn[kt]=vn[jt]=vn[Wt]=vn[Dt]=vn[Ot]=vn[Et]=vn[Ht]=vn[Ut]=vn[Vt]=vn[$t]=vn[Gt]=vn[Ct]=vn[Tt]=vn[It]=vn[Lt]=vn[Rt]=vn[qt]=vn[Ft]=vn[Kt]=vn[Xt]=vn[Zt]=vn[Jt]=!0,vn[Mt]=vn[zt]=vn[Pt]=!1;var mn={"À":"A","Ã":"A","Â":"A","Ã":"A","Ä":"A","Ã…":"A","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","Ç":"C","ç":"c","Ã":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ã":"I","ì":"i","Ã":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ã’":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ã":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},yn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},_n={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xn=parseFloat,wn=parseInt,Sn="object"==o(e)&&e,kn=Sn&&"object"==o(t)&&t,jn=kn&&kn.exports===Sn,On=I("object"==(void 0===i?"undefined":o(i))&&i),En=I("object"==("undefined"==typeof self?"undefined":o(self))&&self),Mn=I("object"==o(this)&&this),zn=On||En||Mn||Function("return this")(),An=function t(e){function n(t){if(Ni(t)&&!lu(t)&&!(t instanceof s)){if(t instanceof i)return t;if(wo.call(t,"__wrapped__"))return ni(t)}return new i(t)}function r(){}function i(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=$}function s(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xt,this.__views__=[]}function u(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function I(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ze(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ae(t){var e=-1,n=t?t.length:0;for(this.__data__=new ze;++e<n;)this.add(t[e])}function Ce(t){this.__data__=new I(t)}function Te(t,e,n,r){return t===$||ji(t,mo[n])&&!wo.call(r,n)?e:t}function Ie(t,e,n){(n===$||ji(t[e],n))&&("number"!=typeof e||n!==$||e in t)||(t[e]=n)}function Ne(t,e,n){var r=t[e];wo.call(t,e)&&ji(r,n)&&(n!==$||e in t)||(t[e]=n)}function Le(t,e){for(var n=t.length;n--;)if(ji(t[n][0],e))return n;return-1}function Re(t,e,n,r){return gs(t,function(t,i,o){e(r,t,n(t),o)}),r}function qe(t,e){return t&&ur(e,Zi(e),t)}function Fe(t,e){for(var n=-1,r=null==t,i=e.length,o=Array(i);++n<i;)o[n]=r?$:Ki(t,e[n]);return o}function Pe(t,e,n){return t==t&&(n!==$&&(t=t<=n?t:n),e!==$&&(t=t>=e?t:e)),t}function Be(t,e,n,r,i,o,s){var u;if(r&&(u=o?r(t,i,o,s):r(t)),u!==$)return u;if(!Ii(t))return t;var a=lu(t);if(a){if(u=function(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&wo.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!e)return sr(t,u)}else{var l=Br(t),f=l==zt||l==At;if(cu(t))return function(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}(t,e);if(l==It||l==kt||f&&!o){if(F(t))return o?t:{};if(u=function(t){return"function"!=typeof t.constructor||Xr(t)?{}:We(Fr(t))}(f?{}:t),!e)return function(t,e){return ur(t,Pr(t),e)}(t,qe(u,t))}else{if(!vn[l])return o?t:{};u=function(t,e,n,r){var i=t.constructor;switch(e){case Wt:return nr(t);case Ot:case Et:return new i(+t);case Dt:return function(t,e){var n=e?nr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,r);case Ht:case Ut:case Vt:case $t:case Gt:case Kt:case Xt:case Zt:case Jt:return function(t,e){var n=e?nr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,r);case Ct:return function(t,e,n){return m(e?n(B(t),!0):B(t),s,new t.constructor)}(t,r,n);case Tt:case qt:return new i(t);case Lt:return function(t){var e=new t.constructor(t.source,_e.exec(t));return e.lastIndex=t.lastIndex,e}(t);case Rt:return function(t,e,n){return m(e?n(D(t),!0):D(t),u,new t.constructor)}(t,r,n);case Ft:return function(t){return ds?Object(ds.call(t)):{}}(t)}}(t,l,Be,e)}}s||(s=new Ce);var h=s.get(t);if(h)return h;if(s.set(t,u),!a)var d=n?function(t){return Ye(t,Zi,Pr)}(t):Zi(t);return c(d||t,function(i,o){d&&(i=t[o=i]),Ne(u,o,Be(i,e,n,r,o,t,s))}),u}function We(t){return Ii(t)?Lo(t):{}}function De(t,e,n){if("function"!=typeof t)throw new go(X);return Fo(function(){t.apply($,n)},e)}function He(t,e,n,r){var i=-1,o=d,s=!0,u=t.length,a=[],l=e.length;if(!u)return a;n&&(e=g(e,M(n))),r?(o=p,s=!1):e.length>=K&&(o=A,s=!1,e=new Ae(e));t:for(;++i<u;){var c=t[i],f=n?n(c):c;if(c=r||0!==c?c:0,s&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;a.push(c)}else o(e,f,r)||a.push(c)}return a}function Ue(t,e){var n=!0;return gs(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Ve(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(u===$?s==s&&!Pi(s):n(s,u)))var u=s,a=o}return a}function $e(t,e){var n=[];return gs(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Ge(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Hr),i||(i=[]);++o<s;){var u=t[o];e>0&&n(u)?e>1?Ge(u,e-1,n,r,i):v(i,u):r||(i[i.length]=u)}return i}function Ke(t,e){return t&&ms(t,e,Zi)}function Xe(t,e){return t&&ys(t,e,Zi)}function Ze(t,e){return h(e,function(e){return Ai(t[e])})}function Je(t,e){for(var n=0,r=(e=Gr(e,t)?[e]:tr(e)).length;null!=t&&n<r;)t=t[ti(e[n++])];return n&&n==r?t:$}function Ye(t,e,n){var r=e(t);return lu(t)?r:v(r,n(t))}function Qe(t,e){return t>e}function tn(t,e){return null!=t&&(wo.call(t,e)||"object"==(void 0===t?"undefined":o(t))&&e in t&&null===Fr(t))}function en(t,e){return null!=t&&e in Object(t)}function nn(t,e,n){for(var r=n?p:d,i=t[0].length,o=t.length,s=o,u=Array(o),a=1/0,l=[];s--;){var c=t[s];s&&e&&(c=g(c,M(e))),a=$o(c.length,a),u[s]=!n&&(e||i>=120&&c.length>=120)?new Ae(s&&c):$}c=t[0];var f=-1,h=u[0];t:for(;++f<i&&l.length<a;){var v=c[f],m=e?e(v):v;if(v=n||0!==v?v:0,!(h?A(h,m):r(l,m,n))){for(s=o;--s;){var y=u[s];if(!(y?A(y,m):r(t[s],m,n)))continue t}h&&h.push(m),l.push(v)}}return l}function rn(t,e,n){Gr(e,t)||(t=Qr(t,e=tr(e)),e=ai(e));var r=null==t?t:t[ti(e)];return null==r?$:a(r,t,n)}function on(t,e,n,r,i){return t===e||(null==t||null==e||!Ii(t)&&!Ni(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var s=lu(t),u=lu(e),a=jt,l=jt;s||(a=(a=Br(t))==kt?It:a),u||(l=(l=Br(e))==kt?It:l);var c=a==It&&!F(t),f=l==It&&!F(e),h=a==l;if(h&&!c)return o||(o=new Ce),s||Bi(t)?Ar(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case Dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Wt:return!(t.byteLength!=e.byteLength||!r(new Co(t),new Co(e)));case Ot:case Et:return+t==+e;case Mt:return t.name==e.name&&t.message==e.message;case Tt:return t!=+t?e!=+e:t==+e;case Lt:case qt:return t==e+"";case Ct:var u=B;case Rt:var a=o<if(u||(u=D),t.size!=e.size&&!a)return!1;var l=s.get(t);return l?l==e:(o|=at,s.set(t,e),Ar(u(t),u(e),r,i,o,s));case Ft:if(ds)return ds.call(t)==ds.call(e)}return!1}(t,e,a,n,r,i,o);if(!(i<)){var d=c&&wo.call(t,"__wrapped__"),p=f&&wo.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new Ce),n(g,v,r,i,o)}}return!!h&&(o||(o=new Ce),function(t,e,n,r,i,o){var s=i<,u=Zi(t),a=u.length;if(a!=Zi(e).length&&!s)return!1;for(var l=a;l--;){var c=u[l];if(!(s?c in e:tn(e,c)))return!1}var f=o.get(t);if(f)return f==e;var h=!0;o.set(t,e);for(var d=s;++l<a;){c=u[l];var p=t[c],g=e[c];if(r)var v=s?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(v===$?p===g||n(p,g,r,i,o):v)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(h=!1)}return o.delete(t),h}(t,e,n,r,i,o))}(t,e,on,n,r,i))}function sn(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=Object(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var a=(u=n[i])[0],l=t[a],c=u[1];if(s&&u[2]){if(l===$&&!(a in t))return!1}else{var f=new Ce;if(r)var h=r(l,c,a,t,e,f);if(!(h===$?on(c,l,r,at|lt,f):h))return!1}}return!0}function ln(t){return!(!Ii(t)||function(t){return!!bo&&bo in t}(t))&&(Ai(t)||F(t)?Eo:Se).test(ei(t))}function mn(t){return"function"==typeof t?t:null==t?ro:"object"==(void 0===t?"undefined":o(t))?lu(t)?kn(t[0],t[1]):Sn(t):uo(t)}function yn(t){t=null==t?t:Object(t);var e=[];for(var n in t)e.push(n);return e}function _n(t,e){return t<e}function bn(t,e){var n=-1,r=Ei(t)?Array(t.length):[];return gs(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function Sn(t){var e=Rr(t);return 1==e.length&&e[0][2]?Jr(e[0][0],e[0][1]):function(n){return n===t||sn(n,t,e)}}function kn(t,e){return Gr(t)&&Zr(e)?Jr(ti(t),e):function(n){var r=Ki(n,t);return r===$&&r===e?Xi(n,t):on(e,r,$,at|lt)}}function On(t,e,n,r,i){if(t!==e){if(!lu(e)&&!Bi(e))var o=Ji(e);c(o||e,function(s,u){if(o&&(s=e[u=s]),Ii(s))i||(i=new Ce),function(t,e,n,r,i,o,s){var u=t[n],a=e[n],l=s.get(a);if(l)Ie(t,n,l);else{var c=o?o(u,a,n+"",t,e,s):$,f=c===$;f&&(c=a,lu(a)||Bi(a)?lu(u)?c=u:Mi(u)?c=sr(u):(f=!1,c=Be(a,!0)):Ri(a)||Oi(a)?Oi(u)?c=$i(u):!Ii(u)||r&&Ai(u)?(f=!1,c=Be(a,!0)):c=u:f=!1),s.set(a,c),f&&i(c,a,r,o,s),s.delete(a),Ie(t,n,c)}}(t,e,u,n,On,r,i);else{var a=r?r(t[u],s,u+"",t,e,i):$;a===$&&(a=s),Ie(t,u,a)}})}}function En(t,e){var n=t.length;if(n)return Vr(e+=e<0?n:0,n)?t[e]:$}function Mn(t,e,n){var r=-1;return e=g(e.length?e:[ro],M(Nr())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(bn(t,function(t,n,i){return{criteria:g(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,s=i.length,u=n.length;++r<s;){var a=rr(i[r],o[r]);if(a)return r>=u?a:a*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)})}function Cn(t,e){return t=Object(t),m(e,function(e,n){return n in t&&(e[n]=t[n]),e},{})}function Tn(t,e){for(var n=-1,r=Cr(t),i=r.length,o={};++n<i;){var s=r[n],u=t[s];e(u,s)&&(o[s]=u)}return o}function In(t){return function(e){return null==e?$:e[t]}}function Nn(t,e,n,r){var i=r?S:w,o=-1,s=e.length,u=t;for(t===e&&(e=sr(e)),n&&(u=g(t,M(n)));++o<s;)for(var a=0,l=e[o],c=n?n(l):l;(a=i(u,c,a,r))>-1;)u!==t&&qo.call(u,a,1),qo.call(t,a,1);return t}function Ln(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;if(Vr(i))qo.call(t,i,1);else if(Gr(i,t))delete t[ti(i)];else{var s=tr(i),u=Qr(t,s);null!=u&&delete u[ti(ai(s))]}}}return t}function Rn(t,e){return t+Bo(Ko()*(e-t+1))}function qn(t,e){var n="";if(!t||e<1||e>yt)return n;do{e%2&&(n+=t),(e=Bo(e/2))&&(t+=t)}while(e);return n}function Fn(t,e,n,r){for(var i=-1,o=(e=Gr(e,t)?[e]:tr(e)).length,s=o-1,u=t;null!=u&&++i<o;){var a=ti(e[i]);if(Ii(u)){var l=n;if(i!=s){var c=u[a];(l=r?r(c,a,u):$)===$&&(l=null==c?Vr(e[i+1])?[]:{}:c)}Ne(u,a,l)}u=u[a]}return t}function Pn(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function Bn(t,e){var n;return gs(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Wn(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e==e&&i<=St){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!Pi(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return Dn(t,e,ro,n)}function Dn(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,s=e!=e,u=null===e,a=Pi(e),l=e===$;i<o;){var c=Bo((i+o)/2),f=n(t[c]),h=f!==$,d=null===f,p=f==f,g=Pi(f);if(s)var v=r||p;else v=l?p&&(r||h):u?p&&h&&(r||!d):a?p&&h&&!d&&(r||!g):!d&&!g&&(r?f<=e:f<e);v?i=c+1:o=c}return $o(o,wt)}function Hn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],u=e?e(s):s;if(!n||!ji(u,a)){var a=u;o[i++]=0===s?0:s}}return o}function Un(t){return"number"==typeof t?t:Pi(t)?bt:+t}function Vn(t){if("string"==typeof t)return t;if(Pi(t))return ps?ps.call(t):"";var e=t+"";return"0"==e&&1/t==-mt?"-0":e}function $n(t,e,n){var r=-1,i=d,o=t.length,s=!0,u=[],a=u;if(n)s=!1,i=p;else if(o>=K){var l=e?null:bs(t);if(l)return D(l);s=!1,i=A,a=new Ae}else a=e?[]:u;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,s&&f==f){for(var h=a.length;h--;)if(a[h]===f)continue t;e&&a.push(f),u.push(c)}else i(a,f,n)||(a!==u&&a.push(f),u.push(c))}return u}function Gn(t,e,n,r){return Fn(t,e,n(Je(t,e)),r)}function Kn(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pn(t,r?0:o,r?o+1:i):Pn(t,r?o+1:0,r?i:o)}function Xn(t,e){var n=t;return n instanceof s&&(n=n.value()),m(e,function(t,e){return e.func.apply(e.thisArg,v([t],e.args))},n)}function Zn(t,e,n){for(var r=-1,i=t.length;++r<i;)var o=o?v(He(o,t[r],e,n),He(t[r],o,e,n)):t[r];return o&&o.length?$n(o,e,n):[]}function Jn(t,e,n){for(var r=-1,i=t.length,o=e.length,s={};++r<i;){var u=r<o?e[r]:$;n(s,t[r],u)}return s}function Yn(t){return Mi(t)?t:[]}function Qn(t){return"function"==typeof t?t:ro}function tr(t){return lu(t)?t:Os(t)}function er(t,e,n){var r=t.length;return n=n===$?r:n,!e&&n>=r?t:Pn(t,e,n)}function nr(t){var e=new t.constructor(t.byteLength);return new Co(e).set(new Co(t)),e}function rr(t,e){if(t!==e){var n=t!==$,r=null===t,i=t==t,o=Pi(t),s=e!==$,u=null===e,a=e==e,l=Pi(e);if(!u&&!l&&!o&&t>e||o&&s&&a&&!u&&!l||r&&s&&a||!n&&a||!i)return 1;if(!r&&!o&&!l&&t<e||l&&n&&i&&!r&&!o||u&&n&&i||!s&&i||!a)return-1}return 0}function ir(t,e,n,r){for(var i=-1,o=t.length,s=n.length,u=-1,a=e.length,l=Vo(o-s,0),c=Array(a+l),f=!r;++u<a;)c[u]=e[u];for(;++i<s;)(f||i<o)&&(c[n[i]]=t[i]);for(;l--;)c[u++]=t[i++];return c}function or(t,e,n,r){for(var i=-1,o=t.length,s=-1,u=n.length,a=-1,l=e.length,c=Vo(o-u,0),f=Array(c+l),h=!r;++i<c;)f[i]=t[i];for(var d=i;++a<l;)f[d+a]=e[a];for(;++s<u;)(h||i<o)&&(f[d+n[s]]=t[i++]);return f}function sr(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function ur(t,e,n,r){n||(n={});for(var i=-1,o=e.length;++i<o;){var s=e[i];Ne(n,s,r?r(n[s],t[s],s,n,t):t[s])}return n}function ar(t,e){return function(n,r){var i=lu(n)?l:Re,o=e?e():{};return i(n,t,Nr(r),o)}}function lr(t){return ki(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:$,s=i>2?n[2]:$;for(o=t.length>3&&"function"==typeof o?(i--,o):$,s&&$r(n[0],n[1],s)&&(o=i<3?$:o,i=1),e=Object(e);++r<i;){var u=n[r];u&&t(e,u,r,o)}return e})}function cr(t,e){return function(n,r){if(null==n)return n;if(!Ei(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fr(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),u=s.length;u--;){var a=s[t?u:++i];if(!1===n(o[a],a,o))break}return e}}function hr(t){return function(e){e=Gi(e);var n=fn.test(e)?U(e):$,r=n?n[0]:e.charAt(0),i=n?er(n,1).join(""):e.slice(1);return r[t]()+i}}function dr(t){return function(e){return m(eo(to(e).replace(un,"")),t,"")}}function pr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=We(t.prototype),r=t.apply(n,e);return Ii(r)?r:n}}function gr(t,e,n){var r=pr(t);return function i(){for(var o=arguments.length,s=Array(o),u=o,l=Ir(i);u--;)s[u]=arguments[u];var c=o<3&&s[0]!==l&&s[o-1]!==l?[]:W(s,l);return(o-=c.length)<n?Or(t,e,yr,i.placeholder,$,s,c,$,$,n-o):a(this&&this!==zn&&this instanceof i?r:t,this,s)}}function vr(t){return function(e,n,r){var i=Object(e);if(n=Nr(n,3),!Ei(e))var o=Zi(e);var s=t(o||e,function(t,e){return o&&(t=i[e=t]),n(t,e,i)},r);return s>-1?e[o?o[s]:s]:$}}function mr(t){return ki(function(e){var n=(e=Ge(e,1)).length,r=n,o=i.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new go(X);if(o&&!u&&"wrapper"==Tr(s))var u=new i([],!0)}for(r=u?r:n;++r<n;){var a=Tr(s=e[r]),l="wrapper"==a?xs(s):$;u=l&&Kr(l[0])&&l[1]==(ot|et|rt|st)&&!l[4].length&&1==l[9]?u[Tr(l[0])].apply(u,l[3]):1==s.length&&Kr(s)?u[a]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&lu(r)&&r.length>=K)return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function yr(t,e,n,r,i,o,s,u,a,l){var c=e&ot,f=e&Y,h=e&Q,d=e&(et|nt),p=e&ut,g=h?$:pr(t);return function v(){for(var m=arguments.length,y=Array(m),_=m;_--;)y[_]=arguments[_];if(d)var b=Ir(v),x=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&r++;return r}(y,b);if(r&&(y=ir(y,r,i,d)),o&&(y=or(y,o,s,d)),m-=x,d&&m<l){var w=W(y,b);return Or(t,e,yr,v.placeholder,n,y,w,u,a,l-m)}var S=f?n:this,k=h?S[t]:t;return m=y.length,u?y=function(t,e){for(var n=t.length,r=$o(e.length,n),i=sr(t);r--;){var o=e[r];t[r]=Vr(o,n)?i[o]:$}return t}(y,u):p&&m>1&&y.reverse(),c&&a<m&&(y.length=a),this&&this!==zn&&this instanceof v&&(k=g||pr(k)),k.apply(S,y)}}function _r(t,e){return function(n,r){return function(t,e,n,r){return Ke(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function br(t){return function(e,n){var r;if(e===$&&n===$)return 0;if(e!==$&&(r=e),n!==$){if(r===$)return n;"string"==typeof e||"string"==typeof n?(e=Vn(e),n=Vn(n)):(e=Un(e),n=Un(n)),r=t(e,n)}return r}}function xr(t){return ki(function(e){return e=1==e.length&&lu(e[0])?g(e[0],M(Nr())):g(Ge(e,1,Ur),M(Nr())),ki(function(n){var r=this;return t(e,function(t){return a(t,r,n)})})})}function wr(t,e){var n=(e=e===$?" ":Vn(e)).length;if(n<2)return n?qn(e,t):e;var r=qn(e,Po(t/H(e)));return fn.test(e)?er(U(r),0,t).join(""):r.slice(0,t)}function Sr(t,e,n,r){var i=e&Y,o=pr(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=r.length,f=Array(c+u),h=this&&this!==zn&&this instanceof e?o:t;++l<c;)f[l]=r[l];for(;u--;)f[l++]=arguments[++s];return a(h,i?n:this,f)}}function kr(t){return function(e,n,r){return r&&"number"!=typeof r&&$r(e,n,r)&&(n=r=$),e=(e=Vi(e))==e?e:0,n===$?(n=e,e=0):n=Vi(n)||0,function(t,e,n,r){for(var i=-1,o=Vo(Po((e-t)/(n||1)),0),s=Array(o);o--;)s[r?o:++i]=t,t+=n;return s}(e,n,r=r===$?e<n?1:-1:Vi(r)||0,t)}}function jr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Vi(e),n=Vi(n)),t(e,n)}}function Or(t,e,n,r,i,o,s,u,a,l){var c=e&et;e|=c?rt:it,(e&=~(c?it:rt))&tt||(e&=~(Y|Q));var f=[t,e,i,c?o:$,c?s:$,c?$:o,c?$:s,u,a,l],h=n.apply($,f);return Kr(t)&&js(h,f),h.placeholder=r,h}function Er(t){var e=ho[t];return function(t,n){if(t=Vi(t),n=$o(Hi(n),292)){var r=(Gi(t)+"e").split("e");return+((r=(Gi(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}function Mr(t){return function(e){var n=Br(e);return n==Ct?B(e):n==Rt?function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}(e):function(t,e){return g(e,function(e){return[e,t[e]]})}(e,t(e))}}function zr(t,e,n,r,i,o,s,u){var a=e&Q;if(!a&&"function"!=typeof t)throw new go(X);var l=r?r.length:0;if(l||(e&=~(rt|it),r=i=$),s=s===$?s:Vo(Hi(s),0),u=u===$?u:Hi(u),l-=i?i.length:0,e&it){var c=r,f=i;r=i=$}var h=a?$:xs(t),d=[t,e,n,r,i,c,f,o,s,u];if(h&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(Y|Q|ot),s=r==ot&&n==et||r==ot&&n==st&&t[7].length<=e[8]||r==(ot|st)&&e[7].length<=e[8]&&n==et;if(!o&&!s)return t;r&Y&&(t[2]=e[2],i|=n&Y?0:tt);var u=e[3];if(u){var a=t[3];t[3]=a?ir(a,u,e[4]):u,t[4]=a?W(t[3],J):e[4]}(u=e[5])&&(a=t[5],t[5]=a?or(a,u,e[6]):u,t[6]=a?W(t[5],J):e[6]),(u=e[7])&&(t[7]=u),r&ot&&(t[8]=null==t[8]?e[8]:$o(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(d,h),t=d[0],e=d[1],n=d[2],r=d[3],i=d[4],!(u=d[9]=null==d[9]?a?0:t.length:Vo(d[9]-l,0))&&e&(et|nt)&&(e&=~(et|nt)),e&&e!=Y)p=e==et||e==nt?gr(t,e,u):e!=rt&&e!=(Y|rt)||i.length?yr.apply($,d):Sr(t,e,n,r);else var p=function(t,e,n){var r=e&Y,i=pr(t);return function e(){return(this&&this!==zn&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return(h?_s:js)(p,d)}function Ar(t,e,n,r,i,o){var s=i<,u=t.length,a=e.length;if(u!=a&&!(s&&a>u))return!1;var l=o.get(t);if(l)return l==e;var c=-1,f=!0,h=i&at?new Ae:$;for(o.set(t,e);++c<u;){var d=t[c],p=e[c];if(r)var g=s?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(g!==$){if(g)continue;f=!1;break}if(h){if(!_(e,function(t,e){if(!h.has(e)&&(d===t||n(d,t,r,i,o)))return h.add(e)})){f=!1;break}}else if(d!==p&&!n(d,p,r,i,o)){f=!1;break}}return o.delete(t),f}function Cr(t){return Ye(t,Ji,Ss)}function Tr(t){for(var e=t.name+"",n=ss[e],r=wo.call(ss,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Ir(t){return(wo.call(n,"placeholder")?n:t).placeholder}function Nr(){var t=n.iteratee||io;return t=t===io?mn:t,arguments.length?t(arguments[0],arguments[1]):t}function Lr(t,e){var n=t.__data__;return function(t){var e=void 0===t?"undefined":o(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function Rr(t){for(var e=Zi(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Zr(i)]}return e}function qr(t,e){var n=function(t,e){return null==t?$:t[e]}(t,e);return ln(n)?n:$}function Fr(t){return Wo(Object(t))}function Pr(t){return Io(Object(t))}function Br(t){return jo.call(t)}function Wr(t,e,n){for(var r,i=-1,o=(e=Gr(e,t)?[e]:tr(e)).length;++i<o;){var s=ti(e[i]);if(!(r=null!=t&&n(t,s)))break;t=t[s]}return r||!!(o=t?t.length:0)&&Ti(o)&&Vr(s,o)&&(lu(t)||Fi(t)||Oi(t))}function Dr(t){var e=t?t.length:$;return Ti(e)&&(lu(t)||Fi(t)||Oi(t))?E(e,String):null}function Hr(t){return lu(t)||Oi(t)}function Ur(t){return lu(t)&&!(2==t.length&&!Ai(t[0]))}function Vr(t,e){return!!(e=null==e?yt:e)&&("number"==typeof t||je.test(t))&&t>-1&&t%1==0&&t<e}function $r(t,e,n){if(!Ii(n))return!1;var r=void 0===e?"undefined":o(e);return!!("number"==r?Ei(n)&&Vr(e,n.length):"string"==r&&e in n)&&ji(n[e],t)}function Gr(t,e){if(lu(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Pi(t))||le.test(t)||!ae.test(t)||null!=e&&t in Object(e)}function Kr(t){var e=Tr(t),r=n[e];if("function"!=typeof r||!(e in s.prototype))return!1;if(t===r)return!0;var i=xs(r);return!!i&&t===i[0]}function Xr(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||mo)}function Zr(t){return t==t&&!Ii(t)}function Jr(t,e){return function(n){return null!=n&&n[t]===e&&(e!==$||t in Object(n))}}function Yr(t,e,n,r,i,o){return Ii(t)&&Ii(e)&&On(t,e,$,Yr,o.set(e,t)),t}function Qr(t,e){return 1==e.length?t:Je(t,Pn(e,0,-1))}function ti(t){if("string"==typeof t||Pi(t))return t;var e=t+"";return"0"==e&&1/t==-mt?"-0":e}function ei(t){if(null!=t){try{return xo.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ni(t){if(t instanceof s)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=sr(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function ri(t,e,n){var r=t?t.length:0;return r?Pn(t,(e=n||e===$?1:Hi(e))<0?0:e,r):[]}function ii(t,e,n){var r=t?t.length:0;return r?Pn(t,0,(e=r-(e=n||e===$?1:Hi(e)))<0?0:e):[]}function oi(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:Hi(n);return i<0&&(i=Vo(r+i,0)),x(t,Nr(e,3),i)}function si(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r-1;return n!==$&&(i=Hi(n),i=n<0?Vo(r+i,0):$o(i,r-1)),x(t,Nr(e,3),i,!0)}function ui(t){return t&&t.length?t[0]:$}function ai(t){var e=t?t.length:0;return e?t[e-1]:$}function li(t,e){return t&&t.length&&e&&e.length?Nn(t,e):t}function ci(t){return t?Zo.call(t):t}function fi(t){if(!t||!t.length)return[];var e=0;return t=h(t,function(t){if(Mi(t))return e=Vo(t.length,e),!0}),E(e,function(e){return g(t,In(e))})}function hi(t,e){if(!t||!t.length)return[];var n=fi(t);return null==e?n:g(n,function(t){return a(e,$,t)})}function di(t){var e=n(t);return e.__chain__=!0,e}function pi(t,e){return e(t)}function gi(t,e){return(lu(t)?c:gs)(t,Nr(e,3))}function vi(t,e){return(lu(t)?function(t,e){for(var n=t?t.length:0;n--&&!1!==e(t[n],n,t););return t}:vs)(t,Nr(e,3))}function mi(t,e){return(lu(t)?g:bn)(t,Nr(e,3))}function yi(t,e,n){var r=-1,i=Wi(t),o=i.length,s=o-1;for(e=(n?$r(t,e,n):e===$)?1:Pe(Hi(e),0,o);++r<e;){var u=Rn(r,s),a=i[u];i[u]=i[r],i[r]=a}return i.length=e,i}function _i(){return co.now()}function bi(t,e,n){return e=n?$:e,e=t&&null==e?t.length:e,zr(t,ot,$,$,$,$,e)}function xi(t,e){var n;if("function"!=typeof e)throw new go(X);return t=Hi(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=$),n}}function wi(t,e,n){function r(e){var n=a,r=l;return a=l=$,p=e,f=t.apply(r,n)}function i(t){var n=t-d;return d===$||n>=e||n<0||v&&t-p>=c}function o(){var t=_i();return i(t)?s(t):void(h=Fo(o,function(t){var n=e-(t-d);return v?$o(n,c-(t-p)):n}(t)))}function s(t){return h=$,m&&a?r(t):(a=l=$,f)}function u(){var t=_i(),n=i(t);if(a=arguments,l=this,d=t,n){if(h===$)return function(t){return p=t,h=Fo(o,e),g?r(t):f}(d);if(v)return h=Fo(o,e),r(d)}return h===$&&(h=Fo(o,e)),f}var a,l,c,f,h,d,p=0,g=!1,v=!1,m=!0;if("function"!=typeof t)throw new go(X);return e=Vi(e)||0,Ii(n)&&(g=!!n.leading,c=(v="maxWait"in n)?Vo(Vi(n.maxWait)||0,e):c,m="trailing"in n?!!n.trailing:m),u.cancel=function(){p=0,a=d=l=h=$},u.flush=function(){return h===$?f:s(_i())},u}function Si(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new go(X);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(Si.Cache||ze),n}function ki(t,e){if("function"!=typeof t)throw new go(X);return e=Vo(e===$?t.length-1:Hi(e),0),function(){for(var n=arguments,r=-1,i=Vo(n.length-e,0),o=Array(i);++r<i;)o[r]=n[e+r];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,n[0],o);case 2:return t.call(this,n[0],n[1],o)}var s=Array(e+1);for(r=-1;++r<e;)s[r]=n[r];return s[e]=o,a(t,this,s)}}function ji(t,e){return t===e||t!=t&&e!=e}function Oi(t){return Mi(t)&&wo.call(t,"callee")&&(!Ro.call(t,"callee")||jo.call(t)==kt)}function Ei(t){return null!=t&&Ti(ws(t))&&!Ai(t)}function Mi(t){return Ni(t)&&Ei(t)}function zi(t){return!!Ni(t)&&(jo.call(t)==Mt||"string"==typeof t.message&&"string"==typeof t.name)}function Ai(t){var e=Ii(t)?jo.call(t):"";return e==zt||e==At}function Ci(t){return"number"==typeof t&&t==Hi(t)}function Ti(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=yt}function Ii(t){var e=void 0===t?"undefined":o(t);return!!t&&("object"==e||"function"==e)}function Ni(t){return!!t&&"object"==(void 0===t?"undefined":o(t))}function Li(t){return"number"==typeof t||Ni(t)&&jo.call(t)==Tt}function Ri(t){if(!Ni(t)||jo.call(t)!=It||F(t))return!1;var e=Fr(t);if(null===e)return!0;var n=wo.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xo.call(n)==ko}function qi(t){return Ii(t)&&jo.call(t)==Lt}function Fi(t){return"string"==typeof t||!lu(t)&&Ni(t)&&jo.call(t)==qt}function Pi(t){return"symbol"==(void 0===t?"undefined":o(t))||Ni(t)&&jo.call(t)==Ft}function Bi(t){return Ni(t)&&Ti(t.length)&&!!gn[jo.call(t)]}function Wi(t){if(!t)return[];if(Ei(t))return Fi(t)?U(t):sr(t);if(No&&t[No])return P(t[No]());var e=Br(t);return(e==Ct?B:e==Rt?D:Yi)(t)}function Di(t){return t?(t=Vi(t))===mt||t===-mt?(t<0?-1:1)*_t:t==t?t:0:0===t?t:0}function Hi(t){var e=Di(t),n=e%1;return e==e?n?e-n:e:0}function Ui(t){return t?Pe(Hi(t),0,xt):0}function Vi(t){if("number"==typeof t)return t;if(Pi(t))return bt;if(Ii(t)){var e=Ai(t.valueOf)?t.valueOf():t;t=Ii(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(de,"");var n=we.test(t);return n||ke.test(t)?wn(t.slice(2),n?2:8):xe.test(t)?bt:+t}function $i(t){return ur(t,Ji(t))}function Gi(t){return null==t?"":Vn(t)}function Ki(t,e,n){var r=null==t?$:Je(t,e);return r===$?n:r}function Xi(t,e){return null!=t&&Wr(t,e,en)}function Zi(t){var e=Xr(t);if(!e&&!Ei(t))return function(t){return Uo(Object(t))}(t);var n=Dr(t),r=!!n,i=n||[],o=i.length;for(var s in t)!tn(t,s)||r&&("length"==s||Vr(s,o))||e&&"constructor"==s||i.push(s);return i}function Ji(t){for(var e=-1,n=Xr(t),r=yn(t),i=r.length,o=Dr(t),s=!!o,u=o||[],a=u.length;++e<i;){var l=r[e];s&&("length"==l||Vr(l,a))||"constructor"==l&&(n||!wo.call(t,l))||u.push(l)}return u}function Yi(t){return t?z(t,Zi(t)):[]}function Qi(t){return Ru(Gi(t).toLowerCase())}function to(t){return(t=Gi(t))&&t.replace(Oe,N).replace(an,"")}function eo(t,e,n){return t=Gi(t),(e=n?$:e)===$&&(e=hn.test(t)?cn:ve),t.match(e)||[]}function no(t){return function(){return t}}function ro(t){return t}function io(t){return mn("function"==typeof t?t:Be(t,!0))}function oo(t,e,n){var r=Zi(e),i=Ze(e,r);null!=n||Ii(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ze(e,Zi(e)));var o=!(Ii(n)&&"chain"in n&&!n.chain),s=Ai(t);return c(i,function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=sr(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,v([this.value()],arguments))})}),t}function so(){}function uo(t){return Gr(t)?In(ti(t)):function(t){return function(e){return Je(e,t)}}(t)}function ao(){return[]}function lo(){return!1}var co=(e=e?An.defaults({},e,An.pick(zn,dn)):zn).Date,fo=e.Error,ho=e.Math,po=e.RegExp,go=e.TypeError,vo=e.Array.prototype,mo=e.Object.prototype,yo=e.String.prototype,_o=e["__core-js_shared__"],bo=function(){var t=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xo=e.Function.prototype.toString,wo=mo.hasOwnProperty,So=0,ko=xo.call(Object),jo=mo.toString,Oo=zn._,Eo=po("^"+xo.call(wo).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=jn?e.Buffer:$,zo=e.Reflect,Ao=e.Symbol,Co=e.Uint8Array,To=zo?zo.enumerate:$,Io=Object.getOwnPropertySymbols,No="symbol"==o(No=Ao&&Ao.iterator)?No:$,Lo=Object.create,Ro=mo.propertyIsEnumerable,qo=vo.splice,Fo=function(t,n){return e.setTimeout.call(zn,t,n)},Po=ho.ceil,Bo=ho.floor,Wo=Object.getPrototypeOf,Do=e.isFinite,Ho=vo.join,Uo=Object.keys,Vo=ho.max,$o=ho.min,Go=e.parseInt,Ko=ho.random,Xo=yo.replace,Zo=vo.reverse,Jo=yo.split,Yo=qr(e,"DataView"),Qo=qr(e,"Map"),ts=qr(e,"Promise"),es=qr(e,"Set"),ns=qr(e,"WeakMap"),rs=qr(Object,"create"),is=ns&&new ns,os=!Ro.call({valueOf:1},"valueOf"),ss={},us=ei(Yo),as=ei(Qo),ls=ei(ts),cs=ei(es),fs=ei(ns),hs=Ao?Ao.prototype:$,ds=hs?hs.valueOf:$,ps=hs?hs.toString:$;n.templateSettings={escape:oe,evaluate:se,interpolate:ue,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,i.prototype=We(r.prototype),i.prototype.constructor=i,s.prototype=We(r.prototype),s.prototype.constructor=s,u.prototype.clear=function(){this.__data__=rs?rs(null):{}},u.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},u.prototype.get=function(t){var e=this.__data__;if(rs){var n=e[t];return n===Z?$:n}return wo.call(e,t)?e[t]:$},u.prototype.has=function(t){var e=this.__data__;return rs?e[t]!==$:wo.call(e,t)},u.prototype.set=function(t,e){return this.__data__[t]=rs&&e===$?Z:e,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(t){var e=this.__data__,n=Le(e,t);return!(n<0||(n==e.length-1?e.pop():qo.call(e,n,1),0))},I.prototype.get=function(t){var e=this.__data__,n=Le(e,t);return n<0?$:e[n][1]},I.prototype.has=function(t){return Le(this.__data__,t)>-1},I.prototype.set=function(t,e){var n=this.__data__,r=Le(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},ze.prototype.clear=function(){this.__data__={hash:new u,map:new(Qo||I),string:new u}},ze.prototype.delete=function(t){return Lr(this,t).delete(t)},ze.prototype.get=function(t){return Lr(this,t).get(t)},ze.prototype.has=function(t){return Lr(this,t).has(t)},ze.prototype.set=function(t,e){return Lr(this,t).set(t,e),this},Ae.prototype.add=Ae.prototype.push=function(t){return this.__data__.set(t,Z),this},Ae.prototype.has=function(t){return this.__data__.has(t)},Ce.prototype.clear=function(){this.__data__=new I},Ce.prototype.delete=function(t){return this.__data__.delete(t)},Ce.prototype.get=function(t){return this.__data__.get(t)},Ce.prototype.has=function(t){return this.__data__.has(t)},Ce.prototype.set=function(t,e){var n=this.__data__;return n instanceof I&&n.__data__.length==K&&(n=this.__data__=new ze(n.__data__)),n.set(t,e),this};var gs=cr(Ke),vs=cr(Xe,!0),ms=fr(),ys=fr(!0);To&&!Ro.call({valueOf:1},"valueOf")&&(yn=function(t){return P(To(t))});var _s=is?function(t,e){return is.set(t,e),t}:ro,bs=es&&1/D(new es([,-0]))[1]==mt?function(t){return new es(t)}:so,xs=is?function(t){return is.get(t)}:so,ws=In("length");Io||(Pr=ao);var Ss=Io?function(t){for(var e=[];t;)v(e,Pr(t)),t=Fr(t);return e}:Pr;(Yo&&Br(new Yo(new ArrayBuffer(1)))!=Dt||Qo&&Br(new Qo)!=Ct||ts&&Br(ts.resolve())!=Nt||es&&Br(new es)!=Rt||ns&&Br(new ns)!=Pt)&&(Br=function(t){var e=jo.call(t),n=e==It?t.constructor:$,r=n?ei(n):$;if(r)switch(r){case us:return Dt;case as:return Ct;case ls:return Nt;case cs:return Rt;case fs:return Pt}return e});var ks=_o?Ai:lo,js=function(){var t=0,e=0;return function(n,r){var i=_i(),o=dt-(i-e);if(e=i,o>0){if(++t>=ht)return n}else t=0;return _s(n,r)}}(),Os=Si(function(t){var e=[];return Gi(t).replace(ce,function(t,n,r,i){e.push(r?i.replace(me,"$1"):n||t)}),e}),Es=ki(function(t,e){return Mi(t)?He(t,Ge(e,1,Mi,!0)):[]}),Ms=ki(function(t,e){var n=ai(e);return Mi(n)&&(n=$),Mi(t)?He(t,Ge(e,1,Mi,!0),Nr(n)):[]}),zs=ki(function(t,e){var n=ai(e);return Mi(n)&&(n=$),Mi(t)?He(t,Ge(e,1,Mi,!0),$,n):[]}),As=ki(function(t){var e=g(t,Yn);return e.length&&e[0]===t[0]?nn(e):[]}),Cs=ki(function(t){var e=ai(t),n=g(t,Yn);return e===ai(n)?e=$:n.pop(),n.length&&n[0]===t[0]?nn(n,Nr(e)):[]}),Ts=ki(function(t){var e=ai(t),n=g(t,Yn);return e===ai(n)?e=$:n.pop(),n.length&&n[0]===t[0]?nn(n,$,e):[]}),Is=ki(li),Ns=ki(function(t,e){e=Ge(e,1);var n=t?t.length:0,r=Fe(t,e);return Ln(t,g(e,function(t){return Vr(t,n)?+t:t}).sort(rr)),r}),Ls=ki(function(t){return $n(Ge(t,1,Mi,!0))}),Rs=ki(function(t){var e=ai(t);return Mi(e)&&(e=$),$n(Ge(t,1,Mi,!0),Nr(e))}),qs=ki(function(t){var e=ai(t);return Mi(e)&&(e=$),$n(Ge(t,1,Mi,!0),$,e)}),Fs=ki(function(t,e){return Mi(t)?He(t,e):[]}),Ps=ki(function(t){return Zn(h(t,Mi))}),Bs=ki(function(t){var e=ai(t);return Mi(e)&&(e=$),Zn(h(t,Mi),Nr(e))}),Ws=ki(function(t){var e=ai(t);return Mi(e)&&(e=$),Zn(h(t,Mi),$,e)}),Ds=ki(fi),Hs=ki(function(t){var e=t.length,n=e>1?t[e-1]:$;return hi(t,n="function"==typeof n?(t.pop(),n):$)}),Us=ki(function(t){var e=(t=Ge(t,1)).length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return Fe(e,t)};return!(e>1||this.__actions__.length)&&r instanceof s&&Vr(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pi,args:[o],thisArg:$}),new i(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push($),t})):this.thru(o)}),Vs=ar(function(t,e,n){wo.call(t,n)?++t[n]:t[n]=1}),$s=vr(oi),Gs=vr(si),Ks=ar(function(t,e,n){wo.call(t,n)?t[n].push(e):t[n]=[e]}),Xs=ki(function(t,e,n){var r=-1,i="function"==typeof e,o=Gr(e),s=Ei(t)?Array(t.length):[];return gs(t,function(t){var u=i?e:o&&null!=t?t[e]:$;s[++r]=u?a(u,t,n):rn(t,e,n)}),s}),Zs=ar(function(t,e,n){t[n]=e}),Js=ar(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Ys=ki(function(t,e){if(null==t)return[];var n=e.length;return n>1&&$r(t,e[0],e[1])?e=[]:n>2&&$r(e[0],e[1],e[2])&&(e=[e[0]]),Mn(t,e=1==e.length&&lu(e[0])?e[0]:Ge(e,1,Ur),[])}),Qs=ki(function(t,e,n){var r=Y;if(n.length){var i=W(n,Ir(Qs));r|=rt}return zr(t,r,e,n,i)}),tu=ki(function(t,e,n){var r=Y|Q;if(n.length){var i=W(n,Ir(tu));r|=rt}return zr(e,r,t,n,i)}),eu=ki(function(t,e){return De(t,1,e)}),nu=ki(function(t,e,n){return De(t,Vi(e)||0,n)});Si.Cache=ze;var ru=ki(function(t,e){var n=(e=1==e.length&&lu(e[0])?g(e[0],M(Nr())):g(Ge(e,1,Ur),M(Nr()))).length;return ki(function(r){for(var i=-1,o=$o(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return a(t,this,r)})}),iu=ki(function(t,e){return zr(t,rt,$,e,W(e,Ir(iu)))}),ou=ki(function(t,e){return zr(t,it,$,e,W(e,Ir(ou)))}),su=ki(function(t,e){return zr(t,st,$,$,$,Ge(e,1))}),uu=jr(Qe),au=jr(function(t,e){return t>=e}),lu=Array.isArray,cu=Mo?function(t){return t instanceof Mo}:lo,fu=jr(_n),hu=jr(function(t,e){return t<=e}),du=lr(function(t,e){if(os||Xr(e)||Ei(e))ur(e,Zi(e),t);else for(var n in e)wo.call(e,n)&&Ne(t,n,e[n])}),pu=lr(function(t,e){if(os||Xr(e)||Ei(e))ur(e,Ji(e),t);else for(var n in e)Ne(t,n,e[n])}),gu=lr(function(t,e,n,r){ur(e,Ji(e),t,r)}),vu=lr(function(t,e,n,r){ur(e,Zi(e),t,r)}),mu=ki(function(t,e){return Fe(t,Ge(e,1))}),yu=ki(function(t){return t.push($,Te),a(gu,$,t)}),_u=ki(function(t){return t.push($,Yr),a(ku,$,t)}),bu=_r(function(t,e,n){t[e]=n},no(ro)),xu=_r(function(t,e,n){wo.call(t,e)?t[e].push(n):t[e]=[n]},Nr),wu=ki(rn),Su=lr(function(t,e,n){On(t,e,n)}),ku=lr(function(t,e,n,r){On(t,e,n,r)}),ju=ki(function(t,e){return null==t?{}:(e=g(Ge(e,1),ti),Cn(t,He(Cr(t),e)))}),Ou=ki(function(t,e){return null==t?{}:Cn(t,g(Ge(e,1),ti))}),Eu=Mr(Zi),Mu=Mr(Ji),zu=dr(function(t,e,n){return e=e.toLowerCase(),t+(n?Qi(e):e)}),Au=dr(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Cu=dr(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Tu=hr("toLowerCase"),Iu=dr(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Nu=dr(function(t,e,n){return t+(n?" ":"")+Ru(e)}),Lu=dr(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ru=hr("toUpperCase"),qu=ki(function(t,e){try{return a(t,$,e)}catch(t){return zi(t)?t:new fo(t)}}),Fu=ki(function(t,e){return c(Ge(e,1),function(e){e=ti(e),t[e]=Qs(t[e],t)}),t}),Pu=mr(),Bu=mr(!0),Wu=ki(function(t,e){return function(n){return rn(n,t,e)}}),Du=ki(function(t,e){return function(n){return rn(t,n,e)}}),Hu=xr(g),Uu=xr(f),Vu=xr(_),$u=kr(),Gu=kr(!0),Ku=br(function(t,e){return t+e}),Xu=Er("ceil"),Zu=br(function(t,e){return t/e}),Ju=Er("floor"),Yu=br(function(t,e){return t*e}),Qu=Er("round"),ta=br(function(t,e){return t-e});return n.after=function(t,e){if("function"!=typeof e)throw new go(X);return t=Hi(t),function(){if(--t<1)return e.apply(this,arguments)}},n.ary=bi,n.assign=du,n.assignIn=pu,n.assignInWith=gu,n.assignWith=vu,n.at=mu,n.before=xi,n.bind=Qs,n.bindAll=Fu,n.bindKey=tu,n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return lu(t)?t:[t]},n.chain=di,n.chunk=function(t,e,n){e=(n?$r(t,e,n):e===$)?1:Vo(Hi(e),0);var r=t?t.length:0;if(!r||e<1)return[];for(var i=0,o=0,s=Array(Po(r/e));i<r;)s[o++]=Pn(t,i,i+=e);return s},n.compact=function(t){for(var e=-1,n=t?t.length:0,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},n.concat=function(){for(var t=arguments.length,e=Array(t?t-1:0),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return t?v(lu(n)?sr(n):[n],Ge(e,1)):[]},n.cond=function(t){var e=t?t.length:0,n=Nr();return t=e?g(t,function(t){if("function"!=typeof t[1])throw new go(X);return[n(t[0]),t[1]]}):[],ki(function(n){for(var r=-1;++r<e;){var i=t[r];if(a(i[0],this,n))return a(i[1],this,n)}})},n.conforms=function(t){return function(t){var e=Zi(t),n=e.length;return function(r){if(null==r)return!n;for(var i=n;i--;){var o=e[i],s=t[o],u=r[o];if(u===$&&!(o in Object(r))||!s(u))return!1}return!0}}(Be(t,!0))},n.constant=no,n.countBy=Vs,n.create=function(t,e){var n=We(t);return e?qe(n,e):n},n.curry=function t(e,n,r){var i=zr(e,et,$,$,$,$,$,n=r?$:n);return i.placeholder=t.placeholder,i},n.curryRight=function t(e,n,r){var i=zr(e,nt,$,$,$,$,$,n=r?$:n);return i.placeholder=t.placeholder,i},n.debounce=wi,n.defaults=yu,n.defaultsDeep=_u,n.defer=eu,n.delay=nu,n.difference=Es,n.differenceBy=Ms,n.differenceWith=zs,n.drop=ri,n.dropRight=ii,n.dropRightWhile=function(t,e){return t&&t.length?Kn(t,Nr(e,3),!0,!0):[]},n.dropWhile=function(t,e){return t&&t.length?Kn(t,Nr(e,3),!0):[]},n.fill=function(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&$r(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=Hi(n))<0&&(n=-n>i?0:i+n),(r=r===$||r>i?i:Hi(r))<0&&(r+=i),r=n>r?0:Ui(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},n.filter=function(t,e){return(lu(t)?h:$e)(t,Nr(e,3))},n.flatMap=function(t,e){return Ge(mi(t,e),1)},n.flatMapDeep=function(t,e){return Ge(mi(t,e),mt)},n.flatMapDepth=function(t,e,n){return n=n===$?1:Hi(n),Ge(mi(t,e),n)},n.flatten=function(t){return t&&t.length?Ge(t,1):[]},n.flattenDeep=function(t){return t&&t.length?Ge(t,mt):[]},n.flattenDepth=function(t,e){return t&&t.length?Ge(t,e=e===$?1:Hi(e)):[]},n.flip=function(t){return zr(t,ut)},n.flow=Pu,n.flowRight=Bu,n.fromPairs=function(t){for(var e=-1,n=t?t.length:0,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},n.functions=function(t){return null==t?[]:Ze(t,Zi(t))},n.functionsIn=function(t){return null==t?[]:Ze(t,Ji(t))},n.groupBy=Ks,n.initial=function(t){return ii(t,1)},n.intersection=As,n.intersectionBy=Cs,n.intersectionWith=Ts,n.invert=bu,n.invertBy=xu,n.invokeMap=Xs,n.iteratee=io,n.keyBy=Zs,n.keys=Zi,n.keysIn=Ji,n.map=mi,n.mapKeys=function(t,e){var n={};return e=Nr(e,3),Ke(t,function(t,r,i){n[e(t,r,i)]=t}),n},n.mapValues=function(t,e){var n={};return e=Nr(e,3),Ke(t,function(t,r,i){n[r]=e(t,r,i)}),n},n.matches=function(t){return Sn(Be(t,!0))},n.matchesProperty=function(t,e){return kn(t,Be(e,!0))},n.memoize=Si,n.merge=Su,n.mergeWith=ku,n.method=Wu,n.methodOf=Du,n.mixin=oo,n.negate=function(t){if("function"!=typeof t)throw new go(X);return function(){return!t.apply(this,arguments)}},n.nthArg=function(t){return t=Hi(t),ki(function(e){return En(e,t)})},n.omit=ju,n.omitBy=function(t,e){return e=Nr(e),Tn(t,function(t,n){return!e(t,n)})},n.once=function(t){return xi(2,t)},n.orderBy=function(t,e,n,r){return null==t?[]:(lu(e)||(e=null==e?[]:[e]),lu(n=r?$:n)||(n=null==n?[]:[n]),Mn(t,e,n))},n.over=Hu,n.overArgs=ru,n.overEvery=Uu,n.overSome=Vu,n.partial=iu,n.partialRight=ou,n.partition=Js,n.pick=Ou,n.pickBy=function(t,e){return null==t?{}:Tn(t,Nr(e))},n.property=uo,n.propertyOf=function(t){return function(e){return null==t?$:Je(t,e)}},n.pull=Is,n.pullAll=li,n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Nn(t,e,Nr(n)):t},n.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Nn(t,e,$,n):t},n.pullAt=Ns,n.range=$u,n.rangeRight=Gu,n.rearg=su,n.reject=function(t,e){var n=lu(t)?h:$e;return e=Nr(e,3),n(t,function(t,n,r){return!e(t,n,r)})},n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Nr(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return Ln(t,i),n},n.rest=ki,n.reverse=ci,n.sampleSize=yi,n.set=function(t,e,n){return null==t?t:Fn(t,e,n)},n.setWith=function(t,e,n,r){return r="function"==typeof r?r:$,null==t?t:Fn(t,e,n,r)},n.shuffle=function(t){return yi(t,xt)},n.slice=function(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&$r(t,e,n)?(e=0,n=r):(e=null==e?0:Hi(e),n=n===$?r:Hi(n)),Pn(t,e,n)):[]},n.sortBy=Ys,n.sortedUniq=function(t){return t&&t.length?Hn(t):[]},n.sortedUniqBy=function(t,e){return t&&t.length?Hn(t,Nr(e)):[]},n.split=function(t,e,n){return n&&"number"!=typeof n&&$r(t,e,n)&&(e=n=$),(n=n===$?xt:n>>>0)?(t=Gi(t))&&("string"==typeof e||null!=e&&!qi(e))&&""==(e=Vn(e))&&fn.test(t)?er(U(t),0,n):Jo.call(t,e,n):[]},n.spread=function(t,e){if("function"!=typeof t)throw new go(X);return e=e===$?0:Vo(Hi(e),0),ki(function(n){var r=n[e],i=er(n,0,e);return r&&v(i,r),a(t,this,i)})},n.tail=function(t){return ri(t,1)},n.take=function(t,e,n){return t&&t.length?Pn(t,0,(e=n||e===$?1:Hi(e))<0?0:e):[]},n.takeRight=function(t,e,n){var r=t?t.length:0;return r?Pn(t,(e=r-(e=n||e===$?1:Hi(e)))<0?0:e,r):[]},n.takeRightWhile=function(t,e){return t&&t.length?Kn(t,Nr(e,3),!1,!0):[]},n.takeWhile=function(t,e){return t&&t.length?Kn(t,Nr(e,3)):[]},n.tap=function(t,e){return e(t),t},n.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new go(X);return Ii(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wi(t,e,{leading:r,maxWait:e,trailing:i})},n.thru=pi,n.toArray=Wi,n.toPairs=Eu,n.toPairsIn=Mu,n.toPath=function(t){return lu(t)?g(t,ti):Pi(t)?[t]:sr(Os(t))},n.toPlainObject=$i,n.transform=function(t,e,n){var r=lu(t)||Bi(t);if(e=Nr(e,4),null==n)if(r||Ii(t)){var i=t.constructor;n=r?lu(t)?new i:[]:Ai(i)?We(Fr(t)):{}}else n={};return(r?c:Ke)(t,function(t,r,i){return e(n,t,r,i)}),n},n.unary=function(t){return bi(t,1)},n.union=Ls,n.unionBy=Rs,n.unionWith=qs,n.uniq=function(t){return t&&t.length?$n(t):[]},n.uniqBy=function(t,e){return t&&t.length?$n(t,Nr(e)):[]},n.uniqWith=function(t,e){return t&&t.length?$n(t,$,e):[]},n.unset=function(t,e){return null==t||function(t,e){t=Qr(t,e=Gr(e,t)?[e]:tr(e));var n=ti(ai(e));return!(null!=t&&tn(t,n))||delete t[n]}(t,e)},n.unzip=fi,n.unzipWith=hi,n.update=function(t,e,n){return null==t?t:Gn(t,e,Qn(n))},n.updateWith=function(t,e,n,r){return r="function"==typeof r?r:$,null==t?t:Gn(t,e,Qn(n),r)},n.values=Yi,n.valuesIn=function(t){return null==t?[]:z(t,Ji(t))},n.without=Fs,n.words=eo,n.wrap=function(t,e){return iu(e=null==e?ro:e,t)},n.xor=Ps,n.xorBy=Bs,n.xorWith=Ws,n.zip=Ds,n.zipObject=function(t,e){return Jn(t||[],e||[],Ne)},n.zipObjectDeep=function(t,e){return Jn(t||[],e||[],Fn)},n.zipWith=Hs,n.entries=Eu,n.entriesIn=Mu,n.extend=pu,n.extendWith=gu,oo(n,n),n.add=Ku,n.attempt=qu,n.camelCase=zu,n.capitalize=Qi,n.ceil=Xu,n.clamp=function(t,e,n){return n===$&&(n=e,e=$),n!==$&&(n=(n=Vi(n))==n?n:0),e!==$&&(e=(e=Vi(e))==e?e:0),Pe(Vi(t),e,n)},n.clone=function(t){return Be(t,!1,!0)},n.cloneDeep=function(t){return Be(t,!0,!0)},n.cloneDeepWith=function(t,e){return Be(t,!0,!0,e)},n.cloneWith=function(t,e){return Be(t,!1,!0,e)},n.deburr=to,n.divide=Zu,n.endsWith=function(t,e,n){t=Gi(t),e=Vn(e);var r=t.length;return n=n===$?r:Pe(Hi(n),0,r),(n-=e.length)>=0&&t.indexOf(e,n)==n},n.eq=ji,n.escape=function(t){return(t=Gi(t))&&ie.test(t)?t.replace(ne,L):t},n.escapeRegExp=function(t){return(t=Gi(t))&&he.test(t)?t.replace(fe,"\\$&"):t},n.every=function(t,e,n){var r=lu(t)?f:Ue;return n&&$r(t,e,n)&&(e=$),r(t,Nr(e,3))},n.find=$s,n.findIndex=oi,n.findKey=function(t,e){return b(t,Nr(e,3),Ke)},n.findLast=Gs,n.findLastIndex=si,n.findLastKey=function(t,e){return b(t,Nr(e,3),Xe)},n.floor=Ju,n.forEach=gi,n.forEachRight=vi,n.forIn=function(t,e){return null==t?t:ms(t,Nr(e,3),Ji)},n.forInRight=function(t,e){return null==t?t:ys(t,Nr(e,3),Ji)},n.forOwn=function(t,e){return t&&Ke(t,Nr(e,3))},n.forOwnRight=function(t,e){return t&&Xe(t,Nr(e,3))},n.get=Ki,n.gt=uu,n.gte=au,n.has=function(t,e){return null!=t&&Wr(t,e,tn)},n.hasIn=Xi,n.head=ui,n.identity=ro,n.includes=function(t,e,n,r){t=Ei(t)?t:Yi(t),n=n&&!r?Hi(n):0;var i=t.length;return n<0&&(n=Vo(i+n,0)),Fi(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&w(t,e,n)>-1},n.indexOf=function(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=null==n?0:Hi(n);return i<0&&(i=Vo(r+i,0)),w(t,e,i)},n.inRange=function(t,e,n){return e=Vi(e)||0,n===$?(n=e,e=0):n=Vi(n)||0,function(t,e,n){return t>=$o(e,n)&&t<Vo(e,n)}(t=Vi(t),e,n)},n.invoke=wu,n.isArguments=Oi,n.isArray=lu,n.isArrayBuffer=function(t){return Ni(t)&&jo.call(t)==Wt},n.isArrayLike=Ei,n.isArrayLikeObject=Mi,n.isBoolean=function(t){return!0===t||!1===t||Ni(t)&&jo.call(t)==Ot},n.isBuffer=cu,n.isDate=function(t){return Ni(t)&&jo.call(t)==Et},n.isElement=function(t){return!!t&&1===t.nodeType&&Ni(t)&&!Ri(t)},n.isEmpty=function(t){if(Ei(t)&&(lu(t)||Fi(t)||Ai(t.splice)||Oi(t)||cu(t)))return!t.length;if(Ni(t)){var e=Br(t);if(e==Ct||e==Rt)return!t.size}for(var n in t)if(wo.call(t,n))return!1;return!(os&&Zi(t).length)},n.isEqual=function(t,e){return on(t,e)},n.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:$)?n(t,e):$;return r===$?on(t,e,n):!!r},n.isError=zi,n.isFinite=function(t){return"number"==typeof t&&Do(t)},n.isFunction=Ai,n.isInteger=Ci,n.isLength=Ti,n.isMap=function(t){return Ni(t)&&Br(t)==Ct},n.isMatch=function(t,e){return t===e||sn(t,e,Rr(e))},n.isMatchWith=function(t,e,n){return n="function"==typeof n?n:$,sn(t,e,Rr(e),n)},n.isNaN=function(t){return Li(t)&&t!=+t},n.isNative=function(t){if(ks(t))throw new fo("This method is not supported with `core-js`. Try https://github.com/es-shims.");return ln(t)},n.isNil=function(t){return null==t},n.isNull=function(t){return null===t},n.isNumber=Li,n.isObject=Ii,n.isObjectLike=Ni,n.isPlainObject=Ri,n.isRegExp=qi,n.isSafeInteger=function(t){return Ci(t)&&t>=-yt&&t<=yt},n.isSet=function(t){return Ni(t)&&Br(t)==Rt},n.isString=Fi,n.isSymbol=Pi,n.isTypedArray=Bi,n.isUndefined=function(t){return t===$},n.isWeakMap=function(t){return Ni(t)&&Br(t)==Pt},n.isWeakSet=function(t){return Ni(t)&&jo.call(t)==Bt},n.join=function(t,e){return t?Ho.call(t,e):""},n.kebabCase=Au,n.last=ai,n.lastIndexOf=function(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if(n!==$&&(i=((i=Hi(n))<0?Vo(r+i,0):$o(i,r-1))+1),e!=e)return q(t,i-1,!0);for(;i--;)if(t[i]===e)return i;return-1},n.lowerCase=Cu,n.lowerFirst=Tu,n.lt=fu,n.lte=hu,n.max=function(t){return t&&t.length?Ve(t,ro,Qe):$},n.maxBy=function(t,e){return t&&t.length?Ve(t,Nr(e),Qe):$},n.mean=function(t){return k(t,ro)},n.meanBy=function(t,e){return k(t,Nr(e))},n.min=function(t){return t&&t.length?Ve(t,ro,_n):$},n.minBy=function(t,e){return t&&t.length?Ve(t,Nr(e),_n):$},n.stubArray=ao,n.stubFalse=lo,n.stubObject=function(){return{}},n.stubString=function(){return""},n.stubTrue=function(){return!0},n.multiply=Yu,n.nth=function(t,e){return t&&t.length?En(t,Hi(e)):$},n.noConflict=function(){return zn._===this&&(zn._=Oo),this},n.noop=so,n.now=_i,n.pad=function(t,e,n){t=Gi(t);var r=(e=Hi(e))?H(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return wr(Bo(i),n)+t+wr(Po(i),n)},n.padEnd=function(t,e,n){t=Gi(t);var r=(e=Hi(e))?H(t):0;return e&&r<e?t+wr(e-r,n):t},n.padStart=function(t,e,n){t=Gi(t);var r=(e=Hi(e))?H(t):0;return e&&r<e?wr(e-r,n)+t:t},n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),t=Gi(t).replace(de,""),Go(t,e||(be.test(t)?16:10))},n.random=function(t,e,n){if(n&&"boolean"!=typeof n&&$r(t,e,n)&&(e=n=$),n===$&&("boolean"==typeof e?(n=e,e=$):"boolean"==typeof t&&(n=t,t=$)),t===$&&e===$?(t=0,e=1):(t=Vi(t)||0,e===$?(e=t,t=0):e=Vi(e)||0),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Ko();return $o(t+i*(e-t+xn("1e-"+((i+"").length-1))),e)}return Rn(t,e)},n.reduce=function(t,e,n){var r=lu(t)?m:j,i=arguments.length<3;return r(t,Nr(e,4),n,i,gs)},n.reduceRight=function(t,e,n){var r=lu(t)?y:j,i=arguments.length<3;return r(t,Nr(e,4),n,i,vs)},n.repeat=function(t,e,n){return e=(n?$r(t,e,n):e===$)?1:Hi(e),qn(Gi(t),e)},n.replace=function(){var t=arguments,e=Gi(t[0]);return t.length<3?e:Xo.call(e,t[1],t[2])},n.result=function(t,e,n){var r=-1,i=(e=Gr(e,t)?[e]:tr(e)).length;for(i||(t=$,i=1);++r<i;){var o=null==t?$:t[ti(e[r])];o===$&&(r=i,o=n),t=Ai(o)?o.call(t):o}return t},n.round=Qu,n.runInContext=t,n.sample=function(t){var e=Ei(t)?t:Yi(t),n=e.length;return n>0?e[Rn(0,n-1)]:$},n.size=function(t){if(null==t)return 0;if(Ei(t)){var e=t.length;return e&&Fi(t)?H(t):e}if(Ni(t)){var n=Br(t);if(n==Ct||n==Rt)return t.size}return Zi(t).length},n.snakeCase=Iu,n.some=function(t,e,n){var r=lu(t)?_:Bn;return n&&$r(t,e,n)&&(e=$),r(t,Nr(e,3))},n.sortedIndex=function(t,e){return Wn(t,e)},n.sortedIndexBy=function(t,e,n){return Dn(t,e,Nr(n))},n.sortedIndexOf=function(t,e){var n=t?t.length:0;if(n){var r=Wn(t,e);if(r<n&&ji(t[r],e))return r}return-1},n.sortedLastIndex=function(t,e){return Wn(t,e,!0)},n.sortedLastIndexBy=function(t,e,n){return Dn(t,e,Nr(n),!0)},n.sortedLastIndexOf=function(t,e){if(t&&t.length){var n=Wn(t,e,!0)-1;if(ji(t[n],e))return n}return-1},n.startCase=Nu,n.startsWith=function(t,e,n){return t=Gi(t),n=Pe(Hi(n),0,t.length),t.lastIndexOf(Vn(e),n)==n},n.subtract=ta,n.sum=function(t){return t&&t.length?O(t,ro):0},n.sumBy=function(t,e){return t&&t.length?O(t,Nr(e)):0},n.template=function(t,e,r){var i=n.templateSettings;r&&$r(t,e,r)&&(e=$),t=Gi(t),e=gu({},e,i,Te);var o,s,u=gu({},e.imports,i.imports,Te),a=Zi(u),l=z(u,a),c=0,f=e.interpolate||Ee,h="__p += '",d=po((e.escape||Ee).source+"|"+f.source+"|"+(f===ue?ye:Ee).source+"|"+(e.evaluate||Ee).source+"|$","g"),p="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++pn+"]")+"\n";t.replace(d,function(e,n,r,i,u,a){return r||(r=i),h+=t.slice(c,a).replace(Me,R),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),u&&(s=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=a+e.length,e}),h+="';\n";var g=e.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(s?h.replace(Yt,""):h).replace(Qt,"$1").replace(te,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=qu(function(){return Function(a,p+"return "+h).apply($,l)});if(v.source=h,zi(v))throw v;return v},n.times=function(t,e){if((t=Hi(t))<1||t>yt)return[];var n=xt,r=$o(t,xt);e=Nr(e),t-=xt;for(var i=E(r,e);++n<t;)e(n);return i},n.toFinite=Di,n.toInteger=Hi,n.toLength=Ui,n.toLower=function(t){return Gi(t).toLowerCase()},n.toNumber=Vi,n.toSafeInteger=function(t){return Pe(Hi(t),-yt,yt)},n.toString=Gi,n.toUpper=function(t){return Gi(t).toUpperCase()},n.trim=function(t,e,n){if((t=Gi(t))&&(n||e===$))return t.replace(de,"");if(!t||!(e=Vn(e)))return t;var r=U(t),i=U(e);return er(r,C(r,i),T(r,i)+1).join("")},n.trimEnd=function(t,e,n){if((t=Gi(t))&&(n||e===$))return t.replace(ge,"");if(!t||!(e=Vn(e)))return t;var r=U(t);return er(r,0,T(r,U(e))+1).join("")},n.trimStart=function(t,e,n){if((t=Gi(t))&&(n||e===$))return t.replace(pe,"");if(!t||!(e=Vn(e)))return t;var r=U(t);return er(r,C(r,U(e))).join("")},n.truncate=function(t,e){var n=ct,r=ft;if(Ii(e)){var i="separator"in e?e.separator:i;n="length"in e?Hi(e.length):n,r="omission"in e?Vn(e.omission):r}var o=(t=Gi(t)).length;if(fn.test(t)){var s=U(t);o=s.length}if(n>=o)return t;var u=n-H(r);if(u<1)return r;var a=s?er(s,0,u).join(""):t.slice(0,u);if(i===$)return a+r;if(s&&(u+=a.length-u),qi(i)){if(t.slice(u).search(i)){var l,c=a;for(i.global||(i=po(i.source,Gi(_e.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;a=a.slice(0,f===$?u:f)}}else if(t.indexOf(Vn(i),u)!=u){var h=a.lastIndexOf(i);h>-1&&(a=a.slice(0,h))}return a+r},n.unescape=function(t){return(t=Gi(t))&&re.test(t)?t.replace(ee,V):t},n.uniqueId=function(t){var e=++So;return Gi(t)+e},n.upperCase=Lu,n.upperFirst=Ru,n.each=gi,n.eachRight=vi,n.first=ui,oo(n,function(){var t={};return Ke(n,function(e,r){wo.call(n.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),n.VERSION=G,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){n[t].placeholder=n}),c(["drop","take"],function(t,e){s.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new s(this);n=n===$?1:Vo(Hi(n),0);var i=this.clone();return r?i.__takeCount__=$o(n,i.__takeCount__):i.__views__.push({size:$o(n,xt),type:t+(i.__dir__<0?"Right":"")}),i},s.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),c(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==pt||n==vt;s.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Nr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),c(["head","last"],function(t,e){var n="take"+(e?"Right":"");s.prototype[t]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");s.prototype[t]=function(){return this.__filtered__?new s(this):this[n](1)}}),s.prototype.compact=function(){return this.filter(ro)},s.prototype.find=function(t){return this.filter(t).head()},s.prototype.findLast=function(t){return this.reverse().find(t)},s.prototype.invokeMap=ki(function(t,e){return"function"==typeof t?new s(this):this.map(function(n){return rn(n,t,e)})}),s.prototype.reject=function(t){return t=Nr(t,3),this.filter(function(e){return!t(e)})},s.prototype.slice=function(t,e){t=Hi(t);var n=this;return n.__filtered__&&(t>0||e<0)?new s(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==$&&(n=(e=Hi(e))<0?n.dropRight(-e):n.take(e-t)),n)},s.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},s.prototype.toArray=function(){return this.take(xt)},Ke(s.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),u=n[o?"take"+("last"==e?"Right":""):e],a=o||/^find/.test(e);u&&(n.prototype[e]=function(){var e=this.__wrapped__,l=o?[1]:arguments,c=e instanceof s,f=l[0],h=c||lu(e),d=function(t){var e=u.apply(n,v([t],l));return o&&p?e[0]:e};h&&r&&"function"==typeof f&&1!=f.length&&(c=h=!1);var p=this.__chain__,g=!!this.__actions__.length,m=a&&!p,y=c&&!g;if(!a&&h){e=y?e:new s(this);var _=t.apply(e,l);return _.__actions__.push({func:pi,args:[d],thisArg:$}),new i(_,p)}return m&&y?t.apply(this,l):(_=this.thru(d),m?o?_.value()[0]:_.value():_)})}),c(["pop","push","shift","sort","splice","unshift"],function(t){var e=vo[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(lu(n)?n:[],t)}return this[r](function(n){return e.apply(lu(n)?n:[],t)})}}),Ke(s.prototype,function(t,e){var r=n[e];if(r){var i=r.name+"";(ss[i]||(ss[i]=[])).push({name:e,func:r})}}),ss[yr($,Q).name]=[{name:"wrapper",func:$}],s.prototype.clone=function(){var t=new s(this.__wrapped__);return t.__actions__=sr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=sr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=sr(this.__views__),t},s.prototype.reverse=function(){if(this.__filtered__){var t=new s(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},s.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=lu(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=$o(e,t+s);break;case"takeRight":t=Vo(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,u=o.end,a=u-s,l=r?u:s-1,c=this.__iteratees__,f=c.length,h=0,d=$o(a,this.__takeCount__);if(!n||i<K||i==a&&d==a)return Xn(t,this.__actions__);var p=[];t:for(;a--&&h<d;){for(var g=-1,v=t[l+=e];++g<f;){var m=c[g],y=m.iteratee,_=m.type,b=y(v);if(_==gt)v=b;else if(!b){if(_==pt)continue t;break t}}p[h++]=v}return p},n.prototype.at=Us,n.prototype.chain=function(){return di(this)},n.prototype.commit=function(){return new i(this.value(),this.__chain__)},n.prototype.next=function(){this.__values__===$&&(this.__values__=Wi(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?$:this.__values__[this.__index__++]}},n.prototype.plant=function(t){for(var e,n=this;n instanceof r;){var i=ni(n);i.__index__=0,i.__values__=$,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e},n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof s){var e=t;return this.__actions__.length&&(e=new s(this)),(e=e.reverse()).__actions__.push({func:pi,args:[ci],thisArg:$}),new i(e,this.__chain__)}return this.thru(ci)},n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=function(){return Xn(this.__wrapped__,this.__actions__)},No&&(n.prototype[No]=function(){return this}),n}();(En||{})._=An,"object"==o(n(53))&&n(53)?(r=function(){return An}.call(e,n,e,t))===$||(t.exports=r):kn?((kn.exports=An)._=An,Sn._=An):zn._=An}).call(void 0)}).call(e,n(20)(t),function(){return this}())},function(t,e,n){"use strict";var r=n(54),i=n(2);t.exports=i.extend({renderSubviews:function(){var t=this.el,e=void 0!=t.parentNode;if(e)var n=function(t){var e=t.parentNode,n=t.nextSibling;return e.removeChild(t),function(){n?e.insertBefore(t,n):e.appendChild(t)}}(t);!function(t){for(var e;e=t.lastChild;)t.removeChild(e)}(t);for(var i,o,s=document.createDocumentFragment(),u=this._views(),a=r.sortBy(u,function(t){return t.ordering}),l=0;l<a.length;l++)(i=a[l]).render(),null!=(o=i.el)&&s.appendChild(o);return t.appendChild(s),e&&n(),t},addView:function(t,e){var n=this._views();if(null==e)throw"Invalid plugin. ";return null==e.ordering&&(e.ordering=t),n[t]=e},removeViews:function(){var t,e,n=this._views();for(e in n)(t=n[e]).undelegateEvents(),t.unbind(),null!=t.removeViews&&t.removeViews(),t.remove();return this.views={}},removeView:function(t){var e=this._views();return e[t].remove(),delete e[t]},getView:function(t){return this._views()[t]},remove:function(){return this.removeViews(),i.prototype.remove.apply(this)},_views:function(){return null==this.views&&(this.views={}),this.views}})},function(t,e,n){var r;(function(t){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(o){function s(t,e){var n,r;for(n in this.originalEvent=t,r=function(t,e){"preventDefault"===t?this[t]=function(){return this.defaultPrevented=!0,e[t]()}:"stopImmediatePropagation"===t?this[t]=function(){return this.immediatePropagationStopped=!0,e[t]()}:y(e[t])?this[t]=function(){return e[t]()}:this[t]=e[t]},t)(t[n]||"function"==typeof t[n])&&r.call(this,n,t);b.extend(this,e,{isImmediatePropagationStopped:function(){return!!this.immediatePropagationStopped}})}var u,a=o.$,l=o.jBone,c=/^<(\w+)\s*\/?>$/,f=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,h=[].slice,d=[].splice,p=Object.keys,g=document,v=function(t){return"string"==typeof t},m=function(t){return t instanceof Object},y=function(t){return"[object Function]"==={}.toString.call(t)},_=function(t){return Array.isArray(t)},b=function(t,e){return new u.init(t,e)};b.noConflict=function(){return o.$=a,o.jBone=l,b},(u=b.fn=b.prototype={init:function(t,e){var n,r,i,o;if(!t)return this;if(v(t)){if(r=c.exec(t))return this[0]=g.createElement(r[1]),this.length=1,m(e)&&this.attr(e),this;if((r=f.exec(t))&&r[1]){for(o=g.createDocumentFragment(),(i=g.createElement("div")).innerHTML=t;i.lastChild;)o.appendChild(i.firstChild);return n=h.call(o.childNodes),b.merge(this,n)}if(b.isElement(e))return b(e).find(t);try{return n=g.querySelectorAll(t),b.merge(this,n)}catch(t){return this}}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?t():t instanceof b?t:b.makeArray(t,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}).constructor=b,u.init.prototype=u,b.setId=function(t){var e=t.jid;t===o?e="window":void 0===t.jid&&(t.jid=e=++b._cache.jid),b._cache.events[e]||(b._cache.events[e]={})},b.getData=function(t){var e=(t=t instanceof b?t[0]:t)===o?"window":t.jid;return{jid:e,events:b._cache.events[e]}},b.isElement=function(t){return t&&t instanceof b||t instanceof HTMLElement||v(t)},b._cache={events:{},jid:0},u.pushStack=function(t){return b.merge(this.constructor(),t)},b.merge=function(t,e){for(var n=e.length,r=t.length,i=0;i<n;)t[r++]=e[i++];return t.length=r,t},b.contains=function(t,e){return t.contains(e)},b.extend=function(t){var e;return d.call(arguments,1).forEach(function(n){if(e=t,n)for(var r in n)e[r]=n[r]}),t},b.makeArray=function(t,e){var n=e||[];return null!==t&&(function(t){var e=t.length,n=void 0===t?"undefined":i(t);return!y(n)&&t!==o&&(!(1!==t.nodeType||!e)||_(n)||0===e||"number"==typeof e&&e>0&&e-1 in t)}(t)?b.merge(n,v(t)?[t]:t):n.push(t)),n},b.unique=function(t){if(null==t)return[];for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.indexOf(i)<0&&e.push(i)}return e},b.Event=function(t,e){var n,r;return t.type&&!e&&(e=t,t=t.type),n=t.split(".").splice(1).join("."),r=t.split(".")[0],(t=g.createEvent("Event")).initEvent(r,!0,!0),b.extend(t,{namespace:n,isDefaultPrevented:function(){return t.defaultPrevented}},e)},b.event={add:function(t,e,n,r,i){b.setId(t);var o,s,u,a=function(e){b.event.dispatch.call(t,e)},l=b.getData(t).events;for(s=(e=e.split(" ")).length;s--;)l[o=(u=e[s]).split(".")[0]]=l[o]||[],l[o].length?a=l[o][0].fn:t.addEventListener&&t.addEventListener(o,a,!1),l[o].push({namespace:u.split(".").splice(1).join("."),fn:a,selector:i,data:r,originfn:n})},remove:function(t,e,n,r){var i,o,s=function(t,e,r,i,o){var s;(n&&o.originfn===n||!n)&&(s=o.fn),t[e][r].fn===s&&(t[e].splice(r,1),t[e].length||i.removeEventListener(e,s))},u=b.getData(t).events;if(u)return!e&&u?p(u).forEach(function(e){for(o=u[e],i=o.length;i--;)s(u,e,i,t,o[i])}):void e.split(" ").forEach(function(e){var n,a=e.split(".")[0],l=e.split(".").splice(1).join(".");if(u[a])for(o=u[a],i=o.length;i--;)n=o[i],(!l||l&&n.namespace===l)&&(!r||r&&n.selector===r)&&s(u,a,i,t,n);else l&&p(u).forEach(function(e){for(o=u[e],i=o.length;i--;)(n=o[i]).namespace.split(".")[0]===l.split(".")[0]&&s(u,e,i,t,n)})})},trigger:function(t,e){var n=[];v(e)?n=e.split(" ").map(function(t){return b.Event(t)}):n=[e=e instanceof Event?e:b.Event(e)],n.forEach(function(e){e.type&&t.dispatchEvent&&t.dispatchEvent(e)})},dispatch:function(t){for(var e,n,r,i,o,u=0,a=0,l=this,c=b.getData(l).events[t.type],f=c.length,h=[],d=[];u<f;u++)h.push(c[u]);for(u=0,f=h.length;u<f&&~c.indexOf(h[u])&&(!i||!i.isImmediatePropagationStopped());u++)if(n=null,o={},(r=h[u]).data&&(o.data=r.data),r.selector){if(~(d=b(l).find(r.selector)).indexOf(t.target)&&(n=t.target)||l!==t.target&&l.contains(t.target)){if(!n)for(e=d.length,a=0;a<e;a++)d[a]&&d[a].contains(t.target)&&(n=d[a]);if(!n)continue;o.currentTarget=n,i=new s(t,o),t.namespace&&t.namespace!==r.namespace||r.originfn.call(n,i)}}else i=new s(t,o),t.namespace&&t.namespace!==r.namespace||r.originfn.call(l,i)}},u.on=function(t,e,n,r){var i=this.length,o=0;if(null==n&&null==r?(r=e,n=e=void 0):null==r&&("string"==typeof e?(r=n,n=void 0):(r=n,n=e,e=void 0)),!r)return this;for(;o<i;o++)b.event.add(this[o],t,r,n,e);return this},u.one=function(t){var e,n=arguments,r=0,i=this.length,o=h.call(n,1,n.length-1),s=h.call(n,-1)[0];for(e=function(e){var n=b(e);t.split(" ").forEach(function(t){n.on.apply(n,[t].concat(o,function r(i){n.off(t,r),s.call(e,i)}))})};r<i;r++)e(this[r]);return this},u.trigger=function(t){var e=0,n=this.length;if(!t)return this;for(;e<n;e++)b.event.trigger(this[e],t);return this},u.off=function(t,e,n){var r=0,i=this.length;for(y(e)&&(n=e,e=void 0);r<i;r++)b.event.remove(this[r],t,n,e);return this},u.find=function(t){for(var e=[],n=0,r=this.length,i=function(n){y(n.querySelectorAll)&&[].forEach.call(n.querySelectorAll(t),function(t){e.push(t)})};n<r;n++)i(this[n]);return b(e)},u.get=function(t){return null!=t?t<0?this[t+this.length]:this[t]:h.call(this)},u.eq=function(t){return b(this[t])},u.parent=function(){for(var t,e=[],n=0,r=this.length;n<r;n++)!~e.indexOf(t=this[n].parentElement)&&t&&e.push(t);return b(e)},u.toArray=function(){return h.call(this)},u.is=function(){var t=arguments;return this.some(function(e){return e.tagName.toLowerCase()===t[0]})},u.has=function(){var t=arguments;return this.some(function(e){return e.querySelectorAll(t[0]).length})},u.add=function(t,e){return this.pushStack(b.unique(b.merge(this.get(),b(t,e))))},u.attr=function(t,e){var n,r=arguments,i=0,o=this.length;if(v(t)&&1===r.length)return this[0]&&this[0].getAttribute(t);for(2===r.length?n=function(n){n.setAttribute(t,e)}:m(t)&&(n=function(e){p(t).forEach(function(n){e.setAttribute(n,t[n])})});i<o;i++)n(this[i]);return this},u.removeAttr=function(t){for(var e=0,n=this.length;e<n;e++)this[e].removeAttribute(t);return this},u.val=function(t){var e=0,n=this.length;if(0===arguments.length)return this[0]&&this[0].value;for(;e<n;e++)this[e].value=t;return this},u.css=function(t,e){var n,r=arguments,i=0,s=this.length;if(v(t)&&1===r.length)return this[0]&&o.getComputedStyle(this[0])[t];for(2===r.length?n=function(n){n.style[t]=e}:m(t)&&(n=function(e){p(t).forEach(function(n){e.style[n]=t[n]})});i<s;i++)n(this[i]);return this},u.data=function(t,e){var n,r=arguments,i={},o=0,s=this.length,u=function(t,e,n){m(n)?(t.jdata=t.jdata||{},t.jdata[e]=n):t.dataset[e]=n},a=function(t){return"true"===t||"false"!==t&&t};if(0===r.length)return this[0].jdata&&(i=this[0].jdata),p(this[0].dataset).forEach(function(t){i[t]=a(this[0].dataset[t])},this),i;if(1===r.length&&v(t))return this[0]&&a(this[0].dataset[t]||this[0].jdata&&this[0].jdata[t]);for(1===r.length&&m(t)?n=function(e){p(t).forEach(function(n){u(e,n,t[n])})}:2===r.length&&(n=function(n){u(n,t,e)});o<s;o++)n(this[o]);return this},u.removeData=function(t){for(var e,n,r=0,i=this.length;r<i;r++)if(e=this[r].jdata,n=this[r].dataset,t)e&&e[t]&&delete e[t],delete n[t];else{for(t in e)delete e[t];for(t in n)delete n[t]}return this},u.addClass=function(t){for(var e=0,n=0,r=this.length,i=t?t.trim().split(/\s+/):[];e<r;e++)for(n=0,n=0;n<i.length;n++)this[e].classList.add(i[n]);return this},u.removeClass=function(t){for(var e=0,n=0,r=this.length,i=t?t.trim().split(/\s+/):[];e<r;e++)for(n=0,n=0;n<i.length;n++)this[e].classList.remove(i[n]);return this},u.toggleClass=function(t,e){var n=0,r=this.length,i="toggle";if(!0===e&&(i="add")||!1===e&&(i="remove"),t)for(;n<r;n++)this[n].classList[i](t);return this},u.hasClass=function(t){var e=0,n=this.length;if(t)for(;e<n;e++)if(this[e].classList.contains(t))return!0;return!1},u.html=function(t){var e,n=arguments;return 1===n.length&&void 0!==t?this.empty().append(t):0===n.length&&(e=this[0])?e.innerHTML:this},u.append=function(t){var e,n=0,r=this.length;for(v(t)&&f.exec(t)?t=b(t):m(t)||(t=document.createTextNode(t)),t=t instanceof b?t:b(t),e=function(e,n){t.forEach(function(t){n?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})};n<r;n++)e(this[n],n);return this},u.appendTo=function(t){return b(t).append(this),this},u.empty=function(){for(var t,e=0,n=this.length;e<n;e++)for(t=this[e];t.lastChild;)t.removeChild(t.lastChild);return this},u.remove=function(){var t,e=0,n=this.length;for(this.off();e<n;e++)delete(t=this[e]).jdata,t.parentNode&&t.parentNode.removeChild(t);return this},"object"===i(t)&&t&&"object"===i(t.exports)?t.exports=b:(void 0!==(r=function(){return b}.call(e,n,e,t))&&(t.exports=r),o.jBone=o.$=b)}(window)}).call(e,n(20)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(91),i=r.extend({buildDOM:function(){return this.on("new:node",this.buildNode),this.on("new:button",this.buildButton),this.on("new:menu",this.buildMenu),r.prototype.buildDOM.call(this)},buildNode:function(t){if(null!=this.g)return t.style.lineHeight=this.g.menuconfig.get("menuItemLineHeight")},buildButton:function(t){if(null!=this.g)return t.style.fontSize=this.g.menuconfig.get("menuFontsize"),t.style.marginLeft=this.g.menuconfig.get("menuMarginLeft"),t.style.padding=this.g.menuconfig.get("menuPadding")},buildMenu:function(t){if(null!=this.g)return t.style.fontSize=this.g.menuconfig.get("menuItemFontsize")}});e.default=i},function(t,e){"use strict";var n={removeToInsertLater:function(t){var e,n;return n=t.parentNode,e=t.nextSibling,n.removeChild(t),function(){e?n.insertBefore(t,e):n.appendChild(t)}},removeAllChilds:function(t){for(0;t.firstChild;)0,t.removeChild(t.firstChild)}};t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.columnsel=e.rowsel=e.possel=e.sel=void 0;var r=n(3),i=n(1).Model.extend({defaults:{type:"super"}}),o=i.extend({defaults:(0,r.extend)({},i.prototype.defaults,{type:"row",seqId:""}),inRow:function(t){return t===this.get("seqId")},inColumn:function(t){return!0},getLength:function(){return 1}}),s=i.extend({defaults:(0,r.extend)({},i.prototype.defaults,{type:"column",xStart:-1,xEnd:-1}),inRow:function(){return!0},inColumn:function(t){return xStart<=t&&t<=xEnd},getLength:function(){return xEnd-xStart}}),u=o.extend((0,r.extend)({},(0,r.pick)(s,"inColumn"),(0,r.pick)(s,"getLength"),{defaults:(0,r.extend)({},s.prototype.defaults,o.prototype.defaults,{type:"pos"})}));e.sel=i,e.possel=u,e.rowsel=o,e.columnsel=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(3),o=n(1).Collection.extend({model:r.sel,initialize:function(t,e){if(void 0!==e&&null!==e)return this.g=e.g,this.listenTo(this.g,"residue:click",function(t){return this._handleE(t.evt,new r.possel({xStart:t.rowPos,xEnd:t.rowPos,seqId:t.seqId}))}),this.listenTo(this.g,"row:click",function(t){return this._handleE(t.evt,new r.rowsel({seqId:t.seqId}))}),this.listenTo(this.g,"column:click",function(t){return this._handleE(t.evt,new r.columnsel({xStart:t.rowPos,xEnd:t.rowPos+t.stepSize-1}))})},getSelForRow:function(t){return this.filter(function(e){return e.inRow(t)})},getSelForColumns:function(t){return this.filter(function(e){return e.inColumn(t)})},addJSON:function(t){return this.add(this._fromJSON(t))},_fromJSON:function(t){switch(t.type){case"column":return new r.columnsel(t);case"row":return new r.rowsel(t);case"pos":return new r.possel(t)}},resetJSON:function(t){return t=t.map(this._fromJSON),this.reset(t)},getBlocksForRow:function(t,e){for(var n=this.filter(function(e){return e.inRow(t)}),r=[],i=function(t,i){return"row"===(i=n[t]).attributes.type?(r=function(){var t=[],n=0;if(0<=e)for(;n<=e;)t.push(n++);else for(;n>=e;)t.push(n--);return t}(),"break"):void(r=r.concat(function(){var t=[],e=i.attributes.xStart;if(i.attributes.xStart<=i.attributes.xEnd)for(;e<=i.attributes.xEnd;)t.push(e++);else for(;e>=i.attributes.xEnd;)t.push(e--);return t}()))},o=0;o<n.length&&"break"!==i(o,void 0);o++);return r},getAllColumnBlocks:function(t){var e,n=(t.maxLen,t.withPos,[]);e=t.withPos?this.filter(function(t){return null!=t.get("xStart")}):this.filter(function(t){return"column"===t.get("type")});for(var r=function(t,r){r=e[t];n=n.concat(function(){var t=[],e=r.attributes.xStart;if(r.attributes.xStart<=r.attributes.xEnd)for(;e<=r.attributes.xEnd;)t.push(e++);else for(;e>=r.attributes.xEnd;)t.push(e--);return t}())},o=0;o<e.length;o++)r(o,void 0);return n=(0,i.uniq)(n)},invertRow:function(t){var e=this.where({type:"row"});e=e.map(function(t){return t.attributes.seqId});for(var n=(0,i.filter)(t,function(t){return!(e.indexOf(t)>=0)}),o=[],s=0;s<n.length;s++){var u=n[s];o.push(new r.rowsel({seqId:u}))}return this.reset(o)},invertCol:function(t){var e=this.where({type:"column"}).reduce(function(t,e){return t.concat(function(){var t=[],n=e.attributes.xStart;if(e.attributes.xStart<=e.attributes.xEnd)for(;n<=e.attributes.xEnd;)t.push(n++);else for(;n>=e.attributes.xEnd;)t.push(n--);return t}())},[]),n=(0,i.filter)(t,function(t){return!(e.indexOf(t)>=0)});if(0!==n.length){for(var o,s=[],u=n[0],a=u,l=0;l<n.length;l++)a+1===(o=n[l])?a=o:(s.push(new r.columnsel({xStart:u,xEnd:a})),u=a=o);return u!==a&&s.push(new r.columnsel({xStart:u,xEnd:n[n.length-1]})),this.reset(s)}},_handleE:function(t,e){return t.ctrlKey||t.metaKey?this.add(e):this.reset([e])},_reduceColumns:function(){return this.each(function(t,e,n){for(var r=(0,i.filter)(n,function(t){return"column"===t.get("type")}),o=t.get("xStart"),s=t.get("xEnd"),u=(0,i.filter)(r,function(t){return t.get("xEnd")===o-1}),a=0;a<u.length;a++)u[a].set("xEnd",o);for(var l=(0,i.filter)(r,function(t){return t.get("xStart")===s+1}),c=0;c<l.length;c++)l[c].set("xStart",s);if(u.length>0||l.length>0)return t.collection.remove(t)})}});e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.xhr=e.seqs=e.parser=e.newick=e.matrix=e.gff=e.fasta=e.clustal=void 0;var i=r(n(61)),o=r(n(62)),s=r(n(63)),u=r(n(65)),a=r(n(67)),l=r(n(11)),c=r(n(24));e.clustal=i.default,e.fasta=o.default,e.gff=s.default,e.matrix=u.default,e.newick=a.default,e.parser=l.default,e.seqs=c.default;var f=n(21);e.xhr=f;var h="imported";"undefined"!=typeof IO_VERSION&&(h=IO_VERSION),e.version=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=n(21),o={};e.default=o,o.read=function(t,e){var n=function(t){return function(n,r,i){return o._onRetrieval(n,i,e,t)}}(this);return void 0===e?new Promise(function(r,o){e=function(t,e){t?o(t):r(e)},i(t,n)}):i(t,n)},o._onRetrieval=function(t,e,n,r){var i=void 0;return void 0!==t&&(i=r.parse(e)),n.call(r,t,i)},o.extend=function(t,e){return extend(o,t,e)},o.mixin=function(t){return"object"!==(void 0===t?"undefined":r(t))&&(t=t.prototype),["read"].forEach(function(e){t[e]=o[e]},this),t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="http://www.w3.org/2000/svg",r=function(t,e){for(var n in e){var r=e[n];t.setAttributeNS(null,n,r)}return t};e.base=function(t){var e=document.createElementNS(n,"svg");return e.setAttribute("width",t.width),e.setAttribute("height",t.height),e},e.line=function(t){return r(document.createElementNS(n,"line"),t)},e.rect=function(t){return r(document.createElementNS(n,"rect"),t)},e.polygon=function(t){return r(document.createElementNS(n,"polygon"),t)}},function(t,e,n){"use strict";var r=n(71);r.onAll=function(t,e){return this.on("all",t,e),this},r.oldMixin=r.mixin,r.mixin=function(t){r.oldMixin(t);for(var e=["onAll"],n=0;n<e.length;n++){var i=e[n];t[i]=this[i]}return t},t.exports=r},function(t,e,n){(function(t){"use strict";var e={};e.d=e.defaultValue=function(t,e){return void 0===t?"function"==typeof t?e():e:t},e.id=function(t){return document.getElementById(t)},e.mk=function(t){return document.createElement(t)},void 0!==t&&void 0!==t.exports&&(t.exports=e)}).call(e,n(20)(t))},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"randomInt",value:function(t,e){if(void 0===e||null===e){var n=[0,t];t=n[0],e=n[1]}if(t>e){var r=[e,t];t=r[0],e=r[1]}return Math.floor(Math.random()*(e-t+1)+t)}},{key:"uniqueId",value:function(){for(var t=arguments.length<=0||void 0===arguments[0]?8:arguments[0],e="";e.length<t;)e+=Math.random().toString(36).substr(2);return e.substr(0,t)}},{key:"getRandomInt",value:function(t,e){return Math.floor(Math.random()*(e-t+1))+t}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(3),o=n(87),s=n(88),u={openInJalview:function(t,e){"."===t.charAt(0)&&(t=document.URL.substr(0,document.URL.lastIndexOf("/"))+"/"+t),t.indexOf("http")<0&&(t="http://"+window.location.hostname+t);var n="http://www.jalview.org/services/launchApp?open="+(t=encodeURIComponent(t));return n+="&colour="+e,window.open(n,"_blank")},publishWeb:function(t,e){var n=r.fasta.write(t.seqs.toJSON());return n=encodeURIComponent(n),(0,r.xhr)({method:"POST",body:"sprunge="+n,uri:"http://sprunge.biojs.net",headers:{"Content-Type":"application/x-www-form-urlencoded"}},function(t,n,r){return e(r.trim())})},shareLink:function(t,e){var n=t.g.config.get("importURL"),r=function(t){if(e)return e("http://msa.biojs.net/app/?seq="+t)};return n?r(n):u.publishWeb(t,r)},saveAsFile:function(t,e){var n=r.fasta.write(t.seqs.toJSON());return s(new Blob([n],{type:"text/plain"}),e)},saveSelection:function(t,e){var n=t.g.selcol.pluck("seqId");if(n.length>0)for(var i=(n=t.seqs.filter(function(t){return n.indexOf(t.get("id"))>=0})).length-1,o=0;0<i?o<=i:o>=i;0<i?o++:o--)n[o]=n[o].toJSON();else n=t.seqs.toJSON();var u=r.fasta.write(n);return s(new Blob([u],{type:"text/plain"}),e)},saveAnnots:function(t,e){var n=t.seqs.map(function(t){if(0!==(n=t.get("features")).length){var e=t.get("name");return n.each(function(t){return t.set("seqname",e)}),n.toJSON()}});n=(0,i.flatten)((0,i.compact)(n));var o=r.gff.exportLines(n);return s(new Blob([o],{type:"text/plain"}),e)},saveAsImg:function(t,e){var n=t.getView("stage").getView("body").getView("seqblock").el;if(void 0!==n&&null!==n)return s(o(n.toDataURL("image/png")),e,"image/png")}};e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=n(3),o=n(10),s=function(t){return t&&t.__esModule?t:{default:t}}(n(38)),u=function(t){return this.msa=t,this},a={guessFileFromText:function(t,e){if(void 0===t||null===t)return["","error"];switch((0,s.default)(t,e)){case"clustal":var n=o.clustal,r="seqs";break;case"fasta":n=o.fasta,r="seqs";break;case"newick":r="newick";break;case"gff":n=o.gff,r="features";break;default:alert("Unknown file format. Please contact us on Github for help.")}return[n,r]},parseText:function(t,e){var n=this.guessFileFromText(t,e),i=r(n,2),o=i[0],s=i[1];return"seqs"===s?[o.parse(t),s]:"features"===s?[o.parseSeqs(t),s]:[t,s]},importFiles:function(t){var e=this;return function(){for(var n=[],r=t.length-1,i=0;0<r?i<=r:i>=r;0<r?i++:i--){var o=t[i],s=new FileReader;s.onload=function(t){return e.importFile(t.target.result)},n.push(s.readAsText(o))}return n}()},importFile:function(t,e){var n=this;(e=e||{}).name=t.name;var i=this.parseText(t,e),o=r(i,2),s=o[0],u=o[1];return"error"===u?(alert("An error happened"),"error"):("seqs"===u?(this.msa.seqs.reset(s),this.msa.g.config.set("url","userimport"),this.msa.g.trigger("url:userImport")):"features"===u?this.msa.seqs.addFeatures(s):"newick"===u?this.msa.u.tree.loadTree(function(){return n.msa.u.tree.showTree(t)}):alert("Unknown file!"),t.name)},importURL:function(t,e){var n=this;return t=this.msa.u.proxy.corsURL(t),this.msa.g.config.set("url",t),(0,o.xhr)({url:t,timeout:0},function(r,i,o){return r?void 0:"error"!==n.importFile(o,{url:t})?(n.msa.g.trigger("import:url",t),e?e():void 0):void 0})}};(0,i.extend)(u.prototype,a),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i={loadScript:function(t,e){var n=r.mk("script");return n.type="text/javascript",n.src=t,n.async=!0,n.onload=n.onreadystatechange=function(){if(!(t||this.readyState&&"complete"!==this.readyState)){var t=!0;return e()}},document.getElementsByTagName("script")[0].parentNode.appendChild(n)},joinCb:function(t,e,n){e=e||1;var r=0,i=function(){if(++r===e)return t.call(n)};return function(t,e){return void 0===t||null===t?i():function(){var n;return n="apply",t.indexOf(n)>=0&&t.apply(e,arguments),i()}}}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return this.g=t.g,this},i={corsURL:function(t){return document.URL.indexOf("localhost")>=0&&"/"===t[0]?t:"."===t.charAt(0)||"/"===t.charAt(0)?t:(this.g.config.get("importProxyStripHttp")&&(t=(t=t.replace("http://","")).replace("https://","")),t=this.g.config.get("importProxy")+t)}};(0,n(3).extend)(r.prototype,i),e.default=r},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t,e,n){var r=t;return a(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=c(e,{uri:t}),r.callback=n,r}function i(t,e,n){return o(e=r(t,e,n))}function o(t){function e(t){clearTimeout(f),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,o),r=s}function n(){if(!c){var e;clearTimeout(f),e=t.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var n=o,i=null;0!==e?(n={body:function(){var t=void 0;if(t=u.response?u.response:u.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}(u),m)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:d,headers:{},url:h,rawRequest:u},u.getAllResponseHeaders&&(n.headers=l(u.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,n,n.body),r=s}}var r=t.callback;if(void 0===r)throw new Error("callback argument missing");var o={body:void 0,headers:{},statusCode:0,method:d,url:h,rawRequest:u},u=t.xhr||null;u||(u=t.cors||t.useXDR?new i.XDomainRequest:new i.XMLHttpRequest);var a,c,f,h=u.url=t.uri||t.url,d=u.method=t.method||"GET",p=t.body||t.data||null,g=u.headers=t.headers||{},v=!!t.sync,m=!1;if("json"in t&&(m=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(t.json))),u.onreadystatechange=function(){4===u.readyState&&n()},u.onload=n,u.onerror=e,u.onprogress=function(){},u.ontimeout=e,u.open(d,h,!v,t.username,t.password),v||(u.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(f=setTimeout(function(){c=!0,u.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",e(t)},t.timeout)),u.setRequestHeader)for(a in g)g.hasOwnProperty(a)&&u.setRequestHeader(a,g[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(p),u}function s(){}var u=n(147),a=n(52),l=n(150),c=n(151);t.exports=i,i.XMLHttpRequest=u.XMLHttpRequest||s,i.XDomainRequest="withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:u.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){i["delete"===t?"del":t]=function(e,n,i){return(n=r(e,n,i)).method=t.toUpperCase(),o(n)}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){var r,i,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};o=function(){"use strict";var t=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e=function(t){for(var e=1;e<arguments.length;++e){var n=arguments[e];if(n)for(var r in n)t[r]=n[r]}return t};return function(n,r){var i,o=this;i=n&&t(n,"constructor")?n.constructor:function(){return o.apply(this,arguments)},e(i,o,r);var s=function(){this.constructor=i};return s.prototype=o.prototype,i.prototype=new s,n&&e(i.prototype,n),i.__super__=o.prototype,i}},"object"===s(e)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={};e.default=n,n.getMeta=function(t){var e,n,r=!1,i=!1,o={},s={},u=t.split(" ");if(u.length>=1?(r=u.shift(),i=u.join(" ")):r=t,r){var a=r.split("|");for(e=a.pop(),s.en=e;0!=a.length;){var l=a.shift(),c=a.shift();o[l]=c}}else e=r;if(i){var f,h,d=i.split("=");if(d.length>1)d.length,d.forEach(function(t){var e,r=(t=t.trim()).split(" ");r.length>1?(h=r.pop(),e=r.join(" ")):e=t,f?s[f.toLowerCase()]=e:n=e,f=h});else n=d.shift()}var p={name:e,ids:o,details:s};return n&&(p.desc=n),p};var r={sp:{link:"http://www.uniprot.org/%s",name:"Uniprot"},tr:{link:"http://www.uniprot.org/%s",name:"Trembl"},gb:{link:"http://www.ncbi.nlm.nih.gov/nuccore/%s",name:"Genbank"},pdb:{link:"http://www.rcsb.org/pdb/explore/explore.do?structureId=%s",name:"PDB"}};n.buildLinks=function(t){var e={};return t=t||{},Object.keys(t).forEach(function(n){if(n in r){var i=r[n],o=i.link.replace("%s",t[n]);e[i.name]=o}}),e},n.contains=function(t,e){return-1!=="".indexOf.call(t,e,0)},n.splitNChars=function(t,e){var n,r;e=e||80;var i=[];for(n=0,r=t.length-1;n<=r;n+=e)i.push(t.substr(n,e));return i},n.reverse=function(t){return t.split("").reverse().join("")},n.complement=function(t){var e=t+"",n=[[/g/g,"0"],[/c/g,"1"],[/0/g,"c"],[/1/g,"g"],[/G/g,"0"],[/C/g,"1"],[/0/g,"C"],[/1/g,"G"],[/a/g,"0"],[/t/g,"1"],[/0/g,"t"],[/1/g,"a"],[/A/g,"0"],[/T/g,"1"],[/0/g,"T"],[/1/g,"A"]];for(var r in n)e=e.replace(n[r][0],n[r][1]);return e},n.reverseComplement=function(t){return n.reverse(n.complement(t))},n.model=function(t,e,n){this.seq=t,this.name=e,this.id=n,this.ids={}}},function(t,e,n){"use strict";var r=n(1).Model;n(90),t.exports=r.extend({constructor:function(t,e){return this.g=e.g,r.apply(this,arguments),this},defaults:{currentSize:5,step:1,originalSize:!1,scaleCategories:[{columnWidth:1,markerStepSize:20,stepSize:0},{columnWidth:3,markerStepSize:20,stepSize:0},{columnWidth:5,markerStepSize:10,stepSize:0},{columnWidth:9,markerStepSize:5,stepSize:1},{columnWidth:15,markerStepSize:2,stepSize:1},{columnWidth:20,markerStepSize:1,stepSize:1},{columnWidth:30,markerStepSize:1,stepSize:1},{columnWidth:45,markerStepSize:1,stepSize:1}]},initialize:function(t){var e=this.get("scaleCategories"),n=this.g.zoomer.get("columnWidth")||this._getScaleInfo().columnWidth,r=_.find(e,{columnWidth:n});if(!r){var i=this._insertScaleCategory(n);r=e[i],this.set("currentSize",i+1)}var o=this.get("currentSize");return this.set("originalSize",o),this.setSize(o),this},_insertScaleCategory:function(t){var e=this.get("scaleCategories"),n=_.findLastIndex(e,function(e){return e.columnWidth<t}),r=e[n],i=n+1,o={columnWidth:t,markerStepSize:r.markerStepSize,stepSize:r.markerStepSize};return e.splice(i,0,o),this.set("scaleCategories",e),i},getSizeRange:function(){return[1,this.get("scaleCategories").length]},bigger:function(){return this.setSize(this.get("currentSize")+this.get("step"))},smaller:function(){return this.setSize(this.get("currentSize")-this.get("step"))},reset:function(){return this.setSize(this.get("originalSize"))},setSize:function(t){var e=this.getSizeRange();t=(t=parseInt(t))<e[0]?e[0]:t>e[1]?e[1]:t,this.set("currentSize",t);var n=this._getScaleInfo();return this.g.zoomer.set({columnWidth:n.columnWidth,stepSize:n.stepSize,markerStepSize:n.markerStepSize}),this},getSize:function(){return this.get("currentSize")},_getScaleInfo:function(){var t=this.getSize(),e=this.get("scaleCategories");return t>0&&t<=e.length?e[t-1]:void 0}})},function(t,e,n){"use strict";var r=n(99),i=n(1).Model;t.exports=i.extend({defaults:{scheme:"taylor",colorBackground:!0,showLowerCase:!0,opacity:.6},initialize:function(t,e,n){return this.colors=new r({seqs:e,conservation:function(){return n.scale(n.conservation())}}),n.on("reset",function(){var t;if("dyn"===this.getSelectedScheme().type&&(t="reset",this.getSelectedScheme().indexOf(t)>=0))return this.getSelectedScheme().reset()},this)},addStaticScheme:function(t,e){return this.colors.addStaticScheme(t,e)},addDynScheme:function(t,e){return this.colors.addDynScheme(t,e)},getScheme:function(t){return this.colors.getScheme(t)},getSelectedScheme:function(){return this.colors.getScheme(this.get("scheme"))}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({initialize:function(t,e){return null==this.get("hidden")&&this.set("hidden",[]),this.stats=e},calcHiddenColumns:function(t){for(var e=this.get("hidden"),n=t,r=0;r<e.length;r++)e[r]<=n&&n++;return n-t}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({defaults:{registerMouseHover:!1,registerMouseClicks:!0,importProxy:"https://cors-anywhere.herokuapp.com/",importProxyStripHttp:!0,eventBus:!0,alphabetSize:20,dropImport:!1,debug:!1,hasRef:!1,bootstrapMenu:!1,manualRendering:!1}})},function(t,e,n){"use strict";var r=n(18),i=n(1).Model;t.exports=i.extend({initialize:function(t){return this.g=t},development:{"msa-tnt":"/node_modules/msa-tnt/build/bundle.js","biojs-io-newick":"/node_modules/biojs-io-newick/build/biojs-io-newick.min.js"},loadPackage:function(t,e){try{return e(n(155)(t))}catch(n){return r.default.loadScript(this._pkgURL(t),e)}},loadPackages:function(t,e){var n=this,i=r.default.joinCb(function(){return e()},t.length);return t.forEach(function(t){return n.loadPackage(t,i)})},_pkgURL:function(t){if(this.g.config.get("debug"))var e=this.development[t];else e="http://wzrd.in/bundle/"+t+"@latest";return e}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({defaults:{searchText:""}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({defaults:{searchBox:-10,overviewBox:30,headerBox:-1,alignmentBody:0,scaleSlider:50}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({defaults:{sequences:!0,markers:!0,metacell:!1,conserv:!1,overviewbox:!1,seqlogo:!1,gapHeader:!1,leftHeader:!0,scaleslider:!1,labels:!0,labelName:!0,labelId:!0,labelPartition:!1,labelCheckbox:!1,metaGaps:!0,metaIdentity:!0,metaLinks:!0},constructor:function(t,e){return this.calcDefaults(e.model),r.apply(this,arguments)},initialize:function(){return this.listenTo(this,"change:metaLinks change:metaIdentity change:metaGaps",function(){return this.trigger("change:metacell")},this),this.listenTo(this,"change:labelName change:labelId change:labelPartition change:labelCheckbox",function(){return this.trigger("change:labels")},this),this.listenTo(this,"change:markers change:conserv change:seqlogo change:gapHeader",function(){return this.trigger("change:header")},this)},calcDefaults:function(t){if(t.length>0){var e=t.at(0).get("ids");if(void 0!==e&&0===Object.keys(e).length)return this.defaults.metaLinks=!1}}})},function(t,e,n){"use strict";var r=n(1).Model;t.exports=r.extend({constructor:function(t,e){return this.calcDefaults(e.model),r.apply(this,arguments),this.g=e.g,this.listenTo(this,"change:labelIdLength change:labelNameLength change:labelPartLength change:labelCheckLength",function(){return this.trigger("change:labelWidth",this.getLabelWidth())},this),this.listenTo(this,"change:metaLinksWidth change:metaIdentWidth change:metaGapWidth",function(){return this.trigger("change:metaWidth",this.getMetaWidth())},this),this},defaults:{alignmentWidth:"auto",alignmentHeight:225,columnWidth:15,rowHeight:15,autoResize:!0,labelIdLength:20,labelNameLength:100,labelPartLength:15,labelCheckLength:15,labelFontsize:13,labelLineHeight:"13px",markerFontsize:"10px",stepSize:1,markerStepSize:2,markerHeight:20,residueFont:"13",canvasEventScale:1,minLetterDrawSize:11,boxRectHeight:2,boxRectWidth:2,overviewboxPaddingTop:10,metaGapWidth:35,metaIdentWidth:40,_alignmentScrollLeft:0,_alignmentScrollTop:0},calcDefaults:function(t){return t.getMaxLength()<200&&t.length<30&&(this.defaults.boxRectWidth=this.defaults.boxRectHeight=5),this},getAlignmentWidth:function(t){return this.get("autoResize")&&void 0!==t?this.get("columnWidth")*t:void 0===this.get("alignmentWidth")||"auto"===this.get("alignmentWidth")||0===this.get("alignmentWidth")?this._adjustWidth():this.get("alignmentWidth")},setLeftOffset:function(t){var e=t;return e=Math.max(0,e),e-=this.g.columns.calcHiddenColumns(e),this.set("_alignmentScrollLeft",e*this.get("columnWidth"))},setTopOffset:function(t){for(var e=Math.max(0,t-1),n=0,r=0;0<e?r<=e:r>=e;0<e?r++:r--)n+=this.model.at(r).attributes.height||1;return this.set("_alignmentScrollTop",n*this.get("rowHeight"))},getLeftBlockWidth:function(){var t=0;return this.g.vis.get("labels")&&(t+=this.getLabelWidth()),this.g.vis.get("metacell")&&(t+=this.getMetaWidth()),t},getMetaWidth:function(){var t=0;return this.g.vis.get("metaGaps")&&(t+=this.get("metaGapWidth")),this.g.vis.get("metaIdentity")&&(t+=this.get("metaIdentWidth")),this.g.vis.get("metaLinks")&&(t+=this.get("metaLinksWidth")),t},getLabelWidth:function(){var t=0;return this.g.vis.get("labelName")&&(t+=this.get("labelNameLength")),this.g.vis.get("labelId")&&(t+=this.get("labelIdLength")),this.g.vis.get("labelPartition")&&(t+=this.get("labelPartLength")),this.g.vis.get("labelCheckbox")&&(t+=this.get("labelCheckLength")),t},_adjustWidth:function(){if(void 0!==this.el&&void 0!==this.model){if(null!=this.el.parentNode&&0!==this.el.parentNode.offsetWidth)var t=this.el.parentNode.offsetWidth;else t=document.body.clientWidth-35;var e=t-this.getLeftBlockWidth(),n=this.getAlignmentWidth(this.model.getMaxLength()-this.g.columns.get("hidden").length),r=Math.min(e,n);return r=Math.floor(r/this.get("columnWidth"))*this.get("columnWidth"),this.attributes.alignmentWidth=r}},autoResize:function(){if(this.get("autoResize"))return this._adjustWidth(this.el,this.model)},autoHeight:function(t){var e=this.getMaxAlignmentHeight();return void 0!==t&&t>0&&(e=Math.min(e,t)),this.set("alignmentHeight",e)},setEl:function(t,e){return this.el=t,this.model=e},_checkScrolling:function(t,e){var n=t[0],r=t[1];return this.set("_alignmentScrollLeft",n,e),this.set("_alignmentScrollTop",r,e)},getMaxAlignmentHeight:function(){var t=0;return this.model.each(function(e){return t+=e.attributes.height||1}),t*this.get("rowHeight")},getMaxAlignmentWidth:function(){return this.model.getMaxLength()*this.get("columnWidth")}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(n(50)),o=n(1).Collection,s=o.extend({model:i.default,constructor:function(){return this.startOnCache=[],this.on("all",function(){return this.startOnCache=[]},this),o.apply(this,arguments)},startOn:function(t){return null==this.startOnCache[t]&&(this.startOnCache[t]=this.where({xStart:t})),this.startOnCache[t]},contains:function(t){return this.reduce(function(e,n){return n||e.contains(t)},!1)},getFeatureOnRow:function(t,e){return this.filter(function(n){return n.get("row")===t&&n.get("xStart")<=e&&e<=n.get("xEnd")})},assignRows:function(){var t=this.max(function(t){return t.get("xEnd")}).attributes.xEnd,e=function(){for(var e=[],n=0;0<t?n<=t:n>=t;0<t?n++:n--)e.push(0);return e}();return this.each(function(t){for(var n=0,r=t.get("xStart"),i=t.get("xEnd"),o=r;r<i?o<=i:o>=i;r<i?o++:o--)e[o]>n&&(n=e[o]),e[o]++;return t.set("row",n)}),(0,r.max)(e)},getCurrentHeight:function(){return this.max(function(t){return t.get("row")}).attributes.row+1},getMinRows:function(){var t=this.max(function(t){return t.get("xEnd")}).attributes.xEnd,e=function(){for(var e=[],n=0;0<t?n<=t:n>=t;0<t?n++:n--)e.push(0);return e}();return this.each(function(t){return function(){for(var n=[],r=t.get("xStart"),i=t.get("xEnd"),o=r;r<i?o<=i:o>=i;o++)n.push(e[o]++);return n}()}),(0,r.max)(e)}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36)),o=r(n(34)),s=n(1).Collection,u=s.extend({model:i.default,constructor:function(t,e){var n=this;return s.apply(this,arguments),this.g=e,this.on("add reset remove",function(){return n.lengthCache=null,n._bindSeqsWithFeatures()},this),this.on("reset",function(){return n._autoSetRefSeq()}),this._autoSetRefSeq(),this.lengthCache=null,this.features={},this},getMaxLength:function(){return 0===this.models.length?0:(null===this.lengthCache&&(this.lengthCache=this.max(function(t){return t.get("seq").length}).get("seq").length),this.lengthCache)},prev:function(t,e){var n=this.indexOf(t)-1;return n<0&&e&&(n=this.length-1),this.at(n)},next:function(t,e){var n=this.indexOf(t)+1;return n===this.length&&e&&(n=0),this.at(n)},calcHiddenSeqs:function(t){for(var e=t,n=0;0<e?n<=e:n>=e;0<e?n++:n--)this.at(n).get("hidden")&&e++;return e-t},addFeatures:function(t){var e=this;if(null!=t.config){var n=t;t=t.seqs,null!=n.config.colors&&function(){var e=n.config.colors;_.each(t,function(t){return _.each(t,function(t){if(null!=e[t.feature])return t.fillColor=e[t.feature]})})}()}return _.isEmpty(this.features)?this.features=t:_.each(t,function(t,n){return e.features.hasOwnProperty(n)?e.features[n]=_.union(e.features[n],t):e.features[n]=t}),this._bindSeqsWithFeatures()},_bindSeqWithFeatures:function(t){var e=this.features[t.attributes.name];e&&(t.attributes.features=new o.default(e),t.attributes.features.assignRows(),t.attributes.height=t.attributes.features.getCurrentHeight()+1)},_bindSeqsWithFeatures:function(){var t=this;return this.each(function(e){return t._bindSeqWithFeatures(e)})},removeAllFeatures:function(){return delete this.features},_autoSetRefSeq:function(){if(this.length>0)return this.at(0).set("ref",!0)},setRef:function(t){var e=this.get(t);return this.each(function(n){if(t.cid)return e.cid===n.cid?n.set("ref",!0):n.set("ref",!1)}),this.g.config.set("hasRef",!0),this.trigger("change:reference",t)}});e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(34)),i=n(1).Model.extend({defaults:{name:"",id:"",seq:"",height:1,ref:!1},initialize:function(){if(this.set("grey",[]),null==this.get("features"))return this.set("features",new r.default)}});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.exporter=e.file=e.seqgen=e.proxy=e.bmath=void 0;var i=r(n(15)),o=r(n(19)),s=r(n(39)),u=r(n(17)),a=r(n(16));e.bmath=i.default,e.proxy=o.default,e.seqgen=s.default,e.file=u.default,e.exporter=a.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var r=(e.name||e.url||"").split("."),i=r[r.length-1]||"",o=0;o<n.length;o++){var s=n[o](t,i);if(s)return s}return"unknown"};var n=[function(t,e){return("CLUSTAL"===t.substring(0,7)||"clustal"==e||"aln"==e)&&"clustal"},function(t,e){return(">"===t.substring(0,1)||"fasta"==e||"fa"==e)&&"fasta"},function(t,e){return("("===t.substring(0,1)||"nwk"==e)&&"newick"},function(t,e){if(t.length<=10)return!1;var n=t.split("\n");return n[0].indexOf("gff")>=0||e.indexOf("gff")>=0?"gff":n[0].indexOf("#")<0&&2===n[0].split("\t").length&&"gff"}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(15)),i=n(72).seq,o=n(48),s={_generateSequence:function(t){for(var e="",n=t-1,r=0;0<n?r<=n:r>=n;0<n?r++:r--)e+=s.getRandomChar();return e},getDummySequences:function(t,e){var n=[];void 0!==t&&null!==t||(t=r.default.getRandomInt(3,5)),void 0!==e&&null!==e||(e=r.default.getRandomInt(50,200));for(var o=1;1<t?o<=t:o>=t;1<t?o++:o--)n.push(new i(s._generateSequence(e),"seq"+o,"r"+o));return n},getRandomChar:function(t){var e=t||"ABCDEFGHIJKLMNOPQRSTUVWXYZ";return e.charAt(Math.floor(Math.random()*e.length))},genConservedSequences:function(t,e,n){var u=[];void 0!==t&&null!==t||(t=r.default.getRandomInt(3,5)),void 0!==e&&null!==e||(e=r.default.getRandomInt(50,200)),n=n||"ACDEFGHIKLMNPQRSTVWY---";for(var a=1;1<t?a<=t:a>=t;1<t?a++:a--)u[a-1]="";for(var l=1,c=e-1,f=0;0<c?f<=c:f>=c;0<c?f++:f--){f%3==0&&(l=r.default.getRandomInt(50,100)/100);for(var h=[],d=t-1,p=0;0<d?p<=d:p>=d;0<d?p++:p--){for(var g=0,v=void 0;g<100;){v=s.getRandomChar(n);var m=o(h);if(m.addSeq(v),g++,Math.abs(l-m.scale(m.conservation())[0])<.2)break}u[p]+=v,h.push(v)}}for(var y=[],_=1;1<t?_<=t:_>=t;1<t?_++:_--)y.push(new i(u[_-1],"seq"+_,"r"+_));return y}};e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=(function(t){t&&t.__esModule}(n(35)),function(t){return this.msa=t,this}),o={loadTree:function(t){return this.msa.g.package.loadPackages(["msa-tnt","biojs-io-newick"],t)},showTree:function(t){var e=window.require("biojs-io-newick"),r=window.require("msa-tnt");if("string"==typeof t)var i=e.parse_newick(t);else i=t;var o,s=new r.selections;0===this.msa.el.getElementsByClassName("tnt_groupDiv").length?(o=document.createElement("div"),this.msa.el.appendChild(o)):(o=this.msa.el.getElementsByClassName("tnt_groupDiv")[0].parentNode).innerHTML="";var u=this.msa.seqs.toJSON();!function t(e){if(null!=e.children)e.children.forEach(function(e){return t(e)});else{var n=u.filter(function(t){return t.name===e.name})[0];null!=n&&("number"==typeof n.id?(n.ids=["s"+(n.id+1)],e.name="s"+(n.id+1)):e.name=n.id)}}(i);var a=r.app({seqs:u,tree:i});return new r.adapters.tree({model:a,el:o,sel:s}),new r.adapters.msa({model:a,sel:s,msa:this.msa}),a.models.forEach(function(t){return delete t.collection,Object.setPrototypeOf(t,n(1).Model.prototype)}),void this.msa.seqs.reset(a.models)},require:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return n(156)(t)})};(0,r.extend)(i.prototype,o),e.default=i},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=n(22),o=n(23),s=n(42),u=function(t,e){var n=t||{};e||(e={}),this.cid=s.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{}),n=s.defaults({},n,s.result(this,"defaults")),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};s.extend(u.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return s.clone(this.attributes)},sync:function(){return Backbone.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return s.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var i,o,u,a,l,c,f,h;if(null==t)return this;if("object"===(void 0===t?"undefined":r(t))?(o=t,n=e):(o={})[t]=e,n||(n={}),!this._validate(o,n))return!1;for(i in u=n.unset,l=n.silent,a=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=s.clone(this.attributes),this.changed={}),h=this.attributes,f=this._previousAttributes,this.idAttribute in o&&(this.id=o[this.idAttribute]),o)e=o[i],s.isEqual(h[i],e)||a.push(i),s.isEqual(f[i],e)?delete this.changed[i]:this.changed[i]=e,u?delete h[i]:h[i]=e;if(!l){a.length&&(this._pending=n);for(var d=0,p=a.length;d<p;d++)this.trigger("change:"+a[d],this,h[a[d]],n)}if(c)return this;if(!l)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,s.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,s.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!s.isEmpty(this.changed):s.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&s.clone(this.changed);var e,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in t)s.isEqual(r[i],e=t[i])||((n||(n={}))[i]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return s.clone(this._previousAttributes)},fetch:function(t){void 0===(t=t?s.clone(t):{}).parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(r){return!!e.set(e.parse(r,t),t)&&(n&&n(e,r,t),void e.trigger("sync",e,r,t))},wrapError(this,t),this.sync("read",this,t)},save:function(t,e,n){var i,o,u,a=this.attributes;if(null==t||"object"===(void 0===t?"undefined":r(t))?(i=t,n=e):(i={})[t]=e,n=s.extend({validate:!0},n),i&&!n.wait){if(!this.set(i,n))return!1}else if(!this._validate(i,n))return!1;i&&n.wait&&(this.attributes=s.extend({},a,i)),void 0===n.parse&&(n.parse=!0);var l=this,c=n.success;return n.success=function(t){l.attributes=a;var e=l.parse(t,n);return n.wait&&(e=s.extend(i||{},e)),!(s.isObject(e)&&!l.set(e,n))&&(c&&c(l,t,n),void l.trigger("sync",l,t,n))},wrapError(this,n),"patch"!==(o=this.isNew()?"create":n.patch?"patch":"update")||n.attrs||(n.attrs=i),u=this.sync(o,this,n),i&&n.wait&&(this.attributes=a),u},destroy:function(t){var e=this,n=(t=t?s.clone(t):{}).success,r=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&r(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;wrapError(this,t);var i=this.sync("delete",this,t);return t.wait||r(),i},url:function(){var t=s.result(this,"urlRoot")||s.result(this.collection,"url")||urlError();return this.isNew()?t:t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},s.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=s.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,s.extend(e,{validationError:n})),!1)}});s.each(["keys","values","pairs","invert","pick","omit","chain","isEmpty"],function(t){s[t]&&(u.prototype[t]=function(){var e=slice.call(arguments);return e.unshift(this.attributes),s[t].apply(s,e)})}),u.extend=o,t.exports=u},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function n(t){return function(e,n,r,i){n=S(n,i,4);var o=!A(e)&&w.keys(e),s=(o||e).length,u=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[u]:u],u+=t),function(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}(e,n,r,o,u,s)}}function o(t){return function(e,n,r){n=k(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function s(t,e,n){return function(r,i,o){var s=0,u=z(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(p.call(r,s,u),w.isNaN))>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function u(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||f,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var a=this,l=a._,c=Array.prototype,f=Object.prototype,h=Function.prototype,d=c.push,p=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,_=h.bind,b=Object.create,x=function(){},w=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var S=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)}},k=function(t,e,n){return null==t?w.identity:w.isFunction(t)?S(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return k(t,e,1/0)};var j=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,z=E("length"),A=function(t){var e=z(t);return"number"==typeof e&&e>=0&&e<=M};w.each=w.forEach=function(t,e,n){var r,i;if(e=S(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==r)return t[r]},w.filter=w.select=function(t,e,n){var r=[];return e=k(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(k(e)),n)},w.every=w.all=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},w.some=w.any=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return A(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])>o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])<o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},w.shuffle=function(t){for(var e,n=A(t)?t:w.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=w.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(A(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=k(e,n),w.pluck(w.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(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=k(n,r),w.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};w.groupBy=C(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=C(function(t,e,n){t[n]=e}),w.countBy=C(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):A(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:A(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=k(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var T=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=z(e);u<a;u++){var l=e[u];if(A(l)&&(w.isArray(l)||w.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};w.flatten=function(t,e){return T(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var i=[],o=[],s=0,u=z(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?w.contains(o,l)||(o.push(l),i.push(a)):w.contains(i,a)||i.push(a)}return i},w.union=function(){return w.uniq(T(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!w.contains(e,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},w.difference=function(t){var e=T(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=o(1),w.findLastIndex=o(-1),w.sortedIndex=function(t,e,n,r){for(var i=(n=k(n,r,1))(e),o=0,s=z(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},w.indexOf=s(1,w.findIndex,w.sortedIndex),w.lastIndexOf=s(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var I=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return w.isObject(s)?s:o};w.bind=function(t,e){if(_&&t.bind===_)return _.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2);return function r(){return I(t,r,e,this,n.concat(p.call(arguments)))}},w.partial=function(t){var e=p.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===w?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(t,n,this,this,o)}},w.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=!1===n.leading?0:w.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=w.now();u||!1!==n.leading||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(a,c)),o}},w.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=w.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=w.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.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}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return N&&u(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&u(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=i.length,s={},u=0;u<o;u++)s[r=i[u]]=e(t[r],r,t);return s},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=j(w.allKeys),w.extendOwn=w.assign=j(w.keys),w.findKey=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=0,s=i.length;o<s;o++)if(e(t[r=i[o]],r,t))return r},w.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;w.isFunction(e)?(i=w.allKeys(s),r=S(e,n)):(i=T(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(T(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=j(w.allKeys,!0),w.create=function(t,e){var n=O(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};w.isEqual=function(t,e){return function t(e,n,r,o){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return e===n;e instanceof w&&(e=e._wrapped),n instanceof w&&(n=n._wrapped);var s=g.call(e);if(s!==g.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n}var u="[object Array]"===s;if(!u){if("object"!=(void 0===e?"undefined":i(e))||"object"!=(void 0===n?"undefined":i(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===e)return o[c]===n;if(r.push(e),o.push(n),u){if((c=e.length)!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,o))return!1}else{var f,h=w.keys(e);if(c=h.length,w.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!w.has(n,f)||!t(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e)},w.isEmpty=function(t){return null==t||(A(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=m||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=void 0===t?"undefined":i(t);return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":i(Int8Array))&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&v.call(t,e)},w.noConflict=function(){return a._=l,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=E,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=S(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=w.invert(R),F=function(t){var e=function(e){return t[e]},n="(?:"+w.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}};w.escape=F(R),w.unescape=F(q),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var P=0;w.uniqueId=function(t){var e=++P+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(D,H),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,w)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=c[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return w}.apply(e,[]))||(t.exports=r)}).call(void 0)},function(t,e){"use strict";function n(t){var e={};return t.split(";").forEach(function(t){var n,r,i;t.indexOf("=")>0?(r=(n=t.split("="))[0],i=n[1],e[r]=i):t.indexOf(" ")>0&&(r=(n=t.split(" "))[0],i=n[1].replace(/"/g,""),e[r]=i)}),e}function r(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function i(t,e,n){return 3===t.length?i(t[0],t[1],t[2]):"#"+r(t)+r(e)+r(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.extractKeys=n,e.rgbToHex=i,e.default={extractKeys:n,rgbToHex:i}},function(t,e){"use strict";t.exports=function(t,e,n){t.beginPath(),t.moveTo(0,e),t.lineTo(n,e),t.lineWidth=1,t.strokeStyle="#999999",t.stroke()}},function(t,e){"use strict";t.exports=function(t,e,n,r,i,o,s){t.font=o+"px Arial",t.textAlign=s?"right":"center",t.fillStyle="#666666",t.fillText(i,e+r/2,n)}},function(t,e){"use strict";t.exports=function(t,e,n,r,i){i=i||"#999999",t.beginPath(),t.moveTo(e,n),t.lineTo(e,n+r),t.lineWidth=1,t.strokeStyle=i,t.stroke()}},function(t,e){"use strict";t.exports={rel:function(t){var e,n,r,i;return e=t.offsetX,n=t.offsetY,void 0==e&&(r=i.getBoundingClientRect(),i=t.target||t.srcElement,void 0==e&&(e=t.clientX-r.left,n=t.clientY-r.top),void 0==e&&(e=t.pageX-i.offsetLeft,n=t.pageY-i.offsetTop),void 0==e)?void 0:[e,n]},abs:function(t){var e,n;return e=t.pageX,n=t.pageY,void 0==e&&(e=t.layerX,n=t.layerY),void 0==e&&(e=t.clientX,n=t.clientY),void 0==e&&(e=t.x,n=t.y),[e,n]},wheelDelta:function(t){var e;return void 0==(e=[t.deltaX,t.deltaY])[0]&&t.mozMovementX&&(e=[0,t.mozMovementX]),isNaN(e[0])&&(e[0]=0),isNaN(e[1])&&(e[1]=0),e}}},function(t,e,n){"use strict";var r=n(110),i=function t(e,n){if(!this||this.constructor!==t)return new t(e);if(void 0===e||"string"==typeof e)throw new TypeError("you need to give the seq stat an array");this.resetSeqs(e),this.alphabetSize=4,this._useBackground=!1,this.useGaps=!1,this.ignoredChars=["-","*"],r.extend(this,n)};i.prototype.addSeq=function(t){this.seqs.push(t),this._reset()},i.prototype.removeSeq=function(t){"number"==typeof t?this.seqs.splice(t,1):r.each(this.seqs,function(e,n){t===e&&this.seqs.splice(n,1)}.bind(this)),this._reset()},i.prototype.addSeqs=function(t){t.forEach(function(t){this.addSeq(t)}.bind(this))},i.prototype.resetSeqs=function(t){if(this.seqs=[],!t instanceof Array||"at"in t){this.mseqs=t;var e=function(){var t=this.mseqs.pluck("seq");this.resetSeqs(t)};t.on("add change reset ",e,this),e.call(this)}else this.addSeqs(t),this._reset(),this.trigger("reset")};var o=["consensus","frequency","maxLength","ic","gaps"];i.prototype._reset=function(){for(var t=0;t<o.length;t++)this["_"+o[t]]=void 0;this._identity=void 0,this._background=void 0},i.prototype.setBackground=function(t){this._useBackground=t,this._reset()},i.prototype.useBackground=function(){this.setBackground(!0)},i.prototype.setDNA=function(){this.alphabetSize=4},i.prototype.setProtein=function(){this.alphabetSize=20},o.forEach(function(t){i.prototype[t]=function(){return void 0===this["_"+t]&&(this["_"+t]=this[t+"Calc"]()),this["_"+t]}}),i.prototype.identity=function(t){var e;return(void 0===this._identity||t)&&(e=this.identityCalc(t),this._identity=void 0),this._identity||e},i.prototype.background=function(){return void 0!==this.bg?this.bg:(void 0===this._background&&this.backgroundCalc(),this._background)},i.prototype.frequencyCalc=function(t){var e,n;e=new Array(this.maxLength()),n=new Array(this.seqs.length);var i=this.ignoredChars;return void 0!==t&&t.all&&(i=[]),r.each(this.seqs,function(t){r.each(t,function(t,r){i.indexOf(t)>=0||(void 0===e[r]&&(e[r]={}),void 0===e[r][t]&&(e[r][t]=0),e[r][t]++,void 0===n[r]&&(n[r]=0),n[r]++)})}),r.each(e,function(t,i){return r.each(t,function(t,r){return e[i][r]=t/n[i]})}),this._frequency=e,e},i.prototype.backgroundCalc=function(){var t={},e=0;return r.each(this.seqs,function(n){r.each(n,function(n){return void 0===t[n]&&(t[n]=0),t[n]++,e++})}),t=r.mapValues(t,function(t){return t/e}),this._background=t,t},i.prototype.icCalc=function(){var t=this.frequency();if(this._useBackground)var e=this.background();var n=this.ignoredChars,i=this._useBackground,o=r.map(t,function(t){return r.reduce(t,function(t,r,o){return n.indexOf(o)>=0?t:(i&&(r/=e[o]),t-r*(Math.log(r)/Math.log(2)))},0)});return this._ic=o,o},i.prototype.conservation=function(t){var e=this.ic(),n=this.gaps(),i=this;t=t||this.alphabetSize;var o=Math.log(t)/Math.log(2),s=0;return r.map(e,function(t){var e=o-t;return i.useGaps&&(e*=1-n[s++]),e})},i.prototype.conservResidue=function(t){var e,n=t?t.alphabetSize:void 0,i=this.ignoredChars;e=void 0!==t&&t.scaled?this.scale(this.conservation(n)):this.conservation(n);var o,s=this.frequency();return r.map(s,function(t,n){o=r.reject(r.keys(t),function(t){return i.indexOf(t)>=0});var s={};return r.each(o,function(r){s[r]=t[r]*e[n]}),s})},i.prototype.conservResidue2=function(t){var e=this.frequency(),n=this.conservation(t),i=this.background();return r.map(e,function(t,o){return r.map(t,function(t){var s=r.reduce(e[o],function(t,e){return t+e/i[o]},0);return t/i[o]/s*n[o]},0)})},i.prototype.scale=function(t,e){e=e||this.alphabetSize;var n=Math.log(e)/Math.log(2);return r.map(t,function(t){return t/n})},i.prototype.maxLengthCalc=function(){return 0===this.seqs.length?0:r.max(this.seqs,function(t){return t.length}).length},i.prototype.consensusCalc=function(){var t=new Array(this.maxLength());return r.each(this.seqs,function(e){r.each(e,function(e,n){void 0===t[n]&&(t[n]={}),void 0===t[n][e]&&(t[n][e]=0),t[n][e]++})}),this._consensus=r.reduce(t,function(t,e){var n;return n=r.keys(e),t+r.max(n,function(t){return e[t]})},""),this._consensus},i.prototype.identityCalc=function(t){var e=t||this.consensus();return this._identity=this.seqs.map(function(t){for(var n=0,r=0,i=0;i<t.length;i++)"-"!==t[i]&&"-"!==e[i]&&(r++,t[i]===e[i]&&n++);return n/r}),this._identity},i.prototype.gapsCalc=function(){var t=this.maxLength();if(t<=1||void 0===t)return[];var e=new Array(this.maxLength());return r.each(this.seqs,function(t){r.each(t,function(t,n){void 0===e[n]&&(e[n]={g:0,t:0}),t="-"===t?"g":"t",e[n][t]++})}),this._gaps=r.map(e,function(t){return t.g/(t.g+t.t)}),this._gaps},r.mixin({mapValues:function(t,e){return r.object(r.keys(t),r.map(t,e))}}),n(13).mixin(i.prototype),t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);Object.defineProperty(e,"SelectionManager",{enumerable:!0,get:function(){return r.SelectionManager}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1).Model.extend({defaults:{xStart:-1,xEnd:-1,height:-1,text:"",fillColor:"red",fillOpacity:.5,type:"rectangle",borderSize:1,borderColor:"black",borderOpacity:.5,validate:!0,row:0},initialize:function(t){if(null!=t.start&&this.set("xStart",t.start-1),null!=t.end&&this.set("xEnd",t.end-1),null!=t.attributes&&(null!=t.attributes.Name&&this.set("text",t.attributes.Name),null!=t.attributes.Color&&this.set("fillColor",t.attributes.Color)),this.attributes.xEnd,this.attributes.xStart,!_.isNumber(this.attributes.xStart)||!_.isNumber(this.attributes.xEnd))return this.set("xStart",parseInt(this.attributes.xStart)),this.set("xEnd",parseInt(this.attributes.xEnd))},validate:function(){if(isNaN(this.attributes.xStart||isNaN(this.attributes.xEnd)))return"features need integer start and end."},contains:function(t){return this.attributes.xStart<=t&&t<=this.attributes.xEnd}});e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(36);Object.defineProperty(e,"seq",{enumerable:!0,get:function(){return r(i).default}});var o=n(35);Object.defineProperty(e,"seqcol",{enumerable:!0,get:function(){return r(o).default}});var s=n(50);Object.defineProperty(e,"feature",{enumerable:!0,get:function(){return r(s).default}});var u=n(34);Object.defineProperty(e,"featurecol",{enumerable:!0,get:function(){return r(u).default}})},function(t,e){"use strict";t.exports=function(t){var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var n=Object.prototype.toString},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function n(t){return function(e,n,r,i){n=S(n,i,4);var o=!A(e)&&w.keys(e),s=(o||e).length,u=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[u]:u],u+=t),function(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}(e,n,r,o,u,s)}}function o(t){return function(e,n,r){n=k(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function s(t,e,n){return function(r,i,o){var s=0,u=z(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(p.call(r,s,u),w.isNaN))>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function u(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||f,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var a=this,l=a._,c=Array.prototype,f=Object.prototype,h=Function.prototype,d=c.push,p=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,_=h.bind,b=Object.create,x=function(){},w=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var S=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)}},k=function(t,e,n){return null==t?w.identity:w.isFunction(t)?S(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return k(t,e,1/0)};var j=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,z=E("length"),A=function(t){var e=z(t);return"number"==typeof e&&e>=0&&e<=M};w.each=w.forEach=function(t,e,n){var r,i;if(e=S(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==r)return t[r]},w.filter=w.select=function(t,e,n){var r=[];return e=k(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(k(e)),n)},w.every=w.all=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},w.some=w.any=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return A(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])>o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])<o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},w.shuffle=function(t){for(var e,n=A(t)?t:w.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=w.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(A(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=k(e,n),w.pluck(w.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(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=k(n,r),w.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};w.groupBy=C(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=C(function(t,e,n){t[n]=e}),w.countBy=C(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):A(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:A(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=k(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var T=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=z(e);u<a;u++){var l=e[u];if(A(l)&&(w.isArray(l)||w.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};w.flatten=function(t,e){return T(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var i=[],o=[],s=0,u=z(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?w.contains(o,l)||(o.push(l),i.push(a)):w.contains(i,a)||i.push(a)}return i},w.union=function(){return w.uniq(T(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!w.contains(e,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},w.difference=function(t){var e=T(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=o(1),w.findLastIndex=o(-1),w.sortedIndex=function(t,e,n,r){for(var i=(n=k(n,r,1))(e),o=0,s=z(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},w.indexOf=s(1,w.findIndex,w.sortedIndex),w.lastIndexOf=s(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var I=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return w.isObject(s)?s:o};w.bind=function(t,e){if(_&&t.bind===_)return _.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2);return function r(){return I(t,r,e,this,n.concat(p.call(arguments)))}},w.partial=function(t){var e=p.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===w?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(t,n,this,this,o)}},w.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=!1===n.leading?0:w.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=w.now();u||!1!==n.leading||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(a,c)),o}},w.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=w.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=w.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.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}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return N&&u(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&u(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=i.length,s={},u=0;u<o;u++)s[r=i[u]]=e(t[r],r,t);return s},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=j(w.allKeys),w.extendOwn=w.assign=j(w.keys),w.findKey=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=0,s=i.length;o<s;o++)if(e(t[r=i[o]],r,t))return r},w.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;w.isFunction(e)?(i=w.allKeys(s),r=S(e,n)):(i=T(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(T(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=j(w.allKeys,!0),w.create=function(t,e){var n=O(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};w.isEqual=function(t,e){return function t(e,n,r,o){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return e===n;e instanceof w&&(e=e._wrapped),n instanceof w&&(n=n._wrapped);var s=g.call(e);if(s!==g.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n}var u="[object Array]"===s;if(!u){if("object"!=(void 0===e?"undefined":i(e))||"object"!=(void 0===n?"undefined":i(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===e)return o[c]===n;if(r.push(e),o.push(n),u){if((c=e.length)!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,o))return!1}else{var f,h=w.keys(e);if(c=h.length,w.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!w.has(n,f)||!t(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e)},w.isEmpty=function(t){return null==t||(A(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=m||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=void 0===t?"undefined":i(t);return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":i(Int8Array))&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&v.call(t,e)},w.noConflict=function(){return a._=l,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=E,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=S(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=w.invert(R),F=function(t){var e=function(e){return t[e]},n="(?:"+w.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}};w.escape=F(R),w.unescape=F(q),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var P=0;w.uniqueId=function(t){var e=++P+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(D,H),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,w)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=c[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return w}.apply(e,[]))||(t.exports=r)}).call(void 0)},function(t,e,n){"use strict";var r=n(22),i=n(23),o=n(42),s=n(41),u=[].slice,a=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,o.extend({silent:!0},e))},l={add:!0,remove:!0,merge:!0},c={add:!0,remove:!1};o.extend(a.prototype,r,{model:s,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return Backbone.sync.apply(this,arguments)},add:function(t,e){return this.set(t,o.extend({merge:!1},e,c))},remove:function(t,e){var n=!o.isArray(t);t=n?[t]:o.clone(t),e||(e={});for(var r=0,i=t.length;r<i;r++){var s=t[r]=this.get(t[r]);if(s){var u=this.modelId(s.attributes);null!=u&&delete this._byId[u],delete this._byId[s.cid];var a=this.indexOf(s);this.models.splice(a,1),this.length--,e.silent||(e.index=a,s.trigger("remove",s,this,e)),this._removeReference(s,e)}}return n?t[0]:t},set:function(t,e){(e=o.defaults({},e,l)).parse&&(t=this.parse(t,e));var n=!o.isArray(t);t=n?t?[t]:[]:t.slice();for(var r,i,s,u,a,c=e.at,f=this.comparator&&null==c&&!1!==e.sort,h=o.isString(this.comparator)?this.comparator:null,d=[],p=[],g={},v=e.add,m=e.merge,y=e.remove,_=!(f||!v||!y)&&[],b=0,x=t.length;b<x;b++){if(s=t[b],u=this.get(s))y&&(g[u.cid]=!0),m&&s!==u&&(s=this._isModel(s)?s.attributes:s,e.parse&&(s=u.parse(s,e)),u.set(s,e),f&&!a&&u.hasChanged(h)&&(a=!0)),t[b]=u;else if(v){if(!(i=t[b]=this._prepareModel(s,e)))continue;d.push(i),this._addReference(i,e)}(i=u||i)&&(r=this.modelId(i.attributes),!_||!i.isNew()&&g[r]||_.push(i),g[r]=!0)}if(y){for(b=0,x=this.length;b<x;b++)g[(i=this.models[b]).cid]||p.push(i);p.length&&this.remove(p,e)}if(d.length||_&&_.length)if(f&&(a=!0),this.length+=d.length,null!=c)for(b=0,x=d.length;b<x;b++)this.models.splice(c+b,0,d[b]);else{_&&(this.models.length=0);var w=_||d;for(b=0,x=w.length;b<x;b++)this.models.push(w[b])}if(a&&this.sort({silent:!0}),!e.silent){var S=null!=c?o.clone(e):e;for(b=0,x=d.length;b<x;b++)null!=c&&(S.index=c+b),(i=d[b]).trigger("add",i,this,S);(a||_&&_.length)&&this.trigger("sort",this,e)}return n?t[0]:t},reset:function(t,e){e||(e={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,o.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,o.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,o.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return u.apply(this.models,arguments)},get:function(t){if(null!=t){var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]}},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return o.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),o.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(o.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return o.invoke(this.models,"get",t)},fetch:function(t){void 0===(t=t?o.clone(t):{}).parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(r){n[t.reset?"reset":"set"](r,t),e&&e(n,r,t),n.trigger("sync",n,r,t)},wrapError(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?o.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,r=e.success;return e.success=function(t,i){e.wait&&n.add(t,e),r&&r(t,i,e)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;(e=e?o.clone(e):{}).collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_isModel:function(t){return t instanceof s},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,r),"change"===t){var i=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e))}this.trigger.apply(this,arguments)}}});o.each(["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample","partition"],function(t){o[t]&&(a.prototype[t]=function(){var e=u.call(arguments);return e.unshift(this.models),o[t].apply(o,e)})});o.each(["groupBy","countBy","sortBy","indexBy"],function(t){o[t]&&(a.prototype[t]=function(e,n){var r=o.isFunction(e)?e:function(t){return t.get(e)};return o[t](this.models,r,n)})}),a.extend=i,t.exports=a},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(){var n,i=Array.prototype.forEach,o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u=0,a={keys:Object.keys||function(t){if("object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++u+"";return t?t+e:e},has:function(t,e){return o.call(t,e)},each:function(t,e,n){if(null!=t)if(i&&t.forEach===i)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}};n={on:function(t,e,n){return c(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var r=this,i=a.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,u,l,f,h;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(u=0,l=(s=t?[t]:a.keys(this._events)).length;u<l;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(f=0,h=o.length;f<h;f++)i=o[f],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&f(n,e),r&&f(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;for(var s in"object"===(void 0===e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t),i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var l=/\s+/,c=function(t,e,n,i){if(!n)return!0;if("object"===(void 0===n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(l.test(n)){for(var s=n.split(l),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},f=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}};a.each({listenTo:"on",listenToOnce:"once"},function(t,e){n[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=a.uniqueId("l"))]=e,"object"===(void 0===n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),n.bind=n.on,n.unbind=n.off,n.mixin=function(t){return a.each(["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"],function(e){t[e]=this[e]},this),t},void 0!==t&&t.exports&&(e=t.exports=n),e.BackboneEvents=n}()},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(){var n,i=Array.prototype.forEach,o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u=0,a={keys:Object.keys||function(t){if("object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++u+"";return t?t+e:e},has:function(t,e){return o.call(t,e)},each:function(t,e,n){if(null!=t)if(i&&t.forEach===i)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}};n={on:function(t,e,n){return c(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var r=this,i=a.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,u,l,f,h;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(u=0,l=(s=t?[t]:a.keys(this._events)).length;u<l;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(f=0,h=o.length;f<h;f++)i=o[f],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&f(n,e),r&&f(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;for(var s in"object"===(void 0===e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t),i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var l=/\s+/,c=function(t,e,n,i){if(!n)return!0;if("object"===(void 0===n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(l.test(n)){for(var s=n.split(l),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},f=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}};a.each({listenTo:"on",listenToOnce:"once"},function(t,e){n[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=a.uniqueId("l"))]=e,"object"===(void 0===n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),n.bind=n.on,n.unbind=n.off,n.mixin=function(t){return a.each(["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"],function(e){t[e]=this[e]},this),t},void 0!==t&&t.exports&&(e=t.exports=n),e.BackboneEvents=n}()},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){var r,i,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};o=function(){"use strict";var t=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e=function(t){for(var e=1;e<arguments.length;++e){var n=arguments[e];if(n)for(var r in n)t[r]=n[r]}return t};return function(n,r){var i,o=this;i=n&&t(n,"constructor")?n.constructor:function(){return o.apply(this,arguments)},e(i,o,r);var s=function(){this.constructor=i};return s.prototype=o.prototype,i.prototype=new s,n&&e(i.prototype,n),i.__super__=o.prototype,i}},"object"===s(e)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function n(t){return function(e,n,r,i){n=S(n,i,4);var o=!A(e)&&w.keys(e),s=(o||e).length,u=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[u]:u],u+=t),function(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}(e,n,r,o,u,s)}}function o(t){return function(e,n,r){n=k(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function s(t,e,n){return function(r,i,o){var s=0,u=z(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(p.call(r,s,u),w.isNaN))>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function u(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||f,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var a=this,l=a._,c=Array.prototype,f=Object.prototype,h=Function.prototype,d=c.push,p=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,_=h.bind,b=Object.create,x=function(){},w=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var S=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)}},k=function(t,e,n){return null==t?w.identity:w.isFunction(t)?S(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return k(t,e,1/0)};var j=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,z=E("length"),A=function(t){var e=z(t);return"number"==typeof e&&e>=0&&e<=M};w.each=w.forEach=function(t,e,n){var r,i;if(e=S(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==r)return t[r]},w.filter=w.select=function(t,e,n){var r=[];return e=k(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(k(e)),n)},w.every=w.all=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},w.some=w.any=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return A(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])>o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])<o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},w.shuffle=function(t){for(var e,n=A(t)?t:w.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=w.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(A(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=k(e,n),w.pluck(w.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(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=k(n,r),w.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};w.groupBy=C(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=C(function(t,e,n){t[n]=e}),w.countBy=C(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):A(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:A(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=k(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var T=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=z(e);u<a;u++){var l=e[u];if(A(l)&&(w.isArray(l)||w.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};w.flatten=function(t,e){return T(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var i=[],o=[],s=0,u=z(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?w.contains(o,l)||(o.push(l),i.push(a)):w.contains(i,a)||i.push(a)}return i},w.union=function(){return w.uniq(T(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!w.contains(e,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},w.difference=function(t){var e=T(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=o(1),w.findLastIndex=o(-1),w.sortedIndex=function(t,e,n,r){for(var i=(n=k(n,r,1))(e),o=0,s=z(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},w.indexOf=s(1,w.findIndex,w.sortedIndex),w.lastIndexOf=s(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var I=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return w.isObject(s)?s:o};w.bind=function(t,e){if(_&&t.bind===_)return _.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2);return function r(){return I(t,r,e,this,n.concat(p.call(arguments)))}},w.partial=function(t){var e=p.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===w?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(t,n,this,this,o)}},w.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=!1===n.leading?0:w.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=w.now();u||!1!==n.leading||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(a,c)),o}},w.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=w.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=w.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.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}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return N&&u(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&u(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=i.length,s={},u=0;u<o;u++)s[r=i[u]]=e(t[r],r,t);return s},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=j(w.allKeys),w.extendOwn=w.assign=j(w.keys),w.findKey=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=0,s=i.length;o<s;o++)if(e(t[r=i[o]],r,t))return r},w.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;w.isFunction(e)?(i=w.allKeys(s),r=S(e,n)):(i=T(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(T(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=j(w.allKeys,!0),w.create=function(t,e){var n=O(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};w.isEqual=function(t,e){return function t(e,n,r,o){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return e===n;e instanceof w&&(e=e._wrapped),n instanceof w&&(n=n._wrapped);var s=g.call(e);if(s!==g.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n}var u="[object Array]"===s;if(!u){if("object"!=(void 0===e?"undefined":i(e))||"object"!=(void 0===n?"undefined":i(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===e)return o[c]===n;if(r.push(e),o.push(n),u){if((c=e.length)!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,o))return!1}else{var f,h=w.keys(e);if(c=h.length,w.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!w.has(n,f)||!t(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e)},w.isEmpty=function(t){return null==t||(A(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=m||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=void 0===t?"undefined":i(t);return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":i(Int8Array))&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&v.call(t,e)},w.noConflict=function(){return a._=l,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=E,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=S(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=w.invert(R),F=function(t){var e=function(e){return t[e]},n="(?:"+w.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}};w.escape=F(R),w.unescape=F(q),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var P=0;w.uniqueId=function(t){var e=++P+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(D,H),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,w)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=c[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return w}.apply(e,[]))||(t.exports=r)}).call(void 0)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(n(11)),s=r(n(24));e.default=i={parse:function(t){var e=[];if("[object Array]"===Object.prototype.toString.call(t))var n=t;else n=t.split("\n");if(!1===n[0].slice(0,6))throw new Error("Invalid CLUSTAL Header");for(var r=0,i=1,o=0;r<n.length;){var u=n[++r];if(null!=u&&0!==u.length)if(0!==u.trim().length){if(!s.default.contains(u,"*")){1===i&&(o=0,i=0);var a=/^(?:\s*)(\S+)(?:\s+)(\S+)(?:\s*)(\d*)(?:\s*|$)/g.exec(u);if(null!=a){var l=a[1].trim(),c=a[2].trim();if(o>=e.length){var f=s.default.getMeta(l.trim());l=f.name;var h=new s.default.model(c,l,o);h.ids=f.ids||{},h.details=f.details||{};var d=Object.keys(h.ids);d.length>0&&(h.id=h.ids[d[0]]),e.push(h)}else e[o].seq+=c;o++}}}else i=1;else i=1}return e}},o.default.mixin(i)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(24)),o=r(n(69)),s=r(n(11)),u=void 0;e.default=u={getMeta:i.default.getMeta,extend:function(t){var e=(0,o.default)(u);return u.getMeta=t,e},parse:function(t){var e=[];if(!t||0===t.length)return[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=t.split("\n"));for(var n=u.getMeta,r=0;r<t.length;r++){var o=t[r];if(">"===o[0]||";"===o[0]){var s=o.slice(1).trim(),a=n(s.trim());s=a.name;var l=a.id||e.length,c=new i.default.model("",a.name,l);c.ids=a.ids||{},c.details=a.details||{},e.push(c)}else c.seq+=o}return e},write:function(t,e){for(var n="",r=0;r<t.length;r++){var o=t[r];null!=e&&(o=e(o)),n+=">"+o.name+"\n",n+=i.default.splitNChars(o.seq,80).join("\n"),n+="\n"}return n}},s.default.mixin(u)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(11)),o=r(n(43)),s=r(n(64)),u=function(){};i.default.mixin(u),e.default=u,u.parseLines=function(t){var e=t.split("\n"),n={},r=[];n.type=u._guessType(e);var i=0;if("jalview"===n.type){var o=s.default.readHeader(e);i=o.offset,n.colors=o.colors,r=o.features}for(var a=i;a<e.length;a++){var l=e[a];0!==l.length&&"#"!==l[0]&&(void 0!==(l=u.parseLine(l))&&r.push(l))}return{features:r,config:n}},u._guessType=function(t){return"##gff-version 3"===t[0].substring(0,15)?"gff3":t[0].indexOf("#")<0&&2===t[0].split("\t").length?"jalview":"gff3"},u.parseSeqs=u.parse=function(t){var e=u.parseLines(t),n={};return e.features.forEach(function(t){var e=t.seqname;void 0===n[e]&&(n[e]=[]),delete t.seqname,n[e].push(t)}),delete e.features,e.seqs=n,e},u.parseLine=function(t){var e={},n=t.split(/\s+/);if(1!==n.length){e.seqname=n[0],e.source=n[1],e.feature=n[2],e.start=parseInt(n[3]),e.end=parseInt(n[4]),e.score=n[5],e.strand=n[6],e.frame=n[7];var r=n.slice(8).join(" ");return Object.keys(e).forEach(function(t){"string"==typeof e[t]&&(e[t]=e[t].trim()),"."===e[t]&&(e[t]=void 0)}),e.score&&(e.score=parseFloat(e.score)),e.frame&&(e.frame=parseInt(e.frame)),e.attributes=o.default.extractKeys(r),e}},u.exportLine=function(t){var e=Object.keys(t.attributes).map(function(e){return e+"="+t.attributes[e]}).join(";"),n=[t.seqname,t.source,t.feature,t.start,t.end,t.score,t.strand,t.frame,e];return(n=n.map(function(t){return void 0===t?".":t})).join("\t")},u.exportLines=function(t){return"##gff-version 3\n"+t.map(u.exportLine).join("\n")},u.exportSeqs=u.export=function(t){var e=[],n=function(t){t.seqname=r,e.push(t)};for(var r in t)t[r].forEach(n);return u.exportLines(e)},u.utils=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(43),i={};e.default=i,i.readHeader=function(t){for(var e,n={},r=0,o=[];r<t.length;r++){var s=t[r];if(s.indexOf("#")>=0)break;var u=s.split(/\t/),a=u[0].trim();if("GFF"===a)break;if(2===u.length)if("startgroup"===a)e=u[1].trim();else{if("endgroup"===a){e="";continue}n[u[0]]=i.parseColor(u[1])}else if(u.length>=5){var l=i.parseLine(u);e&&(l.attributes.Parent=e),o.push(l)}}return{offset:r,colors:n,features:o}},i.parseColor=function(t){return t.indexOf(",")>=0?(0,r.rgbToHex)(t.split(",").map(function(t){return parseInt(t)})):6===t.length&&parseInt(t.charAt(0),16)<=16&&"bisque"!==t?"#"+t:t},i.parseLine=function(t){var e={attributes:{}};return e.attributes.Name=t[0].trim(),e.seqname=t[1].trim(),e.start=parseInt(t[3]),e.end=parseInt(t[4]),e.feature=t[5].trim(),"ID_NOT_SPECIFIED"===e.seqname&&(e.seqname=t[2].trim()),e}},function(t,e,n){"use strict";var r=function t(e){return this.constructor!=t?new t(e):(this.matrix={},this.parsingOrder=[],void 0!=e&&this.parse(e),this)};(function(t){return t&&t.__esModule?t:{default:t}})(n(11)).default.mixin(r),t.exports=r,r.prototype.parse=function(t){return t.split("\n").forEach(function(t){this.parseLine(t)}.bind(this)),this.buildMatrix(),this.matrix},r.read=function(t,e){return(new r).read(t,e)},r.parse=function(t){return(new r).parse(t)},r.prototype.parseLine=function(t){var e=t.charAt(0);if("#"!==e){this.parsingOrder.push(e);for(var n=t.substring(1).split(/\s+/).filter(function(t){return t.length>0}).map(function(t){return parseInt(t)}),r={},i=0;i<n.length;i++)r[this.parsingOrder[i]]=n[i];this.matrix[e]=r}},r.prototype.export=function(){return r.export(this.matrix)},r.export=function(t){var e=[],n=1;for(var r in"matrix"in t&&(t=t.matrix),t){for(var i=r,o=Object.keys(t[r]),s=0;s<n;s++)i+="\t"+t[r][o[s]];e.push(i),n++}return e.join("\n")},r.prototype.buildMatrix=function(){for(var t=this.parsingOrder.length-1;t>=0;t--){var e=this.parsingOrder[t],n=this.matrix[e];for(var r in n)this.matrix[r][e]=n[r]}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.default=function(t){for(var e=[],r={},i=t.split(/\s*(;|\(|\)|\[|\]|,|:|=)\s*/),o=0;o<i.length;o++){var s=i[o],u=void 0;switch(s){case"(":u={},r.children=[u],e.push(r),r=u;break;case",":u={},e[e.length-1].children.push(u),r=u;break;case")":r=e.pop();break;case":":break;default:var a=i[o-1];if(")"==a||"("==a||","==a)r.name=s;else if(":"==a)void 0===s||n(s),isNaN(s)||(r.branch_length=parseFloat(s));else if("="==a)switch(i[o-2]){case"D":r.duplication=s;break;case"G":r.gene_id=s;break;case"T":r.taxon_id=s}}}return r}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.parseNhx=e.parse=void 0;var i=r(n(68)),o=r(n(66)),s={};s.parse=i.default,s.parseNhx=o.default,e.default=s,e.parse=i.default,e.parseNhx=o.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=[],n={},r=t.split(/\s*(;|\(|\)|,|:)\s*/),i=0;i<r.length;i++){var o=r[i],s=void 0;switch(o){case"(":s={},n.children=[s],e.push(n),n=s;break;case",":s={},e[e.length-1].children.push(s),n=s;break;case")":n=e.pop();break;case":":break;default:var u=r[i-1];")"==u||"("==u||","==u?n.name=o:":"==u&&(n.branch_length=parseFloat(o))}}return n}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t=t||{};for(var e=function(t,e,n){for(var r=[],i=t<e,o=n?i?e+1:e-1:e,s=t;i?s<o:s>o;i?s++:s--)r.push(s);return r}(0,arguments.length,!1),n=0;n<e.length;n++){var r=e[n];if(arguments[r])for(var i=0;i<arguments[r].length;i++){var o=arguments[r][i];arguments[r].hasOwnProperty(o)&&(t[o]=arguments[r][o])}}return t}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(){var n,i=Array.prototype.forEach,o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u=0,a={keys:Object.keys||function(t){if("object"!==(void 0===t?"undefined":r(t))&&"function"!=typeof t||null===t)throw new TypeError("keys() called on a non-object");var e,n=[];for(e in t)t.hasOwnProperty(e)&&(n[n.length]=e);return n},uniqueId:function(t){var e=++u+"";return t?t+e:e},has:function(t,e){return o.call(t,e)},each:function(t,e,n){if(null!=t)if(i&&t.forEach===i)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t);else for(var s in t)this.has(t,s)&&e.call(n,t[s],s,t)},once:function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}}};n={on:function(t,e,n){return c(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var r=this,i=a.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,u,l,f,h;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(u=0,l=(s=t?[t]:a.keys(this._events)).length;u<l;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(f=0,h=o.length;f<h;f++)i=o[f],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&f(n,e),r&&f(r,arguments),this},stopListening:function(t,e,n){var i=this._listeners;if(!i)return this;var o=!e&&!n;for(var s in"object"===(void 0===e?"undefined":r(e))&&(n=this),t&&((i={})[t._listenerId]=t),i)i[s].off(e,n,this),o&&delete this._listeners[s];return this}};var l=/\s+/,c=function(t,e,n,i){if(!n)return!0;if("object"===(void 0===n?"undefined":r(n))){for(var o in n)t[e].apply(t,[o,n[o]].concat(i));return!1}if(l.test(n)){for(var s=n.split(l),u=0,a=s.length;u<a;u++)t[e].apply(t,[s[u]].concat(i));return!1}return!0},f=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],u=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,u);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}};a.each({listenTo:"on",listenToOnce:"once"},function(t,e){n[e]=function(e,n,i){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=a.uniqueId("l"))]=e,"object"===(void 0===n?"undefined":r(n))&&(i=this),e[t](n,i,this),this}}),n.bind=n.on,n.unbind=n.off,n.mixin=function(t){return a.each(["on","once","off","trigger","stopListening","listenTo","listenToOnce","bind","unbind"],function(e){t[e]=this[e]},this),t},void 0!==t&&t.exports&&(e=t.exports=n),e.BackboneEvents=n}()},function(t,e,n){"use strict";t.exports=n(70)},function(t,e,n){"use strict";t.exports.seq=n(73)},function(t,e){"use strict";t.exports=function(t,e,n){this.seq=t,this.name=e,this.id=n,this.meta={}}},function(t,e,n){"use strict";t.exports=n(81)},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function n(t){return function(e,n,r,i){n=S(n,i,4);var o=!A(e)&&w.keys(e),s=(o||e).length,u=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[u]:u],u+=t),function(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}(e,n,r,o,u,s)}}function o(t){return function(e,n,r){n=k(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function s(t,e,n){return function(r,i,o){var s=0,u=z(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(p.call(r,s,u),w.isNaN))>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function u(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||f,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var a=this,l=a._,c=Array.prototype,f=Object.prototype,h=Function.prototype,d=c.push,p=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,_=h.bind,b=Object.create,x=function(){},w=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var S=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)}},k=function(t,e,n){return null==t?w.identity:w.isFunction(t)?S(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return k(t,e,1/0)};var j=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,z=E("length"),A=function(t){var e=z(t);return"number"==typeof e&&e>=0&&e<=M};w.each=w.forEach=function(t,e,n){var r,i;if(e=S(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==r)return t[r]},w.filter=w.select=function(t,e,n){var r=[];return e=k(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(k(e)),n)},w.every=w.all=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},w.some=w.any=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return A(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])>o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])<o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},w.shuffle=function(t){for(var e,n=A(t)?t:w.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=w.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(A(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=k(e,n),w.pluck(w.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(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=k(n,r),w.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};w.groupBy=C(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=C(function(t,e,n){t[n]=e}),w.countBy=C(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):A(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:A(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=k(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var T=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=z(e);u<a;u++){var l=e[u];if(A(l)&&(w.isArray(l)||w.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};w.flatten=function(t,e){return T(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var i=[],o=[],s=0,u=z(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?w.contains(o,l)||(o.push(l),i.push(a)):w.contains(i,a)||i.push(a)}return i},w.union=function(){return w.uniq(T(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!w.contains(e,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},w.difference=function(t){var e=T(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=o(1),w.findLastIndex=o(-1),w.sortedIndex=function(t,e,n,r){for(var i=(n=k(n,r,1))(e),o=0,s=z(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},w.indexOf=s(1,w.findIndex,w.sortedIndex),w.lastIndexOf=s(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var I=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return w.isObject(s)?s:o};w.bind=function(t,e){if(_&&t.bind===_)return _.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2);return function r(){return I(t,r,e,this,n.concat(p.call(arguments)))}},w.partial=function(t){var e=p.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===w?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(t,n,this,this,o)}},w.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=!1===n.leading?0:w.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=w.now();u||!1!==n.leading||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(a,c)),o}},w.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=w.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=w.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.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}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return N&&u(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&u(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=i.length,s={},u=0;u<o;u++)s[r=i[u]]=e(t[r],r,t);return s},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=j(w.allKeys),w.extendOwn=w.assign=j(w.keys),w.findKey=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=0,s=i.length;o<s;o++)if(e(t[r=i[o]],r,t))return r},w.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;w.isFunction(e)?(i=w.allKeys(s),r=S(e,n)):(i=T(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(T(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=j(w.allKeys,!0),w.create=function(t,e){var n=O(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};w.isEqual=function(t,e){return function t(e,n,r,o){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return e===n;e instanceof w&&(e=e._wrapped),n instanceof w&&(n=n._wrapped);var s=g.call(e);if(s!==g.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n}var u="[object Array]"===s;if(!u){if("object"!=(void 0===e?"undefined":i(e))||"object"!=(void 0===n?"undefined":i(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===e)return o[c]===n;if(r.push(e),o.push(n),u){if((c=e.length)!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,o))return!1}else{var f,h=w.keys(e);if(c=h.length,w.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!w.has(n,f)||!t(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e)},w.isEmpty=function(t){return null==t||(A(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=m||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=void 0===t?"undefined":i(t);return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":i(Int8Array))&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&v.call(t,e)},w.noConflict=function(){return a._=l,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=E,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=S(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=w.invert(R),F=function(t){var e=function(e){return t[e]},n="(?:"+w.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}};w.escape=F(R),w.unescape=F(q),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var P=0;w.uniqueId=function(t){var e=++P+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(D,H),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,w)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=c[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return w}.apply(e,[]))||(t.exports=r)}).call(void 0)},function(t,e){"use strict";t.exports={render_x_axis_label:function(){var t="Model Position";this.display_ali_map&&(t="Alignment Column"),this.called_on.find(".logo_xaxis").remove(),this.called_on.prepend('<div class="logo_xaxis" class="centered" style="margin-left:40px"><p class="xaxis_text" style="width:10em;margin:1em auto">'+t+"</p></div>")},render_y_axis_label:function(){this.dom_element.parent().before('<canvas class="logo_yaxis" height="'+this.options.height+'" width="55"></canvas>');var t=this.called_on.find(".logo_yaxis"),e=(Math.abs(this.data.max_height),isNaN(this.data.min_height_obs)||parseInt(this.data.min_height_obs,10),null),n="Information Content (bits)";(e=t[0].getContext("2d")).beginPath(),e.moveTo(55,1),e.lineTo(40,1),e.moveTo(55,this.info_content_height),e.lineTo(40,this.info_content_height),e.moveTo(55,this.info_content_height/2),e.lineTo(40,this.info_content_height/2),e.lineWidth=1,e.strokeStyle="#666666",e.stroke(),e.fillStyle="#666666",e.textAlign="right",e.font="bold 10px Arial",e.textBaseline="top",e.fillText(parseFloat(this.data.max_height).toFixed(1),38,0),e.textBaseline="middle",e.fillText(parseFloat(this.data.max_height/2).toFixed(1),38,this.info_content_height/2),e.fillText("0",38,this.info_content_height),"score"===this.data.height_calc&&(n="Score (bits)"),e.save(),e.translate(5,this.height/2-20),e.rotate(-Math.PI/2),e.textAlign="center",e.font="normal 12px Arial",e.fillText(n,1,0),e.restore(),e.fillText("occupancy",55,this.info_content_height+7),this.show_inserts&&(e.fillText("ins. prob.",50,280),e.fillText("ins. len.",46,296))}}},function(t,e){"use strict";var n=null;t.exports=function(){if(!n){var t=document.createElement("canvas");n=!(!t.getContext||!t.getContext("2d"))}return n}},function(t,e){"use strict";t.exports={A:"#FF9966",C:"#009999",D:"#FF0000",E:"#CC0033",F:"#00FF00",G:"#f2f20c",H:"#660033",I:"#CC9933",K:"#663300",L:"#FF9933",M:"#CC99CC",N:"#336666",P:"#0099FF",Q:"#6666CC",R:"#990000",S:"#0000FF",T:"#00FFFF",V:"#FFCC33",W:"#66CC66",Y:"#006600"}},function(t,e){"use strict";t.exports={A:"#cbf751",C:"#5ec0cc",G:"#ffdf59",T:"#b51f16",U:"#b51f16"}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e,n){t.find(".logo_settings_switch, .logo_settings .close").on("click",function(t){t.preventDefault(),r(".logo_settings").toggle()}),t.find(".logo_reset").on("click",function(t){t.preventDefault(),e.changeZoom({target:e.default_zoom})}),t.find(".logo_change").on("click",function(t){t.preventDefault()}),t.find(".logo_zoomin").on("click",function(t){t.preventDefault(),e.changeZoom({distance:.1,direction:"+"})}),t.find(".logo_zoomout").on("click",function(t){t.preventDefault(),e.changeZoom({distance:.1,direction:"-"})}),t.find(".logo_scale").on("change",function(t){e.toggleScale(this.value)}),t.find(".logo_color").on("change",function(t){e.toggleColorscheme(this.value)}),t.find(".logo_ali_map").on("change",function(t){e.toggleAliMap(this.value)}),t.find(".logo_position").on("change",function(){this.value.match(/^\d+$/m)&&e.scrollToColumn(this.value,1)}),n.on("dblclick",function(n){offset=e.logo_graphic.offset(),x=parseInt(n.pageX-offset.left,10),window_position=n.pageX-t.parent().offset().left,col=e.columnFromCoordinates(x),current=e.zoom,current<1?e.changeZoom({target:1,offset:window_position,column:col}):e.changeZoom({target:.3,offset:window_position,column:col})}),r(document).on(t.attr("id")+".scrolledTo",function(t,n,r,i){e.render({target:n})}),r(document).on("keydown",function(t){t.ctrlKey||(61!==t.which&&107!==t.which||(zoom+=.1,e.changeZoom({distance:.1,direction:"+"})),109!==t.which&&0!==t.which||(zoom-=.1,e.changeZoom({distance:.1,direction:"-"})))})}},function(t,e,n){"use strict";_=n(75);var r=n(77),i=n(84),o=n(83),s=n(2),u=n(76),a=n(80),l=n(82),c=n(5);t.exports=s.extend({options:{xaxis:!0,yaxis:!0,height:300,column_width:34,debug:!0,scale_height_enabled:!0,scaled_max:!0,zoom_buttons:!0,colorscheme:"default",data:void 0,start:1,end:void 0,zoom:.4,colors:void 0,divider:!1,show_probs:!1,divider_step:5,show_divider:!1,border:!1,settings:!1,scroller:!0,positionMarker:!0},loadDefault:function(t){this.data=t.data,this.display_ali_map=0,this.alphabet=t.data.alphabet||"dna",this.start=t.start,this.zoom=parseFloat(t.zoom)||.4,this.default_zoom=this.zoom,this.column_width=t.column_width,this.height=t.height,this.canvas_width=5e3,this.scale_height_enabled=t.scale_height_enabled,this.scrollme=null,this.previous_target=0,this.rendered=[],this.previous_zoom=0,void 0==this.data.max_height&&(this.data.max_height=this.calcMaxHeight(this.data.heightArr)),this.data.insert_probs&&this.data.delete_probs||(this.options.show_probs=!1),t.scaled_max?this.data.max_height=t.data.max_height_obs||this.data.max_height||2:this.data.max_height=t.data.max_height_theory||this.data.max_height||2,t.colors?this.changeColors(t.colors):"aa"===this.alphabet?(this.aa_colors=n(78),this.changeColors(this.aa_colors)):(this.dna_colors=n(79),this.changeColors(this.dna_colors))},initialize:function(t){if(r()){void 0==t.data&&(this.el.textContent="No data added."),_.extend(this.options,t);var e=this.options;if(this.loadDefault(e),this.options.show_probs?this.data.processing&&/^observed|weighted/.test(this.data.processing)?(this.show_inserts=0,this.info_content_height=this.height-14):(this.show_inserts=1,this.info_content_height=this.height-44):this.info_content_height=this.height,this.$el=c(this.el),this.initDivs(),this.options.settings){var n=l(this,e);this.$el.append(n)}a(this.$el,this,this.logo_graphic)}else this.el.textContent="Your browser doesn't support canvas."},initDivs:function(){var t=f("div");t.className="logo_graphic",this.logo_graphic=c(t);var e=f("div");if(e.className="logo_container",e.style.height=this.height,this.container=c(e),this.container.append(t),this.$el.append(e),this.options.divider){var n=f("div");n.className="logo_divider",this.$el.append(n)}this.dom_element=c(t),this.called_on=this.$el,this.options.xaxis&&u.render_x_axis_label.call(this),this.options.yaxis?u.render_y_axis_label.call(this):this.container[0].style.marginLeft="0px"},render:function(){return i.call(this),this},changeColors:function(t){this.colors=t,void 0!=t&&void 0!=t.type&&(this.colorscheme="dynamic"),this.buildAlphabet()},buildAlphabet:function(){this.letters={};var t=this.colors;if("dynamic"==this.colorscheme){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");t={},e.forEach(function(e){t[e]=""})}for(var n in t)if(t.hasOwnProperty(n)){var r={color:t[n]};this.letters[n]=new o(n,r)}},toggleColorscheme:function(t){var e=this.currentColumn();t?this.colorscheme="default"===t?"default":"consensus":"default"===this.colorscheme?this.colorscheme="consensus":this.colorscheme="default",this.rendered=[],this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},toggleScale:function(t){var e=this.currentColumn();t?this.data.max_height="obs"===t?this.data.max_height_obs:this.data.max_height_theory:this.data.max_height===this.data.max_height_obs?this.data.max_height=this.data.max_height_theory:this.data.max_height=this.data.max_height_obs,this.rendered=[],this.logoYAxis&&this.logoYAxis.remove(),u.render_y_axis_label.call(this),this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},toggleAliMap:function(t){var e=this.currentColumn();t?this.display_ali_map="model"===t?0:1:1===this.display_ali_map?this.display_ali_map=0:this.display_ali_map=1,u.render_x_axis_label(this),this.rendered=[],this.scrollme.reflow(),this.scrollToColumn(e+1),this.scrollToColumn(e)},currentColumn:function(){var t=this.scrollme.scroller.getValues().left,e=this.column_width*this.zoom,n=t/e,r=this.container.width()/e/2;return Math.ceil(n+r)},changeZoom:function(t){var e=.3;if(t.target?e=t.target:t.distance&&(e=(parseFloat(this.zoom)-parseFloat(t.distance)).toFixed(1),"+"===t.direction&&(e=(parseFloat(this.zoom)+parseFloat(t.distance)).toFixed(1))),e>1?e=1:e<.1&&(e=.1),this.logo_graphic.width()*e/this.zoom>this.container.width())if(t.column){this.zoom=e,this.render({zoom:this.zoom}),this.scrollme.reflow();var n=this.coordinatesFromColumn(t.column);this.scrollme.scroller.scrollTo(n-t.offset)}else{var r=this.currentColumn();this.zoom=e,this.render({zoom:this.zoom}),this.scrollme.reflow(),this.scrollToColumn(r)}return this.zoom},columnFromCoordinates:function(t){return Math.ceil(t/(this.column_width*this.zoom))},coordinatesFromColumn:function(t){return(t-1)*(this.column_width*this.zoom)+this.column_width*this.zoom/2},scrollToColumn:function(t,e){var n=this.logo_container.width()/2,r=this.coordinatesFromColumn(t);this.scrollme.scroller.scrollTo(r-n,0,e)},calcMaxHeight:function(t){return t.reduce(function(t,e){var n=0;for(var r in e)n+=e[r];return n>t?n:t},0)}});var f=function(t){return document.createElement(t)}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){var n=r('<form class="logo_form"><fieldset><label for="position">Column number</label><input type="text" name="position" class="logo_position"></input><button class="button logo_change">Go</button></fieldset></form>'),i=r('<div class="logo_settings"></div>');if(i.append('<span class="close">x</span>'),t.scale_height_enabled&&t.data.max_height_obs<t.data.max_height_theory){var o="",s="",u="",a="";t.data.max_height_obs===t.data.max_height?o="checked":s="checked"}var l='<fieldset><legend>Scale</legend><label><input type="radio" name="scale" class="logo_scale" value="obs" '+o+"/>Maximum Observed "+a+'</label></br><label><input type="radio" name="scale" class="logo_scale" value="theory" '+s+"/>Maximum Theoretical "+u+"</label></fieldset>";if(i.append(l),"score"!==t.data.height_calc&&"aa"===t.data.alphabet&&t.data.probs_arr){var c=null,f=null,h="",d="";"default"===t.colorscheme?c="checked":f="checked",e.help&&(h='<a class="help" href="/help#colors_default" title="Each letter receives its own color."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>',d='<a class="help" href="/help#colors_consensus" title="Letters are colored as in Clustalx and Jalview, with colors depending on composition of the column."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>');var p='<fieldset><legend>Color Scheme</legend><label><input type="radio" name="color" class="logo_color" value="default" '+c+"/>Default "+h+'</label></br><label><input type="radio" name="color" class="logo_color" value="consensus" '+f+"/>Consensus Colors "+d+"</label></fieldset>";i.append(p)}if(t.data.ali_map){var g=null,v=null,m="",y="";0===t.display_ali_map?g="checked":v="checked",e.help&&(m='<a class="help" href="/help#coords_model" title="The coordinates along the top of the plot show the model position."><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>',y='<a class="help" href="/help#coords_ali" title="The coordinates along the top of the plot show the column in the alignment associated with the model"><span aria-hidden="true" data-icon="?"></span><span class="reader-text">help</span></a>');var _='<fieldset><legend>Coordinates</legend><label><input type="radio" name="coords" class="logo_ali_map" value="model" '+g+"/>Model "+m+'</label></br><label><input type="radio" name="coords" class="logo_ali_map" value="alignment" '+v+"/>Alignment "+y+"</label></fieldset>";i.append(_)}var b=r('<div class="logo_controls"></div>');return t.zoom_enabled&&b.append('<button class="logo_zoomout button">-</button><button class="logo_zoomin button">+</button>'),i.children().length>0&&(b.append('<button class="logo_settings_switch button">Settings</button>'),b.append(i)),n.append(b),n}},function(t,e){"use strict";t.exports=function(t,e){e=e||{},this.value=t,this.width=parseInt(e.width,10)||100,"W"===this.value&&(this.width+=30*this.width/100),this.height=parseInt(e.height,10)||100,this.color=e.color||"#000000",this.fontSize=e.fontSize||138,this.scaled=function(){},this.draw=function(t,e,n,r,i,o){var s=e/this.height,u=n/this.width,a=t.font;t.transform(u,0,0,s,r,i),t.fillStyle=o||this.color,t.textAlign="center",t.font="bold "+this.fontSize+"px Arial",t.fillText(this.value,0,0),t.setTransform(1,0,0,1,0,0),t.fillStyle="#000000",t.font=a}}},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=s(t).find("#canv_"+r);return o.length||(s(t).append('<canvas class="canvas_logo" id="canv_'+r+'" height="'+e+'" width="'+n+'" style="left:'+i*r+'px"></canvas>'),o=s(t).find("#canv_"+r)),s(o).attr("width",n).attr("height",e),o[0]}var i=n(86),o=n(85),s=n(5);t.exports=function(t){if(this.data){var e=(t=t||{}).zoom||this.zoom,n=t.target||1,s=(t.scaled,this.dom_element.parent().attr("width")),u=1,a=null,l=null,c=0;if(this.previous_target=n,t.start&&(this.start=t.start),t.end&&(this.end=t.end),e<=.1?e=.1:e>=1&&(e=1),this.zoom=e,a=this.end||this.data.heightArr.length,l=(l=(l=this.start||1)>(a=(a=a>this.data.heightArr.length?this.data.heightArr.length:a)<l?l:a)?a:l)>1?l:1,this.y=this.height-20,this.max_width=this.column_width*(a-l+1),s>this.max_width&&(e=1,this.zoom_enabled=!1),this.zoom=e,this.zoomed_column=this.column_width*e,this.total_width=this.zoomed_column*(a-l+1),e<1)for(;this.total_width<s&&(this.zoom+=.1,this.zoomed_column=this.column_width*this.zoom,this.total_width=this.zoomed_column*(a-l+1),this.zoom_enabled=!1,!(e>=1)););n>this.total_width&&(n=this.total_width),this.dom_element.attr({width:this.total_width+"px"}).css({width:this.total_width+"px"}),this.canvas_width=this.total_width;var f=Math.ceil(this.total_width/this.canvas_width);for(this.columns_per_canvas=Math.ceil(this.canvas_width/this.zoomed_column),this.previous_zoom!==this.zoom&&(this.dom_element.find("canvas").remove(),this.previous_zoom=this.zoom,this.rendered=[]),this.canvases=[],this.contexts=[],c=0;c<f;c++){var h=this.columns_per_canvas*c+l,d=h+this.columns_per_canvas-1;d>a&&(d=a);var p=(d-h+1)*this.zoomed_column;p>u&&(u=p);var g=u*c,v=g+p;if(n<v+v/2&&n>g-g/2)if(this.canvases[c]=r(this.dom_element,this.height,p,c,u),this.contexts[c]=this.canvases[c].getContext("2d"),this.contexts[c].setTransform(1,0,0,1,0,0),this.contexts[c].clearRect(0,0,p,this.height),this.contexts[c].fillStyle="#ffffff",this.contexts[c].fillRect(0,0,v,this.height),this.zoomed_column>12){var m=parseInt(10*e,10);m=m>10?10:m,this.debug&&o.call(this,h,d,c,1),i.call(this,h,d,c,m)}else o.call(this,h,d,c)}!this.scrollme&&this.options.scroller&&(this.scrollme=new EasyScroller(this.dom_element[0],{scrollingX:1,scrollingY:0,eventTarget:this.called_on})),1!==n&&this.scrollme.reflow()}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,s,u){var a="#ffffff";u?(i>.1?a="#d7301f":i>.05?a="#fc8d59":i>.03&&(a="#fdcc8a"),t.fillStyle=a,t.fillRect(e,n+15,r,10),a="#ffffff",o>9?a="#d7301f":o>7?a="#fc8d59":o>4&&(a="#fdcc8a"),t.fillStyle=a,t.fillRect(e,n+30,r,10)):n+=30,a="#ffffff",s<.75?a="#2171b5":s<.85?a="#6baed6":s<.95&&(a="#bdd7e7"),t.fillStyle=a,t.fillRect(e,n,r,10)}var i=n(44),o=n(46),s=n(45);t.exports=function(t,e,n,u){var a=0,l=t,c=null,f=0,h=Math.abs(this.data.max_height)+Math.abs(this.data.min_height_obs),d=Math.round(100*Math.abs(this.data.max_height)/h),p=(Math.round(this.info_content_height*d/100),this.info_content_height,10);for(f=t;f<=e;f++){if(this.data.mmline&&1===this.data.mmline[f-1])this.contexts[n].fillStyle="#cccccc",this.contexts[n].fillRect(a,10,this.zoomed_column,this.height-40);else{var g=this.data.heightArr[f-1],v=0,m=(g.length,0);for(var m in g){var y=[m,g[m]];if(y[1]>.01){var _,b=parseFloat(y[1])/this.data.max_height,x=a,w=(this.info_content_height-2)*b,S=this.info_content_height-2-v-w;_="dynamic"===this.colorscheme?this.colors.getColor(y[0],{pos:f-1}):"consensus"===this.colorscheme?this.cmap[f-1][y[0]]||"#7a7a7a":this.colors[y[0]],u?(this.contexts[n].strokeStyle=_,this.contexts[n].strokeRect(x,S,this.zoomed_column,w)):(this.contexts[n].fillStyle=_,this.contexts[n].fillRect(x,S,this.zoomed_column,w)),v+=w}}}this.zoom<.2?p=20:this.zoom<.3&&(p=10),this.options.positionMarker&&f%p==0&&(this.options.show_probs&&o(this.contexts[n],a+this.zoomed_column,this.height-30,parseFloat(this.height),"#dddddd"),o(this.contexts[n],a+this.zoomed_column,0,5),c=this.display_ali_map?this.data.ali_map[f-1]:l,s(this.contexts[n],a-2,10,this.zoomed_column,c,10,!0)),this.options.show_probs&&r(this.contexts[n],a,this.height-42,this.zoomed_column,this.data.insert_probs[f-1],this.data.insert_lengths[f-1],this.data.delete_probs[f-1],this.show_inserts),this.options.show_probs&&(this.show_inserts?i(this.contexts[n],this.height-45,this.total_width):i(this.contexts[n],this.height-15,this.total_width)),this.options.border&&i(this.contexts[n],0,this.total_width),a+=this.zoomed_column,l++}}},function(t,e,n){"use strict";function r(t,e,n,r,o,s,u){var a=n-4,l="#ffffff",c="#555555";u&&(a=n-35),o<.75?(l="#2171b5",c="#ffffff"):o<.85?l="#6baed6":o<.95&&(l="#bdd7e7"),i(t,e,a,o,s,r,l,c)}function i(t,e,n,r,i,o,s,u){t.font=i+"px Arial",t.fillStyle=s,t.fillRect(e,n-10,o,14),t.textAlign="center",t.fillStyle=u,t.fillText(r,e+o/2,n)}function o(t,e){var n=e.ralign?e.x+t.zoomed_column:e.x,r=e.ralign?e.x+2:e.x;l(t.contexts[e.context_num],n,t.height-30,-30-t.height,"#dddddd"),l(t.contexts[e.context_num],n,0,5),c(t.contexts[e.context_num],r,10,t.zoomed_column,e.column_num,e.fontsize,e.ralign)}function s(t,e,n,r,o,s){var u="#ffffff",a="#555555";o>.1?(u="#d7301f",a="#ffffff"):o>.05?u="#fc8d59":o>.03&&(u="#fdcc8a"),i(t,e,n-20,o,s,r,u,a),o>.03&&l(t,e+r,n-30,-30-n,u)}function u(t,e,n,r,o,s){var u="#ffffff",a="#555555";o>9?(u="#d7301f",a="#ffffff"):o>7?u="#fc8d59":o>4&&(u="#fdcc8a"),i(t,e,n,o,s,r,u,a)}var a=n(44),l=n(46),c=n(45);t.exports=function(t,e,n,i){var c=0,f=t,h=null,d=0,p=Math.abs(this.data.max_height),g=isNaN(this.data.min_height_obs)?0:parseInt(this.data.min_height_obs,10),v=p+Math.abs(g),m=Math.round(100*Math.abs(this.data.max_height)/v),y=Math.round(this.info_content_height*m/100);this.info_content_height;for(this.info_content_height,this.info_content_height,e+3<=this.end&&(e+=3),d=t;d<=e;d++){if(this.data.mmline&&1===this.data.mmline[d-1])this.contexts[n].fillStyle="#cccccc",this.contexts[n].fillRect(c,10,this.zoomed_column,this.height-40);else{var _=this.data.heightArr[d-1],b=[];if(_){var x=0,w=(_.length,0),S=null;for(var w in _){var k=[w,_[w]],j=c+this.zoomed_column/2,O=null;if(k[1]>.01){O=parseFloat(k[1])/this.data.max_height;var E=this.info_content_height-2-x,M=(this.info_content_height-2)*O;b[w]=[M,this.zoomed_column,j,E],x+=M}}for(var w in _)b[w]&&this.letters[w]&&(S="dynamic"===this.colorscheme?this.colors.getColor(w,{pos:d-1}):"consensus"===this.colorscheme?this.cmap[d-1][w]||"#7a7a7a":null,this.letters[w].draw(this.contexts[n],b[w][0],b[w][1],b[w][2],b[w][3],S))}}h=this.display_ali_map?this.data.ali_map[d-1]:f,this.options.show_divider&&(this.zoom<.7?d%this.options.divider_step==0&&o(this,{context_num:n,x:c,fontsize:10,column_num:h,ralign:!0}):o(this,{context_num:n,x:c,fontsize:i,column_num:h})),this.options.show_probs&&(r(this.contexts[n],c,this.height,this.zoomed_column,this.data.delete_probs[d-1],i,this.show_inserts),l(this.contexts[n],c,this.height-15,5),this.show_inserts&&(s(this.contexts[n],c,this.height,this.zoomed_column,this.data.insert_probs[d-1],i),u(this.contexts[n],c,this.height-5,this.zoomed_column,this.data.insert_lengths[d-1],i),l(this.contexts[n],c,this.height-45,5),l(this.contexts[n],c,this.height-30,5))),c+=this.zoomed_column,f++}this.options.show_probs&&(this.show_inserts&&(a(this.contexts[n],this.height-30,this.total_width),a(this.contexts[n],this.height-45,this.total_width)),a(this.contexts[n],this.height-15,this.total_width)),this.options.border&&a(this.contexts[n],0,this.total_width)}},function(t,e){"use strict";var n=window.HTMLCanvasElement&&window.HTMLCanvasElement.prototype,r=window.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),i=r&&window.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=(r||o)&&window.atob&&window.ArrayBuffer&&window.Uint8Array&&function(t){var e,n,s,u,a,l;for(e=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):decodeURIComponent(t.split(",")[1]),n=new ArrayBuffer(e.length),s=new Uint8Array(n),u=0;u<e.length;u+=1)s[u]=e.charCodeAt(u);return a=t.split(",")[0].split(":")[1].split(";")[0],r?new Blob([i?s:n],{type:a}):((l=new o).append(n),l.getBlob(a))};window.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(t,e,r){t(r&&n.toDataURL&&s?s(this.toDataURL(e,r)):this.mozGetAsFile("blob",e))}:n.toDataURL&&s&&(n.toBlob=function(t,e,n){t(s(this.toDataURL(e,n)))})),t.exports=s},function(t,e,n){(function(t){"use strict";var e=e||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i=!t.externalHost&&"download"in r,o=function(n){var r=e.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)},s=t.webkitRequestFileSystem,u=t.requestFileSystem||s||t.mozRequestFileSystem,a=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},l="application/octet-stream",c=0,f=[],h=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?n().revokeObjectURL(e):e.remove()}f.length=0},d=function(t,e,n){for(var r=(e=[].concat(e)).length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){a(t)}}},p=function(e,a){var h,p,g,v=this,m=e.type,y=!1,_=function(){var t=n().createObjectURL(e);return f.push(t),t},b=function(){d(v,"writestart progress write writeend".split(" "))},x=function(){!y&&h||(h=_()),p?p.location.href=h:window.open(h,"_blank"),v.readyState=v.DONE,b()},w=function(t){return function(){if(v.readyState!==v.DONE)return t.apply(this,arguments)}},S={create:!0,exclusive:!1};return v.readyState=v.INIT,a||(a="download"),i?(h=_(),r.href=h,r.download=a,o(r),v.readyState=v.DONE,void b()):(t.chrome&&m&&m!==l&&(g=e.slice||e.webkitSlice,e=g.call(e,0,e.size,l),y=!0),s&&"download"!==a&&(a+=".download"),(m===l||s)&&(p=t),u?(c+=e.size,void u(t.TEMPORARY,c,w(function(t){t.root.getDirectory("saved",S,w(function(t){var n=function(){t.getFile(a,S,w(function(t){t.createWriter(w(function(n){n.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),v.readyState=v.DONE,d(v,"writeend",e)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){n["on"+t]=v["on"+t]}),n.write(e),v.abort=function(){n.abort(),v.readyState=v.DONE},v.readyState=v.WRITING}),x)}),x)};t.getFile(a,{create:!1},w(function(t){t.remove(),n()}),w(function(t){t.code===t.NOT_FOUND_ERR?n():x()}))}),x)}),x)):void x())},g=p.prototype,v=function(t,e){return new p(t,e)};return g.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,t.addEventListener("unload",h,!1),v.unload=function(){h(),t.removeEventListener("unload",h,!1)},v}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||(void 0).content),n=window.define;void 0===n&&void 0!==window.almond&&"define"in window.almond&&(n=window.almond.define),void 0!==t&&null!==t?t.exports=e:void 0!==n&&null!==n&&null!=n.amd&&n("saveAs",[],function(){return e})}).call(e,n(20)(t))},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e,n){"use strict";!function(n){function r(t,e){if(!(this instanceof r))return new r(t,e);this.domain=[],this.range=[],Array.isArray(t)&&(this.domain=t),Array.isArray(e)&&(this.range=e);var n=function(t){if("number"!=typeof t)return null;var e=this.domain[0],n=this.domain[1],r=this.range[0],i=this.range[1];return"number"!==r&&"number"!=typeof i&&(r=e,i=n),r+(i-r)/(n-e)*(t-e)}.bind(this);return n.domain=function(t){return Array.isArray(t)&&(this.domain=t),n}.bind(this),n.range=function(t){return Array.isArray(t)&&(this.range=t),n}.bind(this),n}void 0!==t&&t.exports&&(e=t.exports=r),e.LinearScale=r}()},function(t,e,n){"use strict";t.exports=n(92)},function(t,e,n){"use strict";var r,i;r=n(5),i=n(2),t.exports=i.extend({initialize:function(t){this._nodes=[],this.name=t.name||"",this.el.className+="smenubar"},render:function(){for(var t=this.el.firstChild;t;)this.el.removeChild(t),t=this.el.firstChild;this.el.appendChild(this.buildDOM())},setName:function(t){this.name=t},addNode:function(t,e,n){var r;null!=n&&(r=n.style),null==this._nodes&&(this._nodes=[]),this._nodes.push({label:t,callback:e,style:r})},getNode:function(t){var e=void 0;return this._nodes.forEach(function(n){n.label===t&&(e=n)}),e},modifyNode:function(t,e,n){var r=this.getNode(t);r.callback=e||r.callback,n=n||{},r.style=n.style||r.style},renameNode:function(t,e){var n=this.getNode(t);n.label=e||n.label},removeNode:function(t){var e=this.getNode(t);this._nodes.splice(this._nodes.indexOf(e),1)},removeAllNodes:function(){this._nodes=[]},buildDOM:function(){var t=document.createElement("span");return t.appendChild(this._buildM({nodes:this._nodes,name:this.name})),t},_buildM:function(t){var e,n,i,o,s,u,a,l=t.nodes,c=t.name,f=document.createElement("div");f.className="smenu-dropdown smenu-dropdown-tip",f.style.display="none";var h=document.createElement("ul");h.className="smenu-dropdown-menu";for(var d=0,p=l.length;d<p;d++){for(i in s=l[d],(o=document.createElement("li")).textContent=s.label,a=s.style)u=a[i],o.style[i]=u;o.addEventListener("click",s.callback),this.trigger("new:node",o),h.appendChild(o)}return this.trigger("new:menu",h),f.appendChild(h),(e=document.createElement("a")).textContent=c,e.className="smenubar_alink",this.trigger("new:button",e),r(e).on("click",function(t){return function(n){return t._showMenu(n,f,e),window.setTimeout(function(){return r(document.body).one("click",function(t){return f.style.display="none"})},5)}}(this)),(n=document.createDocumentFragment()).appendChild(f),n.appendChild(e),n},_showMenu:function(t,e,n){var r;e.style.display="block",e.style.position="absolute",r=n.getBoundingClientRect(),e.style.left=r.left+"px",e.style.top=r.top+n.offsetHeight+"px"}})},function(t,e){"use strict";t.exports={A:"#00a35c",R:"#00fc03",N:"#00eb14",D:"#00eb14",C:"#0000ff",Q:"#00f10e",E:"#00f10e",G:"#009d62",H:"#00d52a",I:"#0054ab",L:"#007b84",K:"#00ff00",M:"#009768",F:"#008778",P:"#00e01f",S:"#00d52a",T:"#00db24",W:"#00a857",Y:"#00e619",V:"#005fa0",B:"#00eb14",X:"#00b649",Z:"#00f10e"}},function(t,e){"use strict";t.exports={A:"#BBBBBB",B:"grey",C:"yellow",D:"red",E:"red",F:"magenta",G:"brown",H:"#00FFFF",I:"#BBBBBB",J:"#fff",K:"#00FFFF",L:"#BBBBBB",M:"#BBBBBB",N:"green",O:"#fff",P:"brown",Q:"green",R:"#00FFFF",S:"green",T:"green",U:"#fff",V:"#BBBBBB",W:"magenta",X:"grey",Y:"magenta",Z:"grey",Gap:"grey"}},function(t,e){"use strict";t.exports={A:"orange",B:"#fff",C:"green",D:"red",E:"red",F:"blue",G:"orange",H:"red",I:"green",J:"#fff",K:"red",L:"green",M:"green",N:"#fff",O:"#fff",P:"orange",Q:"#fff",R:"red",S:"orange",T:"orange",U:"#fff",V:"green",W:"blue",X:"#fff",Y:"blue",Z:"#fff",Gap:"#fff"}},function(t,e){"use strict";t.exports={A:"#80a0f0",R:"#f01505",N:"#00ff00",D:"#c048c0",C:"#f08080",Q:"#00ff00",E:"#c048c0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",L:"#80a0f0",K:"#f01505",M:"#80a0f0",F:"#80a0f0",P:"#ffff00",S:"#00ff00",T:"#00ff00",W:"#80a0f0",Y:"#15a4a4",V:"#80a0f0",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e){"use strict";t.exports={A:"#e718e7",R:"#6f906f",N:"#1be41b",D:"#778877",C:"#23dc23",Q:"#926d92",E:"#ff00ff",G:"#00ff00",H:"#758a75",I:"#8a758a",L:"#ae51ae",K:"#a05fa0",M:"#ef10ef",F:"#986798",P:"#00ff00",S:"#36c936",T:"#47b847",W:"#8a758a",Y:"#21de21",V:"#857a85",B:"#49b649",X:"#758a75",Z:"#c936c9"}},function(t,e){"use strict";t.exports={A:"#ad0052",B:"#0c00f3",C:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",J:"#fff",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",O:"#fff",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",U:"#fff",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3"}},function(t,e,n){"use strict";function r(t){if(null==t||"object"!=(void 0===t?"undefined":i(t)))return t;var e=t.constructor();for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=n(105),s=o.stat,u=o.dyn,a=n(93),l=n(94),c=n(95),f=n(96),h=n(97),d=n(98),p=n(100),g=n(101),v=n(102),m=n(104),y=n(106),_=n(107),b=n(108),x={buried:a,buried_index:a,cinema:l,clustal2:f,clustal:c,helix:h,helix_propensity:h,hydro:d,lesk:p,mae:g,nucleotide:v,purine:m,purine_pyrimidine:m,strand:y,strand_propensity:y,taylor:_,turn:b,turn_propensity:b,zappo:n(109)},w={pid:n(103)},S=function(t){this.maps=r(x),this.dyn=r(w),this.opt=t};t.exports=S,S.getScheme=function(t){return x[t]},S.prototype.getScheme=function(t){var e=this.maps[t];return void 0===e&&(e={},void 0!=this.dyn[t])?new u(this.dyn[t],this.opt):new s(e)},S.prototype.addStaticScheme=function(t,e){this.maps[t]=e},S.prototype.addDynScheme=function(t,e){this.dyn[t]=e}},function(t,e){"use strict";t.exports={A:" orange",B:" #fff",C:" green",D:" red",E:" red",F:" green",G:" orange",H:" magenta",I:" green",J:" #fff",K:" red",L:" green",M:" green",N:" magenta",O:" #fff",P:" green",Q:" magenta",R:" red",S:" orange",T:" orange",U:" #fff",V:" green",W:" green",X:" #fff",Y:" green",Z:" #fff",Gap:" #fff"}},function(t,e){"use strict";t.exports={A:" #77dd88",B:" #fff",C:" #99ee66",D:" #55bb33",E:" #55bb33",F:" #9999ff",G:" #77dd88",H:" #5555ff",I:" #66bbff",J:" #fff",K:" #ffcc77",L:" #66bbff",M:" #66bbff",N:" #55bb33",O:" #fff",P:" #eeaaaa",Q:" #55bb33",R:" #ffcc77",S:" #ff4455",T:" #ff4455",U:" #fff",V:" #66bbff",W:" #9999ff",X:" #fff",Y:" #9999ff",Z:" #fff",Gap:" #fff"}},function(t,e){"use strict";t.exports={A:" #64F73F",C:" #FFB340",G:" #EB413C",T:" #3C88EE",U:" #3C88EE"}},function(t,e){"use strict";var n;t.exports=n={},n.init=function(){this.cons=this.opt.conservation()},n.run=function(t,e){var n=this.cons[e.pos];return n>.8?"#6464ff":n>.6?"#9da5ff":n>.4?"#cccccc":"#ffffff"}},function(t,e){"use strict";t.exports={A:" #FF83FA",C:" #40E0D0",G:" #FF83FA",R:" #FF83FA",T:" #40E0D0",U:" #40E0D0",Y:" #40E0D0"}},function(t,e){"use strict";t.exports.stat=function(t){this.defaultColor="#ffffff",this.type="static",this.map=t,this.getColor=function(t){return void 0!==this.map[t]?this.map[t]:this.defaultColor}},t.exports.dyn=function(t,e){this.type="dyn",this.opt=e,void 0!==t.init?(t.init.call(this),this.getColor=t.run,this.reset=t.init):this.getColor=t}},function(t,e){"use strict";t.exports={A:"#5858a7",R:"#6b6b94",N:"#64649b",D:"#2121de",C:"#9d9d62",Q:"#8c8c73",E:"#0000ff",G:"#4949b6",H:"#60609f",I:"#ecec13",L:"#b2b24d",K:"#4747b8",M:"#82827d",F:"#c2c23d",P:"#2323dc",S:"#4949b6",T:"#9d9d62",W:"#c0c03f",Y:"#d3d32c",V:"#ffff00",B:"#4343bc",X:"#797986",Z:"#4747b8"}},function(t,e){"use strict";t.exports={A:"#ccff00",R:"#0000ff",N:"#cc00ff",D:"#ff0000",C:"#ffff00",Q:"#ff00cc",E:"#ff0066",G:"#ff9900",H:"#0066ff",I:"#66ff00",L:"#33ff00",K:"#6600ff",M:"#00ff00",F:"#00ff66",P:"#ffcc00",S:"#ff3300",T:"#ff6600",W:"#00ccff",Y:"#00ffcc",V:"#99ff00",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e){"use strict";t.exports={A:"#2cd3d3",R:"#708f8f",N:"#ff0000",D:"#e81717",C:"#a85757",Q:"#3fc0c0",E:"#778888",G:"#ff0000",H:"#708f8f",I:"#00ffff",L:"#1ce3e3",K:"#7e8181",M:"#1ee1e1",F:"#1ee1e1",P:"#f60909",S:"#e11e1e",T:"#738c8c",W:"#738c8c",Y:"#9d6262",V:"#07f8f8",B:"#f30c0c",X:"#7c8383",Z:"#5ba4a4"}},function(t,e){"use strict";t.exports={A:"#ffafaf",R:"#6464ff",N:"#00ff00",D:"#ff0000",C:"#ffff00",Q:"#00ff00",E:"#ff0000",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",L:"#ffafaf",K:"#6464ff",M:"#ffafaf",F:"#ffc800",P:"#ff00ff",S:"#00ff00",T:"#00ff00",W:"#ffc800",Y:"#ffc800",V:"#ffafaf",B:"#fff",X:"#fff",Z:"#fff"}},function(t,e,n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){function n(t){return function(e,n,r,i){n=S(n,i,4);var o=!A(e)&&w.keys(e),s=(o||e).length,u=t>0?0:s-1;return arguments.length<3&&(r=e[o?o[u]:u],u+=t),function(e,n,r,i,o,s){for(;o>=0&&o<s;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}(e,n,r,o,u,s)}}function o(t){return function(e,n,r){n=k(n,r);for(var i=z(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function s(t,e,n){return function(r,i,o){var s=0,u=z(r);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(p.call(r,s,u),w.isNaN))>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}}function u(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||f,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)(o=L[n])in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var a=this,l=a._,c=Array.prototype,f=Object.prototype,h=Function.prototype,d=c.push,p=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,_=h.bind,b=Object.create,x=function(){},w=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var S=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)}},k=function(t,e,n){return null==t?w.identity:w.isFunction(t)?S(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return k(t,e,1/0)};var j=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),u=s.length,a=0;a<u;a++){var l=s[a];e&&void 0!==n[l]||(n[l]=o[l])}return n}},O=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,z=E("length"),A=function(t){var e=z(t);return"number"==typeof e&&e>=0&&e<=M};w.each=w.forEach=function(t,e,n){var r,i;if(e=S(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=Array(i),s=0;s<i;s++){var u=r?r[s]:s;o[s]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==r)return t[r]},w.filter=w.select=function(t,e,n){var r=[];return e=k(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(k(e)),n)},w.every=w.all=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(!e(t[s],s,t))return!1}return!0},w.some=w.any=function(t,e,n){e=k(e,n);for(var r=!A(t)&&w.keys(t),i=(r||t).length,o=0;o<i;o++){var s=r?r[o]:o;if(e(t[s],s,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return A(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])>o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var u=0,a=(t=A(t)?t:w.values(t)).length;u<a;u++)(r=t[u])<o&&(o=r);else e=k(e,n),w.each(t,function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)});return o},w.shuffle=function(t){for(var e,n=A(t)?t:w.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=w.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(A(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=k(e,n),w.pluck(w.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(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var C=function(t){return function(e,n,r){var i={};return n=k(n,r),w.each(e,function(r,o){t(i,r,n(r,o,e))}),i}};w.groupBy=C(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=C(function(t,e,n){t[n]=e}),w.countBy=C(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):A(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:A(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=k(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var T=function t(e,n,r,i){for(var o=[],s=0,u=i||0,a=z(e);u<a;u++){var l=e[u];if(A(l)&&(w.isArray(l)||w.isArguments(l))){n||(l=t(l,n,r));var c=0,f=l.length;for(o.length+=f;c<f;)o[s++]=l[c++]}else r||(o[s++]=l)}return o};w.flatten=function(t,e){return T(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var i=[],o=[],s=0,u=z(t);s<u;s++){var a=t[s],l=n?n(a,s,t):a;e?(s&&o===l||i.push(a),o=l):n?w.contains(o,l)||(o.push(l),i.push(a)):w.contains(i,a)||i.push(a)}return i},w.union=function(){return w.uniq(T(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=z(t);r<i;r++){var o=t[r];if(!w.contains(e,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},w.difference=function(t){var e=T(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,z).length||0,n=Array(e),r=0;r<e;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=z(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=o(1),w.findLastIndex=o(-1),w.sortedIndex=function(t,e,n,r){for(var i=(n=k(n,r,1))(e),o=0,s=z(t);o<s;){var u=Math.floor((o+s)/2);n(t[u])<i?o=u+1:s=u}return o},w.indexOf=s(1,w.findIndex,w.sortedIndex),w.lastIndexOf=s(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var I=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),s=t.apply(o,i);return w.isObject(s)?s:o};w.bind=function(t,e){if(_&&t.bind===_)return _.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2);return function r(){return I(t,r,e,this,n.concat(p.call(arguments)))}},w.partial=function(t){var e=p.call(arguments,1);return function n(){for(var r=0,i=e.length,o=Array(i),s=0;s<i;s++)o[s]=e[s]===w?arguments[r++]:e[s];for(;r<arguments.length;)o.push(arguments[r++]);return I(t,n,this,this,o)}},w.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,s=null,u=0;n||(n={});var a=function(){u=!1===n.leading?0:w.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var l=w.now();u||!1!==n.leading||(u=l);var c=e-(l-u);return r=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),u=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(a,c)),o}},w.debounce=function(t,e,n){var r,i,o,s,u,a=function a(){var l=w.now()-s;l<e&&l>=0?r=setTimeout(a,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=w.now();var l=n&&!r;return r||(r=setTimeout(a,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.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}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return N&&u(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&u(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=i.length,s={},u=0;u<o;u++)s[r=i[u]]=e(t[r],r,t);return s},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=j(w.allKeys),w.extendOwn=w.assign=j(w.keys),w.findKey=function(t,e,n){e=k(e,n);for(var r,i=w.keys(t),o=0,s=i.length;o<s;o++)if(e(t[r=i[o]],r,t))return r},w.pick=function(t,e,n){var r,i,o={},s=t;if(null==s)return o;w.isFunction(e)?(i=w.allKeys(s),r=S(e,n)):(i=T(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var u=0,a=i.length;u<a;u++){var l=i[u],c=s[l];r(c,l,s)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(T(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=j(w.allKeys,!0),w.create=function(t,e){var n=O(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var s=n[o];if(e[s]!==i[s]||!(s in i))return!1}return!0};w.isEqual=function(t,e){return function t(e,n,r,o){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return e===n;e instanceof w&&(e=e._wrapped),n instanceof w&&(n=n._wrapped);var s=g.call(e);if(s!==g.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n}var u="[object Array]"===s;if(!u){if("object"!=(void 0===e?"undefined":i(e))||"object"!=(void 0===n?"undefined":i(n)))return!1;var a=e.constructor,l=n.constructor;if(a!==l&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===e)return o[c]===n;if(r.push(e),o.push(n),u){if((c=e.length)!==n.length)return!1;for(;c--;)if(!t(e[c],n[c],r,o))return!1}else{var f,h=w.keys(e);if(c=h.length,w.keys(n).length!==c)return!1;for(;c--;)if(f=h[c],!w.has(n,f)||!t(e[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(t,e)},w.isEmpty=function(t){return null==t||(A(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=m||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=void 0===t?"undefined":i(t);return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":i(Int8Array))&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&v.call(t,e)},w.noConflict=function(){return a._=l,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=E,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=S(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},q=w.invert(R),F=function(t){var e=function(e){return t[e]},n="(?:"+w.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}};w.escape=F(R),w.unescape=F(q),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var P=0;w.uniqueId=function(t){var e=++P+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,s,u){return o+=t.slice(i,u).replace(D,H),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\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 s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,w)},a=e.variable||"obj";return u.source="function("+a+"){\n"+o+"}",u},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=c[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return w}.apply(e,[]))||(t.exports=r)}).call(void 0)},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.io=e.$=e.boneView=e.view=e.selcol=e.selection=e.utils=e.menu=e.model=e.msa=void 0;var o=n(8);Object.defineProperty(e,"selection",{enumerable:!0,get:function(){return i(o).default}});var s=n(9);Object.defineProperty(e,"selcol",{enumerable:!0,get:function(){return i(s).default}});var u=n(2);Object.defineProperty(e,"view",{enumerable:!0,get:function(){return i(u).default}});var a=n(4);Object.defineProperty(e,"boneView",{enumerable:!0,get:function(){return i(a).default}});var l=n(5);Object.defineProperty(e,"$",{enumerable:!0,get:function(){return i(l).default}});var c=i(n(125)),f=r(n(51)),h=r(n(113)),d=r(n(37)),p=n(10);e.default=function(){var t=function(t){return c.default.apply(this,t)};return t.prototype=c.default.prototype,new t(arguments)},e.msa=c.default,e.model=f,e.menu=h,e.utils=d;var g={xhr:n(21),fasta:p.fasta,clustal:p.clustal,gff:p.gff};e.io=g;var v;v="1.0.3",e.version=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(121)),o=r(n(119)),s=r(n(123)),u=r(n(124)),a=r(n(115)),l=r(n(122)),c=r(n(118)),f=r(n(117)),h=r(n(120)),d=r(n(116)),p=r(n(114)),g=n(4).extend({initialize:function(t){if(!t.msa)throw new Error("No msa instance provided. Please provide .msa");if(this.msa=t.msa,this.msa.g.menuconfig=new p.default(t.menu),this.addView("10_import",new i.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("15_ordering",new l.default({model:this.msa.seqs,g:this.msa.g})),this.addView("20_filter",new o.default({model:this.msa.seqs,g:this.msa.g})),this.addView("30_selection",new s.default({model:this.msa.seqs,g:this.msa.g})),this.addView("40_vis",new u.default({model:this.msa.seqs,g:this.msa.g})),this.addView("50_color",new a.default({model:this.msa.seqs,g:this.msa.g})),this.addView("70_extra",new c.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("80_export",new f.default({model:this.msa.seqs,g:this.msa.g,msa:this.msa})),this.addView("90_help",new h.default({g:this.msa.g})),this.msa.g.config.get("debug"))return this.addView("95_debug",new d.default({g:this.msa.g}))},render:function(){return this.renderSubviews(),this.el.setAttribute("class","smenubar"),this.el.appendChild(document.createElement("p"))}});e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(112);Object.defineProperty(e,"defaultmenu",{enumerable:!0,get:function(){return r(i).default}});var o=n(6);Object.defineProperty(e,"menubuilder",{enumerable:!0,get:function(){return r(o).default}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1).Model,i=r.extend({constructor:function(t,e){return"small"==t&&(t=this.small),r.apply(this,[t])},small:{menuFontsize:"12px"},defaults:{menuFontsize:"14px",menuItemFontsize:"14px",menuItemLineHeight:"14px",menuMarginLeft:"3px",menuPadding:"3px 4px 3px 4px"}});e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)),i=n(7),o=r.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.listenTo(this.g.colorscheme,"change",function(){return this.render()})},render:function(){var t=this.setName("Color scheme");this.removeAllNodes();for(var e,n=this.getColorschemes(),r=0;r<n.length;r++)e=n[r],this.addScheme(t,e);return this.grey(t),i.removeAllChilds(this.el),this.el.appendChild(this.buildDOM()),this},addScheme:function(t,e){var n=this,r={};return this.g.colorscheme.get("scheme")===e.id&&(r.backgroundColor="#77ED80"),this.addNode(e.name,function(){n.g.colorscheme.set("scheme",e.id)},{style:r})},getColorschemes:function(){var t=[];return t.push({name:"Taylor",id:"taylor"}),t.push({name:"Buried",id:"buried"}),t.push({name:"Cinema",id:"cinema"}),t.push({name:"Clustal",id:"clustal"}),t.push({name:"Clustal2",id:"clustal2"}),t.push({name:"Helix",id:"helix"}),t.push({name:"Hydrophobicity",id:"hydro"}),t.push({name:"Lesk",id:"lesk"}),t.push({name:"MAE",id:"mae"}),t.push({name:"Nucleotide",id:"nucleotide"}),t.push({name:"Purine",id:"purine"}),t.push({name:"PID",id:"pid"}),t.push({name:"Strand",id:"strand"}),t.push({name:"Turn",id:"turn"}),t.push({name:"Zappo",id:"zappo"}),t.push({name:"No color",id:"foo"}),t},grey:function(t){}});e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)).default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Debug"),this.addNode("Get the code",function(){return window.open("https://github.com/wilzbach/msa")}),this.addNode("Toggle mouseover events",function(){return t.g.config.set("registerMouseHover",!t.g.config.get("registerMouseHover")),t.g.onAll(function(){})}),this.addNode("Minimized width",function(){return t.g.zoomer.set("alignmentWidth",600)}),this.addNode("Minimized height",function(){return t.g.zoomer.set("alignmentHeight",120)}),this.el.appendChild(this.buildDOM()),this}});e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(6)),o=r(n(16)),s=(n(10).fasta.write,"↪"),u=i.default.extend({initialize:function(t){return this.g=t.g,this.msa=t.msa,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Export"),this.addNode("Share view (URL)"+s,function(){return o.default.shareLink(t.msa,function(t){return window.open(t,"_blank")})}),this.addNode("View in Jalview",function(){var e=t.g.config.get("url");return void 0===e||null===e?alert("Sequence weren't imported via an URL"):e.indexOf("localhost")?o.default.publishWeb(t.msa,function(e){return o.default.openInJalview(e,t.g.colorscheme.get("scheme"))}):o.default.openInJalview(e,t.g.colorscheme.get("scheme"))}),this.addNode("Export alignment (FASTA)",function(){return o.default.saveAsFile(t.msa,"all.fasta")}),this.addNode("Export alignment (URL)",function(){return o.default.publishWeb(t.msa,function(t){return window.open(t,"_blank")})}),this.addNode("Export selected sequences (FASTA)",function(){return o.default.saveSelection(t.msa,"selection.fasta")}),this.addNode("Export features (GFF)",function(){return o.default.saveAnnots(t.msa,"features.gff3")}),this.addNode("Export MSA image (PNG)",function(){return o.default.saveAsImg(t.msa,"biojs-msa.png")}),this.el.appendChild(this.buildDOM()),this}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(6)),o=r(n(36)),s=(r(n(18)),n(21),i.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.msa=t.msa},render:function(){var t=this;this.setName("Extras");var e=this.g.stats;return this.msa,this.addNode("Add consensus seq",function(){var n=e.consensus(),r=new o.default({seq:n,id:"0c",name:"Consenus"});return t.model.add(r),t.model.setRef(r),t.model.comparator=function(t){return!t.get("ref")},t.model.sort()}),this.addNode("Jump to a column",function(){var e=prompt("Column","20");return e<0||e>t.model.getMaxLength()||isNaN(e)?void alert("invalid column"):t.g.zoomer.setLeftOffset(e)}),this.el.appendChild(this.buildDOM()),this}}));e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)).default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Filter"),this.addNode("Hide columns by threshold",function(e){var n=prompt("Enter threshold (in percent)",20);n/=100;for(var r=t.model.getMaxLength(),i=[],o=t.g.stats.scale(t.g.stats.conservation()),s=r-1,u=0;0<s?u<=s:u>=s;0<s?u++:u--)o[u]<n&&i.push(u);return t.g.columns.set("hidden",i)}),this.addNode("Hide columns by selection",function(){var e=t.g.columns.get("hidden").concat(t.g.selcol.getAllColumnBlocks({maxLen:t.model.getMaxLength(),withPos:!0}));return t.g.selcol.reset([]),t.g.columns.set("hidden",e)}),this.addNode("Hide columns by gaps",function(){var e=prompt("Enter threshold (in percent)",20);e/=100;for(var n=[],r=t.model.getMaxLength()-1,i=0;0<r?i<=r:i>=r;0<r?i++:i--){var o=0,s=0;t.model.each(function(t){return"-"===t.get("seq")[i]&&o++,s++}),o/s>e&&n.push(i)}return t.g.columns.set("hidden",n)}),this.addNode("Hide seqs by identity",function(){var e=prompt("Enter threshold (in percent)",20);return e/=100,t.model.each(function(t){if(t.get("identity")<e)return t.set("hidden",!0)})}),this.addNode("Hide seqs by selection",function(){var e=t.g.selcol.where({type:"row"}).map(function(t){return t.get("seqId")});return t.g.selcol.reset([]),t.model.each(function(t){if(e.indexOf(t.get("id"))>=0)return t.set("hidden",!0)})}),this.addNode("Hide seqs by gaps",function(){var e=prompt("Enter threshold (in percent)",40);return t.model.each(function(t,n){if(t.get("seq").reduce(function(t,e){return"-"===e?++t:void 0},0)>e)return t.set("hidden",!0)})}),this.addNode("Reset",function(){return t.g.columns.set("hidden",[]),t.model.each(function(t){if(t.get("hidden"))return t.set("hidden",!1)})}),this.el.appendChild(this.buildDOM()),this}});e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)).default.extend({initialize:function(t){return this.g=t.g},render:function(){return this.setName("Help"),this.addNode("About the project",function(){return window.open("https://github.com/wilzbach/msa")}),this.addNode("Report issues",function(){return window.open("https://github.com/wilzbach/msa/issues")}),this.addNode("User manual",function(){return window.open("https://github.com/wilzbach/msa/wiki/User-manual")}),this.el.style.display="inline-block",this.el.appendChild(this.buildDOM()),this}});e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)),i=n(14),o=r.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.msa=t.msa},render:function(){var t=this,e=this.msa,n=i.mk("input");n.type="file",n.style.display="none",n.multiple=!0,n.addEventListener("change",function(){var t=n.files||[];return e.u.file.importFiles(t)}),this.el.appendChild(n);var r="(Fasta, Clustal, GFF, Jalview features, Newick)";return this.setName("Import"),this.addNode("URL",function(e){var n=prompt("URL "+r,"http://rostlab.org/~goldberg/clustalw2-I20140818-215249-0556-53699878-pg.clustalw");if(n.length>5)return t.msa.u.file.importURL(n,function(){})}),this.addNode("From file "+r,function(){return n.click()}),this.addNode("Drag & Drop",function(){return alert("Yep. Just drag & drop your file "+r)}),this.el.appendChild(this.buildDOM()),this}});e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)),i=n(7),o="↑",s="↓",u=r.default.extend({initialize:function(t){return this.g=t.g,this.order="ID",this.el.style.display="inline-block"},setOrder:function(t){return this.order=t,this.render()},render:function(){this.setName("Sorting"),this.removeAllNodes();for(var t,e=this.getComparators(),n=0;n<e.length;n++)t=e[n],this._addNode(t);var r=this.buildDOM();return i.removeAllChilds(this.el),this.el.appendChild(r),this},_addNode:function(t){var e=this,n=t.text,r={};return n===this.order&&(r.backgroundColor="#77ED80"),this.addNode(n,function(){return null!=t.precode&&t.precode(),e.model.comparator=t.comparator,e.model.sort(),e.setOrder(t.text)},{style:r})},getComparators:function(){var t=this,e=[];e.push({text:"ID "+o,comparator:"id"}),e.push({text:"ID "+s,comparator:function(t,e){return-(""+t.get("id")).localeCompare(""+e.get("id"),[],{numeric:!0})}}),e.push({text:"Label "+o,comparator:"name"}),e.push({text:"Label "+s,comparator:function(t,e){return-t.get("name").localeCompare(e.get("name"))}}),e.push({text:"Seq "+o,comparator:"seq"}),e.push({text:"Seq "+s,comparator:function(t,e){return-t.get("seq").localeCompare(e.get("seq"))}});var n=function(){return t.ident=t.g.stats.identity()},r=function(){return t.gaps={},t.model.each(function(e){var n=e.attributes.seq;return t.gaps[e.id]=(n.reduce(function(t,e){return"-"===e?++t:void 0}),0/n.length)})};return e.push({text:"Identity "+o,comparator:function(e,n){var r=t.ident[e.id]-t.ident[n.id];return r>0?1:r<0?-1:0},precode:n}),e.push({text:"Identity "+s,comparator:function(e,n){var r=t.ident[e.id]-t.ident[n.id];return r>0?-1:r<0?1:0},precode:n}),e.push({text:"Gaps "+o,comparator:function(e,n){var r=t.gaps[e.id]-t.gaps[n.id];return r>0?1:r<0?-1:0},precode:r}),e.push({text:"Gaps "+s,comparator:function(e,n){var r=t.gaps[e.id]-t.gaps[n.id];return r<0?1:r>0?-1:0},precode:r}),e.push({text:"Consensus to top",comparator:function(t){return!t.get("ref")}}),e}});e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)).default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block"},render:function(){var t=this;return this.setName("Selection"),this.addNode("Find Motif (supports RegEx)",function(){var e=prompt("your search","D");return t.g.user.set("searchText",e)}),this.addNode("Invert columns",function(){return t.g.selcol.invertCol(function(){var e=[],n=t.model.getMaxLength(),r=0;if(0<=n)for(;r<=n;)e.push(r++);else for(;r>=n;)e.push(r--);return e}())}),this.addNode("Invert rows",function(){return t.g.selcol.invertRow(t.model.pluck("id"))}),this.addNode("Reset",function(){return t.g.selcol.reset()}),this.el.appendChild(this.buildDOM()),this}});e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(6)),i=n(7),o=r.default.extend({initialize:function(t){return this.g=t.g,this.el.style.display="inline-block",this.listenTo(this.g.vis,"change",this.render)},render:function(){var t=this;this.removeAllNodes(),this.setName("Vis.elements");for(var e,n=this.getVisElements(),r=0;r<n.length;r++)e=n[r],this._addVisEl(e);return this.addNode("Reset",function(){return t.g.vis.set("labels",!0),t.g.vis.set("sequences",!0),t.g.vis.set("metacell",!0),t.g.vis.set("conserv",!0),t.g.vis.set("labelId",!0),t.g.vis.set("labelName",!0),t.g.vis.set("labelCheckbox",!1),t.g.vis.set("seqlogo",!1),t.g.vis.set("gapHeader",!1),t.g.vis.set("leftHeader",!0),t.g.vis.set("metaGaps",!0),t.g.vis.set("metaIdentity",!0),t.g.vis.set("metaLinks",!0)}),i.removeAllChilds(this.el),this.el.appendChild(this.buildDOM()),this},_addVisEl:function(t){var e=this,n={};if(this.g.vis.get(t.id)){var r="Hide ";n.color="red"}else r="Show ",n.color="green";return this.addNode(r+t.name,function(){return e.g.vis.set(t.id,!e.g.vis.get(t.id))},{style:n})},getVisElements:function(){var t=[];return t.push({name:"residues indices",id:"markers"}),t.push({name:"ID/Label",id:"labels"}),t.push({name:"meta info (Gaps/Ident)",id:"metacell"}),t.push({name:"overview panel",id:"overviewbox"}),t.push({name:"sequence logo",id:"seqlogo"}),t.push({name:"gap weights",id:"gapHeader"}),t.push({name:"conservation weights",id:"conserv"}),t.push({name:"scale slider",id:"scaleslider"}),t.push({name:"Label",id:"labelName"}),t.push({name:"ID",id:"labelId"}),t.push({name:"gaps %",id:"metaGaps"}),t.push({name:"identity score",id:"metaIdentity"}),t}});e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(35)),o=r(n(26)),s=r(n(27)),u=r(n(28)),a=r(n(29)),l=r(n(9)),c=r(n(30)),f=r(n(32)),h=r(n(31)),d=r(n(33)),p=r(n(25)),g=r(n(130)),v=r(n(17)),m=r(n(40)),y=r(n(19)),_=n(4),b=n(13),x=n(48),w=n(5),S=_.extend({initialize:function(t){var e=this;if(void 0!==t&&null!==t||(t={}),null==t.colorscheme&&(t.colorscheme={}),null==t.columns&&(t.columns={}),null==t.conf&&(t.conf={}),null==t.vis&&(t.vis={}),null==t.visorder&&(t.visorder={}),null==t.zoomer&&(t.zoomer={}),null==t.conserv&&(t.conserv={}),null==t.scale&&(t.scale={}),this.g=b.mixin({}),this.seqs=this.g.seqs=new i.default(t.seqs,this.g),this.g.config=new u.default(t.conf),this.g.package=new a.default(this.g),this.g.selcol=new l.default([],{g:this.g}),this.g.user=new c.default,this.g.vis=new f.default(t.vis,{model:this.seqs}),this.g.visorder=new h.default(t.visorder),this.g.zoomer=new d.default(t.zoomer,{g:this.g,model:this.seqs}),this.g.scale=new p.default(t.scale,{g:this.g}),this.g.conservationConfig=t.conserv,"localhost"===window.location.hostname&&this.g.config.set("debug",!0),this._loadSeqs(t),this.u={},this.u.file=new v.default(this),this.u.proxy=new y.default({g:this.g}),this.u.tree=new m.default(this),!0===this.g.config.get("eventBus")&&this.startEventBus(),this.g.config.get("dropImport")){var n={dragover:this.dragOver,drop:this.dropFile};this.delegateEvents(n)}return t.importURL&&this.u.file.importURL(t.importURL,function(){return e.render()}),t.bootstrapMenu&&(t.menu&&(this.menuConfig=t.menu),this.g.config.set("bootstrapMenu",!0)),this.draw(),this.m()},_loadSeqs:function(t){var e=this.seqs.pluck("seq");return this.g.stats=new x(this.seqs,{useGaps:!0}),this.g.stats.alphabetSize=this.g.config.get("alphabetSize"),this.g.columns=new s.default(t.columns,this.g.stats),this.g.colorscheme=new o.default(t.colorscheme,e,this.g.stats),this.g.zoomer.setEl(this.el,this.seqs)},importURL:function(){return this.u.file.importURL.apply(this.u.file,arguments)},m:function(){var t={};return t.model=n(51),t.selection=n(8),t.selcol=n(9),t.view=n(2),t.boneView=n(4),this.m=t},draw:function(){var t=this;if(this.removeViews(),this.addView("stage",new g.default({model:this.seqs,g:this.g})),this.$el.addClass("biojs_msa_div"),this.g.config.get("bootstrapMenu")){var e=document.createElement("div"),n=document.createElement("div");this.el.parentNode?(this.el.parentNode.replaceChild(n,this.el),n.appendChild(e),n.appendChild(this.el)):(n.appendChild(e),n.appendChild(this.el));var r={el:e,msa:this};this.menuConfig&&(r.menu=this.menuConfig),new msa.menu.defaultmenu(r).render()}return w(window).on("resize",function(e){return setTimeout(function(){return this.g.zoomer.autoResize()}.bind(t),5)})},dragOver:function(t){return t.preventDefault(),t.target.className="hover",!1},dropFile:function(t){t.preventDefault();var e=t.target.files||t.dataTransfer.files;return this.u.file.importFiles(e),!1},startEventBus:function(){var t=this,e=["config","columns","colorscheme","selcol","vis","visorder","zoomer"];return function(){for(var n,r=[],i=0;i<e.length;i++)n=e[i],r.push(t._proxyToG(n));return r}()},_proxyToG:function(t){return this.listenTo(this.g[t],"all",function(e,n,r,i){if("change"!==e)return void 0!==i&&null!==i?this.g.trigger(t+":"+e,r,n,i):this.g.trigger(t+":"+e,r,n)})},render:function(){return void 0===this.seqs||this.seqs.length,this.renderSubviews(),this.g.vis.set("loaded",!0),this}});e.default=S},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(134)),o=r(n(143)),s=n(4).extend({initialize:function(t){this.g=t.g;var e=new o.default({model:this.model,g:this.g});if(e.ordering=-1,this.addView("labelblock",e),this.g.vis.get("sequences")){var n=new i.default({model:this.model,g:this.g});n.ordering=0,this.addView("seqblock",n)}return this.listenTo(this.g.zoomer,"change:alignmentHeight",this.adjustHeight),this.listenTo(this.g.zoomer,"change:alignmentWidth",this.adjustWidth),this.listenTo(this.g.columns,"change:hidden",this.adjustHeight),this},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_albody",this.el.style.whiteSpace="nowrap",this.adjustHeight(),this.adjustWidth(),this},adjustHeight:function(){return"auto"===this.g.zoomer.get("alignmentHeight")?this.el.style.height=this.g.zoomer.get("rowHeight")*this.model.length+5:this.el.style.height=this.g.zoomer.get("alignmentHeight")},adjustWidth:function(){return this.el.style.width=this.getWidth()},getWidth:function(){var t=0;return t+=this.g.zoomer.getLeftBlockWidth(),this.g.vis.get("sequences")&&(t+=this.g.zoomer.get("alignmentWidth")),t}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(2),o=n(47),s=n(5),u=i.extend({className:"biojs_msa_overviewbox",tagName:"canvas",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:boxRectWidth change:boxRectHeight change:overviewboxPaddingTop",this.rerender),this.listenTo(this.g.selcol,"add reset change",this.rerender),this.listenTo(this.g.columns,"change:hidden",this.rerender),this.listenTo(this.g.colorscheme,"change:showLowerCase",this.rerender),this.listenTo(this.model,"change",_.debounce(this.rerender,5)),this.color=this.g.colorscheme.getSelectedScheme(),this.listenTo(this.g.colorscheme,"change:scheme",function(){return this.color=this.g.colorscheme.getSelectedScheme(),this.rerender()}),this.dragStart=[]},events:{click:"_onclick",mousedown:"_onmousedown"},rerender:function(){if(!this.g.config.get("manualRendering"))return this.render()},render:function(){this._createCanvas(),this.el.textContent="overview",this.el.style.marginTop=this.g.zoomer.get("overviewboxPaddingTop"),this.ctx.fillStyle="#999999",this.ctx.fillRect(0,0,this.el.width,this.el.height);for(var t=this.g.zoomer.get("boxRectWidth"),e=this.g.zoomer.get("boxRectHeight"),n=this.g.columns.get("hidden"),r=this.g.colorscheme.get("showLowerCase"),i=-e,o=this.model.length,s=0;s<o;s++)if(this.model.at(s)){var u=this.model.at(s).get("seq"),a=0;if(i+=e,this.model.at(s).get("hidden"))this.ctx.fillStyle="grey",this.ctx.fillRect(0,i,u.length*t,e);else for(var l=0;l<u.length;l++){var c=u[l];r&&(c=c.toUpperCase());var f=this.color.getColor(c,{pos:l});n.indexOf(l)>=0&&(f="grey"),void 0!==f&&null!==f&&(this.ctx.fillStyle=f,this.ctx.fillRect(a,i,t,e)),a+=t}}return this._drawSelection()},_drawSelection:function(){var t=this;if(!(this.dragStart.length>0)||this.prolongSelection){var e=this.g.zoomer.get("boxRectWidth"),n=this.g.zoomer.get("boxRectHeight"),r=n*this.model.length;this.ctx.fillStyle="#666666",this.ctx.globalAlpha=.9;for(var i=this.g.selcol.length,o=function(i){var o=t.g.selcol.at(i);if(!o)return"continue";var s=void 0,u=void 0;"column"===o.get("type")?t.ctx.fillRect(e*o.get("xStart"),0,e*(o.get("xEnd")-o.get("xStart")+1),r):"row"===o.get("type")?(s=t.model.filter(function(t){return t.get("id")===o.get("seqId")})[0],u=t.model.indexOf(s),t.ctx.fillRect(0,n*u,e*s.get("seq").length,n)):"pos"===o.get("type")&&(s=t.model.filter(function(t){return t.get("id")===o.get("seqId")})[0],u=t.model.indexOf(s),t.ctx.fillRect(e*o.get("xStart"),n*u,e*(o.get("xEnd")-o.get("xStart")+1),n))},s=0;s<i;s++)o(s);return this.ctx.globalAlpha=1}},_onclick:function(t){return this.g.trigger("meta:click",{seqId:this.model.get("id",{evt:t})})},_onmousemove:function(t){if(0!==this.dragStart.length){this.render(),this.ctx.fillStyle="#666666",this.ctx.globalAlpha=.9;var e=this._calcSelection(o.abs(t));return this.ctx.fillRect(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0]),t.preventDefault(),t.stopPropagation()}},_onmousedown:function(t){var e=this;return this.dragStart=o.abs(t),this.dragStartRel=o.rel(t),t.ctrlKey||t.metaKey?this.prolongSelection=!0:this.prolongSelection=!1,s(document.body).on("mousemove.overmove",function(t){return e._onmousemove(t)}),s(document.body).on("mouseup.overup",function(t){return e._onmouseup(t)}),this.dragStart},_calcSelection:function(t){for(var e=[t[0]-this.dragStart[0],t[1]-this.dragStart[1]],n=0;n<=1;n++)e[n]=this.dragStartRel[n]+e[n];for(var r=[[this.dragStartRel[0],e[0]],[this.dragStartRel[1],e[1]]],i=0;i<=1;i++)r[i][1]<r[i][0]&&(r[i]=[r[i][1],r[i][0]]),r[i][0]=Math.max(r[i][0],0);return r},_endSelection:function(t){if(s(document.body).off(".overmove"),s(document.body).off(".overup"),0!==this.dragStart.length){for(var e=this._calcSelection(t),n=0;n<=1;n++)e[0][n]=Math.floor(e[0][n]/this.g.zoomer.get("boxRectWidth"));for(n=0;n<=1;n++)e[1][n]=Math.floor(e[1][n]/this.g.zoomer.get("boxRectHeight"));e[0][1]=Math.min(this.model.getMaxLength()-1,e[0][1]),e[1][1]=Math.min(this.model.length-1,e[1][1]);for(var i=[],o=e[1][0];o<=e[1][1];o++){var u={seqId:this.model.at(o).get("id"),xStart:e[0][0],xEnd:e[0][1]};i.push(new r.possel(u))}return this.dragStart=[],this.prolongSelection?this.g.selcol.add(i):this.g.selcol.reset(i),this.g.zoomer.setLeftOffset(e[0][0]),this.g.zoomer.setTopOffset(e[1][0])}},_onmouseup:function(t){return this._endSelection(o.abs(t))},_onmouseout:function(t){return this._endSelection(o.abs(t))},_createCanvas:function(){var t=this.g.zoomer.get("boxRectWidth"),e=this.g.zoomer.get("boxRectHeight");return this.el.height=this.model.length*e,this.el.width=this.model.getMaxLength()*t,this.ctx=this.el.getContext("2d"),this.el.style.overflow="auto",this.el.style.cursor="crosshair"}});e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(2),o=n(5),s=i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:columnWidth",this.render),this.toggleClass="msa-hide",this.isVisible=!0,this},attributes:{class:"biojs_msa_scale"},events:{"change input":"updateSlider","click button.msa-btn-close":"hide","click button.msa-btn-open":"show","click button[data-action]":"clickButton"},template:(0,r.template)('\t<div class="msa-scale-minimised">\t <button class="btn msa-btn msa-btn-open">Zoom</button>\t</div>\t<div class="msa-scale-maximised">\t <button class="btn msa-btn msa-btn-close" style="float:right">× close</button>\t <div>\t <input type="range" \t data-provide="slider" \t min="<%= min %>" \t max="<%= max %>" \t step="<%= step %>" \t value="<%= value %>" \t >\t </div>\t <div class="btngroup msa-btngroup">\t <button class="btn msa-btn" data-action="smaller"><span class="glyphicon-zoom-out"></span>-</button>\t <button class="btn msa-btn" data-action="bigger"><span class="glyphicon-zoom-in"></span>+</button>\t <button class="btn msa-btn" data-action="reset"><span class="glyphicon-repeat"></span>reset</button>\t </div>\t</div>\t'),render:function(){var t=this.model.getSizeRange(),e={value:this.model.getSize(),min:t[0],max:t[1],step:this.model.step||1};return this.$el.html(this.template(e)),this.isVisible?this.show():this.hide(),this},updateSlider:function(t){var e=t.target,n=parseInt(o(e).val());this.model.setSize(n)},clickButton:function(t){var e=t.target,n=o(e).data("action");return this.model[n],"function"==typeof this.model[n]&&this.model[n](),this},hide:function(){this.isVisible=!1,this.$el.find(".msa-scale-minimised").removeClass(this.toggleClass),this.$el.find(".msa-scale-maximised").addClass(this.toggleClass)},show:function(){this.isVisible=!1,this.$el.find(".msa-scale-minimised").addClass(this.toggleClass),this.$el.find(".msa-scale-maximised").removeClass(this.toggleClass)}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n(4),o=n(14),s=(n(7),i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.user,"change:searchText",function(t,e){return this.search(e),this.render()}),this.sel=[],this.selPos=0},events:{scroll:"_sendScrollEvent"},render:function(){this.renderSubviews(),this.el.className="biojs_msa_searchresult";var t=this.g.user.get("searchText");return void 0!==t&&null!==t&&t.length>0&&(0===this.sel.length?this.el.textContent="no selection found":(this.resultBox=o.mk("div"),this.resultBox.className="biojs_msa_searchresult_ovbox",this.updateResult(),this.el.appendChild(this.resultBox),this.el.appendChild(this.buildBtns()))),this},updateResult:function(){var t="search pattern: "+this.g.user.get("searchText");t+=", selection: "+(this.selPos+1);var e=this.sel[this.selPos];return t+=" (",t+=e.get("xStart")+" - "+e.get("xEnd"),t+=", id: "+e.get("seqId"),t+=")",this.resultBox.textContent=t},buildBtns:function(){var t=this,e=o.mk("button");e.textContent="Prev",e.addEventListener("click",function(){return t.moveSel(-1)});var n=o.mk("button");n.textContent="Next",n.addEventListener("click",function(){return t.moveSel(1)});var r=o.mk("button");r.textContent="All",r.addEventListener("click",function(){return t.g.selcol.reset(t.sel)});var i=o.mk("div");return i.appendChild(e),i.appendChild(n),i.appendChild(r),i.className="biojs_msa_searchresult_row",i},moveSel:function(t){var e=this.selPos+t;return e<0||e>=this.sel.length?-1:(this.focus(e),this.selPos=e,this.updateResult())},focus:function(t){var e=this.sel[t],n=e.get("xStart");return this.g.zoomer.setLeftOffset(n),this.g.selcol.reset([e])},search:function(t){var e,n=new RegExp(t,"gi"),i=[],o=e=100042;return this.model.each(function(t){var e=t.get("seq");return function(){for(var s,u=[];s=n.exec(e);){var a=s.index,l={xStart:a,xEnd:a+s[0].length-1,seqId:t.get("id")};i.push(new r.possel(l)),u.push(o=Math.min(a,o))}return u}()}),this.g.selcol.reset(i),o===e&&(o=0),this.g.zoomer.setLeftOffset(o),this.sel=i}}));e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=r(n(126)),s=r(n(138)),u=r(n(127)),a=r(n(129)),l=r(n(128)),c=n(4).extend({initialize:function(t){return this.g=t.g,this.draw(),this.listenTo(this.g.stats,"reset",function(){return this.rerender()}),this.listenTo(this.model,"change:hidden",(0,i.debounce)(this.rerender,10)),this.listenTo(this.model,"sort",this.rerender),this.listenTo(this.model,"add",function(){}),this.listenTo(this.g.vis,"change:sequences",this.rerender),this.listenTo(this.g.vis,"change:overviewbox",this.rerender),this.listenTo(this.g.visorder,"change",this.rerender),this.listenTo(this.g.zoomer,"change:columnWidth",this.rerender),this.listenTo(this.g.vis,"change:scaleslider",this.rerender),this},draw:function(){if(this.removeViews(),this.g.vis.get("overviewbox")){var t=new u.default({model:this.model,g:this.g});t.ordering=this.g.visorder.get("overviewBox"),this.addView("overviewBox",t)}var e=new s.default({model:this.model,g:this.g});e.ordering=this.g.visorder.get("headerBox"),this.addView("headerBox",e);var n=new a.default({model:this.model,g:this.g});n.ordering=this.g.visorder.get("searchBox"),this.addView("searchbox",n);var r=new o.default({model:this.model,g:this.g});if(r.ordering=this.g.visorder.get("alignmentBody"),this.addView("body",r),this.g.vis.get("scaleslider")){var i=new l.default({model:this.g.scale,g:this.g});i.ordering=this.g.visorder.get("scaleSlider"),this.addView("scaleSlider",i)}return this},render:function(t){return this.renderSubviews(),this.el.className="biojs_msa_stage",this},rerender:function(){if(!this.g.config.get("manualRendering"))return this.draw(),this.render()}});e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=(n(13),function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.g=e,this.cache={},this.cacheHeight=0,this.cacheWidth=0}return r(t,[{key:"getFontTile",value:function(t,e,n){return e===this.cacheWidth&&n===this.cacheHeight||(this.cacheHeight=n,this.cacheWidth=e,this.cache={}),void 0===this.cache[t]&&this.createTile(t,e,n),this.cache[t]}},{key:"createTile",value:function(t,e,n){var r=this.cache[t]=document.createElement("canvas");return r.width=e,r.height=n,this.ctx=r.getContext("2d"),this.ctx.font=this.g.zoomer.get("residueFont")+"px mono",this.ctx.textBaseline="middle",this.ctx.textAlign="center",this.ctx.fillText(t,e/2,n/2,e)}}]),t}());e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(13),o=function(t,e){return this.g=t,this.model=e,this.maxScrollWidth=0,this.maxScrollHeight=0,this.setMaxScrollHeight(),this.setMaxScrollWidth(),this.listenTo(this.g.zoomer,"change:rowHeight",this.setMaxScrollHeight),this.listenTo(this.g.zoomer,"change:columnWidth",this.setMaxScrollWidth),this.listenTo(this.g.zoomer,"change:alignmentWidth",this.setMaxScrollWidth),this.listenTo(this.g.zoomer,"change:alignmentHeight",this.setMaxScrollHeight),this.listenTo(this.model,"add change reset",function(){return this.setMaxScrollHeight(),this.setMaxScrollWidth()},this),this};(0,r.extend)(o.prototype,{setMaxScrollHeight:function(){return this.maxScrollHeight=this.g.zoomer.getMaxAlignmentHeight()-this.g.zoomer.get("alignmentHeight")},setMaxScrollWidth:function(){return this.maxScrollWidth=this.g.zoomer.getMaxAlignmentWidth()-this.g.zoomer.getAlignmentWidth()}}),i.mixin(o.prototype),e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=function(t,e){return this.g=t,this.ctx=e,this};_.extend(i.prototype,{_getSelection:function(t){var e=t.get("seq").length,n=[],i=this.g.selcol.getSelForRow(t.get("id")),o=(0,r.find)(i,function(t){return"row"===t.get("type")});if(void 0!==o&&null!==o)for(var s=e-1,u=0;u<=s;u++)n.push(u);else if(i.length>0)for(var a,l=0;l<i.length;l++)for(var c=(a=i[l]).get("xStart"),f=a.get("xEnd"),h=c;h<=f;h++)n.push(h);return n},_appendSelection:function(t){var e=this,n=t.model.get("seq"),r=this._getSelection(t.model),i=this._getPrevNextSelection(t.model),o=i[0],s=i[1];if(this.g.zoomer.get("columnWidth"),this.g.zoomer.get("rowHeight"),0!==r.length){var u=0;return function(){for(var i=[],a=n.length-1,l=function(n){i.push(function(){if(t.hidden.indexOf(n)>=0)return u++;var i=n-u;return r.indexOf(n)>=0&&(0===i||r.indexOf(n-1)<0)?e._renderSelection({n:n,k:i,selection:r,mPrevSel:o,mNextSel:s,xZero:t.xZero,yZero:t.yZero,model:t.model}):void 0}())},c=0;0<a?c<=a:c>=a;0<a?c++:c--)l(c);return i}()}},_renderSelection:function(t){for(var e=t.xZero,n=t.yZero,r=t.n,i=t.k,o=t.selection,s=t.mPrevSel,u=t.mNextSel,a=0,l=t.model.get("seq").length-1,c=r;(r<l?c<=l:c>=l)&&o.indexOf(c)>=0;r<l?c++:c--)a++;var f=this.g.zoomer.get("columnWidth"),h=this.g.zoomer.get("rowHeight"),d=f*a+1,p=this.g.columns.get("hidden");this.ctx.beginPath();var g=this.ctx.lineWidth;this.ctx.lineWidth=3;var v=this.ctx.strokeStyle;this.ctx.strokeStyle="#FF0000",e+=i*f;for(var m=0,y=a-1,_=0;0<y?_<=y:_>=y;0<y?_++:_--){var b=r+_;p.indexOf(b)>=0||(void 0!==s&&null!==s&&s.indexOf(b)>=0||(this.ctx.moveTo(e+m,n),this.ctx.lineTo(m+f+e,n)),void 0!==u&&null!==u&&u.indexOf(b)>=0||(this.ctx.moveTo(m+e,h+n),this.ctx.lineTo(m+f+e,h+n)),m+=f)}return this.ctx.moveTo(e,n),this.ctx.lineTo(e,h+n),this.ctx.moveTo(e+d,n),this.ctx.lineTo(e+d,h+n),this.ctx.stroke(),this.ctx.strokeStyle=v,this.ctx.lineWidth=g},_getPrevNextSelection:function(t){var e=t.collection.prev(t),n=t.collection.next(t),r=void 0,i=void 0;return void 0!==e&&null!==e&&(r=this._getSelection(e)),void 0!==n&&null!==n&&(i=this._getSelection(n)),[r,i]}}),e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=n(3),u=r(n(131)),a=r(n(133)),l=r(n(135)),c=r(n(132)),f=n(4),h=n(47),d=n(5),p=f.extend({tagName:"canvas",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:_alignmentScrollLeft change:_alignmentScrollTop",function(t,e,n){if(null==(void 0!==n&&null!==n?n.origin:void 0)||"canvasseq"!==n.origin)return this.render()}),this.listenTo(this.g.columns,"change:hidden",this.render),this.listenTo(this.g.zoomer,"change:alignmentWidth change:alignmentHeight",this.render),this.listenTo(this.g.colorscheme,"change",this.render),this.listenTo(this.g.selcol,"reset add",this.render),this.listenTo(this.model,"reset add",this.render),this.el.style.display="inline-block",this.el.style.overflowX="hidden",this.el.style.overflowY="hidden",this.el.className="biojs_msa_seqblock",this.ctx=this.el.getContext("2d"),this.cache=new u.default(this.g),this.coordsCache=new c.default(this.g,this.model),this.listenTo(this.g.zoomer,"change:residueFont",function(){return this.cache=new u.default(this.g),this.render()}),this.sel=new a.default(this.g,this.ctx),this._setColor(),this.throttleTime=0,this.throttleCounts=0,null!=document.documentElement.style.webkitAppearance?this.throttledDraw=function(){var t=+new Date;if(this.draw(),this.throttleTime+=+new Date-t,this.throttleCounts++,this.throttleCounts>15)return Math.ceil(this.throttleTime/this.throttleCounts),this.throttledDraw=this.draw}:this.throttledDraw=(0,s.throttle)(this.throttledDraw,30),this.manageEvents()},throttledDraw:function(){var t=+new Date;if(this.draw(),this.throttleTime+=+new Date-t,this.throttleCounts++,this.throttleCounts>15){var e=Math.ceil(this.throttleTime/this.throttleCounts);return e*=1.2,e=Math.max(20,e),this.throttledDraw=_.throttle(this.draw,e)}},manageEvents:function(){var t={mousedown:"_onmousedown",touchstart:"_ontouchstart"};return this.g.config.get("registerMouseClicks")&&(t.dblclick="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),t.mousewheel="_onmousewheel",t.DOMMouseScroll="_onmousewheel",this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents),this.dragStart=[]},_setColor:function(){return this.color=this.g.colorscheme.getSelectedScheme()},draw:function(){if(this.el.width=this.el.width,null!=this.seqDrawer&&this.model.length>0)return this.seqDrawer.drawLetters(),this.seqDrawer.drawRows(this.sel._appendSelection,this.sel),this.seqDrawer.drawRows(this.drawFeatures,this)},drawFeatures:function(t){var e=this,n=this.g.zoomer.get("columnWidth"),r=this.g.zoomer.get("rowHeight");if(t.model.attributes.height>1){var i=function(){var i=e.ctx;return t.model.attributes.features.each(function(e){i.fillStyle=e.attributes.fillColor||"red";var o=e.attributes.xEnd-e.attributes.xStart+1,s=(e.attributes.row+1)*r;return i.fillRect(e.attributes.xStart*n+t.xZero,s+t.yZero,n*o,r)}),i.fillStyle="black",i.font=e.g.zoomer.get("residueFont")+"px mono",i.textBaseline="middle",i.textAlign="center",{v:t.model.attributes.features.each(function(e){var o=e.attributes.xEnd-e.attributes.xStart+1,s=(e.attributes.row+1)*r;return i.fillText(e.attributes.text,t.xZero+e.attributes.xStart*n+o/2*n,t.yZero+.5*r+s)})}}();if("object"===(void 0===i?"undefined":o(i)))return i.v}},render:function(){return this.el.setAttribute("height",this.g.zoomer.get("alignmentHeight")+"px"),this.el.setAttribute("width",this.g.zoomer.getAlignmentWidth()+"px"),this.g.zoomer._checkScrolling(this._checkScrolling([this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")]),{header:"canvasseq"}),this._setColor(),this.seqDrawer=new l.default(this.g,this.ctx,this.model,{width:this.el.width,height:this.el.height,color:this.color,cache:this.cache}),this.throttledDraw(),this},_onmousemove:function(t,e){if(0!==this.dragStart.length){var n=h.abs(t),r=[n[0]-this.dragStart[0],n[1]-this.dragStart[1]],i=this.g.zoomer.get("canvasEventScale");e&&(i=3);for(var o=0;o<=1;o++)r[o]=r[o]*i;for(var s=[this.dragStartScroll[0]-r[0],this.dragStartScroll[1]-r[1]],u=0;u<=1;u++)s[u]=Math.round(s[u]);var a=this._checkScrolling(s);this.g.zoomer._checkScrolling(a,{origin:"canvasseq"});for(var l=0;l<=1;l++)a[l]!==s[l]&&(0===a[l]?(this.dragStart[l]=n[l],this.dragStartScroll[l]=0):this.dragStart[l]=n[l]-a[l]);return this.throttledDraw(),null!=t.preventDefault?(t.preventDefault(),t.stopPropagation()):void 0}},_ontouchmove:function(t){return this._onmousemove(t.changedTouches[0],!0),t.preventDefault(),t.stopPropagation()},_onmousedown:function(t){var e=this;return this.dragStart=h.abs(t),this.dragStartScroll=[this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")],d(document.body).on("mousemove.overmove",function(t){return e._onmousemove(t)}),d(document.body).on("mouseup.overup",function(){return e._cleanup()}),t.preventDefault()},_ontouchstart:function(t){var e=this;return this.dragStart=h.abs(t.changedTouches[0]),this.dragStartScroll=[this.g.zoomer.get("_alignmentScrollLeft"),this.g.zoomer.get("_alignmentScrollTop")],d(document.body).on("touchmove.overtmove",function(t){return e._ontouchmove(t)}),d(document.body).on("touchend.overtend touchleave.overtleave touchcancel.overtcanel",function(t){return e._touchCleanup(t)})},_onmousewinout:function(t){if(t.toElement===document.body.parentNode)return this._cleanup()},_cleanup:function(){return this.dragStart=[],d(document.body).off(".overmove"),d(document.body).off(".overup"),d(document.body).off(".overout")},_touchCleanup:function(t){return t.changedTouches.length>0&&this._onmousemove(t.changedTouches[0],!0),this.dragStart=[],d(document.body).off(".overtmove"),d(document.body).off(".overtend"),d(document.body).off(".overtleave"),d(document.body).off(".overtcancel")},_onmousewheel:function(t){var e=h.wheelDelta(t);return this.g.zoomer.set("_alignmentScrollLeft",this.g.zoomer.get("_alignmentScrollLeft")+e[0]),this.g.zoomer.set("_alignmentScrollTop",this.g.zoomer.get("_alignmentScrollTop")+e[1]),t.preventDefault()},_onclick:function(t){var e=this._getClickPos(t);return void 0!==e&&null!==e&&(null!=e.feature?this.g.trigger("feature:click",e):this.g.trigger("residue:click",e)),this.throttledDraw()},_onmousein:function(t){var e=this._getClickPos(t);return void 0!==e&&null!==e&&(null!=e.feature?this.g.trigger("feature:mousein",e):this.g.trigger("residue:mousein",e)),this.throttledDraw()},_onmouseout:function(t){var e=this._getClickPos(t);return void 0!==e&&null!==e&&(null!=e.feature?this.g.trigger("feature:mouseout",e):this.g.trigger("residue:mouseout",e)),this.throttledDraw()},_getClickPos:function(t){var e=h.rel(t);e[0]+=this.g.zoomer.get("_alignmentScrollLeft");var n=Math.floor(e[0]/this.g.zoomer.get("columnWidth")),r=this.seqDrawer._getSeqForYClick(e[1]),o=i(r,2),s=o[0],u=o[1];n+=this.g.columns.calcHiddenColumns(n),s+=this.model.calcHiddenSeqs(s),n=Math.max(0,n),s=Math.max(0,s);var a=this.model.at(s).get("id");if(!(u>0))return{seqId:a,rowPos:n,evt:t};var l=this.model.at(s).get("features").getFeatureOnRow(u-1,n);return 0!==l.length?{seqId:a,feature:l[0],rowPos:n,evt:t}:void 0},_checkScrolling:function(t){for(var e=[this.coordsCache.maxScrollWidth,this.coordsCache.maxScrollHeight],n=0;n<=1;n++)t[n]>e[n]&&(t[n]=e[n]),t[n]<0&&(t[n]=0);return t}});e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i={updateConfig:function(){this.rectWidth=this.g.zoomer.get("columnWidth"),this.rectHeight=this.g.zoomer.get("rowHeight")},drawLetters:function(){return this.updateConfig(),this.ctx.globalAlpha=this.g.colorscheme.get("opacity"),this.drawSeqs(function(t){return this.drawSeq(t,this._drawRect)}),this.ctx.globalAlpha=1,this.rectWidth>=this.g.zoomer.get("minLetterDrawSize")&&this.drawSeqs(function(t){return this.drawSeq(t,this._drawLetter)}),this},drawSeqs:function(t,e){var n=this.g.columns.get("hidden");e=e||this;for(var i=this.getStartSeq(),o=r(i,2),s=o[0],u=o[1],a=s;a<this.model.length;a++){var l=this.model.at(a);if(!l.get("hidden")&&(t.call(e,{model:l,yPos:u,y:a,hidden:n}),(u+=(l.attributes.height||1)*this.rectHeight)>this.height))break}},drawRows:function(t,e){return this.drawSeqs(function(n){return this.drawRow(n,t,e)})},drawRow:function(t,e,n){var r=this.g.zoomer.get("columnWidth"),i=Math.max(0,Math.abs(Math.ceil(-this.g.zoomer.get("_alignmentScrollLeft")/r))),o=-Math.abs(-this.g.zoomer.get("_alignmentScrollLeft")%r)-i*r,s=t.yPos;return e.call(n,{model:t.model,xZero:o,yZero:s,hidden:t.hidden})},getStartSeq:function(){for(var t=Math.max(0,Math.floor(this.g.zoomer.get("_alignmentScrollTop")/this.rectHeight))+1,e=0,n=0;e<t&&n<this.model.length;)e+=this.model.at(n).attributes.height||1,n++;return[n-1,-Math.max(0,this.g.zoomer.get("_alignmentScrollTop")-e*this.rectHeight+(this.model.at(n-1).attributes.height||1)*this.rectHeight)]},_getSeqForYClick:function(t){for(var e=this.getStartSeq(),n=r(e,2),i=n[0],o=n[1]%this.rectHeight,s=Math.max(0,Math.floor((t-o)/this.rectHeight))+1,u=0,a=i;u<s&&a<this.model.length;)u+=this.model.at(a).attributes.height||1,a++;return[a-1,Math.max(0,Math.floor(t/this.rectHeight)-u+(this.model.at(a-1).get("height")||1))]},drawSeq:function(t,e){for(var n=t.model.get("seq"),r=t.yPos,i=this.rectWidth,o=this.rectHeight,s=Math.max(0,Math.abs(Math.ceil(-this.g.zoomer.get("_alignmentScrollLeft")/i))),u=-Math.abs(-this.g.zoomer.get("_alignmentScrollLeft")%i),a={rectWidth:i,rectHeight:o,yPos:r,y:t.y},l=this.width,c=s;c<n.length;c++){var f=n[c];if(f=f.toUpperCase(),a.x=c,a.c=f,a.xPos=u,t.hidden.indexOf(c)<0&&(e(this,a),(u+=i)>l))break}},_drawRect:function(t,e){var n=t.color.getColor(e.c,{pos:e.x,y:e.y});if(void 0!==n&&null!==n)return t.ctx.fillStyle=n,t.ctx.fillRect(e.xPos,e.yPos,e.rectWidth,e.rectHeight)},_drawLetter:function(t,e){return t.ctx.drawImage(t.cache.getFontTile(e.c,e.rectWidth,e.rectHeight),e.xPos,e.yPos,e.rectWidth,e.rectHeight)}},o=function(t,e,n,r){return this.g=t,this.ctx=e,this.model=n,this.width=r.width,this.height=r.height,this.color=r.color,this.cache=r.cache,this.rectHeight=this.g.zoomer.get("rowHeight"),this.rectWidth=this.g.zoomer.get("columnWidth"),this};(0,n(3).extend)(o.prototype,i),e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});"function"==typeof Symbol&&Symbol.iterator;var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(12)),i=n(2),o=n(7),s=i.extend({className:"biojs_msa_conserv",initialize:function(t){this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.listenTo(this.g.columns,"change:scaling",this.render),this.listenTo(this.g.stats,"reset",this.render);var e=_.extend({},{fillColor:["#660","#ff0"],strokeColor:"#330",maxHeight:20,rectStyler:function(t,e){return t}},this.g.conservationConfig);return this.fillColor=e.fillColor,this.strokeColor=e.strokeColor,this.maxHeight=e.maxHeight,this.rectStyler=e.rectStyler,this.manageEvents()},colorer:function(t){var e=this,n=function(){return"none"};if("string"==typeof t)n=function(){return t};else if(Array.isArray(t)){t.length;var r="undefined"!=typeof d3&&!!d3.scale,i="undefined"!=typeof d3_scale;r||i?function(){var i=(r?d3.scale.linear():d3_scale.scaleLinear()).domain([0,e.maxHeight]).range(t);n=function(t){return i(t.height)}}():n=function(e){return t[0]}}return n},render:function(){var t=this.g.stats.scale(this.g.stats.conservation());o.removeAllChilds(this.el);var e=this.model.getMaxLength(),n=this.g.zoomer.get("columnWidth"),i=this.maxHeight,s=n*(e-this.g.columns.get("hidden").length),u=r.base({height:i,width:s});u.style.display="inline-block",u.style.cursor="pointer";for(var a=(this.rectData,this.colorer(this.fillColor)),l=this.colorer(this.strokeColor),c=this.rectStyler,f=this.g.zoomer.get("stepSize"),h=this.g.columns.get("hidden"),d=0,p=0;p<e;)if(h.indexOf(p)>=0)p+=f;else{s=n*f;for(var g=0,v=f-1,m=0;0<v?m<=v:m>=v;0<v?m++:m--)g+=t[p];var y=i*(g/f),_={x:d,y:i-y,maxheight:i,width:s-n/4,height:y,rowPos:p},b=r.rect(_);b.style.stroke=l(_),b.style.fill=a(_),"function"==typeof c&&c(b,_),b.rowPos=p,u.appendChild(b),d+=s,p+=f}return this.el.appendChild(u),this},_onclick:function(t){var e=this,n=t.target.rowPos,r=this.g.zoomer.get("stepSize");return function(){for(var i=[],o=r-1,s=0;0<o?s<=o:s>=o;0<o?s++:s--)i.push(e.g.trigger("bar:click",{rowPos:n+s,evt:t}));return i}()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("bar:mousein",{rowPos:e,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("bar:mouseout",{rowPos:e,evt:t})}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(12)),i=n(2),o=n(7),s=i.extend({className:"biojs_msa_gapview",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.listenTo(this.g.columns,"change:scaling",this.render),this.listenTo(this.model,"reset",this.render),this.manageEvents()},render:function(){var t=this.g.stats.gaps();o.removeAllChilds(this.el);var e=this.model.getMaxLength(),n=this.g.zoomer.get("columnWidth"),i=n*(e-this.g.columns.get("hidden").length),s=r.base({height:20,width:i});s.style.display="inline-block",s.style.cursor="pointer";for(var u=this.g.zoomer.get("stepSize"),a=this.g.columns.get("hidden"),l=0,c=0;c<e;)if(a.indexOf(c)>=0)c+=u;else{i=n*u;for(var f=0,h=u-1,d=0;0<h?d<=h:d>=h;0<h?d++:d--)f+=t[c];var p=f/u*20,g=r.rect({x:l,y:20-p,width:i-n/4,height:p,style:"stroke:red;stroke-width:1;"});g.rowPos=c,s.appendChild(g),l+=i,c+=u}return this.el.appendChild(s),this},_onclick:function(t){var e=this,n=t.target.rowPos,r=this.g.zoomer.get("stepSize");return function(){for(var i=[],o=r-1,s=0;0<o?s<=o:s>=o;0<o?s++:s--)i.push(e.g.trigger("gap:click",{rowPos:n+s,evt:t}));return i}()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("gap:mousein",{rowPos:e,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos);return this.g.trigger("gap:mouseout",{rowPos:e,evt:t})}});e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(139)),o=r(n(141)),s=n(4).extend({initialize:function(t){var e=this;return this.g=t.g,this.draw(),this.listenTo(this.g.vis,"change:labels change:metacell change:leftHeader",function(){return e.draw(),e.render()})},draw:function(){if(this.removeViews(),this.g.vis.get("leftHeader")&&(this.g.vis.get("labels")||this.g.vis.get("metacell"))){var t=new i.default({model:this.model,g:this.g});t.ordering=-50,this.addView("lHeader",t)}var e=new o.default({model:this.model,g:this.g});return e.ordering=0,this.addView("rHeader",e)},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_header"}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),i=n(2),o=n(7),s=i.extend({className:"biojs_msa_headers",initialize:function(t){return this.g=t.g,this.listenTo(this.g.vis,"change:metacell change:labels",this.render),this.listenTo(this.g.zoomer,"change:labelWidth change:metaWidth",this.render)},render:function(){o.removeAllChilds(this.el);var t=0;return t+=this.g.zoomer.getLeftBlockWidth(),this.el.style.width=t+"px",this.g.vis.get("labels")&&this.el.appendChild(this.labelDOM()),this.g.vis.get("metacell")&&this.el.appendChild(this.metaDOM()),this.el.style.display="inline-block",this.el.style.fontSize=this.g.zoomer.get("markerFontsize"),this},labelDOM:function(){var t=r.mk("div");if(t.style.width=this.g.zoomer.getLabelWidth(),t.style.display="inline-block",this.g.vis.get("labelCheckbox")&&t.appendChild(this.addEl(".",10)),this.g.vis.get("labelId")&&t.appendChild(this.addEl("ID",this.g.zoomer.get("labelIdLength"))),this.g.vis.get("labelPartition")&&t.appendChild(this.addEl("part",15)),this.g.vis.get("labelName")){var e=this.addEl("Label");t.appendChild(e)}return t},addEl:function(t,e){var n=document.createElement("span");return n.textContent=t,void 0!==e&&null!==e&&(n.style.width=e+"px"),n.style.display="inline-block",n},metaDOM:function(){var t=r.mk("div");return t.style.width=this.g.zoomer.getMetaWidth(),t.style.display="inline-block",this.g.vis.get("metaGaps")&&t.appendChild(this.addEl("Gaps",this.g.zoomer.get("metaGapWidth"))),this.g.vis.get("metaIdentity")&&t.appendChild(this.addEl("Ident",this.g.zoomer.get("metaIdentWidth"))),t}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(12)),i=n(2),o=n(7),s=n(5),u=i.extend({className:"biojs_msa_marker",initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:stepSize change:labelWidth change:columnWidth change:markerStepSize change:markerFontsize",this.render),this.listenTo(this.g.vis,"change:labels change:metacell",this.render),this.manageEvents()},render:function(){o.removeAllChilds(this.el);var t=this.g.zoomer.get("markerFontsize"),e=this.g.zoomer.get("columnWidth"),n=this.g.zoomer.get("stepSize"),r=this.g.zoomer.get("markerStepSize"),i=this.g.columns.get("hidden");this.el.style.fontSize=t;var s=document.createElement("span"),u=0,a=this.model.getMaxLength();for(u=0;u<a;u++)if(i.indexOf(u)>=0)this.markerHidden(l,u,n),u+=n;else{var l=document.createElement("span");l.className="msa-col-header",l.style.width=e+"px",l.style.display="inline-block",l.textContent=(u+1)%r==0?u+1:(u+1)%n==0?".":" ",l.rowPos=u,s.appendChild(l)}return this.el.appendChild(s),this},markerHidden:function(t,e,n){for(var i=this,o=this.g.columns.get("hidden").slice(0),u=Math.max(0,e-n),a=!0,l=u;u<e?l<=e:l>=e;u<e?l++:l--)a&=o.indexOf(l)>=0;if(!a){var c=this.model.getMaxLength(),f=0,h=-1;for(e=e;(e<c?e<=c:e>=c)&&(h>=0||(h=o.indexOf(e)),o.indexOf(e)>=0);e<c?e++:e--)f++;var d=r.base({height:10,width:10});d.style.position="relative";var p=r.polygon({points:"0,0 5,5 10,0",style:"fill:lime;stroke:purple;stroke-width:1"});return s(p).on("click",function(t){return o.splice(h,f),i.g.columns.set("hidden",o)}),d.appendChild(p),t.appendChild(d),d}},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents)},_onclick:function(t){var e=t.target.rowPos,n=this.g.zoomer.get("stepSize");return this.g.trigger("column:click",{rowPos:e,stepSize:n,evt:t})},_onmousein:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos),n=this.g.zoomer.get("stepSize");return this.g.trigger("column:mousein",{rowPos:e,stepSize:n,evt:t})},_onmouseout:function(t){var e=this.g.zoomer.get("stepSize"*t.rowPos),n=this.g.zoomer.get("stepSize");return this.g.trigger("column:mouseout",{rowPos:e,stepSize:n,evt:t})}});e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(140)),o=r(n(136)),s=r(n(142)),u=r(n(137)),a=n(4).extend({initialize:function(t){return this.g=t.g,this.blockEvents=!1,this.listenTo(this.g.vis,"change:header",function(){return this.draw(),this.render()}),this.listenTo(this.g.vis,"change",this._setSpacer),this.listenTo(this.g.zoomer,"change:alignmentWidth",this._setWidth),this.listenTo(this.g.zoomer,"change:_alignmentScrollLeft",this._adjustScrollingLeft),this.listenTo(this.g.columns,"change:hidden",function(){return this.draw(),this.render()}),this.draw(),this.g.vis.once("change:loaded",this._adjustScrollingLeft,this)},events:{scroll:"_sendScrollEvent"},draw:function(){if(this.removeViews(),this.g.vis.get("conserv")){var t=new o.default({model:this.model,g:this.g});t.ordering=-20,this.addView("conserv",t)}if(this.g.vis.get("markers")){var e=new i.default({model:this.model,g:this.g});e.ordering=-10,this.addView("marker",e)}if(this.g.vis.get("seqlogo")){var n=new s.default({model:this.model,g:this.g});n.ordering=-30,this.addView("seqlogo",n)}if(this.g.vis.get("gapHeader")){var r=new u.default({model:this.model,g:this.g});return r.ordering=-25,this.addView("gapview",r)}},render:function(){return this.renderSubviews(),this._setSpacer(),this.el.className="biojs_msa_rheader",this.el.style.overflowX="auto",this.el.style.display="inline-block",this._setWidth(),this._adjustScrollingLeft(),this},_sendScrollEvent:function(){return this.blockEvents||this.g.zoomer.set("_alignmentScrollLeft",this.el.scrollLeft,{origin:"header"}),this.blockEvents=!1},_adjustScrollingLeft:function(t,e,n){if(null==(void 0!==n&&null!==n?n.origin:void 0)||"header"!==n.origin){var r=this.g.zoomer.get("_alignmentScrollLeft");return this.blockEvents=!0,this.el.scrollLeft=r}},_setSpacer:function(){return this.el.style.marginLeft=this._getLabelWidth()+"px"},_getLabelWidth:function(){var t=0;return this.g.vis.get("leftHeader")||(t+=this.g.zoomer.getLeftBlockWidth()),t},_setWidth:function(){return this.el.style.width=this.g.zoomer.getAlignmentWidth()+"px"}});e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(74),i=n(2),o=n(7),s=i.extend({initialize:function(t){return this.g=t.g,this.listenTo(this.g.zoomer,"change:alignmentWidth",this.render),this.listenTo(this.g.colorscheme,"change",function(){var t=this.g.colorscheme.getSelectedScheme();return this.seqlogo.changeColors(t),this.render()}),this.listenTo(this.g.zoomer,"change:columnWidth",function(){return this.seqlogo.column_width=this.g.zoomer.get("columnWidth"),this.render()}),this.listenTo(this.g.stats,"reset",function(){return this.draw(),this.render()}),this.draw()},draw:function(){o.removeAllChilds(this.el);var t=this.g.stats.conservResidue({scaled:!0}),e={alphabet:"aa",heightArr:t=_.map(t,function(t){return _.pick(t,function(t,e){return"-"!==e})})},n=this.g.colorscheme.getSelectedScheme();return this.seqlogo=new r({model:this.model,g:this.g,data:e,yaxis:!1,scroller:!1,xaxis:!1,height:100,column_width:this.g.zoomer.get("columnWidth"),positionMarker:!1,zoom:1,el:this.el,colors:n})},render:function(){return this.seqlogo.render()}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(144)),i=n(4).extend({initialize:function(t){var e=this;return this.g=t.g,this.draw(),this.listenTo(this.g.zoomer,"change:_alignmentScrollTop",this._adjustScrollingTop),this.g.vis.once("change:loaded",this._adjustScrollingTop,this),this.listenTo(this.g.zoomer,"change:alignmentHeight",this._setHeight),this.listenTo(this.model,"change:reference",this.draw),this.listenTo(this.model,"reset add remove",function(){return e.draw(),e.render()})},draw:function(){this.removeViews();for(var t=0;t<this.model.length;t++)if(!this.model.at(t).get("hidden")){var e=new r.default({model:this.model.at(t),g:this.g});e.ordering=t,this.addView("row_"+t,e)}},events:{scroll:"_sendScrollEvent"},_sendScrollEvent:function(){return this.g.zoomer.set("_alignmentScrollTop",this.el.scrollTop,{origin:"label"})},_adjustScrollingTop:function(){return this.el.scrollTop=this.g.zoomer.get("_alignmentScrollTop")},render:function(){return this.renderSubviews(),this.el.className="biojs_msa_labelblock",this.el.style.display="inline-block",this.el.style.verticalAlign="top",this.el.style.overflowY="auto",this.el.style.overflowX="hidden",this.el.style.fontSize=this.g.zoomer.get("labelFontsize")+"px",this.el.style.lineHeight=""+this.g.zoomer.get("labelLineHeight"),this._setHeight(),this},_setHeight:function(){return this.el.style.height=this.g.zoomer.get("alignmentHeight")+"px"}});e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(145)),o=r(n(146)),s=n(4).extend({initialize:function(t){return this.g=t.g,this.draw(),this.listenTo(this.g.vis,"change:labels",this.drawR),this.listenTo(this.g.vis,"change:metacell",this.drawR),this.listenTo(this.g.zoomer,"change:rowHeight",function(){return this.el.style.height=this.g.zoomer.get("rowHeight")+"px"}),this.listenTo(this.g.selcol,"change reset add",this.setSelection)},draw:function(){if(this.removeViews(),this.g.vis.get("labels")&&this.addView("labels",new i.default({model:this.model,g:this.g})),this.g.vis.get("metacell")){var t=new o.default({model:this.model,g:this.g});return this.addView("metacell",t)}},drawR:function(){return this.draw(),this.render()},render:function(){return this.renderSubviews(),this.el.setAttribute("class","biojs_msa_labelrow"),this.el.style.height=this.g.zoomer.get("rowHeight")*(this.model.attributes.height||1)+"px",this.setSelection(),this},setSelection:function(){return this.g.selcol.getSelForRow(this.model.id).length>0?this.el.style.fontWeight="bold":this.el.style.fontWeight="normal"}});e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(7),o=r.extend({initialize:function(t){return this.seq=t.seq,this.g=t.g,this.manageEvents()},manageEvents:function(){var t={};return this.g.config.get("registerMouseClicks")&&(t.click="_onclick"),this.g.config.get("registerMouseHover")&&(t.mousein="_onmousein",t.mouseout="_onmouseout"),this.delegateEvents(t),this.listenTo(this.g.config,"change:registerMouseHover",this.manageEvents),this.listenTo(this.g.config,"change:registerMouseClick",this.manageEvents),this.listenTo(this.g.vis,"change:labelName change:labelId change:labelPartition change:labelCheckbox",this.render),this.listenTo(this.g.zoomer,"change:labelIdLength change:labelNameLength change:labelPartLength change:labelCheckLength",this.render),this.listenTo(this.g.zoomer,"change:labelFontSize change:labelLineHeight change:labelWidth change:rowHeight",this.render)},render:function(){if(i.removeAllChilds(this.el),this.el.style.width=this.g.zoomer.getLabelWidth()+"px",this.el.setAttribute("class","biojs_msa_labels"),this.g.vis.get("labelCheckbox")){var t=document.createElement("input");t.setAttribute("type","checkbox"),t.value=this.model.get("id"),t.name="seq",t.style.width=this.g.zoomer.get("labelCheckLength")+"px",this.el.appendChild(t)}if(this.g.vis.get("labelId")){var e=document.createElement("span"),n=this.model.get("id");isNaN(n)||n++,e.textContent=n,e.style.width=this.g.zoomer.get("labelIdLength")+"px",e.style.display="inline-block",this.el.appendChild(e)}if(this.g.vis.get("labelPartition")){var r=document.createElement("span");r.style.width=this.g.zoomer.get("labelPartLength")+"px",r.textContent=this.model.get("partition"),r.style.display="inline-block",this.el.appendChild(e),this.el.appendChild(r)}if(this.g.vis.get("labelName")){var o=document.createElement("span");o.textContent=this.model.get("name"),this.model.get("ref")&&this.g.config.get("hasRef")&&(o.style.fontWeight="bold"),o.style.width=this.g.zoomer.get("labelNameLength")+"px",this.el.appendChild(o)}return this.el.style.overflow=scroll,this.el.style.fontSize=this.g.zoomer.get("labelFontsize")+"px",this},_onclick:function(t){var e=this.model.get("id");return this.g.trigger("row:click",{seqId:e,evt:t})},_onmousein:function(t){var e=this.model.get("id");return this.g.trigger("row:mouseout",{seqId:e,evt:t})},_onmouseout:function(t){var e=this.model.get("id");return this.g.trigger("row:mouseout",{seqId:e,evt:t})}});e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=function(t){return t&&t.__esModule?t:{default:t}}(n(6)),o=n(3),s=n(2),u=n(7),a=s.extend({className:"biojs_msa_metaview",initialize:function(t){return this.g=t.g,this.listenTo(this.g.vis,"change:metacell",this.render),this.listenTo(this.g.zoomer,"change:metaWidth",this.render)},events:{click:"_onclick",mousein:"_onmousein",mouseout:"_onmouseout"},render:function(){u.removeAllChilds(this.el),this.el.style.display="inline-block";var t=this.g.zoomer.getMetaWidth();if(this.el.style.width=t-10,this.el.style.paddingRight=5,this.el.style.paddingLeft=5,this.el.style.fontSize=this.g.zoomer.get("labelFontsize")-2+"px",this.g.vis.get("metaGaps")){var e=this.model.get("seq"),n=(0,o.reduce)(e,function(t,e){return"-"===e?++t:void 0},0);n=(100*n/e.length).toFixed(0)+"%";var s=document.createElement("span");s.textContent=n,s.style.display="inline-block",s.style.width=35,this.el.appendChild(s)}if(this.g.vis.get("metaIdentity")){var a=this.g.stats.identity()[this.model.id],l=document.createElement("span");this.model.get("ref")&&this.g.config.get("hasRef")?l.textContent="ref.":void 0!==a&&null!==a&&(l.textContent=a.toFixed(2)),l.style.display="inline-block",l.style.width=40,this.el.appendChild(l)}if(this.g.vis.get("metaLinks")&&this.model.attributes.ids){var c=r.seqs.buildLinks(this.model.attributes.ids);if(Object.keys(c).length>0){var f=new i.default({name:"↗"});c.forEach(function(t,e){return f.addNode(e,function(e){return window.open(t)})});var h=f.buildDOM();return h.style.cursor="pointer",this.el.appendChild(h)}}},_onclick:function(t){return this.g.trigger("meta:click",{seqId:this.model.get("id",{evt:t})})},_onmousein:function(t){return this.g.trigger("meta:mousein",{seqId:this.model.get("id",{evt:t})})},_onmouseout:function(t){return this.g.trigger("meta:mouseout",{seqId:this.model.get("id",{evt:t})})}});e.default=a},function(t,e){(function(e){"use strict";"undefined"!=typeof window?t.exports=window:void 0!==e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(e,function(){return this}())},function(t,e,n){"use strict";var r=n(52);t.exports=function(t,e,n){if(!r(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===i.call(t)?function(t,e,n){for(var r=0,i=t.length;r<i;r++)o.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n):"string"==typeof t?function(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}(t,e,n):function(t,e,n){for(var r in t)o.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n)};var i=Object.prototype.toString,o=Object.prototype.hasOwnProperty},function(t,e){"use strict";(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e,n){"use strict";var r=n(149),i=n(148);t.exports=function(t){if(!t)return{};var e={};return i(r(t).split("\n"),function(t){var n=t.indexOf(":"),i=r(t.slice(0,n)).toLowerCase(),o=r(t.slice(n+1));void 0===e[i]?e[i]=o:function(t){return"[object Array]"===Object.prototype.toString.call(t)}(e[i])?e[i].push(o):e[i]=[e[i],o]}),e}},function(t,e){"use strict";t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},function(t,e,n){(t.exports=n(89)()).push([t.id,".biojs_msa_stage{cursor:default;line-height:normal;font-family:Helvetica}.biojs_msa_seqblock{cursor:move}.biojs_msa_layer{display:block;white-space:nowrap}.biojs_msa_labels{color:#000;display:inline-block;cursor:pointer;vertical-align:middle;overflow:hidden;text-overflow:clip}.biojs_msa_header,.biojs_msa_labels{white-space:nowrap;text-align:left}.biojs_msa_labelrow:before{content:'';display:inline-block;width:0;height:100%;vertical-align:middle}.biojs_msa_labelrow{height:100%}.biojs_msa_labelblock::-webkit-scrollbar,.biojs_msa_rheader::-webkit-scrollbar{//:none;width:7px;height:7px}.biojs_msa_labelblock::-webkit-scrollbar-thumb,.biojs_msa_rheader::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5);box-shadow:0 0 1px hsla(0,0%,100%,.5)}.biojs_msa_marker{color:#999;white-space:nowrap}.biojs_msa_marker .msa-col-header{cursor:pointer;text-align:center}.biojs_msa_marker .msa-col-header:hover{color:red}.smenubar .smenubar_alink{background:#3498db;background-image:-webkit-linear-gradient(top,#3498db,#2980b9);background-image:linear-gradient(180deg,#3498db,#2980b9);border-radius:28px;font-family:Arial;color:#fff;padding:3px 10px;margin-left:10px;text-decoration:none}.smenubar{display:inline-block}.smenubar .smenubar_alink:hover{cursor:pointer}.smenu-dropdown{position:absolute;z-index:9999999;display:none}.smenu-dropdown .smenu-dropdown-menu,.smenu-dropdown .smenu-dropdown-panel{min-width:160px;max-width:360px;list-style:none;background:#fff;border:1px solid #ddd;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);overflow:visible;padding:4px 0;margin:0}.smenu-dropdown .smenu-dropdown-panel{padding:10px}.smenu-dropdown.smenu-dropdown-scroll .smenu-dropdown-menu,.smenu-dropdown.smenu-dropdown-scroll .smenu-dropdown-panel{max-height:358px;overflow:auto}.smenu-dropdown .smenu-dropdown-menu LI{list-style:none;padding:0;margin:0;line-height:18px}.smenu-dropdown .smenu-dropdown-menu LABEL,.smenu-dropdown .smenu-dropdown-menu LI{display:block;color:#555;text-decoration:none;line-height:18px;padding:3px 15px;white-space:nowrap}.smenu-dropdown .smenu-dropdown-menu LABEL:hover,.smenu-dropdown .smenu-dropdown-menu LI:hover{background-color:#08c;color:#fff;cursor:pointer}.smenu-dropdown .smenu-dropdown-menu .smenu-dropdown-divider{font-size:1px;border-top:1px solid #e5e5e5;padding:0;margin:5px 0}.biojs_msa_div{position:relative}.biojs_msa_scale{position:absolute;bottom:0;right:0;background-color:#fff;box-shadow:0 2px 3px #999;border-radius:3px;margin:5px 0 0 auto;padding:5px;text-align:center}.biojs_msa_scale .msa-btngroup{margin:5px auto 0}.biojs_msa_scale [type=range]{cursor:pointer}.biojs_msa_scale .msa-btn-close{text-align:right;font-size:.8em;padding:2px}.biojs_msa_scale .msa-btn-open{background-color:#fff}.biojs_msa_scale .msa-hide{display:none}.msa-btn{cursor:pointer;font-size:1.1em;display:inline-block;padding:2px 8px;margin-bottom:0;border:1px solid transparent;border-radius:4px;box-sizing:border-box}.msa-btn:hover{background-color:#ddd}",""])},function(t,e,n){function r(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=f[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],e))}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(l(r.parts[o],e));f[r.id]={id:r.id,refs:1,parts:s}}}}function i(t){for(var e=[],n={},r=0;r<t.length;r++){var i=t[r],o=i[0],s={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(s):e.push(n[o]={id:o,parts:[s]})}return e}function o(t,e){var n=p(),r=m[m.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),m.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=m.indexOf(t);e>=0&&m.splice(e,1)}function u(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function a(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function l(t,e){var n,r,i;if(e.singleton){var o=v++;n=g||(g=u(e)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(e),r=function(t,e){var n=e.css,r=e.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}.bind(null,n),i=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){s(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function c(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}var f={},h=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},d=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),p=h(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,v=0,m=[];t.exports=function(t,e){void 0===(e=e||{}).singleton&&(e.singleton=d()),void 0===e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],s=0;s<n.length;s++){var u=n[s];(a=f[u.id]).refs--,o.push(a)}t&&r(i(t),e);for(s=0;s<o.length;s++){var a;if(0===(a=o[s]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete f[a.id]}}}};var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var r=n(152);"string"==typeof r&&(r=[[t.id,r,""]]),n(153)(r,{}),r.locals&&(t.exports=r.locals)},function(t,e,n){function r(t){return n(i(t))}function i(t){return o[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var o={"./StageScale":25,"./StageScale.js":25,"./colorscheme":26,"./colorscheme.js":26,"./columns":27,"./columns.js":27,"./config":28,"./config.js":28,"./package":29,"./package.js":29,"./selection/Selection":8,"./selection/Selection.js":8,"./selection/SelectionCol":9,"./selection/SelectionCol.js":9,"./selection/index":49,"./selection/index.js":49,"./user":30,"./user.js":30,"./visOrdering":31,"./visOrdering.js":31,"./visibility":32,"./visibility.js":32,"./zoomer":33,"./zoomer.js":33};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=155},function(t,e,n){function r(t){return n(i(t))}function i(t){return o[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var o={"./bmath":15,"./bmath.js":15,"./exporter":16,"./exporter.js":16,"./file":17,"./file.js":17,"./index":37,"./index.js":37,"./loader":18,"./loader.js":18,"./proxy":19,"./proxy.js":19,"./recognize":38,"./recognize.js":38,"./seqgen":39,"./seqgen.js":39,"./svg":12,"./svg.js":12,"./tree":40,"./tree.js":40};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=156}]);
|
|
},{}],1:[function(require,module,exports) {
|
|
"use strict";require("./msa"),_.extend(window.bundleEntries||{},{load:function(e){var t=e.chart,r=e.dataset,s=t.settings,n=new msa.msa({el:$("#"+e.targets[0]),vis:{conserv:"true"==s.get("conserv"),overviewbox:"true"==s.get("overviewbox")},menu:"small",bootstrapMenu:"true"==s.get("menu")});n.u.file.importURL(r.download_url,function(){n.render(),t.state("ok","Chart drawn."),e.process.resolve()})}});
|
|
},{"./msa":2}]},{},[1]) |