sequenceserver 1.1.0.beta7 → 1.1.0.beta8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sequenceserver might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/sequenceserver/version.rb +1 -1
- data/public/js/hits_overview.js +1 -1
- data/public/js/report.js +7 -4
- data/public/sequenceserver-report.min.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a84db1a31e7b1e1a9b89ce2a6dacaf9721c2983d
|
4
|
+
data.tar.gz: 16414f4af1a58ebf682213d955f18145206dc167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c2b63cbec445107926636009ea439c6bcbac7f4acfca3246ad91a0f166d8290d9fb2af9254045fc989374ac882d419b13c49273a39f61f2186107775448cfa0
|
7
|
+
data.tar.gz: 7669b574fb3e19490857d22acdbbc1d05558b6bcae86b87a9cf1d0ad64deaf4e8c882becbb25d6e8e0eac2d7e0cd510d751daed2c0fea6ed2944de91ae6993c6
|
data/public/js/hits_overview.js
CHANGED
data/public/js/report.js
CHANGED
@@ -941,8 +941,9 @@ var Report = React.createClass({
|
|
941
941
|
*/
|
942
942
|
fetchResults: function () {
|
943
943
|
var intervals = [200, 400, 800, 1200, 2000, 3000, 5000];
|
944
|
+
var component = this;
|
944
945
|
|
945
|
-
|
946
|
+
function poll () {
|
946
947
|
$.getJSON(location.pathname + '.json')
|
947
948
|
.complete(function (jqXHR) {
|
948
949
|
switch (jqXHR.status) {
|
@@ -952,12 +953,12 @@ var Report = React.createClass({
|
|
952
953
|
interval = intervals[0];
|
953
954
|
}
|
954
955
|
else {
|
955
|
-
interval = intervals.shift;
|
956
|
+
interval = intervals.shift();
|
956
957
|
}
|
957
958
|
setTimeout(poll, interval);
|
958
959
|
break;
|
959
960
|
case 200:
|
960
|
-
|
961
|
+
component.updateState(jqXHR.responseJSON);
|
961
962
|
break;
|
962
963
|
case 404:
|
963
964
|
case 400:
|
@@ -966,7 +967,9 @@ var Report = React.createClass({
|
|
966
967
|
break;
|
967
968
|
}
|
968
969
|
});
|
969
|
-
}
|
970
|
+
}
|
971
|
+
|
972
|
+
poll();
|
970
973
|
},
|
971
974
|
|
972
975
|
/**
|
@@ -1,7 +1,7 @@
|
|
1
1
|
!function(a){function b(a,b,e){return 4===arguments.length?c.apply(this,arguments):void d(a,{declarative:!0,deps:b,declare:e})}function c(a,b,c,e){d(a,{declarative:!1,deps:b,executingRequire:c,execute:e})}function d(a,b){b.name=a,a in o||(o[a]=b),b.normalizedDeps=b.deps}function e(a,b){if(b[a.groupIndex]=b[a.groupIndex]||[],-1==p.call(b[a.groupIndex],a)){b[a.groupIndex].push(a);for(var c=0,d=a.normalizedDeps.length;d>c;c++){var f=a.normalizedDeps[c],g=o[f];if(g&&!g.evaluated){var h=a.groupIndex+(g.declarative!=a.declarative);if(void 0===g.groupIndex||g.groupIndex<h){if(void 0!==g.groupIndex&&(b[g.groupIndex].splice(p.call(b[g.groupIndex],g),1),0==b[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=h}e(g,b)}}}}function f(a){var b=o[a];b.groupIndex=0;var c=[];e(b,c);for(var d=!!b.declarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],i=0;i<g.length;i++){var k=g[i];d?h(k):j(k)}d=!d}}function g(a){return s[a]||(s[a]={name:a,dependencies:[],exports:{},importers:[]})}function h(b){if(!b.module){var c=b.module=g(b.name),d=b.module.exports,e=b.declare.call(a,function(a,b){if(c.locked=!0,"object"==typeof a)for(var e in a)d[e]=a[e];else d[a]=b;for(var f=0,g=c.importers.length;g>f;f++){var h=c.importers[f];if(!h.locked)for(var i=0;i<h.dependencies.length;++i)h.dependencies[i]===c&&h.setters[i](d)}return c.locked=!1,b},{id:b.name});c.setters=e.setters,c.execute=e.execute;for(var f=0,i=b.normalizedDeps.length;i>f;f++){var j,k=b.normalizedDeps[f],l=o[k],m=s[k];m?j=m.exports:l&&!l.declarative?j=l.esModule:l?(h(l),m=l.module,j=m.exports):j=n(k),m&&m.importers?(m.importers.push(c),c.dependencies.push(m)):c.dependencies.push(null),c.setters[f]&&c.setters[f](j)}}}function i(a){var b,c=o[a];if(c)c.declarative?m(a,[]):c.evaluated||j(c),b=c.module.exports;else if(b=n(a),!b)throw new Error("Unable to load dependency "+a+".");return(!c||c.declarative)&&b&&b.__useDefault?b.default:b}function j(b){if(!b.module){var c={},d=b.module={exports:c,id:b.name};if(!b.executingRequire)for(var e=0,f=b.normalizedDeps.length;f>e;e++){var g=b.normalizedDeps[e],h=o[g];h&&j(h)}b.evaluated=!0;var l=b.execute.call(a,function(a){for(var c=0,d=b.deps.length;d>c;c++)if(b.deps[c]==a)return i(b.normalizedDeps[c]);throw new TypeError("Module "+a+" not declared as a dependency.")},c,d);void 0!==l&&(d.exports=l),c=d.exports,c&&c.__esModule?b.esModule=c:b.esModule=k(c)}}function k(b){var c={};if(("object"==typeof b||"function"==typeof b)&&b!==a)if(q)for(var d in b)"default"!==d&&l(c,b,d);else{var e=b&&b.hasOwnProperty;for(var d in b)"default"===d||e&&!b.hasOwnProperty(d)||(c[d]=b[d])}return c.default=b,r(c,"__useDefault",{value:!0}),c}function l(a,b,c){try{var d;(d=Object.getOwnPropertyDescriptor(b,c))&&r(a,c,d)}catch(d){return a[c]=b[c],!1}}function m(b,c){var d=o[b];if(d&&!d.evaluated&&d.declarative){c.push(b);for(var e=0,f=d.normalizedDeps.length;f>e;e++){var g=d.normalizedDeps[e];-1==p.call(c,g)&&(o[g]?m(g,c):n(g))}d.evaluated||(d.evaluated=!0,d.module.execute.call(a))}}function n(a){if(u[a])return u[a];if("@node/"==a.substr(0,6))return u[a]=k(t(a.substr(6)));var b=o[a];if(!b)throw"Module "+a+" not present.";return f(a),m(a,[]),o[a]=void 0,b.declarative&&r(b.module.exports,"__esModule",{value:!0}),u[a]=b.declarative?b.module.exports:b.esModule}var o={},p=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(a){q=!1}var r;!function(){try{Object.defineProperty({},"a",{})&&(r=Object.defineProperty)}catch(a){r=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(a){}}}}();var s={},t="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&"undefined"!=typeof require.resolve&&"undefined"!=typeof process&&process.platform&&require,u={"@empty":{}};return function(a,d,e,f){return function(g){g(function(g){for(var h={_nodeRequire:t,register:b,registerDynamic:c,get:n,set:function(a,b){u[a]=b},newModule:function(a){return a}},i=0;i<d.length;i++)(function(a,b){b&&b.__esModule?u[a]=b:u[a]=k(b)})(d[i],arguments[i]);f(h);var j=n(a[0]);if(a.length>1)for(var i=1;i<a.length;i++)n(a[i]);return e?j.default:j})}}}("undefined"!=typeof self?self:global)(["1"],[],!1,function(c){var e=this.require,f=(this.exports,this.module);!function(a){function b(a,b){for(var c=a.split(".");c.length;)b=b[c.shift()];return b}function d(c){if("string"==typeof c)return b(c,a);if(!(c instanceof Array))throw new Error("Global exports must be a string or array.");for(var d={},e=!0,f=0;f<c.length;f++){var g=b(c[f],a);e&&(d.default=g,e=!1),d[c[f].split(".").pop()]=g}return d}function e(b){if(Object.keys)Object.keys(a).forEach(b);else for(var c in a)i.call(a,c)&&b(c)}function f(b){e(function(c){if(-1==j.call(k,c)){try{var d=a[c]}catch(a){k.push(c)}b(c,d)}})}var g,h=c,i=Object.prototype.hasOwnProperty,j=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},k=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];h.set("@@global-helpers",h.newModule({prepareGlobal:function(b,c,e){var h=a.define;a.define=void 0;var i;if(e){i={};for(var j in e)i[j]=a[j],a[j]=e[j]}return c||(g={},f(function(a,b){g[a]=b})),function(){var b;if(c)b=d(c);else{b={};var e,j;f(function(a,c){g[a]!==c&&"undefined"!=typeof c&&(b[a]=c,"undefined"!=typeof e?j||e===c||(j=!0):e=c)}),b=j?b:e}if(i)for(var k in i)a[k]=i[k];return a.define=h,b}}}))}("undefined"!=typeof self?self:global),!function(a){function b(a,b){a=a.replace(h,"");var c=a.match(k),d=(c[1].split(",")[b]||"require").replace(l,""),e=m[d]||(m[d]=new RegExp(i+d+j,"g"));e.lastIndex=0;for(var f,g=[];f=e.exec(a);)g.push(f[2]||f[3]);return g}function d(a,b,c,e){if("object"==typeof a&&!(a instanceof Array))return d.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof a&&"function"==typeof b&&(a=[a]),!(a instanceof Array)){if("string"==typeof a){var g=f.get(a);return g.__useDefault?g.default:g}throw new TypeError("Invalid require")}for(var h=[],i=0;i<a.length;i++)h.push(f.import(a[i],e));Promise.all(h).then(function(a){b&&b.apply(null,a)},c)}function e(c,e,h){"string"!=typeof c&&(h=e,e=c,c=null),e instanceof Array||(h=e,e=["require","exports","module"].splice(0,h.length)),"function"!=typeof h&&(h=function(a){return function(){return a}}(h)),void 0===e[e.length-1]&&e.pop();var i,j,k;-1!=(i=g.call(e,"require"))&&(e.splice(i,1),c||(e=e.concat(b(h.toString(),i)))),-1!=(j=g.call(e,"exports"))&&e.splice(j,1),-1!=(k=g.call(e,"module"))&&e.splice(k,1);var l={name:c,deps:e,execute:function(b,c,g){for(var l=[],m=0;m<e.length;m++)l.push(b(e[m]));g.uri=g.id,g.config=function(){},-1!=k&&l.splice(k,0,g),-1!=j&&l.splice(j,0,c),-1!=i&&l.splice(i,0,function(a,c,e){return"string"==typeof a&&"function"!=typeof c?b(a):d.call(f,a,c,e,g.id)});var n=h.apply(-1==j?a:c,l);return"undefined"==typeof n&&g&&(n=g.exports),"undefined"!=typeof n?n:void 0}};if(c)n.anonDefine||n.isBundle?n.anonDefine&&n.anonDefine.name&&(n.anonDefine=null):n.anonDefine=l,n.isBundle=!0,f.registerDynamic(l.name,l.deps,!1,l.execute);else{if(n.anonDefine&&!n.anonDefine.name)throw new Error("Multiple anonymous defines in module "+c);n.anonDefine=l}}var f=c,g=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},h=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,i="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",j="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",k=/\(([^\)]*)\)/,l=/^\s+|\s+$/g,m={};e.amd={};var n={isBundle:!1,anonDefine:null};f.amdDefine=e,f.amdRequire=d}("undefined"!=typeof self?self:global),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("2",["4","3"],b):b(jQuery)}(function(a){return a.effects.effect.drop=function(b,c){var d,e=a(this),f=["position","top","bottom","left","right","opacity","height","width"],g=a.effects.setMode(e,b.mode||"hide"),h="show"===g,i=b.direction||"left",j="up"===i||"down"===i?"top":"left",k="up"===i||"left"===i?"pos":"neg",l={opacity:h?1:0};a.effects.save(e,f),e.show(),a.effects.createWrapper(e),d=b.distance||e["top"===j?"outerHeight":"outerWidth"](!0)/2,h&&e.css("opacity",0).css(j,"pos"===k?-d:d),l[j]=(h?"pos"===k?"+=":"-=":"pos"===k?"-=":"+=")+d,e.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===g&&e.hide(),a.effects.restore(e,f),a.effects.removeWrapper(e),c()}})}})}(),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("3",["4"],b):b(jQuery)}(function(a){var b="ui-effects-",c=a;return a.effects={effect:{}},function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";if(h)return f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:l<=.5?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=d<=.5?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(a){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(a){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function d(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||!a.fx.step[d]&&isNaN(parseFloat(e))||(g[d]=e));return g}var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(c.style(a.elem,d,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(c,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(e,function(a,b){c[b]&&g[b+"Class"](c[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=d(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function c(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function d(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.11.4",save:function(a,c){for(var d=0;d<c.length;d++)null!==c[d]&&a.data(b+c[d],a[0].style[c[d]])},restore:function(a,c){var d,e;for(e=0;e<c.length;e++)null!==c[e]&&(d=a.data(b+c[e]),void 0===d&&(d=""),a.css(c[e],d))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function c(){a.isFunction(f)&&f.call(e[0]),a.isFunction(b)&&b()}var e=a(this),f=d.complete,h=d.mode;(e.is(":hidden")?"hide"===h:"show"===h)?(e[h](),c()):g.call(e[0],d,c)}var d=c.apply(this,arguments),e=d.mode,f=d.queue,g=a.effects.effect[d.effect];return a.fx.off||!g?e?this[e](d.duration,d.complete):this.each(function(){d.complete&&d.complete.call(this)}):f===!1?this.each(b):this.queue(f||"fx",b)},show:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(a.fn.show),hide:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(a.fn.hide),toggle:function(a){return function(b){if(d(b)||"boolean"==typeof b)return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}(),a.effects})}(),function(){var a=c.amdDefine;!function(b){"function"==typeof a&&a.amd?a("5",["4","3"],b):b(jQuery)}(function(a){return a.effects.effect.bounce=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","height","width"],i=a.effects.setMode(g,b.mode||"effect"),j="hide"===i,k="show"===i,l=b.direction||"up",m=b.distance,n=b.times||5,o=2*n+(k||j?1:0),p=b.duration/o,q=b.easing,r="up"===l||"down"===l?"top":"left",s="up"===l||"left"===l,t=g.queue(),u=t.length;for((k||j)&&h.push("opacity"),a.effects.save(g,h),g.show(),a.effects.createWrapper(g),m||(m=g["top"===r?"outerHeight":"outerWidth"]()/3),k&&(f={opacity:1},f[r]=0,g.css("opacity",0).css(r,s?2*-m:2*m).animate(f,p,q)),j&&(m/=Math.pow(2,n-1)),f={},f[r]=0,d=0;d<n;d++)e={},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q).animate(f,p,q),m=j?2*m:m/2;j&&(e={opacity:0},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q)),g.queue(function(){j&&g.hide(),a.effects.restore(g,h),a.effects.removeWrapper(g),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,o+1))),g.dequeue()}})}(),c.registerDynamic("6",["4"],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"$",null);return function(a){"format global";"deps jquery";"exports $";if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),
|
2
2
|
this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery)}(this),e()}),c.registerDynamic("7",["6"],!0,function(a,b,c){this||self;c.exports=a("6")}),c.registerDynamic("8",[],!0,function(a,b,c){"format cjs";this||self;!function(a){var b=function(){window.asyncWebshims||(window.asyncWebshims={cfg:[],ready:[]})},c=function(){window.jQuery&&(a(jQuery),a=function(){return window.webshims})};window.webshims={setOptions:function(){b(),window.asyncWebshims.cfg.push(arguments)},ready:function(){b(),window.asyncWebshims.ready.push(arguments)},activeLang:function(a){b(),window.asyncWebshims.lang=a},polyfill:function(a){b(),window.asyncWebshims.polyfill=a},_curScript:function(){var a,b,c,d,e,f=document.currentScript;if(!f){try{throw new Error("")}catch(a){for(c=(a.sourceURL||a.stack||"").split("\n"),e=/(?:fil|htt|wid|abo|app|res)(.)+/i,b=0;b<c.length;b++)if(d=c[b].match(e)){c=d[0].replace(/[\:\s\(]+[\d\:\)\(\s]+$/,"");break}}for(a=document.scripts||document.getElementsByTagName("script"),b=0;b<a.length&&(!a[b].getAttribute("src")||(f=a[b],"interactive"!=a[b].readyState&&c!=a[b].src));b++);}return f}()},window.webshim=window.webshims,window.webshims.timer=setInterval(c,0),c(),!1}(function(a){"use strict";function b(a){return document.createElement(a)}var c,d,e=window.navigator,f=window.webshims,g="dom-support",h=a.event.special,i=a([]),j=window.asyncWebshims,k={},l=window.Object,m=function(a){return a+"\n//# sourceURL="+this.url},n=function(a){return!(!q.enhanceAuto&&"auto"==a)&&a},o={matchmedia:"matchMedia",xhr2:"filereader",promise:"es6",URL:"url"},p="capture"in b("input");clearInterval(f.timer),k.advancedObjectProperties=k.objectAccessor=k.ES5=!!("create"in l&&"seal"in l),!k.ES5||"toJSON"in Date.prototype||(k.ES5=!1),d=a.support.hrefNormalized===!1?f._curScript.getAttribute("src",4):f._curScript.src,d=d.split("?")[0].slice(0,d.lastIndexOf("/")+1)+"shims/",a.extend(f,{version:"1.15.8",cfg:{enhanceAuto:window.Audio&&(!window.matchMedia||matchMedia("(min-device-width: 721px)").matches),waitReady:!0,loadStyles:!0,wsdoc:document,wspopover:{appendTo:"auto",hideOnBlur:!0},ajax:{crossDomain:!0},loadScript:function(b,c){a.ajax(a.extend({},q.ajax,{url:b,success:c,dataType:"script",cache:!0,global:!1,dataFilter:m}))},basePath:d},support:k,bugs:{},modules:{},features:{},featureList:[],setOptions:function(b,c){"string"==typeof b&&arguments.length>1?q[b]=a.isPlainObject(c)?a.extend(!0,q[b]||{},c):c:"object"==typeof b&&a.extend(!0,q,b)},_getAutoEnhance:n,addPolyfill:function(b,c){c=c||{};var d=c.f||b;r[d]||(r[d]=[],f.featureList.push(d),q[d]={}),r[d].push(b),c.options=a.extend(q[d],c.options),y(b,c),c.methodNames&&a.each(c.methodNames,function(a,b){f.addMethodName(b)})},polyfill:function(){return function(a){return a||(a=f.featureList),"string"==typeof a&&(a=a.split(" ")),f._polyfill(a)}}(),_polyfill:function(b){var d,e,f=[];c.run||(d=-1!==a.inArray("forms-ext",b),c(),e=d&&!v["form-number-date-ui"].test()||!p&&-1!==a.inArray("mediacapture",b),d&&-1==a.inArray("forms",b)&&b.push("forms"),q.loadStyles&&w.loadCSS("styles/shim"+(e?"-ext":"")+".css")),q.waitReady&&(a.readyWait++,t(b,function(){a.ready(!0)})),a.each(b,function(a,b){return b=o[b]||b,r[b]?(b!==r[b][0]&&t(r[b],function(){s(b,!0)}),void(f=f.concat(r[b]))):void s(b,!0)}),x(f),a.each(b,function(a,b){var c=q[b];c&&("mediaelement"==b&&(c.replaceUI=n(c.replaceUI))&&c.plugins.unshift("mediacontrols"),c.plugins&&c.plugins.length&&x(q[b].plugins))})},reTest:function(){var b,c=function(c,d){var e=v[d],f=d+"Ready";!e||e.loaded||(e.test&&a.isFunction(e.test)?e.test([]):e.test)||(h[f]&&delete h[f],r[e.f],b.push(d))};return function(d){"string"==typeof d&&(d=d.split(" ")),b=[],a.each(d,c),x(b)}}(),isReady:function(b,c){if(b+="Ready",c){if(h[b]&&h[b].add)return!0;h[b]=a.extend(h[b]||{},{add:function(a){a.handler.call(this,b)}}),a(document).triggerHandler(b)}return!(!h[b]||!h[b].add)||!1},ready:function(b,c){var d=arguments[2];if("string"==typeof b&&(b=b.split(" ")),d||(b=a.map(a.grep(b,function(a){return!s(a)}),function(a){return a+"Ready"})),!b.length)return void c(a,f,window,document);var e=b.shift(),g=function(){t(b,c,!0)};a(document).one(e,g)},capturingEvents:function(b,c){document.addEventListener&&("string"==typeof b&&(b=[b]),a.each(b,function(b,d){var e=function(b){return b=a.event.fix(b),c&&f.capturingEventPrevented&&f.capturingEventPrevented(b),a.event.dispatch.call(this,b)};h[d]=h[d]||{},h[d].setup||h[d].teardown||a.extend(h[d],{setup:function(){this.addEventListener(d,e,!0)},teardown:function(){this.removeEventListener(d,e,!0)}})}))},register:function(b,c){var d=v[b];if(!d)return void f.error("can't find module: "+b);d.loaded=!0;var e=function(){c(a,f,window,document,void 0,d.options),s(b,!0)};d.d&&d.d.length?t(d.d,e):e()},c:{},loader:{
|
3
3
|
addModule:function(b,c){v[b]=c,c.name=c.name||b,c.c||(c.c=[]),a.each(c.c,function(a,c){f.c[c]||(f.c[c]=[]),f.c[c].push(b)})},loadList:function(){var b=[],c=function(c,d){"string"==typeof d&&(d=[d]),a.merge(b,d),w.loadScript(c,!1,d)},d=function(c,d){if(s(c)||-1!=a.inArray(c,b))return!0;var e,f=v[c];return!f||(e=f.test&&a.isFunction(f.test)?f.test(d):f.test,!!e&&(s(c,!0),!0))},e=function(b,c){if(b.d&&b.d.length){var e=function(b,e){d(e,c)||-1!=a.inArray(e,c)||c.push(e)};a.each(b.d,function(b,c){v[c]?v[c].loaded||e(b,c):r[c]&&(a.each(r[c],e),t(r[c],function(){s(c,!0)}))}),b.noAutoCallback||(b.noAutoCallback=!0)}};return function(g){var h,i,j,k,l=[],m=function(d,e){return k=e,a.each(f.c[e],function(c,d){return-1==a.inArray(d,l)||-1!=a.inArray(d,b)?(k=!1,!1):void 0}),k?(c("combos/"+k,f.c[k]),!1):void 0};for(i=0;i<g.length;i++)h=v[g[i]],h&&!d(h.name,g)&&(h.css&&q.loadStyles&&w.loadCSS(h.css),h.loadInit&&h.loadInit(),e(h,g),h.loaded||l.push(h.name),h.loaded=!0);for(i=0,j=l.length;j>i;i++)k=!1,h=l[i],-1==a.inArray(h,b)&&("noCombo"!=q.debug&&a.each(v[h].c,m),k||c(v[h].src||h,h))}}(),makePath:function(a){return-1!=a.indexOf("//")||0===a.indexOf("/")?a:(-1==a.indexOf(".")&&(a+=".js"),q.addCacheBuster&&(a+=q.addCacheBuster),q.basePath+a)},loadCSS:function(){var b,c={};return function(d){d=this.makePath(d),c[d]||(b=b||a("link, style")[0]||a("script")[0],c[d]=1,a('<link rel="stylesheet" />').insertBefore(b).attr({href:d}))}}(),loadScript:function(){var b={};return function(c,d,e,f){if(f||(c=w.makePath(c)),!b[c]){var g=function(){d&&d(),e&&("string"==typeof e&&(e=e.split(" ")),a.each(e,function(a,b){v[b]&&(v[b].afterLoad&&v[b].afterLoad(),s(v[b].noAutoCallback?b+"FileLoaded":b,!0))}))};b[c]=1,q.loadScript(c,g,a.noop)}}}()}});var q=f.cfg,r=f.features,s=f.isReady,t=f.ready,u=f.addPolyfill,v=f.modules,w=f.loader,x=w.loadList,y=w.addModule,z=f.bugs,A=[],B={warn:1,error:1},C=a.fn,D=b("video");f.addMethodName=function(a){a=a.split(":");var b=a[1];1==a.length?(b=a[0],a=a[0]):a=a[0],C[a]=function(){return this.callProp(b,arguments)}},C.callProp=function(b,c){var d;return c||(c=[]),this.each(function(){var e=a.prop(this,b);if(e&&e.apply){if(d=e.apply(this,c),void 0!==d)return!1}else f.warn(b+" is not a method of "+this)}),void 0!==d?d:this},f.activeLang=function(){"language"in e||(e.language=e.browserLanguage||"");var b=a.attr(document.documentElement,"lang")||e.language;return t("webshimLocalization",function(){f.activeLang(b)}),function(a){if(a)if("string"==typeof a)b=a;else if("object"==typeof a){var c=arguments,d=this;t("webshimLocalization",function(){f.activeLang.apply(d,c)})}return b}}(),f.errorLog=[],a.each(["log","error","warn","info"],function(a,b){f[b]=function(a){(B[b]&&q.debug!==!1||q.debug)&&(f.errorLog.push(a),window.console&&console.log&&console[console[b]?b:"log"](a))}}),function(){a.isDOMReady=a.isReady;var b=function(){a.isDOMReady=!0,s("DOM",!0),setTimeout(function(){s("WINDOWLOAD",!0)},9999)};c=function(){if(!c.run){if(!a.isDOMReady&&q.waitReady){var d=a.ready;a.ready=function(a){return a!==!0&&document.body&&b(),d.apply(this,arguments)},a.ready.promise=d.promise}q.readyEvt?a(document).one(q.readyEvt,b):a(b)}c.run=!0},a(window).on("load",function(){b(),setTimeout(function(){s("WINDOWLOAD",!0)},9)});var d=[],e=function(){1==this.nodeType&&f.triggerDomUpdate(this)};a.extend(f,{addReady:function(a){var b=function(b,c){f.ready("DOM",function(){a(b,c)})};d.push(b),q.wsdoc&&b(q.wsdoc,i)},triggerDomUpdate:function(b){if(!b||!b.nodeType)return void(b&&b.jquery&&b.each(function(){f.triggerDomUpdate(this)}));var c=b.nodeType;if(1==c||9==c){var e=b!==document?a(b):i;a.each(d,function(a,c){c(b,e)})}}}),C.clonePolyfill=C.clone,C.htmlPolyfill=function(b){if(!arguments.length)return a(this.clonePolyfill()).html();var c=C.html.call(this,b);return c===this&&a.isDOMReady&&this.each(e),c},C.jProp=function(){return this.pushStack(a(C.prop.apply(this,arguments)||[]))},a.each(["after","before","append","prepend","replaceWith"],function(b,c){C[c+"Polyfill"]=function(b){return b=a(b),C[c].call(this,b),a.isDOMReady&&b.each(e),this}}),a.each(["insertAfter","insertBefore","appendTo","prependTo","replaceAll"],function(b,c){C[c.replace(/[A-Z]/,function(a){return"Polyfill"+a})]=function(){return C[c].apply(this,arguments),a.isDOMReady&&f.triggerDomUpdate(this),this}}),C.updatePolyfill=function(){return a.isDOMReady&&f.triggerDomUpdate(this),this},a.each(["getNativeElement","getShadowElement","getShadowFocusElement"],function(a,b){C[b]=function(){return this.pushStack(this)}})}(),l.create&&(f.objectCreate=function(b,c,d){var e=l.create(b);return d&&(e.options=a.extend(!0,{},e.options||{},d),d=e.options),e._create&&a.isFunction(e._create)&&e._create(d),e}),y("swfmini",{test:function(){return window.swfobject&&!window.swfmini&&(window.swfmini=window.swfobject),"swfmini"in window},c:[16,7,2,8,1,12,23]}),v.swfmini.test(),y("sizzle",{test:a.expr.filters}),u("es5",{test:!(!k.ES5||!Function.prototype.bind),d:["sizzle"]}),u("dom-extend",{f:g,noAutoCallback:!0,d:["es5"],c:[16,7,2,15,30,3,8,4,9,10,25,31,34]}),b("picture"),u("picture",{test:"picturefill"in window||!!window.HTMLPictureElement||"respimage"in window,d:["matchMedia"],c:[18],loadInit:function(){s("picture",!0)}}),u("matchMedia",{test:!(!window.matchMedia||!matchMedia("all").addListener),c:[18]}),u("sticky",{test:-1!=(a(b("b")).attr("style","position: -webkit-sticky; position: sticky").css("position")||"").indexOf("sticky"),d:["es5","matchMedia"]}),u("es6",{test:!!(Math.imul&&Number.MIN_SAFE_INTEGER&&l.is&&window.Promise&&Promise.all),d:["es5"]}),u("geolocation",{test:"geolocation"in e,options:{destroyWrite:!0},c:[21]}),function(){u("canvas",{src:"excanvas",test:"getContext"in b("canvas"),options:{type:"flash"},noAutoCallback:!0,loadInit:function(){var a=this.options.type;!a||-1===a.indexOf("flash")||v.swfmini.test()&&!swfmini.hasFlashPlayerVersion("9.0.0")||(this.src="flash"==a?"FlashCanvas/flashcanvas":"FlashCanvasPro/flashcanvas")},methodNames:["getContext"],d:[g]})}();var E="getUserMedia"in e;u("usermedia-core",{f:"usermedia",test:E&&window.URL,d:["url",g]}),u("usermedia-shim",{f:"usermedia",test:!!(E||e.webkitGetUserMedia||e.mozGetUserMedia||e.msGetUserMedia),d:["url","mediaelement",g]}),u("mediacapture",{test:p,d:["swfmini","usermedia",g,"filereader","forms","canvas"]}),function(){var c,d,h="form-shim-extend",i="formvalidation",j="form-number-date-api",l=!1,m=!1,o=!1,p={},r=b("progress"),s=b("output"),t=function(){var d,f,g="1(",j=b("input");if(f=a('<fieldset><textarea required="" /></fieldset>')[0],k.inputtypes=p,a.each(["range","date","datetime-local","month","color","number"],function(a,b){j.setAttribute("type",b),p[b]=j.type==b&&(j.value=g)&&j.value!=g}),k.datalist=!!("options"in b("datalist")&&window.HTMLDataListElement),k[i]="checkValidity"in j,k.fieldsetelements="elements"in f,k.fieldsetdisabled="disabled"in f){try{f.querySelector(":invalid")&&(f.disabled=!0,d=!f.querySelector(":invalid")&&f.querySelector(":disabled"))}catch(a){}k.fieldsetdisabled=!!d}if(k[i]&&(m=!(k.fieldsetdisabled&&k.fieldsetelements&&"value"in r&&"value"in s),o=m&&/Android/i.test(e.userAgent),l=window.opera||z.bustedValidity||m||!k.datalist,!l&&p.number)){l=!0;try{j.type="number",j.value="",j.stepUp(),l="1"!=j.value}catch(a){}}return z.bustedValidity=l,c=k[i]&&!l?"form-native-extend":h,t=a.noop,!1},w=function(b){var c=!0;return b._types||(b._types=b.types.split(" ")),a.each(b._types,function(a,b){return b in p&&!p[b]?(c=!1,!1):void 0}),c};f.validationMessages=f.validityMessages={langSrc:"i18n/formcfg-",availableLangs:"ar bg ca cs el es fa fi fr he hi hu it ja lt nl no pl pt pt-BR pt-PT ru sv zh-CN zh-TW".split(" ")},f.formcfg=a.extend({},f.validationMessages),f.inputTypes={},u("form-core",{f:"forms",test:t,d:["es5"],options:{placeholderType:"value",messagePopover:{},list:{popover:{constrainWidth:!0}},iVal:{sel:".ws-validate",handleBubble:"hide",recheckDelay:400}},methodNames:["setCustomValidity","checkValidity","setSelectionRange"],c:[16,7,2,8,1,15,30,3,31]}),d=q.forms,u("form-native-extend",{f:"forms",test:function(b){return t(),!k[i]||l||-1==a.inArray(j,b||[])||v[j].test()},d:["form-core",g,"form-message"],c:[6,5,14,29]}),u(h,{f:"forms",test:function(){return t(),k[i]&&!l},d:["form-core",g,"sizzle"],c:[16,15,28]}),u(h+"2",{f:"forms",test:function(){return t(),k[i]&&!m},d:[h],c:[27]}),u("form-message",{f:"forms",test:function(a){return t(),!(d.customMessages||!k[i]||l||!v[c].test(a))},d:[g],c:[16,7,15,30,3,8,4,14,28]}),u(j,{f:"forms-ext",options:{types:"date time range number"},test:function(){t();var a=!l;return a&&(a=w(this.options)),a},methodNames:["stepUp","stepDown"],d:["forms",g],c:[6,5,17,14,28,29,33]}),y("range-ui",{options:{},noAutoCallback:!0,test:function(){return!!C.rangeUI},d:["es5"],c:[6,5,9,10,17,11]}),u("form-number-date-ui",{f:"forms-ext",test:function(){var a=this.options;return a.replaceUI=n(a.replaceUI),t(),!a.replaceUI&&o&&(a.replaceUI=!0),!a.replaceUI&&w(a)},d:["forms",g,j,"range-ui"],options:{widgets:{calculateWidth:!0,animate:!0}},c:[6,5,9,10,17,11]}),u("form-datalist",{f:"forms",test:function(){return t(),o&&(d.customDatalist=!0),k.datalist&&!d.fD},d:["form-core",g],c:[16,7,6,2,9,15,30,31,28,33]})}();var F="FileReader"in window&&"FormData"in window;return u("filereader-xhr",{f:"filereader",test:F,d:[g,"swfmini"],c:[25,27]}),u("canvas-blob",{f:"filereader",methodNames:["toBlob"],test:!(F&&!b("canvas").toBlob)}),u("details",{test:"open"in b("details"),d:[g],options:{text:"Details"},c:[21,22]}),u("url",{test:function(){var a=!1;try{a=new URL("b","http://a"),a=!(!a.searchParams||"http://a/b"!=a.href)}catch(a){}return a},d:["es5"]}),function(){f.mediaelement={};var c=b("track");if(k.mediaelement="canPlayType"in D,k.texttrackapi="addTextTrack"in D,k.track="kind"in c,b("audio"),!(z.track=!k.texttrackapi))try{z.track=!("oncuechange"in D.addTextTrack("metadata"))}catch(a){}u("mediaelement-core",{f:"mediaelement",noAutoCallback:!0,options:{jme:{},plugins:[],vars:{},params:{},attrs:{},changeSWF:a.noop},methodNames:["play","pause","canPlayType","mediaLoad:load"],d:["swfmini"],c:[16,7,2,8,1,12,13,23]}),u("mediaelement-jaris",{f:"mediaelement",d:["mediaelement-core",g],test:function(){var a=this.options;return!(!k.mediaelement||f.mediaelement.loadSwf)&&(a.preferFlash&&!v.swfmini.test()&&(a.preferFlash=!1),!(a.preferFlash&&swfmini.hasFlashPlayerVersion("11.3")))},c:[21,25]}),u("track",{options:{positionDisplay:!0,override:z.track},test:function(){var a=this.options;return a.override=n(a.override),!a.override&&!z.track},d:["mediaelement",g],methodNames:["addTextTrack"],c:[21,12,13,22,34]}),y("jmebase",{src:"jme/base",c:[98,99,97]}),a.each([["mediacontrols",{c:[98,99],css:"jme/controls.css"}],["playlist",{c:[98,97]}],["alternate-media"]],function(b,c){y(c[0],a.extend({src:"jme/"+c[0],d:["jmebase"]},c[1]))}),y("track-ui",{d:["track",g]})}(),u("feature-dummy",{test:!0,loaded:!0,c:A}),f.$=a,a.webshims=f,a.webshim=webshim,f.callAsync=function(){f.callAsync=a.noop,j&&(j.cfg&&(j.cfg.length||(j.cfg=[[j.cfg]]),a.each(j.cfg,function(a,b){f.setOptions.apply(f,b)})),j.ready&&a.each(j.ready,function(a,b){f.ready.apply(f,b)}),j.lang&&f.activeLang(j.lang),"polyfill"in j&&f.polyfill(j.polyfill)),f.isReady("jquery",!0)},f.callAsync(),f})}),c.registerDynamic("9",["8"],!0,function(a,b,c){this||self;c.exports=a("8")}),c.register("a",["2","4","5","7","9"],function(a){return{setters:[function(a){},function(a){},function(a){},function(a){},function(a){}],execute:function(){!function(a){a.fn.disable=function(){return this.prop("disabled",!0).addClass("disabled")},a.fn.enable=function(){return this.prop("disabled",!1).removeClass("disabled")},a.fn.check=function(){return this.prop("checked",!0)},a.fn.uncheck=function(){return this.prop("checked",!1)},a.fn._tooltip=a.fn.tooltip,a.fn.tooltip=function(b){return this._tooltip("destroy")._tooltip(a.extend({container:"body",placement:"left",delay:{show:1e3}},b))},a.modalActive=function(){var b=!1;return a(".modal").each(function(){var c=a(this).data("bs.modal");if(c)return b=c.isShown,!b}),b},a.fn.wiggle=function(){this.finish().effect("bounce",{direction:"left",distance:24,times:4},250)}}(jQuery),a("default",{FASTA_FORMAT:/^>/,setupTooltips:function(){$(".pos-label").each(function(){$(this).tooltip({placement:"right"})}),$(".downloads a").each(function(){$(this).tooltip()})}})}}}),c.registerDynamic("b",[],!0,function(a,b,c){var e,f=(this||self,[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1});"function"!=typeof Object.assign&&(Object.assign=function(a){"use strict";var b,c,d;if(null===a)throw new TypeError("Cannot convert undefined or null to object");for(a=Object(a),b=1;b<arguments.length;){if(d=arguments[b],null!==d)for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c]);b++}return a}),e=function(a){var b;return b=new e.Core(a)},e.Core=function(a){return this.tracks={heatmaps:{},histograms:{},chords:{},scatters:{},lines:{},stacks:{},highlights:{},texts:{}},this.conf=e.mixConf(a,this.defaultConf),this},e.Core.prototype.removeTracks=function(a){var b,c,d,e,f,g,h,i;g=d3.select(this.conf.container),e=this.tracks;for(i in e)if(f=e[i],"object"==typeof a)for(c=0,d=a.length;c<d;c++)b=a[c],b in f&&(g.select("."+b).remove(),delete f[b]);else if("string"==typeof a)a in f&&(g.select("."+a).remove(),delete f[a]);else if("undefined"==typeof a)for(h in f)g.select("."+h).remove(),delete f[h];return this},e.Core.prototype.layout=function(a,b){return this._layout=new e.Layout(a,b),this},e.log=function(a,b,c,d){var e;e=["Permanent log","Error","Warning","Info"],console.log("CircosJS: ",e[a]+" ["+b+"] ",c,d)},e.mixConf=function(a,b){var c,d,f;d={};for(c in b)f=b[c],c in a?"[object Array]"===Object.prototype.toString.call(f)?d[c]=a[c]:"object"==typeof f&&null!=f?null!=f&&0===Object.keys(f).length?d[c]=a[c]:d[c]=e.mixConf(a[c],f):d[c]=a[c]:d[c]=f;return d},e.Core.prototype.smartBorders=function(){var a,b,c,d,e,f,g,h,i,j,k,l;l=this.conf.defaultTrackWidth,e={in:this._layout.conf.innerRadius,out:this._layout.conf.outerRadius},b=[],g=this.tracks;for(k in g){h=g[k];for(j in h)i=h[j],i.conf.innerRadius&&b.push({in:i.conf.innerRadius,out:i.conf.outerRadius})}for(b=b.sort(function(a,b){return a.out>b.out,a.out<b.out,0}),c=e,d=0,f=b.length;d<f;d++){if(a=b[d],a.out<c.in-l)return{in:c.in-l,out:c.in};c=a}return c.in>l?{in:c.in-l,out:c.in}:{in:b[0].out,out:b[0].out+l}},"undefined"!=typeof c&&null!==c&&(c.exports=e),e.checkParent=function(a,b,c,d){return a in c||(e.log(1,"datum","unknown parent id",{line:b+1,value:a,header:d,layoutSummary:c}),!1)},e.checkNumber=function(a,b){var c,d;for(c in a)if(d=a[c],isNaN(d))return e.log(1,"datum","not a number",{line:b+1,value:d,header:c}),!1;return!0},e.parseSpanValueData=function(a,b){var c,d;return a.length>0?(d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2],value:a[3]},b)}).map(function(a){return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:parseFloat(a[3])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}):{data:[],meta:{min:null,max:null}}},e.parseSpanStringData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"start"in d&&"end"in d&&"value"in d&&(a=a.map(function(a){return[a.parent_id,a.start,a.end,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({start:a[1],end:a[2]},b)}).map(function(a){var c;return(a[1]<0||a[2]>b[a[0]])&&e.log(2,"position","position inconsistency",{datum:a,layoutSummary:b}),c=null!=a[3]?a[3]:null,{block_id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2])),value:c}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionValueData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1],value:a[2]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:parseFloat(a[2])||1}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parsePositionTextData=function(a,b){var c,d;return d=a[0],"parent_id"in d&&"position"in d&&(a=a.map(function(a){return[a.parent_id,a.position,a.value]})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"parent")}).filter(function(a,b){return e.checkNumber({position:a[1]},b)}).map(function(a){return{block_id:a[0],position:Math.min(b[a[0]],parseFloat(a[1])),value:a[2]}}),c=d3.nest().key(function(a){return a.block_id}).entries(a),{data:c,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.parseChordData=function(a,b){var c;return c=a[0],"source_id"in c&&"source_start"in c&&"target_id"in c&&"target_start"in c&&"target_end"in c&&(a=a.map(function(a){var b;return b=[a.source_id,a.source_start,a.source_end,a.target_id,a.target_start,a.target_end],null!=a.value&&b.push(a.value),b})),a=a.filter(function(a,c){return e.checkParent(a[0],c,b,"source_id")}).filter(function(a,c){return e.checkParent(a[3],c,b,"target_id")}).filter(function(a,b){return e.checkNumber({source_start:a[1],source_end:a[2],target_start:a[4],target_end:a[5],value:a[6]||1},b)}).map(function(a){return{source:{id:a[0],start:Math.max(0,parseFloat(a[1])),end:Math.min(b[a[0]],parseFloat(a[2]))},target:{id:a[3],start:Math.max(0,parseFloat(a[4])),end:Math.min(b[a[3]],parseFloat(a[5]))},value:parseFloat(a[6]),hsp:a[7]}}),{data:a,meta:{min:d3.min(a,function(a){return a.value}),max:d3.max(a,function(a){return a.value})}}},e.Layout=function(a,b){var c,d,f,g,h,i,j,k;null==b&&e.log(2,"no layout data",""),this.conf=e.mixConf(a,JSON.parse(JSON.stringify(this.defaultConf))),this.data=b,this.blocks={},this.size=0,g=0,h=this.data;for(f in h)k=h[f],this.blocks[k.id]={label:k.label,len:k.len,color:k.color,offset:g},k.offset=g,g+=k.len;this.size=g,d=this.conf.gap,j=this.size,c=this.data.length,i=this.data;for(f in i)k=i[f],this.blocks[k.id].start=k.offset/j*(2*Math.PI-c*d)+f*d,this.blocks[k.id].end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d,k.start=k.offset/j*(2*Math.PI-c*d)+f*d,k.end=(k.offset+k.len)/j*(2*Math.PI-c*d)+f*d;return this.getAngle=function(a,b){var c;return c=this.blocks[a].start/this._size,"deg"===b?360*c:"rad"===b?2*c*Math.PI:null},this.summary=function(){var a,b,c,d,e;for(c={},e=this._data,b=0,d=e.length;b<d;b++)a=e[b],c[a.id]=a.len;return c},this},e.Core.prototype.heatmap=function(a,b,c){var d;return d=new e.Heatmap,d.build(this,b,c),this.tracks.heatmaps[a]=d,this},e.Core.prototype.histogram=function(a,b,c){var d;return d=new e.Histogram,d.build(this,b,c),this.tracks.histograms[a]=d,this},e.Core.prototype.chord=function(a,b,c){var d;return d=new e.Chord,d.build(this,b,c),this.tracks.chords[a]=d,this},e.Core.prototype.scatter=function(a,b,c){var d;return d=new e.Scatter,d.build(this,b,c),this.tracks.scatters[a]=d,this},e.Core.prototype.line=function(a,b,c){var d;return d=new e.Line,d.build(this,b,c),this.tracks.lines[a]=d,this},e.Core.prototype.stack=function(a,b,c){var d;return d=new e.Stack,d.build(this,b,c),this.tracks.stacks[a]=d,this},e.Core.prototype.highlight=function(a,b,c){var d;return d=new e.Highlight,d.build(this,b,c),this.tracks.highlights[a]=d,this},e.Core.prototype.text=function(a,b,c){var d;return d=new e.Text,d.build(this,b,c),this.tracks.texts[a]=d,this},e.Chord=function(){return e.Track.call(this),this.parseData=e.parseChordData,this.applyRules=function(a,b){var c,d,e,f,g;for(a=a||[],f=[],d=0,e=b.length;d<e;d++)c=b[d],f.push(function(){var b,d,e;for(e=[],d=0,b=a.length;d<b;d++)g=a[d],g.condition(c)?e.push(c[g.parameter]=g.value):e.push(void 0);return e}());return f},this.getSource=function(a){return function(a,b){var c,d,e,f;return a=a.source,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.getTarget=function(a){return function(a,b){var c,d,e,f;return a=a.target,c=b.blocks[a.id],f=c.start+a.start/c.len*(c.end-c.start),d=c.start+a.end/c.len*(c.end-c.start),e={radius:b.conf.innerRadius,startAngle:f,endAngle:d}}}(this),this.dimChords=function(a,b,c,d){a.selectAll("path").style("opacity",function(a,b){return d==b?1:0})},this.resetChords=function(a,b){a.selectAll("path").style("opacity",b.opacity)},this.renderChords=function(a,b,c,d,e,f,g,h){var i,j;return j=a.append("g").attr("class",c.colorPalette),i=j.selectAll(".chord").data(d).enter().append("path").attr("class","chord").attr("d",d3.svg.chord().source(function(a){return g(a,e)}).target(function(a){return h(a,e)})).attr("opacity",function(a){return c.opacity}).attr("data-toggle","tooltip").attr("title",function(a){return"Identity "+a.hsp.identity+"<br> Evalue "+a.hsp.evalue}).attr("id",function(a){var b=a.source.start+a.source.end,c=a.target.start+a.target.end;return a.source.id+"_"+b+"_"+a.target.id+"_"+c}).on("mouseover",function(a){return function(b,d,e){return a.dimChords(j,b,c,d),a.dispatch.mouseover(b,d,e)}}(this)).on("mouseout",function(a){return function(b,d,e){return a.resetChords(j,c),a.dispatch.mouseout(b,d,e)}}(this)),c.usePalette?i.attr("class",function(a){return"q"+f(a.value,c.cmin,c.cmax,c.colorPaletteSize,c.colorPaletteReverse,c.logScale)+"-"+c.colorPaletteSize}):i.attr("fill",function(a){return a.color||c.color}),i},this.render=function(a){return function(b,c,d){var f,g;if(c.select("."+d).remove(),g=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderChords(g,d,a.conf,a.data,b._layout,a.ratio,a.getSource,a.getTarget),null!=a.conf.tooltipContent)return e.registerTooltip(b,a,f,a.conf)}}(this),this},e.Heatmap=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("class",function(a){return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize})},this},e.Highlight=function(){return e.Track.call(this),this.parseData=e.parseSpanStringData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g;return g=a.renderBlock(c,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){return a.selectAll("tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(b.innerRadius).outerRadius(b.outerRadius).startAngle(function(a,b){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a,b){return d.theta(a.end,c.blocks[a.block_id])})).attr("fill",function(a){return a.value||b.color}).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}).attr("stroke",function(a){return a.strokeColor||b.strokeColor})},this},e.Histogram=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",a.conf.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,e){var f;return f=a.selectAll(".bin").data(function(a){return a.values}).enter().append("path").attr("class","bin").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.arc().innerRadius(function(a){var c;return"in"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.outerRadius-c):b.innerRadius}).outerRadius(function(a){var c;return"out"===b.direction?(c=e.ratio(a.value,b.cmin,b.cmax,b.outerRadius-b.innerRadius,!1,b.logscale),b.innerRadius+c):b.outerRadius}).startAngle(function(a){return e.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return e.theta(a.end,c.blocks[a.block_id])})),b.usePalette?f.attr("class",function(a){return"q"+e.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}):f.attr("fill",d.color||b.color),f},this},e.Line=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=d3.svg.line().x(function(a){return d.x(a,c,b)}).y(function(a){return d.y(a,c,b)}).interpolate(b.interpolation),a.append("path").datum(function(a){return a.values}).attr("class","line").attr("d",e).attr("opacity",function(a){return a.opacity||b.opacity}).attr("stroke-width",function(a){return a.thickness||b.thickness}).attr("stroke",function(a){return a.color||b.color}).attr("fill",function(a){var c,d;return d=a.fill||b.fill,c=a.fill_color||b.fill_color,d?c:"none"})},this},e.Scatter=function(){return e.Track.call(this),this.parseData=e.parsePositionValueData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".point").data(function(a){return a.values}).enter().append("path").attr("class","point").attr("opacity",function(a){return a.opacity||b.opacity}).attr("d",d3.svg.symbol().type(b.glyph.shape).size(b.glyph.size)).attr("transform",function(a){return function(a){return"translate("+d.x(a,c,b)+","+d.y(a,c,b)+") rotate("+360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)+")"}}(this)).attr("stroke",function(a){return a.glyph_strokeColor||b.glyph.strokeColor}).attr("stroke-width",function(a){return a.glyph_strokeWidth||b.glyph.strokeWidth}).attr("fill",function(a){var c,d;return d=a.glyph_fill||b.glyph.fill,c=a.glyph_color||b.glyph.color,d?c:"none"})},this},e.Stack=function(){return e.Track.call(this),this.parseData=e.parseSpanValueData,this.build=function(a,b,c,d,e){return this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.buildLayers(this.data,this.conf.margin),this.applyRules(b.rules,this.data)},this.buildLayers=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;for(f in a)for(c=a[f],c.values=c.values.sort(function(a,b){return a.start<b.start?-1:a.start===b.start&&a.end>b.end?-1:a.start===b.start&&a.end===b.end?0:1}),j=[],o=c.values,g=0,k=o.length;g<k;g++){for(d=o[g],n=!1,e=m=0,l=j.length;m<l;e=++m)if(i=j[e],h=i.slice(0).pop(),h.end+b<d.start){i.push(d),d.layer=e,n=!0;break}n||(d.layer=j.length),n||j.push([d])}},this.applyRules=function(a,b){var c,d,e,f,g,h,i;a=a||[],g=[];for(e in b)i=b[e],g.push(function(){var b,e;b=i.layers,e=[];for(d in b)f=b[d],e.push(function(){var b,e,g;for(g=[],b=0,e=f.length;b<e;b++)c=f[b],g.push(function(){var b,e,f;for(f=[],e=0,b=a.length;e<b;e++)h=a[e],h.condition(i.parent,c,d)?f.push(c[h.parameter]=h.value):f.push(void 0);return f}());return g}());return e}());return g},this.datumRadialPosition=function(a){return function(b){var c,d,e;return e=(a.conf.thickness+a.conf.radialMargin)*b.layer,d=e+a.conf.thickness,"out"===a.conf.direction?[a.conf.innerRadius+e,Math.min(a.conf.innerRadius+d,a.conf.outerRadius)]:"in"===a.conf.direction?[Math.max(a.conf.outerRadius-d,a.conf.innerRadius),a.conf.outerRadius-e]:"center"===a.conf.direction?(c=Math.floor((a.conf.outerRadius+a.conf.innerRadius)/2),e=(a.conf.thickness+a.conf.radialMargin)*Math.floor(b.layer/2),d=e+a.conf.thickness,b.layer%2===0?[c+e,c+d]:[c-e-a.conf.radialMargin,c-d-a.conf.radialMargin]):void 0}}(this),this.datumInnerRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[0]}}(this),this.datumOuterRadius=function(a){return function(b,c,d){return a.datumRadialPosition(b,c,d)[1]}}(this),this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",f.colorPalette),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e;return e=a.selectAll(".tile").data(function(a){return a.values}).enter().append("path").attr("class","tile").attr("d",d3.svg.arc().innerRadius(d.datumInnerRadius).outerRadius(d.datumOuterRadius).startAngle(function(a){return d.theta(a.start,c.blocks[a.block_id])}).endAngle(function(a){return d.theta(a.end,c.blocks[a.block_id])})),e.attr("opacity",function(a){return a.opacity||b.opacity}),e.attr("stroke-width",function(a){return a.strokeWidth||b.strokeWidth}),e.attr("stroke",function(a){return a.strokeColor||b.strokeColor}),e.attr("fill",function(a){return a.color||b.color}),e.attr("class",function(a){var c;if(c=a.usePalette||b.usePalette)return"q"+d.ratio(a.value,b.cmin,b.cmax,b.colorPaletteSize,b.colorPaletteReverse,b.logScale)+"-"+b.colorPaletteSize}),e},this},e.Text=function(){return e.Track.call(this),this.parseData=e.parsePositionTextData,this.renderDatumContainer=function(a){return function(b,c,d,e,f){var g,h;return h=c.append("g").attr("class",d),g=a.renderBlock(h,e,b._layout,f)}}(this),this.renderDatum=function(a,b,c,d){var e,f,g,h;g=a.selectAll("g").data(function(a){return a.values}).enter().append("g").append("text").text(function(a){return a.value}).attr("transform",function(a){var e;return e=360*d.theta(a.position,c.blocks[a.block_id])/(2*Math.PI)-90,"rotate("+e+")translate("+b.innerRadius+",0)"}),f=b.style;for(e in f)h=f[e],g.style(e,h);return g},this},e.Track=function(){return this.build=function(a,b,c){return this.dispatch=d3.dispatch("mouseover","mouseout"),this.loadData(c,a),this.conf=this.processConf(b,this.defaultConf,this.meta,a,this),this.applyRules(b.rules,this.data)},this.loadData=function(a,b){var c,d,e,f,g,h;for(e={},g=b._layout.data,d=0,f=g.length;d<f;d++)c=g[d],e[c.id]=c.len;return h=this.parseData(a,e),this.data=h.data,this.meta=h.meta},this.processConf=function(a,b,c,d,f){var g;return a=e.mixConf(a,Object.assign({},b)),a=f.computeMinMax(a,c),0===a.innerRadius&&0===a.outerRadius&&(g=d.smartBorders(),a.innerRadius=g.in,a.outerRadius=g.out),a},this.applyRules=function(a,b){var c,d,e,f,g,h;a=a||[],f=[];for(e in b)h=b[e],f.push(function(){var b,e;b=h.values,e=[];for(d in b)c=b[d],e.push(function(){var b,e,f;for(f=[],b=0,e=a.length;b<e;b++)g=a[b],g.condition(h.key,c,d)?f.push(c[g.parameter]=g.value):f.push(void 0);return f}());return e}());return f},this.computeMinMax=function(a,b){return a.cmin="smart"===a.min?b.min:a.min,a.cmax="smart"===a.max?b.max:a.max,a},this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this.render=function(a){return function(b,c,d){var f,g,h,i;return c.select("."+d).remove(),i=c.append("g").attr("class",d).attr("z-index",a.conf.zIndex),f=a.renderDatumContainer(b,i,d,a.data,a.conf),(null!=(g=a.conf.axes)?g.display:void 0)&&a.renderAxes(f,a.conf,b._layout,a.data),h=a.renderDatum(f,a.conf,b._layout,a),null!=a.conf.tooltipContent&&e.registerTooltip(b,a,h,a.conf),h.on("mouseover",function(b,c,d){return a.dispatch.mouseover(b,c,d)}),h.on("mouseout",function(b,c,d){
|
4
|
-
return a.dispatch.mouseout(b,c,d)})}}(this),this.renderBlock=function(a,b,c,d){var e,f;return f=d.outerRadius-d.innerRadius,e=a.selectAll(".block").data(b).enter().append("g").attr("class","block").attr("transform",function(a){return"rotate("+360*c.blocks[a.key].start/(2*Math.PI)+")"}),d.backgrounds&&e.selectAll(".background").data(d.backgrounds).enter().append("path").attr("class","background").attr("fill",function(a){return a.color}).attr("opacity",function(a){return a.opacity||1}).attr("d",d3.svg.arc().innerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.start:d.innerRadius+f*a.start}).outerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.end:d.innerRadius+f*a.end}).startAngle(function(a,b,c){return 0}).endAngle(function(a,d,e){return c.blocks[b[e].key].end-c.blocks[b[e].key].start})),e},this.renderAxes=function(a,b,c,d){var e,f,g;return"pixel"===b.axes.minor.spacingType&&(e=function(){var a,c,d,e,f;for(f=[],g=a=c=b.innerRadius,d=b.outerRadius,e=b.axes.minor.spacing;e>0?a<=d:a>=d;g=a+=e)f.push(g);return f}()),f=d3.svg.arc().innerRadius(function(a){return a}).outerRadius(function(a){return a}).startAngle(0).endAngle(function(a,b,e){var f;return f=c.blocks[d[e].key],f.end-f.start}),a.selectAll(".axis").data(e).enter().append("path").attr("opacity",b.opacity).attr("class","axis").attr("d",f).attr("stroke-width",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.thickness:b.axes.minor.thickness}).attr("stroke",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.color:b.axes.minor.color})},this.theta=function(a,b){return a/b.len*(b.end-b.start)},this.x=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.cos(e)}}(this),this.y=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.sin(e)}}(this),this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this},e.renderLayout=function(a,b,c){var d,f,g,h;if(f=c._layout.conf,b.select(".cs-layout").remove(),h=b.append("g").attr("class","cs-layout").attr("z-index",f.zIndex).on("click",f.onClick),d=h.selectAll("g").data(c._layout.data).enter().append("g").attr("class",function(a){return a.id}).attr("opacity",f.opacity),g=a.svg.arc().innerRadius(f.innerRadius).outerRadius(f.outerRadius).cornerRadius(f.cornerRadius).startAngle(function(a){return a.start}).endAngle(function(a){return a.end}),d.append("path").attr("d",g).attr("fill",function(a){return a.color}).attr("id",function(a){return a.id}),f.labels.display&&e.renderLayoutLabels(f,a,d),f.ticks.display)return e.renderLayoutTicks(f,h,a,c)},e.renderLayoutLabels=function(a,b,c){var d,e,f;return f=a.innerRadius+a.labels.radialOffset,e=b.svg.arc().innerRadius(f).outerRadius(f).startAngle(function(a,b){return a.start}).endAngle(function(a,b){return a.end}),c.append("path").attr("fill","none").attr("stroke","none").attr("d",e).attr("id",function(a){return"arc-label"+a.id}),d=c.append("text").attr("font-size",a.labels.size).attr("text-anchor","middle"),d.append("textPath").attr("startOffset","25%").attr("xlink:href",function(a){return"#arc-label"+a.id}).style("fill",a.labels.color).text(function(a){var b=a.end-a.start;return a.label.slice(0,Math.floor(21*b))+".."})},e.renderLayoutTicks=function(a,b,c,d){var e,f,g;return e=function(b){var d,e;d=(b.end-b.start)/b.len,b.end-b.start>1.57?e=8:b.end-b.start>.785?e=4:b.end-b.start>.3925?e=2:b.end-b.start>0&&(e=0);var f=[],g={angle:0*d+b.start,label:0};f.push(g);var h=c.scale.linear().domain([1,b.len]).range([b.start,b.end]),i=h.ticks(e).length;h.ticks(e).map(function(c,e){var g=(c*d+b.start,b.len*d+b.start,{angle:c*d+b.start,label:c/a.ticks.labelDenominator+a.ticks.labelSuffix});f.push(g)}),f.splice(i,1);var g={angle:b.len*d+b.start-.006,label:b.len/a.ticks.labelDenominator+a.ticks.labelSuffix};return f.push(g),f},f=function(b,c){return a.ticks.labels===!1?null:a.ticks.labelDisplay0===!1&&0===c?null:c%a.ticks.labelSpacing?null:0===c?b/a.ticks.labelDenominator:b/a.ticks.labelDenominator+a.ticks.labelSuffix},g=b.append("g").selectAll("g").data(d._layout.data).enter().append("g").selectAll("g").data(e).enter().append("g").attr("transform",function(b){return"rotate("+(180*b.angle/Math.PI-90)+")translate("+a.outerRadius+",0)"}),g.append("line").attr("x1",0).attr("y1",1).attr("x2",function(b,c){return a.ticks.size.major}).attr("y2",1).style("stroke",a.ticks.color),g.append("text").attr("x",8).attr("dy",".35em").attr("transform",function(a){return a.angle>Math.PI?"rotate(180)translate(-16)":null}).attr("text-anchor",function(a){return a.angle>Math.PI?"end":null}).attr("font-size",a.ticks.labelSize).style("fill",a.ticks.labelColor).text(function(a){return a.label})},e.Core.prototype.render=function(a,b){var c,d,g,h,i,j,k,l,m,n;if("undefined"==typeof a&&(h=!0,a=[]),b){d=this.tracks;for(l in d){k=d[l];for(c in k)j=k[c],i.select("."+c).remove()}}i=d3.select(this.conf.container).attr("width",this.conf.width).attr("height",this.conf.height),n=i.select(".all"),n.empty()&&(n=i.append("g").attr("class","all").attr("transform","translate("+parseInt(this.conf.width/2)+","+parseInt(this.conf.height/2)+")")),g=this.tracks;for(l in g){k=g[l];for(c in k)j=k[c],(h||f.call(a,c)>=0)&&j.render(this,n,c)}return(h||f.call(a,"layout")>=0)&&e.renderLayout(d3,n,this),m=i.selectAll(".all > g").remove(),m[0].sort(function(a,b){return parseInt(a.getAttribute("z-index"))<parseInt(b.getAttribute("z-index"))?-1:parseInt(a.getAttribute("z-index"))>parseInt(b.getAttribute("z-index"))?1:0}),i.select(".all").selectAll("g").data(m[0]).enter().append(function(a){return a}),this},e.Core.prototype.defaultConf={width:700,height:700,container:"circos",defaultTrackWidth:10},e.Layout.prototype.defaultConf={innerRadius:250,outerRadius:300,cornerRadius:5,gap:.04,opacity:1,labels:{position:"center",display:!0,size:14,color:"#000",radialOffset:20},ticks:{display:!0,color:"grey",spacing:1e7,labels:!0,labelSpacing:10,labelSuffix:"Mb",labelDenominator:1e6,labelDisplay0:!0,labelSize:10,labelColor:"#000",labelFont:"default",majorSpacing:5,size:{minor:2,major:5}},onClick:null,onMouseOver:null,zIndex:100},e.axes={display:!1,minor:{spacing:5,spacingType:"pixel",color:"#d3d3d3",thickness:2},major:{spacing:5,color:"#000000",thickness:2}},e.Heatmap.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",colorPalette:"YlGnBu",colorPaletteSize:9,colorPaletteReverse:!1,logScale:!1,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Histogram.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",colorPaletteSize:9,colorPalette:"YlGnBu",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",logScale:!1,axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Chord.prototype.defaultConf={colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",opacity:.7,min:"smart",max:"smart",logScale:!1,rules:[],backgrounds:[],zIndex:1,tooltipContent:null},e.Scatter.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,glyph:{color:"#fd6a62",fill:!0,size:15,shape:"circle",strokeColor:"#d3d3d3",strokeWidth:2},axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Line.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",fill:!0,fill_color:"#d3d3d3",thickness:2,max_gap:1e7,interpolation:"linear",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Stack.prototype.defaultConf={innerRadius:0,outerRadius:0,colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",thickness:10,radialMargin:2,margin:2,strokeWidth:1,strokeColor:"#000000",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Highlight.prototype.defaultConf={innerRadius:0,outerRadius:0,defaultColor:"#fd6a62",opacity:.5,rules:[],zIndex:101,strokeColor:"#d3d3d3",strokeWidth:0,tooltipContent:null},e.Text.prototype.defaultConf={innerRadius:0,outerRadius:0,rules:[],backgrounds:[],zIndex:1,style:{},tooltipContent:null},e.registerTooltip=function(a,b,c,d){return b.tip=d3.tip().direction("s").offset([20,0]).html(d.tooltipContent),c.call(b.tip),b.dispatch.on("mouseover",function(a,c,d){return b.tip.attr("class","d3-tip appear").show(a)}),b.dispatch.on("mouseout",function(a,c,d){return b.tip.attr("class","d3-tip").show(a),b.tip.hide()})}}),c.registerDynamic("c",["b"],!0,function(a,b,c){this||self;c.exports=a("b")}),c.register("d",["10","11","12","13","e","f","c"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,d){e(this,a),this.queries=d.queries,this.svgContainer=b,this.seq_type=c.get_seq_type(d.program),this.initiate()}return d(a,null,[{key:"name",value:function(){return"Circos"}},{key:"className",value:function(){return"circos-distribution collapse"}},{key:"collapseId",value:function(a){return"circos-collapse"}},{key:"dataName",value:function(a){return"Circos-visualisation"}}]),d(a,[{key:"initiate",value:function(){this.width=this.svgContainer.width(),this.height=600,this.innerRadius=200,this.outerRadius=230,this.query_arr=[],this.hit_arr=[],this.layout_arr=[],this.chords_arr=[],this.hsp_count=50,this.denominator=100,this.spacing=20,this.labelSpacing=10;var a={amino_acid:"aa",nucleic_acid:"bp"};this.construct_layout(),this.iterator_for_edits(),this.hit_arr=g.uniq(this.hit_arr),this.handle_spacing();var b=f.formatPrefix(this.max_length);this.suffix=" "+b.symbol+a[this.seq_type.subject_seq_type],"k"==b.symbol?this.denominator=1e3:"M"==b.symbol?(this.denominator=1e6,this.spacing=1e6,this.labelSpacing=2e5):"g"==b.symbol&&(this.denominator=1e9),f.select(this.svgContainer[0]).insert("svg",":first-child").attr("class","circosContainer"),this.create_instance(this.svgContainer,this.width,this.height),this.chords_arr.length&&this.layout_arr.length?this.instance_render():this.render_error(),this.setupTooltip()}},{key:"iterator_for_edits",value:function(){this.max_length=this.calculate_max_length(),this.hit_arr.length>10&&this.complex_layout_edits()}},{key:"construct_layout",value:function(){var a=0,b=32,c=this.queries.length,d=Math.min(b/2,c),e=(b-d)/d;this.new_layout=[],this.data=g.map(this.queries,g.bind(function(b){if(a<d){var c=b.id,f=b.length,h={len:f,color:"#8dd3c7",label:c,id:"Query_"+this.clean_id(b.id),ori_id:c};this.layout_arr.push(h);g.map(b.hits,g.bind(function(a){if(a.number<e){g.map(a.hsps,g.bind(function(c){if(g.indexOf(this.hit_arr,a.id)==-1){var d=a.id,e=a.length;this.hit_arr.push(a.id);var f={len:e,color:"#80b1d3",label:d,id:"Hit_"+this.clean_id(a.id),ori_id:d};this.layout_arr.push(f)}var h=["Query_"+this.clean_id(b.id),c.qstart,c.qend,"Hit_"+this.clean_id(a.id),c.sstart,c.send,a.number,c];return this.chords_arr.push(h),c},this));return a}},this))}return this.query_arr.push(b.id),b},this))}},{key:"rearrange_new_layout",value:function(){g.each(this.new_layout,g.bind(function(a){var b=a.id.slice(0,3);"Que"==b&&this.layout_arr.push(a)},this)),g.each(this.new_layout,g.bind(function(a){var b=a.id.slice(0,3);"Hit"==b&&this.layout_arr.push(a)},this))}},{key:"complex_layout_edits",value:function(){this.delete_from_layout=[],this.delete_from_chords=[],g.each(this.layout_arr,g.bind(function(a,b){var c=(a.len/this.max_length).toFixed(3);a.label;c<.1&&"Que"!=a.id.slice(0,3)&&(this.delete_from_layout.push(a),this.hit_arr.slice(g.indexOf(this.hit_arr,a.label),1))},this))}},{key:"check_in_chords_arr",value:function(a,b,c){var d=0;g.each(this.chords_arr,g.bind(function(c){"Que"==b&&c[0]!=a&&d++},this)),d==this.chords_arr.length&&(console.log("no record found "+a),this.delete_arr.push(c))}},{key:"find_index_of_hit",value:function(a){var b;return g.each(this.queries,g.bind(function(c){g.each(c.hits,g.bind(function(c){var d="Hit_"+this.clean_id(c.id);a==d&&(b=c.id)},this))},this)),g.indexOf(this.layout_arr,b)}},{key:"edit_labels",value:function(){console.log("label edits"),g.each(this.layout_arr,g.bind(function(a){var b=(a.len/this.max_length).toFixed(3),c=a.label;b<.41?a.label="..":c.length>10?a.label=c.slice(0,2)+"...":a.label=a.ori_id},this))}},{key:"calculate_multipliers",value:function(){var a=0,b=0;g.each(this.query_arr,g.bind(function(b){g.each(this.data,g.bind(function(c){b==c.id&&(a+=c.length)},this))},this)),g.each(this.data,g.bind(function(a){g.each(a.hits,g.bind(function(a){var c=g.indexOf(this.hit_arr,a.id);c>=0&&(b+=a.length)},this))},this));var c=(a+b)/2;console.log("mid sum "+c+" hit_sum "+b+" query_sum "+a),this.query_multiplier=(c/a).toFixed(3),this.hit_multiplier=(c/b).toFixed(3),console.log("query "+this.query_multiplier+" hit "+this.hit_multiplier)}},{key:"handle_spacing",value:function(){this.max_length>16e3?this.spacing=200:this.max_length>12e3?this.spacing=150:this.max_length>8e3?this.spacing=100:this.max_length>4e3?this.spacing=75:this.max_length>1800&&(this.spacing=50)}},{key:"calculate_max_length",value:function(){var a=0;return g.each(this.layout_arr,function(b){a<b.len&&(a=b.len)}),a}},{key:"clean_id",value:function(a){return a.replace(/[^a-zA-Z0-9]/g,"")}},{key:"create_instance",value:function(a,b,c){this.instance=new h({container:".circosContainer",width:b,height:c}),this.chord_layout(),this.instance_layout()}},{key:"chord_layout",value:function(){return this.chords_arr.length>32?this.paletteSize=32:this.paletteSize=this.chords_arr.length,{usePalette:!0,colorPaletteSize:this.paletteSize,colorPalette:"RdYlBu",opacity:.85}}},{key:"instance_layout",value:function(){return{innerRadius:this.innerRadius,outerRadius:this.outerRadius,cornerRadius:1,labels:{display:!0,size:"10px",radialOffset:10},ticks:{display:!0,spacing:this.spacing,labelSpacing:this.labelSpacing,labelDenominator:this.denominator,labelSuffix:this.suffix,labelSize:"10px",majorSpacing:this.labelSpacing,size:{minor:0,major:4}}}}},{key:"instance_render",value:function(){this.instance.layout(this.instance_layout(),this.layout_arr),this.instance.chord("chord1",this.chord_layout(),this.chords_arr),this.instance.render()}},{key:"render_error",value:function(){this.svgContainer.find("svg").remove(),this.svg=f.select(this.svgContainer[0]).insert("svg",":first-child").attr("width",this.svgContainer.width()).attr("height",this.svgContainer.height()).append("g").attr("class","circos-error").attr("transform","translate("+this.svgContainer.width()/2+","+this.svgContainer.height()/2+")").append("text").attr("text-anchor","start").attr("dy","-0.25em").attr("x",-175).style("font-size","14px").text("Circos looks great with less than 16 queries")}},{key:"layoutReset",value:function(){this.layoutHide=[],g.each(this.layout_arr,function(a){$("."+a.id).css("opacity",1)})}},{key:"chordsReset",value:function(){this.chordsHide=[],g.each(this.chords_arr,function(a){var b=a[1]+a[2],c=a[4]+a[5];$("#"+a[0]+"_"+b+"_"+a[3]+"_"+c).show()})}},{key:"chordsCheck",value:function(a,b){g.each(this.chords_arr,g.bind(function(c,d){"Que"==b&&c[0]==a&&(this.chordsHide.push(d),this.layoutHide.push(c[3])),"Hit"==b&&c[3]==a&&(this.chordsHide.push(d),this.layoutHide.push(c[0]))},this))}},{key:"chordsClean",value:function(){g.each(this.chords_arr,g.bind(function(a,b){if(g.indexOf(this.chordsHide,b)==-1){var c=a[1]+a[2],d=a[4]+a[5];$("#"+a[0]+"_"+c+"_"+a[3]+"_"+d).hide()}},this))}},{key:"layoutClean",value:function(){g.each(this.layout_arr,g.bind(function(a,b){g.indexOf(this.layoutHide,a.id)==-1&&$("."+a.id).css("opacity",.1)},this))}},{key:"setupTooltip",value:function(){var a={};$(".circos-distribution").on("click",g.bind(function(b){b.stopPropagation(),this.layoutReset(),this.chordsReset(),a={}},this)),g.each(this.query_arr,g.bind(function(b,c){this.chordsHide=[],this.layoutHide=[],b&&$(".circos-distribution .Query_"+this.clean_id(b)).attr("data-toggle","tooltip").attr("title",b).on("click",g.bind(function(d){if(d.stopPropagation(),a[c]!=b){a[c]=b;var e="Query_"+this.clean_id(b);this.layoutHide.push(e),this.chordsCheck(e,"Que"),this.chordsClean(),this.layoutClean()}else a[c]=0,this.layoutReset(),this.chordsReset()},this))},this)),g.each(this.hit_arr,g.bind(function(b,c){this.chordsHide=[],this.layoutHide=[],b&&$(".circos-distribution .Hit_"+this.clean_id(b)).attr("data-toggle","tooltip").attr("title",b).on("click",g.bind(function(d){if(d.stopPropagation(),a[c]!=b){a[c]=b;var e="Hit_"+this.clean_id(b);this.layoutHide.push(e),this.chordsCheck(e,"Hit"),this.chordsClean(),this.layoutClean()}else a[c]=0,this.layoutReset(),this.chordsReset()},this))},this)),$('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"ratioCalculate",value:function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))}},{key:"drawLegend",value:function(){this.ratioHSP=[],g.each(this.chords_arr,g.bind(function(a){var b={number:a[6],evalue:a[7].evalue};this.ratioHSP.push(b)},this));var a=f.min(this.ratioHSP,function(a){return a.number}),b=f.max(this.ratioHSP,function(a){return a.number});console.log("chords_arr "+this.chords_arr.length),console.log("ratioHSP test "+this.ratioHSP.length),console.log("paletteSize "+this.paletteSize),console.log("min "+a+" max "+b),this.legend=f.select(this.svgContainer[0]).insert("svg",":first-child").attr("height",20).attr("width",30*this.ratioHSP.length).attr("transform","translate(10, 10)").append("g").attr("class","RdYlBu").attr("transform","translate(10, 0)");this.legend.selectAll(".bar").data(this.ratioHSP).enter().append("g").attr("class","g").attr("transform",function(a,b){return"translate("+30*b+",0)"}).append("rect").attr("class",g.bind(function(c,d){var e=this.ratioCalculate(c.number,a,b,this.paletteSize,!1,!1);return console.log("calc ratio "+e),"q"+e+"-"+this.paletteSize},this)).attr("data-toggle","tooltip").attr("title",function(a){return a.evalue}).attr("x",1).attr("width",30).attr("height",20),f.scale.linear().domain([0,250]).range([0,100])}}]),a}(),j=b(i),a("default",j)}}}),c.register("14",["10","11","12","13","e","f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,c){e(this,a),this.svg_container=b,$queryDiv=b.parents(".resultn"),hits=this.extractData(c.query.hits,c.query.number),this.graphIt($queryDiv,b,0,20,null,hits)}return d(a,null,[{key:"name",value:function(){return"Alignments Overview"}},{key:"className",value:function(){return"alignment-overview"}},{key:"collapseId",value:function(a){return"alignment_"+a.query.number}},{key:"dataName",value:function(a){return"Alignment-Overview-"+a.query.id}}]),d(a,[{key:"extractData",value:function(a,b){var c=[];return a.map(function(a){var d=[],e=a.hsps;g.each(e,function(c){var e={};e.hspEvalue=c.evalue,e.hspStart=c.qstart,e.hspEnd=c.qend,e.hspFrame=c.sframe,e.hspId="Query_"+b+"_hit_"+a.number+"_hsp_"+c.number,d.push(e)}),d.hitId=a.id,d.hitDef="Query_"+b+"_hit_"+a.number,d.hitEvalue=a.evalue,c.push(d)}),c}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupClick",value:function(a){$("a",a).click(function(a){a.preventDefault(),a.stopPropagation(),window.location.hash=$(this).attr("href")})}},{key:"graphControls",value:function(a,b,c,d,e){var f,h,i,j,k=20,l=function(){f=e.length,h=a.find(".ghit > g").length},m=function(a,b){b.append($("<button/>").addClass("btn btn-link more").attr("type","button").attr("data-parent-query",a.attr("id")).html("View More ").append($("<i/>").html(" ").addClass("fa fa-angle-double-down")),$("<button/>").addClass("btn btn-link less").attr("type","button").attr("data-parent-query",a.attr("id")).html("View Less ").append($("<i/>").html(" ").addClass("fa fa-angle-double-up"))),i=$(".less",b),j=$(".more",b)},n=function(){l(),f===k||h<k?(i.hide(),j.hide()):h===f?(j.hide(),i.show()):h===k?(i.hide(),j.show()):(i.show(),j.show())};c===!0&&(m(a,b),n()),j.on("click",g.bind(function(c){l(),this.graphIt(a,b,h,k,d,e),n(),this.setupTooltip(),c.stopPropagation()},this)),i.on("click",g.bind(function(c){l();var f=h-k;f>=k?(this.graphIt(a,b,h,-k,d,e),n()):0!==f&&(this.graphIt(a,b,h,k-h,d,e),n()),this.setupTooltip(),c.stopPropagation()},this))}},{key:"drawLegend",value:function(a,b,c,d,e){var f=a.append("g").attr("transform","translate(0,"+(d-1.88*b.margin)+")");f.append("rect").attr("x",7*(c-2*b.margin)/10).attr("width",2*(c-4*b.margin)/10).attr("height",b.legend).attr("fill","url(#legend-grad)"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",6*(c-2*b.margin)/10-b.margin/2).text("Weaker hits"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",9*(c-2*b.margin)/10+b.margin/2).text("Stronger hits"),a.append("linearGradient").attr("id","legend-grad").selectAll("stop").data([{offset:"0%",color:"#ccc"},{offset:"50%",color:"#888"},{offset:"100%",color:"#000"}]).enter().append("stop").attr("offset",function(a){return a.offset}).attr("stop-color",function(a){return a.color})}},{key:"graphIt",value:function(a,b,d,e,g,h){var i={barHeight:2,barPadding:1,legend:5,margin:20},j=$.extend(i,g),k=h.slice(0,d+e);if(k.length<1)return!1;0!==d&&b.find("svg").remove();var l=a.data().queryLen,m=a.attr("id"),n=b.width(),o=k.length*(j.barHeight+j.barPadding)+2*j.legend+5*j.margin,p={blastn:"nucleic_acid",blastp:"amino_acid",blastx:"nucleic_acid",tblastx:"nucleic_acid",tblastn:"amino_acid"},q=f.select(b[0]).selectAll("svg").data([k]).enter().insert("svg",":first-child").attr("width",n).attr("height",o).append("g").attr("transform","translate("+j.margin/2+", "+1.5*j.margin+")"),r=f.scale.linear().range([0,n-j.margin]);r.domain([1,l]);var s=a.data().algorithm,t=c.tick_formatter(r,p[s]),u=r.ticks(11);u.pop();var v=f.svg.axis().scale(r).orient("top").tickValues(u.concat([1,l])).tickFormat(t),w=q.append("g").attr("transform","translate(0, "+j.margin+")").append("g").attr("class","x axis").call(v);w.selectAll("text").attr("x","25px").attr("y","2px").attr("transform","rotate(-90)");var x=f.scale.ordinal().rangeBands([0,o-3*j.margin-2*j.legend],.3);x.domain(k.map(function(a){return a.hitId}));var y=f.scale.log().domain([f.min([1e-5,f.min(k.map(function(a){if(0!==parseFloat(a.hitEvalue))return a.hitEvalue}))]),f.max(k.map(function(a){return a.hitEvalue}))]).range([40,150]);q.append("g").attr("class","ghit").attr("transform","translate(0, "+1.65*(j.margin-j.legend)+")").selectAll(".hits").data(k).enter().append("g").each(function(a,b){f.select(this).selectAll(".hsp").data(a).enter().append("a").each(function(d,e){var g=x(a.hitId)+j.barHeight/2,h=f.rgb(y(d.hspEvalue),y(d.hspEvalue),y(d.hspEvalue));e+1<a.length&&(a[e].hspEnd<=a[e+1].hspStart?f.select(this.parentNode).append("line").attr("x1",r(a[e].hspEnd)).attr("y1",g).attr("x2",r(a[e+1].hspStart)).attr("y2",g).attr("stroke",h):a[e].hspStart>a[e+1].hspEnd&&f.select(this.parentNode).append("line").attr("x1",r(a[e+1].hspEnd)).attr("y1",g).attr("x2",r(a[e].hspStart)).attr("y2",g).attr("stroke",h)),f.select(this).attr("xlink:href","#"+m+"_hit_"+(b+1)).append("rect").attr("data-toggle","tooltip").attr("title",a.hitId+"<br><strong>E value:</strong> "+c.prettify_evalue(d.hspEvalue)).attr("class","bar").attr("x",function(a){return r(a.hspStart)}).attr("y",x(a.hitId)).attr("width",function(a){return r(a.hspEnd-a.hspStart+1)}).attr("height",j.barHeight).attr("fill",f.rgb(h))})}),k.length>1&&this.drawLegend(q,j,n,o,h),0===d&&this.graphControls(a,b,!0,g,h),this.setupTooltip(),this.setupClick(b)}}]),a}(),i=b(h),a("default",i)}}}),c.register("15",["10","11","12","13","e","f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,d){e(this,a),this.query=d.query,this._seq_type=c.get_seq_type(d.algorithm),this.svg_container=b,this._margin={top:30,right:25,bottom:55,left:12.5},this.initiate(b.width(),b.height())}return d(a,null,[{key:"name",value:function(){return"Length distribution of hits"}},{key:"className",value:function(){return"length-distribution"}},{key:"collapseId",value:function(a){return"length_"+a.query.number}},{key:"dataName",value:function(a){return"length-distribution-"+a.query.id}}]),d(a,[{key:"initiate",value:function(a,b){this._width=a-this._margin.left-this._margin.right,this._height=b-this._margin.top-this._margin.bottom,this.svg=f.select(this.svg_container[0]).insert("svg",":first-child").attr("width",this._width+this._margin.right+this._margin.left).attr("height",this._height+this._margin.top+this._margin.bottom).append("g").attr("transform","translate("+this._margin.left+","+this._margin.top+")"),this.hit_lengths(),this.define_scale_and_bins(),this.update_data(),this.draw()}},{key:"draw",value:function(){this.draw_rectangles(),this.draw_query_line(),this.draw_axes(),this.setupTooltip()}},{key:"define_scale_and_bins",value:function(){this._scale_x=f.scale.linear().domain([0,1.05*f.max([this.query.length,f.max(this._data)])]).range([0,this._width]),this._bins=f.layout.histogram().range(this._scale_x.domain()).bins(this._scale_x.ticks(50))(this._data),this._scale_y=f.scale.linear().domain([0,f.max(this._bins,function(a){return a.length})]).range([this._height,0])}},{key:"hit_lengths",value:function(){this._data=g.map(this.query.hits,g.iteratee("length"))}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupResponsiveness",value:function(){var a=$(window).width();console.log("cureent "+a);var b=g.debounce(g.bind(function(){a!=$(window).width()&&(console.log("redraw initiated "+this._height),this.draw(),a=$(window).width())},this),125);$(window).resize(b)}},{key:"tick_formatter",value:function(a){var b=this._scale_x.ticks(),c=f.format(".1f"),d=f.formatPrefix(b[b.length-1]),e={amino_acid:"aa",nucleic_acid:"bp"};return function(f){if(0!==f)return g.indexOf(b,f)>=0?"aa"==e[a]?f+" "+e[a]:c(d.scale(f))+" "+d.symbol+e[a]:void 0}}},{key:"update_data",value:function(){var a=this,b=[];this._bins.map(function(d){var e=[];d.reverse();var f=d.length;d.map(function(b,h){var i=d.length-(h+1),j=g.findIndex(a.query.hits,{length:b}),k={value:b,id:a.query.hits[j].id,evalue:a.query.hits[j].evalue,url:"#Query_"+a.query.number+"_hit_"+a.query.hits[j].number,y0:f,y1:f+=i-f,color:c.get_colors_for_evalue(a.query.hits[j].evalue,a.query.hits)};e.push(k)});var h={data:e,x:d.x,dx:d.dx,length:d.length};b.push(h)}),this._update_data=b}},{key:"draw_rectangles",value:function(){var a=this,b=this.svg.selectAll(".bar").data(this._update_data).enter().append("g").attr("class","g").attr("transform",function(b){return"translate("+(a._scale_x(b.x)+a._margin.left)+",0)"});b.selectAll("rect").data(function(a){return a.data}).enter().append("a").attr("xlink:href",function(a){return a.url}).append("rect").attr("class","bar").attr("data-toggle","tooltip").attr("title",function(a){return a.id+" <br>E Value: "+c.prettify_evalue(a.evalue)+"<br>Length: "+a.value}).attr("x",1).attr("y",function(b){return a._scale_y(b.y0)}).attr("width",a._scale_x(this._bins[1].x)-a._scale_x(this._bins[0].x)-1).attr("height",function(b){return a._scale_y(b.y1)-a._scale_y(b.y0)}).attr("fill",function(a){return a.color})}},{key:"draw_query_line",value:function(){var a=this.svg.append("g").attr("class","query_line").attr("transform","translate("+(this._margin.left+this._scale_x(this.query.length))+",0)");a.append("rect").attr("x",1).attr("class","bar").attr("width",4).attr("height",this._height).style("fill","rgb(95,122,183)"),a.append("text").attr("dy","0.75em").attr("y",-10).attr("x",2).attr("text-anchor","start").text("Query").style("fill","#000").attr("transform","rotate(-45)")}},{key:"draw_axes",value:function(){var a,b;b=this._scale_y.ticks().length,a=b>=8?8:b;var c=this.tick_formatter(this._seq_type.subject_seq_type),d=f.svg.axis().scale(this._scale_x).orient("bottom").ticks(50).tickFormat(c),e=f.svg.axis().scale(this._scale_y).orient("left").tickValues(this._scale_y.ticks(a)).tickFormat(function(a){if(Math.floor(a)==a)return a}),h=this._scale_y.ticks();for(var i in h)if(h[i]%1!=0){e.tickValues(f.range(0,f.max(this._bins,function(a){return a.length})+1));break}var j=this,k=this.svg.append("g").attr("class","axis axis--x").attr("transform","translate("+this._margin.left+","+this._height+")").call(d);k.selectAll("line").attr("y2",function(a){var b=j._scale_x.ticks();return g.indexOf(b,a)>=0?7:4}),k.selectAll("text").style("text-anchor","end").attr("x","-8px").attr("y","3px").attr("dy","0").attr("transform","rotate(-90)");this.svg.append("g").attr("class","axis axis--y").attr("transform","translate("+this._margin.left+",0)").call(e)}}]),a}(),i=b(h),a("default",i)}}}),c.registerDynamic("16",[],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"d3",null);return function(a){"format global";"exports d3";!function(){function a(a){return a&&(a.ownerDocument||a.document||a).documentElement}function b(a){return a&&(a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView)}function c(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function d(a){return null===a?NaN:+a}function e(a){return!isNaN(a)}function g(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function h(a){return a.length}function i(a){for(var b=1;a*b%1;)b*=10;return b}function j(a,b){for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}function k(){this._=Object.create(null)}function l(a){return(a+="")===ng||a[0]===og?og+a:a}function m(a){return(a+="")[0]===og?a.slice(1):a}function n(a){return l(a)in this._}function o(a){return(a=l(a))in this._&&delete this._[a]}function p(){var a=[];for(var b in this._)a.push(m(b));return a}function q(){var a=0;for(var b in this._)++a;return a}function r(){for(var a in this._)return!1;return!0}function s(){this._=Object.create(null)}function t(a){return a}function u(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function v(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var c=0,d=pg.length;c<d;++c){var e=pg[c]+b;if(e in a)return e}}function w(){}function x(){}function y(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],d=new k;return b.on=function(b,e){var f,g=d.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),d.remove(b)),e&&c.push(d.set(b,{on:e})),a)},b}function z(){cg.event.preventDefault()}function A(){for(var a,b=cg.event;a=b.sourceEvent;)b=a;return b}function B(a){for(var b=new x,c=0,d=arguments.length;++c<d;)b[arguments[c]]=y(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=cg.event;e.target=a,
|
4
|
+
return a.dispatch.mouseout(b,c,d)})}}(this),this.renderBlock=function(a,b,c,d){var e,f;return f=d.outerRadius-d.innerRadius,e=a.selectAll(".block").data(b).enter().append("g").attr("class","block").attr("transform",function(a){return"rotate("+360*c.blocks[a.key].start/(2*Math.PI)+")"}),d.backgrounds&&e.selectAll(".background").data(d.backgrounds).enter().append("path").attr("class","background").attr("fill",function(a){return a.color}).attr("opacity",function(a){return a.opacity||1}).attr("d",d3.svg.arc().innerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.start:d.innerRadius+f*a.start}).outerRadius(function(a){return"in"===d.direction?d.outerRadius-f*a.end:d.innerRadius+f*a.end}).startAngle(function(a,b,c){return 0}).endAngle(function(a,d,e){return c.blocks[b[e].key].end-c.blocks[b[e].key].start})),e},this.renderAxes=function(a,b,c,d){var e,f,g;return"pixel"===b.axes.minor.spacingType&&(e=function(){var a,c,d,e,f;for(f=[],g=a=c=b.innerRadius,d=b.outerRadius,e=b.axes.minor.spacing;e>0?a<=d:a>=d;g=a+=e)f.push(g);return f}()),f=d3.svg.arc().innerRadius(function(a){return a}).outerRadius(function(a){return a}).startAngle(0).endAngle(function(a,b,e){var f;return f=c.blocks[d[e].key],f.end-f.start}),a.selectAll(".axis").data(e).enter().append("path").attr("opacity",b.opacity).attr("class","axis").attr("d",f).attr("stroke-width",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.thickness:b.axes.minor.thickness}).attr("stroke",function(a,c){return c%b.axes.major.spacing===0?b.axes.major.color:b.axes.minor.color})},this.theta=function(a,b){return a/b.len*(b.end-b.start)},this.x=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.cos(e)}}(this),this.y=function(a){return function(b,c,d){var e,f,g;return f=a.ratio(b.value,d.cmin,d.cmax,d.outerRadius-d.innerRadius,!1,d.logscale),g="in"===d.direction?d.outerRadius-f:d.innerRadius+f,e=a.theta(b.position,c.blocks[b.block_id])-Math.PI/2,g*Math.sin(e)}}(this),this.ratio=function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))},this},e.renderLayout=function(a,b,c){var d,f,g,h;if(f=c._layout.conf,b.select(".cs-layout").remove(),h=b.append("g").attr("class","cs-layout").attr("z-index",f.zIndex).on("click",f.onClick),d=h.selectAll("g").data(c._layout.data).enter().append("g").attr("class",function(a){return a.id}).attr("opacity",f.opacity),g=a.svg.arc().innerRadius(f.innerRadius).outerRadius(f.outerRadius).cornerRadius(f.cornerRadius).startAngle(function(a){return a.start}).endAngle(function(a){return a.end}),d.append("path").attr("d",g).attr("fill",function(a){return a.color}).attr("id",function(a){return a.id}),f.labels.display&&e.renderLayoutLabels(f,a,d),f.ticks.display)return e.renderLayoutTicks(f,h,a,c)},e.renderLayoutLabels=function(a,b,c){var d,e,f;return f=a.innerRadius+a.labels.radialOffset,e=b.svg.arc().innerRadius(f).outerRadius(f).startAngle(function(a,b){return a.start}).endAngle(function(a,b){return a.end}),c.append("path").attr("fill","none").attr("stroke","none").attr("d",e).attr("id",function(a){return"arc-label"+a.id}),d=c.append("text").attr("font-size",a.labels.size).attr("text-anchor","middle"),d.append("textPath").attr("startOffset","25%").attr("xlink:href",function(a){return"#arc-label"+a.id}).style("fill",a.labels.color).text(function(a){var b=a.end-a.start;return a.label.slice(0,Math.floor(21*b))+".."})},e.renderLayoutTicks=function(a,b,c,d){var e,f,g;return e=function(b){var d,e;d=(b.end-b.start)/b.len,b.end-b.start>1.57?e=8:b.end-b.start>.785?e=4:b.end-b.start>.3925?e=2:b.end-b.start>0&&(e=0);var f=[],g={angle:0*d+b.start,label:0};f.push(g);var h=c.scale.linear().domain([1,b.len]).range([b.start,b.end]),i=h.ticks(e).length;h.ticks(e).map(function(c,e){var g=(c*d+b.start,b.len*d+b.start,{angle:c*d+b.start,label:c/a.ticks.labelDenominator+a.ticks.labelSuffix});f.push(g)}),f.splice(i,1);var g={angle:b.len*d+b.start-.006,label:b.len/a.ticks.labelDenominator+a.ticks.labelSuffix};return f.push(g),f},f=function(b,c){return a.ticks.labels===!1?null:a.ticks.labelDisplay0===!1&&0===c?null:c%a.ticks.labelSpacing?null:0===c?b/a.ticks.labelDenominator:b/a.ticks.labelDenominator+a.ticks.labelSuffix},g=b.append("g").selectAll("g").data(d._layout.data).enter().append("g").selectAll("g").data(e).enter().append("g").attr("transform",function(b){return"rotate("+(180*b.angle/Math.PI-90)+")translate("+a.outerRadius+",0)"}),g.append("line").attr("x1",0).attr("y1",1).attr("x2",function(b,c){return a.ticks.size.major}).attr("y2",1).style("stroke",a.ticks.color),g.append("text").attr("x",8).attr("dy",".35em").attr("transform",function(a){return a.angle>Math.PI?"rotate(180)translate(-16)":null}).attr("text-anchor",function(a){return a.angle>Math.PI?"end":null}).attr("font-size",a.ticks.labelSize).style("fill",a.ticks.labelColor).text(function(a){return a.label})},e.Core.prototype.render=function(a,b){var c,d,g,h,i,j,k,l,m,n;if("undefined"==typeof a&&(h=!0,a=[]),b){d=this.tracks;for(l in d){k=d[l];for(c in k)j=k[c],i.select("."+c).remove()}}i=d3.select(this.conf.container).attr("width",this.conf.width).attr("height",this.conf.height),n=i.select(".all"),n.empty()&&(n=i.append("g").attr("class","all").attr("transform","translate("+parseInt(this.conf.width/2)+","+parseInt(this.conf.height/2)+")")),g=this.tracks;for(l in g){k=g[l];for(c in k)j=k[c],(h||f.call(a,c)>=0)&&j.render(this,n,c)}return(h||f.call(a,"layout")>=0)&&e.renderLayout(d3,n,this),m=i.selectAll(".all > g").remove(),m[0].sort(function(a,b){return parseInt(a.getAttribute("z-index"))<parseInt(b.getAttribute("z-index"))?-1:parseInt(a.getAttribute("z-index"))>parseInt(b.getAttribute("z-index"))?1:0}),i.select(".all").selectAll("g").data(m[0]).enter().append(function(a){return a}),this},e.Core.prototype.defaultConf={width:700,height:700,container:"circos",defaultTrackWidth:10},e.Layout.prototype.defaultConf={innerRadius:250,outerRadius:300,cornerRadius:5,gap:.04,opacity:1,labels:{position:"center",display:!0,size:14,color:"#000",radialOffset:20},ticks:{display:!0,color:"grey",spacing:1e7,labels:!0,labelSpacing:10,labelSuffix:"Mb",labelDenominator:1e6,labelDisplay0:!0,labelSize:10,labelColor:"#000",labelFont:"default",majorSpacing:5,size:{minor:2,major:5}},onClick:null,onMouseOver:null,zIndex:100},e.axes={display:!1,minor:{spacing:5,spacingType:"pixel",color:"#d3d3d3",thickness:2},major:{spacing:5,color:"#000000",thickness:2}},e.Heatmap.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",colorPalette:"YlGnBu",colorPaletteSize:9,colorPaletteReverse:!1,logScale:!1,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Histogram.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",colorPaletteSize:9,colorPalette:"YlGnBu",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",logScale:!1,axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Chord.prototype.defaultConf={colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",opacity:.7,min:"smart",max:"smart",logScale:!1,rules:[],backgrounds:[],zIndex:1,tooltipContent:null},e.Scatter.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,glyph:{color:"#fd6a62",fill:!0,size:15,shape:"circle",strokeColor:"#d3d3d3",strokeWidth:2},axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Line.prototype.defaultConf={innerRadius:0,outerRadius:0,min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",fill:!0,fill_color:"#d3d3d3",thickness:2,max_gap:1e7,interpolation:"linear",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Stack.prototype.defaultConf={innerRadius:0,outerRadius:0,colorPaletteSize:9,colorPalette:"PuBuGn",usePalette:!0,colorPaletteReverse:!1,color:"#fd6a62",min:"smart",max:"smart",direction:"out",logScale:!1,color:"#fd6a62",thickness:10,radialMargin:2,margin:2,strokeWidth:1,strokeColor:"#000000",axes:e.axes,rules:[],backgrounds:[],zIndex:1,opacity:1,tooltipContent:null},e.Highlight.prototype.defaultConf={innerRadius:0,outerRadius:0,defaultColor:"#fd6a62",opacity:.5,rules:[],zIndex:101,strokeColor:"#d3d3d3",strokeWidth:0,tooltipContent:null},e.Text.prototype.defaultConf={innerRadius:0,outerRadius:0,rules:[],backgrounds:[],zIndex:1,style:{},tooltipContent:null},e.registerTooltip=function(a,b,c,d){return b.tip=d3.tip().direction("s").offset([20,0]).html(d.tooltipContent),c.call(b.tip),b.dispatch.on("mouseover",function(a,c,d){return b.tip.attr("class","d3-tip appear").show(a)}),b.dispatch.on("mouseout",function(a,c,d){return b.tip.attr("class","d3-tip").show(a),b.tip.hide()})}}),c.registerDynamic("c",["b"],!0,function(a,b,c){this||self;c.exports=a("b")}),c.register("d",["10","11","12","13","e","f","c"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default}],execute:function(){i=function(){function a(b,d){e(this,a),this.queries=d.queries,this.svgContainer=b,this.seq_type=c.get_seq_type(d.program),this.initiate()}return d(a,null,[{key:"name",value:function(){return"Circos"}},{key:"className",value:function(){return"circos-distribution collapse"}},{key:"collapseId",value:function(a){return"circos-collapse"}},{key:"dataName",value:function(a){return"Circos-visualisation"}}]),d(a,[{key:"initiate",value:function(){this.width=this.svgContainer.width(),this.height=600,this.innerRadius=200,this.outerRadius=230,this.query_arr=[],this.hit_arr=[],this.layout_arr=[],this.chords_arr=[],this.hsp_count=50,this.denominator=100,this.spacing=20,this.labelSpacing=10;var a={amino_acid:"aa",nucleic_acid:"bp"};this.construct_layout(),this.iterator_for_edits(),this.hit_arr=g.uniq(this.hit_arr),this.handle_spacing();var b=f.formatPrefix(this.max_length);this.suffix=" "+b.symbol+a[this.seq_type.subject_seq_type],"k"==b.symbol?this.denominator=1e3:"M"==b.symbol?(this.denominator=1e6,this.spacing=1e6,this.labelSpacing=2e5):"g"==b.symbol&&(this.denominator=1e9),f.select(this.svgContainer[0]).insert("svg",":first-child").attr("class","circosContainer"),this.create_instance(this.svgContainer,this.width,this.height),this.chords_arr.length&&this.layout_arr.length?this.instance_render():this.render_error(),this.setupTooltip()}},{key:"iterator_for_edits",value:function(){this.max_length=this.calculate_max_length(),this.hit_arr.length>10&&this.complex_layout_edits()}},{key:"construct_layout",value:function(){var a=0,b=32,c=this.queries.length,d=Math.min(b/2,c),e=(b-d)/d;this.new_layout=[],this.data=g.map(this.queries,g.bind(function(b){if(a<d){var c=b.id,f=b.length,h={len:f,color:"#8dd3c7",label:c,id:"Query_"+this.clean_id(b.id),ori_id:c};this.layout_arr.push(h);g.map(b.hits,g.bind(function(a){if(a.number<e){g.map(a.hsps,g.bind(function(c){if(g.indexOf(this.hit_arr,a.id)==-1){var d=a.id,e=a.length;this.hit_arr.push(a.id);var f={len:e,color:"#80b1d3",label:d,id:"Hit_"+this.clean_id(a.id),ori_id:d};this.layout_arr.push(f)}var h=["Query_"+this.clean_id(b.id),c.qstart,c.qend,"Hit_"+this.clean_id(a.id),c.sstart,c.send,a.number,c];return this.chords_arr.push(h),c},this));return a}},this))}return this.query_arr.push(b.id),b},this))}},{key:"rearrange_new_layout",value:function(){g.each(this.new_layout,g.bind(function(a){var b=a.id.slice(0,3);"Que"==b&&this.layout_arr.push(a)},this)),g.each(this.new_layout,g.bind(function(a){var b=a.id.slice(0,3);"Hit"==b&&this.layout_arr.push(a)},this))}},{key:"complex_layout_edits",value:function(){this.delete_from_layout=[],this.delete_from_chords=[],g.each(this.layout_arr,g.bind(function(a,b){var c=(a.len/this.max_length).toFixed(3);a.label;c<.1&&"Que"!=a.id.slice(0,3)&&(this.delete_from_layout.push(a),this.hit_arr.slice(g.indexOf(this.hit_arr,a.label),1))},this))}},{key:"check_in_chords_arr",value:function(a,b,c){var d=0;g.each(this.chords_arr,g.bind(function(c){"Que"==b&&c[0]!=a&&d++},this)),d==this.chords_arr.length&&(console.log("no record found "+a),this.delete_arr.push(c))}},{key:"find_index_of_hit",value:function(a){var b;return g.each(this.queries,g.bind(function(c){g.each(c.hits,g.bind(function(c){var d="Hit_"+this.clean_id(c.id);a==d&&(b=c.id)},this))},this)),g.indexOf(this.layout_arr,b)}},{key:"edit_labels",value:function(){console.log("label edits"),g.each(this.layout_arr,g.bind(function(a){var b=(a.len/this.max_length).toFixed(3),c=a.label;b<.41?a.label="..":c.length>10?a.label=c.slice(0,2)+"...":a.label=a.ori_id},this))}},{key:"calculate_multipliers",value:function(){var a=0,b=0;g.each(this.query_arr,g.bind(function(b){g.each(this.data,g.bind(function(c){b==c.id&&(a+=c.length)},this))},this)),g.each(this.data,g.bind(function(a){g.each(a.hits,g.bind(function(a){var c=g.indexOf(this.hit_arr,a.id);c>=0&&(b+=a.length)},this))},this));var c=(a+b)/2;console.log("mid sum "+c+" hit_sum "+b+" query_sum "+a),this.query_multiplier=(c/a).toFixed(3),this.hit_multiplier=(c/b).toFixed(3),console.log("query "+this.query_multiplier+" hit "+this.hit_multiplier)}},{key:"handle_spacing",value:function(){this.max_length>16e3?this.spacing=200:this.max_length>12e3?this.spacing=150:this.max_length>8e3?this.spacing=100:this.max_length>4e3?this.spacing=75:this.max_length>1800&&(this.spacing=50)}},{key:"calculate_max_length",value:function(){var a=0;return g.each(this.layout_arr,function(b){a<b.len&&(a=b.len)}),a}},{key:"clean_id",value:function(a){return a.replace(/[^a-zA-Z0-9]/g,"")}},{key:"create_instance",value:function(a,b,c){this.instance=new h({container:".circosContainer",width:b,height:c}),this.chord_layout(),this.instance_layout()}},{key:"chord_layout",value:function(){return this.chords_arr.length>32?this.paletteSize=32:this.paletteSize=this.chords_arr.length,{usePalette:!0,colorPaletteSize:this.paletteSize,colorPalette:"RdYlBu",opacity:.85}}},{key:"instance_layout",value:function(){return{innerRadius:this.innerRadius,outerRadius:this.outerRadius,cornerRadius:1,labels:{display:!0,size:"10px",radialOffset:10},ticks:{display:!0,spacing:this.spacing,labelSpacing:this.labelSpacing,labelDenominator:this.denominator,labelSuffix:this.suffix,labelSize:"10px",majorSpacing:this.labelSpacing,size:{minor:0,major:4}}}}},{key:"instance_render",value:function(){this.instance.layout(this.instance_layout(),this.layout_arr),this.instance.chord("chord1",this.chord_layout(),this.chords_arr),this.instance.render()}},{key:"render_error",value:function(){this.svgContainer.find("svg").remove(),this.svg=f.select(this.svgContainer[0]).insert("svg",":first-child").attr("width",this.svgContainer.width()).attr("height",this.svgContainer.height()).append("g").attr("class","circos-error").attr("transform","translate("+this.svgContainer.width()/2+","+this.svgContainer.height()/2+")").append("text").attr("text-anchor","start").attr("dy","-0.25em").attr("x",-175).style("font-size","14px").text("Circos looks great with less than 16 queries")}},{key:"layoutReset",value:function(){this.layoutHide=[],g.each(this.layout_arr,function(a){$("."+a.id).css("opacity",1)})}},{key:"chordsReset",value:function(){this.chordsHide=[],g.each(this.chords_arr,function(a){var b=a[1]+a[2],c=a[4]+a[5];$("#"+a[0]+"_"+b+"_"+a[3]+"_"+c).show()})}},{key:"chordsCheck",value:function(a,b){g.each(this.chords_arr,g.bind(function(c,d){"Que"==b&&c[0]==a&&(this.chordsHide.push(d),this.layoutHide.push(c[3])),"Hit"==b&&c[3]==a&&(this.chordsHide.push(d),this.layoutHide.push(c[0]))},this))}},{key:"chordsClean",value:function(){g.each(this.chords_arr,g.bind(function(a,b){if(g.indexOf(this.chordsHide,b)==-1){var c=a[1]+a[2],d=a[4]+a[5];$("#"+a[0]+"_"+c+"_"+a[3]+"_"+d).hide()}},this))}},{key:"layoutClean",value:function(){g.each(this.layout_arr,g.bind(function(a,b){g.indexOf(this.layoutHide,a.id)==-1&&$("."+a.id).css("opacity",.1)},this))}},{key:"setupTooltip",value:function(){var a={};$(".circos-distribution").on("click",g.bind(function(b){b.stopPropagation(),this.layoutReset(),this.chordsReset(),a={}},this)),g.each(this.query_arr,g.bind(function(b,c){this.chordsHide=[],this.layoutHide=[],b&&$(".circos-distribution .Query_"+this.clean_id(b)).attr("data-toggle","tooltip").attr("title",b).on("click",g.bind(function(d){if(d.stopPropagation(),a[c]!=b){a[c]=b;var e="Query_"+this.clean_id(b);this.layoutHide.push(e),this.chordsCheck(e,"Que"),this.chordsClean(),this.layoutClean()}else a[c]=0,this.layoutReset(),this.chordsReset()},this))},this)),g.each(this.hit_arr,g.bind(function(b,c){this.chordsHide=[],this.layoutHide=[],b&&$(".circos-distribution .Hit_"+this.clean_id(b)).attr("data-toggle","tooltip").attr("title",b).on("click",g.bind(function(d){if(d.stopPropagation(),a[c]!=b){a[c]=b;var e="Hit_"+this.clean_id(b);this.layoutHide.push(e),this.chordsCheck(e,"Hit"),this.chordsClean(),this.layoutClean()}else a[c]=0,this.layoutReset(),this.chordsReset()},this))},this)),$('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"ratioCalculate",value:function(a,b,c,d,e,f){var g,h,i;return h=f?2.3:1,b===c||a===b&&!e||a===c&&e?0:a===c||a===b&&e?d-1:(g=(a-b)/(c-b),i=Math.exp(1/h*Math.log(g)),e&&(i=1-i),Math.floor(d*i))}},{key:"drawLegend",value:function(){this.ratioHSP=[],g.each(this.chords_arr,g.bind(function(a){var b={number:a[6],evalue:a[7].evalue};this.ratioHSP.push(b)},this));var a=f.min(this.ratioHSP,function(a){return a.number}),b=f.max(this.ratioHSP,function(a){return a.number});console.log("chords_arr "+this.chords_arr.length),console.log("ratioHSP test "+this.ratioHSP.length),console.log("paletteSize "+this.paletteSize),console.log("min "+a+" max "+b),this.legend=f.select(this.svgContainer[0]).insert("svg",":first-child").attr("height",20).attr("width",30*this.ratioHSP.length).attr("transform","translate(10, 10)").append("g").attr("class","RdYlBu").attr("transform","translate(10, 0)");this.legend.selectAll(".bar").data(this.ratioHSP).enter().append("g").attr("class","g").attr("transform",function(a,b){return"translate("+30*b+",0)"}).append("rect").attr("class",g.bind(function(c,d){var e=this.ratioCalculate(c.number,a,b,this.paletteSize,!1,!1);return console.log("calc ratio "+e),"q"+e+"-"+this.paletteSize},this)).attr("data-toggle","tooltip").attr("title",function(a){return a.evalue}).attr("x",1).attr("width",30).attr("height",20),f.scale.linear().domain([0,250]).range([0,100])}}]),a}(),j=b(i),a("default",j)}}}),c.register("14",["10","11","12","13","e","f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,c){e(this,a),this.svg_container=b,$queryDiv=b.parents(".resultn"),hits=this.extractData(c.query.hits,c.query.number),this.graphIt($queryDiv,b,0,20,null,hits)}return d(a,null,[{key:"name",value:function(){return"Matching sequences"}},{key:"className",value:function(){return"alignment-overview"}},{key:"collapseId",value:function(a){return"alignment_"+a.query.number}},{key:"dataName",value:function(a){return"Alignment-Overview-"+a.query.id}}]),d(a,[{key:"extractData",value:function(a,b){var c=[];return a.map(function(a){var d=[],e=a.hsps;g.each(e,function(c){var e={};e.hspEvalue=c.evalue,e.hspStart=c.qstart,e.hspEnd=c.qend,e.hspFrame=c.sframe,e.hspId="Query_"+b+"_hit_"+a.number+"_hsp_"+c.number,d.push(e)}),d.hitId=a.id,d.hitDef="Query_"+b+"_hit_"+a.number,d.hitEvalue=a.evalue,c.push(d)}),c}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupClick",value:function(a){$("a",a).click(function(a){a.preventDefault(),a.stopPropagation(),window.location.hash=$(this).attr("href")})}},{key:"graphControls",value:function(a,b,c,d,e){var f,h,i,j,k=20,l=function(){f=e.length,h=a.find(".ghit > g").length},m=function(a,b){b.append($("<button/>").addClass("btn btn-link more").attr("type","button").attr("data-parent-query",a.attr("id")).html("View More ").append($("<i/>").html(" ").addClass("fa fa-angle-double-down")),$("<button/>").addClass("btn btn-link less").attr("type","button").attr("data-parent-query",a.attr("id")).html("View Less ").append($("<i/>").html(" ").addClass("fa fa-angle-double-up"))),i=$(".less",b),j=$(".more",b)},n=function(){l(),f===k||h<k?(i.hide(),j.hide()):h===f?(j.hide(),i.show()):h===k?(i.hide(),j.show()):(i.show(),j.show())};c===!0&&(m(a,b),n()),j.on("click",g.bind(function(c){l(),this.graphIt(a,b,h,k,d,e),n(),this.setupTooltip(),c.stopPropagation()},this)),i.on("click",g.bind(function(c){l();var f=h-k;f>=k?(this.graphIt(a,b,h,-k,d,e),n()):0!==f&&(this.graphIt(a,b,h,k-h,d,e),n()),this.setupTooltip(),c.stopPropagation()},this))}},{key:"drawLegend",value:function(a,b,c,d,e){var f=a.append("g").attr("transform","translate(0,"+(d-1.88*b.margin)+")");f.append("rect").attr("x",7*(c-2*b.margin)/10).attr("width",2*(c-4*b.margin)/10).attr("height",b.legend).attr("fill","url(#legend-grad)"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",6*(c-2*b.margin)/10-b.margin/2).text("Weaker hits"),f.append("text").attr("class"," legend-text").attr("transform","translate(0, "+b.legend+")").attr("x",9*(c-2*b.margin)/10+b.margin/2).text("Stronger hits"),a.append("linearGradient").attr("id","legend-grad").selectAll("stop").data([{offset:"0%",color:"#ccc"},{offset:"50%",color:"#888"},{offset:"100%",color:"#000"}]).enter().append("stop").attr("offset",function(a){return a.offset}).attr("stop-color",function(a){return a.color})}},{key:"graphIt",value:function(a,b,d,e,g,h){var i={barHeight:2,barPadding:1,legend:5,margin:20},j=$.extend(i,g),k=h.slice(0,d+e);if(k.length<1)return!1;0!==d&&b.find("svg").remove();var l=a.data().queryLen,m=a.attr("id"),n=b.width(),o=k.length*(j.barHeight+j.barPadding)+2*j.legend+5*j.margin,p={blastn:"nucleic_acid",blastp:"amino_acid",blastx:"nucleic_acid",tblastx:"nucleic_acid",tblastn:"amino_acid"},q=f.select(b[0]).selectAll("svg").data([k]).enter().insert("svg",":first-child").attr("width",n).attr("height",o).append("g").attr("transform","translate("+j.margin/2+", "+1.5*j.margin+")"),r=f.scale.linear().range([0,n-j.margin]);r.domain([1,l]);var s=a.data().algorithm,t=c.tick_formatter(r,p[s]),u=r.ticks(11);u.pop();var v=f.svg.axis().scale(r).orient("top").tickValues(u.concat([1,l])).tickFormat(t),w=q.append("g").attr("transform","translate(0, "+j.margin+")").append("g").attr("class","x axis").call(v);w.selectAll("text").attr("x","25px").attr("y","2px").attr("transform","rotate(-90)");var x=f.scale.ordinal().rangeBands([0,o-3*j.margin-2*j.legend],.3);x.domain(k.map(function(a){return a.hitId}));var y=f.scale.log().domain([f.min([1e-5,f.min(k.map(function(a){if(0!==parseFloat(a.hitEvalue))return a.hitEvalue}))]),f.max(k.map(function(a){return a.hitEvalue}))]).range([40,150]);q.append("g").attr("class","ghit").attr("transform","translate(0, "+1.65*(j.margin-j.legend)+")").selectAll(".hits").data(k).enter().append("g").each(function(a,b){f.select(this).selectAll(".hsp").data(a).enter().append("a").each(function(d,e){var g=x(a.hitId)+j.barHeight/2,h=f.rgb(y(d.hspEvalue),y(d.hspEvalue),y(d.hspEvalue));e+1<a.length&&(a[e].hspEnd<=a[e+1].hspStart?f.select(this.parentNode).append("line").attr("x1",r(a[e].hspEnd)).attr("y1",g).attr("x2",r(a[e+1].hspStart)).attr("y2",g).attr("stroke",h):a[e].hspStart>a[e+1].hspEnd&&f.select(this.parentNode).append("line").attr("x1",r(a[e+1].hspEnd)).attr("y1",g).attr("x2",r(a[e].hspStart)).attr("y2",g).attr("stroke",h)),f.select(this).attr("xlink:href","#"+m+"_hit_"+(b+1)).append("rect").attr("data-toggle","tooltip").attr("title",a.hitId+"<br><strong>E value:</strong> "+c.prettify_evalue(d.hspEvalue)).attr("class","bar").attr("x",function(a){return r(a.hspStart)}).attr("y",x(a.hitId)).attr("width",function(a){return r(a.hspEnd-a.hspStart+1)}).attr("height",j.barHeight).attr("fill",f.rgb(h))})}),k.length>1&&this.drawLegend(q,j,n,o,h),0===d&&this.graphControls(a,b,!0,g,h),this.setupTooltip(),this.setupClick(b)}}]),a}(),i=b(h),a("default",i)}}}),c.register("15",["10","11","12","13","e","f"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){h=function(){function a(b,d){e(this,a),this.query=d.query,this._seq_type=c.get_seq_type(d.algorithm),this.svg_container=b,this._margin={top:30,right:25,bottom:55,left:12.5},this.initiate(b.width(),b.height())}return d(a,null,[{key:"name",value:function(){return"Length distribution of hits"}},{key:"className",value:function(){return"length-distribution"}},{key:"collapseId",value:function(a){return"length_"+a.query.number}},{key:"dataName",value:function(a){return"length-distribution-"+a.query.id}}]),d(a,[{key:"initiate",value:function(a,b){this._width=a-this._margin.left-this._margin.right,this._height=b-this._margin.top-this._margin.bottom,this.svg=f.select(this.svg_container[0]).insert("svg",":first-child").attr("width",this._width+this._margin.right+this._margin.left).attr("height",this._height+this._margin.top+this._margin.bottom).append("g").attr("transform","translate("+this._margin.left+","+this._margin.top+")"),this.hit_lengths(),this.define_scale_and_bins(),this.update_data(),this.draw()}},{key:"draw",value:function(){this.draw_rectangles(),this.draw_query_line(),this.draw_axes(),this.setupTooltip()}},{key:"define_scale_and_bins",value:function(){this._scale_x=f.scale.linear().domain([0,1.05*f.max([this.query.length,f.max(this._data)])]).range([0,this._width]),this._bins=f.layout.histogram().range(this._scale_x.domain()).bins(this._scale_x.ticks(50))(this._data),this._scale_y=f.scale.linear().domain([0,f.max(this._bins,function(a){return a.length})]).range([this._height,0])}},{key:"hit_lengths",value:function(){this._data=g.map(this.query.hits,g.iteratee("length"))}},{key:"setupTooltip",value:function(){this.svg_container.find('[data-toggle="tooltip"]').tooltip({placement:"top",container:"body",html:"true",delay:0,"white-space":"nowrap"})}},{key:"setupResponsiveness",value:function(){var a=$(window).width();console.log("cureent "+a);var b=g.debounce(g.bind(function(){a!=$(window).width()&&(console.log("redraw initiated "+this._height),this.draw(),a=$(window).width())},this),125);$(window).resize(b)}},{key:"tick_formatter",value:function(a){var b=this._scale_x.ticks(),c=f.format(".1f"),d=f.formatPrefix(b[b.length-1]),e={amino_acid:"aa",nucleic_acid:"bp"};return function(f){if(0!==f)return g.indexOf(b,f)>=0?"aa"==e[a]?f+" "+e[a]:c(d.scale(f))+" "+d.symbol+e[a]:void 0}}},{key:"update_data",value:function(){var a=this,b=[];this._bins.map(function(d){var e=[];d.reverse();var f=d.length;d.map(function(b,h){var i=d.length-(h+1),j=g.findIndex(a.query.hits,{length:b}),k={value:b,id:a.query.hits[j].id,evalue:a.query.hits[j].evalue,url:"#Query_"+a.query.number+"_hit_"+a.query.hits[j].number,y0:f,y1:f+=i-f,color:c.get_colors_for_evalue(a.query.hits[j].evalue,a.query.hits)};e.push(k)});var h={data:e,x:d.x,dx:d.dx,length:d.length};b.push(h)}),this._update_data=b}},{key:"draw_rectangles",value:function(){var a=this,b=this.svg.selectAll(".bar").data(this._update_data).enter().append("g").attr("class","g").attr("transform",function(b){return"translate("+(a._scale_x(b.x)+a._margin.left)+",0)"});b.selectAll("rect").data(function(a){return a.data}).enter().append("a").attr("xlink:href",function(a){return a.url}).append("rect").attr("class","bar").attr("data-toggle","tooltip").attr("title",function(a){return a.id+" <br>E Value: "+c.prettify_evalue(a.evalue)+"<br>Length: "+a.value}).attr("x",1).attr("y",function(b){return a._scale_y(b.y0)}).attr("width",a._scale_x(this._bins[1].x)-a._scale_x(this._bins[0].x)-1).attr("height",function(b){return a._scale_y(b.y1)-a._scale_y(b.y0)}).attr("fill",function(a){return a.color})}},{key:"draw_query_line",value:function(){var a=this.svg.append("g").attr("class","query_line").attr("transform","translate("+(this._margin.left+this._scale_x(this.query.length))+",0)");a.append("rect").attr("x",1).attr("class","bar").attr("width",4).attr("height",this._height).style("fill","rgb(95,122,183)"),a.append("text").attr("dy","0.75em").attr("y",-10).attr("x",2).attr("text-anchor","start").text("Query").style("fill","#000").attr("transform","rotate(-45)")}},{key:"draw_axes",value:function(){var a,b;b=this._scale_y.ticks().length,a=b>=8?8:b;var c=this.tick_formatter(this._seq_type.subject_seq_type),d=f.svg.axis().scale(this._scale_x).orient("bottom").ticks(50).tickFormat(c),e=f.svg.axis().scale(this._scale_y).orient("left").tickValues(this._scale_y.ticks(a)).tickFormat(function(a){if(Math.floor(a)==a)return a}),h=this._scale_y.ticks();for(var i in h)if(h[i]%1!=0){e.tickValues(f.range(0,f.max(this._bins,function(a){return a.length})+1));break}var j=this,k=this.svg.append("g").attr("class","axis axis--x").attr("transform","translate("+this._margin.left+","+this._height+")").call(d);k.selectAll("line").attr("y2",function(a){var b=j._scale_x.ticks();return g.indexOf(b,a)>=0?7:4}),k.selectAll("text").style("text-anchor","end").attr("x","-8px").attr("y","3px").attr("dy","0").attr("transform","rotate(-90)");this.svg.append("g").attr("class","axis axis--y").attr("transform","translate("+this._margin.left+",0)").call(e)}}]),a}(),i=b(h),a("default",i)}}}),c.registerDynamic("16",[],!1,function(a,b,d){var e=c.get("@@global-helpers").prepareGlobal(d.id,"d3",null);return function(a){"format global";"exports d3";!function(){function a(a){return a&&(a.ownerDocument||a.document||a).documentElement}function b(a){return a&&(a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView)}function c(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function d(a){return null===a?NaN:+a}function e(a){return!isNaN(a)}function g(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function h(a){return a.length}function i(a){for(var b=1;a*b%1;)b*=10;return b}function j(a,b){for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}function k(){this._=Object.create(null)}function l(a){return(a+="")===ng||a[0]===og?og+a:a}function m(a){return(a+="")[0]===og?a.slice(1):a}function n(a){return l(a)in this._}function o(a){return(a=l(a))in this._&&delete this._[a]}function p(){var a=[];for(var b in this._)a.push(m(b));return a}function q(){var a=0;for(var b in this._)++a;return a}function r(){for(var a in this._)return!1;return!0}function s(){this._=Object.create(null)}function t(a){return a}function u(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function v(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var c=0,d=pg.length;c<d;++c){var e=pg[c]+b;if(e in a)return e}}function w(){}function x(){}function y(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],d=new k;return b.on=function(b,e){var f,g=d.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),d.remove(b)),e&&c.push(d.set(b,{on:e})),a)},b}function z(){cg.event.preventDefault()}function A(){for(var a,b=cg.event;a=b.sourceEvent;)b=a;return b}function B(a){for(var b=new x,c=0,d=arguments.length;++c<d;)b[arguments[c]]=y(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=cg.event;e.target=a,
|
5
5
|
cg.event=e,b[e.type].apply(c,d)}finally{cg.event=f}}},b}function C(a){return rg(a,vg),a}function D(a){return"function"==typeof a?a:function(){return sg(a,this)}}function E(a){return"function"==typeof a?a:function(){return tg(a,this)}}function F(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}return a=cg.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function G(a){return a.trim().replace(/\s+/g," ")}function H(a){return new RegExp("(?:^|\\s+)"+cg.requote(a)+"(?:\\s+|$)","g")}function I(a){return(a+"").trim().split(/^|\s+/)}function J(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=I(a).map(K);var e=a.length;return"function"==typeof b?d:c}function K(a){var b=H(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.getAttribute("class")||"";d?(b.lastIndex=0,b.test(e)||c.setAttribute("class",G(e+" "+a))):c.setAttribute("class",G(e.replace(b," ")))}}function L(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function M(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function N(a){function b(){var b=this.ownerDocument,c=this.namespaceURI;return c?b.createElementNS(c,a):b.createElement(a)}function c(){return this.ownerDocument.createElementNS(a.space,a.local)}return"function"==typeof a?a:(a=cg.ns.qualify(a)).local?c:b}function O(){var a=this.parentNode;a&&a.removeChild(this)}function P(a){return{__data__:a}}function Q(a){return function(){return ug(this,a)}}function R(a){return arguments.length||(a=c),function(b,c){return b&&c?a(b.__data__,c.__data__):!b-!c}}function S(a,b){for(var c=0,d=a.length;c<d;c++)for(var e,f=a[c],g=0,h=f.length;g<h;g++)(e=f[g])&&b(e,g,c);return a}function T(a){return rg(a,xg),a}function U(a){var b,c;return function(d,e,f){var g,h=a[f].update,i=h.length;for(f!=c&&(c=f,b=0),e>=b&&(b=e+1);!(g=h[b])&&++b<i;);return g}}function V(a,b,c){function d(){var b=this[g];b&&(this.removeEventListener(a,b,b.$),delete this[g])}function e(){var e=i(b,eg(arguments));d.call(this),this.addEventListener(a,this[g]=e,e.$=c),e._=b}function f(){var b,c=new RegExp("^__on([^.]+)"+cg.requote(a)+"$");for(var d in this)if(b=d.match(c)){var e=this[d];this.removeEventListener(b[1],e,e.$),delete this[d]}}var g="__on"+a,h=a.indexOf("."),i=W;h>0&&(a=a.slice(0,h));var j=yg.get(a);return j&&(a=j,i=X),h?b?e:d:b?w:f}function W(a,b){return function(c){var d=cg.event;cg.event=c,b[0]=this.__data__;try{a.apply(this,b)}finally{cg.event=d}}}function X(a,b){var c=W(a,b);return function(a){var b=this,d=a.relatedTarget;d&&(d===b||8&d.compareDocumentPosition(b))||c.call(b,a)}}function Y(c){var d=".dragsuppress-"+ ++Ag,e="click"+d,f=cg.select(b(c)).on("touchmove"+d,z).on("dragstart"+d,z).on("selectstart"+d,z);if(null==zg&&(zg=!("onselectstart"in c)&&v(c.style,"userSelect")),zg){var g=a(c).style,h=g[zg];g[zg]="none"}return function(a){if(f.on(d,null),zg&&(g[zg]=h),a){var b=function(){f.on(e,null)};f.on(e,function(){z(),b()},!0),setTimeout(b,0)}}}function Z(a,c){c.changedTouches&&(c=c.changedTouches[0]);var d=a.ownerSVGElement||a;if(d.createSVGPoint){var e=d.createSVGPoint();if(Bg<0){var f=b(a);if(f.scrollX||f.scrollY){d=cg.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var g=d[0][0].getScreenCTM();Bg=!(g.f||g.e),d.remove()}}return Bg?(e.x=c.pageX,e.y=c.pageY):(e.x=c.clientX,e.y=c.clientY),e=e.matrixTransform(a.getScreenCTM().inverse()),[e.x,e.y]}var h=a.getBoundingClientRect();return[c.clientX-h.left-a.clientLeft,c.clientY-h.top-a.clientTop]}function $(){return cg.event.changedTouches[0].identifier}function _(a){return a>0?1:a<0?-1:0}function aa(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])}function ba(a){return a>1?0:a<-1?Eg:Math.acos(a)}function ca(a){return a>1?Hg:a<-1?-Hg:Math.asin(a)}function da(a){return((a=Math.exp(a))-1/a)/2}function ea(a){return((a=Math.exp(a))+1/a)/2}function fa(a){return((a=Math.exp(2*a))-1)/(a+1)}function ga(a){return(a=Math.sin(a/2))*a}function ha(){}function ia(a,b,c){return this instanceof ia?(this.h=+a,this.s=+b,void(this.l=+c)):arguments.length<2?a instanceof ia?new ia(a.h,a.s,a.l):wa(""+a,xa,ia):new ia(a,b,c)}function ja(a,b,c){function d(a){return a>360?a-=360:a<0&&(a+=360),a<60?f+(g-f)*a/60:a<180?g:a<240?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a=isNaN(a)?0:(a%=360)<0?a+360:a,b=isNaN(b)?0:b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,g=c<=.5?c*(1+b):c+b-c*b,f=2*c-g,new sa(e(a+120),e(a),e(a-120))}function ka(a,b,c){return this instanceof ka?(this.h=+a,this.c=+b,void(this.l=+c)):arguments.length<2?a instanceof ka?new ka(a.h,a.c,a.l):a instanceof ma?oa(a.l,a.a,a.b):oa((a=ya((a=cg.rgb(a)).r,a.g,a.b)).l,a.a,a.b):new ka(a,b,c)}function la(a,b,c){return isNaN(a)&&(a=0),isNaN(b)&&(b=0),new ma(c,Math.cos(a*=Ig)*b,Math.sin(a)*b)}function ma(a,b,c){return this instanceof ma?(this.l=+a,this.a=+b,void(this.b=+c)):arguments.length<2?a instanceof ma?new ma(a.l,a.a,a.b):a instanceof ka?la(a.h,a.c,a.l):ya((a=sa(a)).r,a.g,a.b):new ma(a,b,c)}function na(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=pa(e)*Tg,d=pa(d)*Ug,f=pa(f)*Vg,new sa(ra(3.2404542*e-1.5371385*d-.4985314*f),ra(-.969266*e+1.8760108*d+.041556*f),ra(.0556434*e-.2040259*d+1.0572252*f))}function oa(a,b,c){return a>0?new ka(Math.atan2(c,b)*Jg,Math.sqrt(b*b+c*c),a):new ka(NaN,NaN,a)}function pa(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function qa(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ra(a){return Math.round(255*(a<=.00304?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function sa(a,b,c){return this instanceof sa?(this.r=~~a,this.g=~~b,void(this.b=~~c)):arguments.length<2?a instanceof sa?new sa(a.r,a.g,a.b):wa(""+a,sa,ja):new sa(a,b,c)}function ta(a){return new sa(a>>16,a>>8&255,255&a)}function ua(a){return ta(a)+""}function va(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function wa(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/.exec(a=a.toLowerCase()))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(Aa(e[0]),Aa(e[1]),Aa(e[2]))}return(f=Yg.get(a))?b(f.r,f.g,f.b):(null==a||"#"!==a.charAt(0)||isNaN(f=parseInt(a.slice(1),16))||(4===a.length?(g=(3840&f)>>4,g|=g>>4,h=240&f,h|=h>>4,i=15&f,i|=i<<4):7===a.length&&(g=(16711680&f)>>16,h=(65280&f)>>8,i=255&f)),b(g,h,i))}function xa(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=i<.5?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(b<c?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):(d=NaN,e=i>0&&i<1?0:d),new ia(d,e,i)}function ya(a,b,c){a=za(a),b=za(b),c=za(c);var d=qa((.4124564*a+.3575761*b+.1804375*c)/Tg),e=qa((.2126729*a+.7151522*b+.072175*c)/Ug),f=qa((.0193339*a+.119192*b+.9503041*c)/Vg);return ma(116*e-16,500*(d-e),200*(e-f))}function za(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Aa(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Ba(a){return"function"==typeof a?a:function(){return a}}function Ca(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=null),Da(b,c,a,d)}}function Da(a,b,c,d){function e(){var a,b=i.status;if(!b&&Fa(i)||b>=200&&b<300||304===b){try{a=c.call(f,i)}catch(a){return void g.error.call(f,a)}g.load.call(f,a)}else g.error.call(f,i)}var f={},g=cg.dispatch("beforesend","progress","load","error"),h={},i=new XMLHttpRequest,j=null;return!this.XDomainRequest||"withCredentials"in i||!/^(http(s)?:)?\/\//.test(a)||(i=new XDomainRequest),"onload"in i?i.onload=i.onerror=e:i.onreadystatechange=function(){i.readyState>3&&e()},i.onprogress=function(a){var b=cg.event;cg.event=a;try{g.progress.call(f,i)}finally{cg.event=b}},f.header=function(a,b){return a=(a+"").toLowerCase(),arguments.length<2?h[a]:(null==b?delete h[a]:h[a]=b+"",f)},f.mimeType=function(a){return arguments.length?(b=null==a?null:a+"",f):b},f.responseType=function(a){return arguments.length?(j=a,f):j},f.response=function(a){return c=a,f},["get","post"].forEach(function(a){f[a]=function(){return f.send.apply(f,[a].concat(eg(arguments)))}}),f.send=function(c,d,e){if(2===arguments.length&&"function"==typeof d&&(e=d,d=null),i.open(c,a,!0),null==b||"accept"in h||(h.accept=b+",*/*"),i.setRequestHeader)for(var k in h)i.setRequestHeader(k,h[k]);return null!=b&&i.overrideMimeType&&i.overrideMimeType(b),null!=j&&(i.responseType=j),null!=e&&f.on("error",e).on("load",function(a){e(null,a)}),g.beforesend.call(f,i),i.send(null==d?null:d),f},f.abort=function(){return i.abort(),f},cg.rebind(f,g,"on"),null==d?f:f.get(Ea(d))}function Ea(a){return 1===a.length?function(b,c){a(null==b?c:null)}:a}function Fa(a){var b=a.responseType;return b&&"text"!==b?a.response:a.responseText}function Ga(){var a=Ha(),b=Ia()-a;b>24?(isFinite(b)&&(clearTimeout(ah),ah=setTimeout(Ga,b)),_g=0):(_g=1,ch(Ga))}function Ha(){var a=Date.now();for(bh=Zg;bh;)a>=bh.t&&(bh.f=bh.c(a-bh.t)),bh=bh.n;return a}function Ia(){for(var a,b=Zg,c=1/0;b;)b.f?b=a?a.n=b.n:Zg=b.n:(b.t<c&&(c=b.t),b=(a=b).n);return $g=a,c}function Ja(a,b){return b-(a?Math.ceil(Math.log(a)/Math.LN10):1)}function Ka(a,b){var c=Math.pow(10,3*mg(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function La(a){var b=a.decimal,c=a.thousands,d=a.grouping,e=a.currency,f=d&&c?function(a,b){for(var e=a.length,f=[],g=0,h=d[0],i=0;e>0&&h>0&&(i+h+1>b&&(h=Math.max(1,b-i)),f.push(a.substring(e-=h,e+h)),!((i+=h+1)>b));)h=d[g=(g+1)%d.length];return f.reverse().join(c)}:t;return function(a){var c=eh.exec(a),d=c[1]||" ",g=c[2]||">",h=c[3]||"-",i=c[4]||"",j=c[5],k=+c[6],l=c[7],m=c[8],n=c[9],o=1,p="",q="",r=!1,s=!0;switch(m&&(m=+m.substring(1)),(j||"0"===d&&"="===g)&&(j=d="0",g="="),n){case"n":l=!0,n="g";break;case"%":o=100,q="%",n="f";break;case"p":o=100,q="%",n="r";break;case"b":case"o":case"x":case"X":"#"===i&&(p="0"+n.toLowerCase());case"c":s=!1;case"d":r=!0,m=0;break;case"s":o=-1,n="r"}"$"===i&&(p=e[0],q=e[1]),"r"!=n||m||(n="g"),null!=m&&("g"==n?m=Math.max(1,Math.min(21,m)):"e"!=n&&"f"!=n||(m=Math.max(0,Math.min(20,m)))),n=fh.get(n)||Ma;var t=j&&l;return function(a){var c=q;if(r&&a%1)return"";var e=a<0||0===a&&1/a<0?(a=-a,"-"):"-"===h?"":h;if(o<0){var i=cg.formatPrefix(a,m);a=i.scale(a),c=i.symbol+q}else a*=o;a=n(a,m);var u,v,w=a.lastIndexOf(".");if(w<0){var x=s?a.lastIndexOf("e"):-1;x<0?(u=a,v=""):(u=a.substring(0,x),v=a.substring(x))}else u=a.substring(0,w),v=b+a.substring(w+1);!j&&l&&(u=f(u,1/0));var y=p.length+u.length+v.length+(t?0:e.length),z=y<k?new Array(y=k-y+1).join(d):"";return t&&(u=f(z+u,z.length?k-v.length:1/0)),e+=p,a=u+v,("<"===g?e+a+z:">"===g?z+e+a:"^"===g?z.substring(0,y>>=1)+e+a+z.substring(y):e+(t?a:z+a))+c}}}function Ma(a){return a+""}function Na(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Oa(a,b,c){function d(b){var c=a(b),d=f(c,1);return b-c<d-b?c:d}function e(c){return b(c=a(new hh(c-1)),1),c}function f(a,c){return b(a=new hh(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;g<d;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;g<d;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{hh=Na;var d=new Na;return d._=a,g(d,b,c)}finally{hh=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Pa(a);return i.floor=i,i.round=Pa(d),i.ceil=Pa(e),i.offset=Pa(f),i.range=h,a}function Pa(a){return function(b,c){try{hh=Na;var d=new Na;return d._=b,a(d,c)._}finally{hh=Date}}}function Qa(a){function b(a){function b(b){for(var c,e,f,g=[],h=-1,i=0;++h<d;)37===a.charCodeAt(h)&&(g.push(a.slice(i,h)),null!=(e=jh[c=a.charAt(++h)])&&(c=a.charAt(++h)),(f=C[c])&&(c=f(b,null==e?"e"===c?" ":"0":e)),g.push(c),i=h+1);return g.push(a.slice(i,h)),g.join("")}var d=a.length;return b.parse=function(b){var d={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},e=c(d,a,b,0);if(e!=b.length)return null;"p"in d&&(d.H=d.H%12+12*d.p);var f=null!=d.Z&&hh!==Na,g=new(f?Na:hh);return"j"in d?g.setFullYear(d.y,0,d.j):"w"in d&&("W"in d||"U"in d)?(g.setFullYear(d.y,0,1),g.setFullYear(d.y,0,"W"in d?(d.w+6)%7+7*d.W-(g.getDay()+5)%7:d.w+7*d.U-(g.getDay()+6)%7)):g.setFullYear(d.y,d.m,d.d),g.setHours(d.H+(d.Z/100|0),d.M+d.Z%100,d.S,d.L),f?g._:g},b.toString=function(){return a},b}function c(a,b,c,d){for(var e,f,g,h=0,i=b.length,j=c.length;h<i;){if(d>=j)return-1;if(e=b.charCodeAt(h++),37===e){if(g=b.charAt(h++),f=D[g in jh?b.charAt(h++):g],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function d(a,b,c){w.lastIndex=0;var d=w.exec(b.slice(c));return d?(a.w=x.get(d[0].toLowerCase()),c+d[0].length):-1}function e(a,b,c){u.lastIndex=0;var d=u.exec(b.slice(c));return d?(a.w=v.get(d[0].toLowerCase()),c+d[0].length):-1}function f(a,b,c){A.lastIndex=0;var d=A.exec(b.slice(c));return d?(a.m=B.get(d[0].toLowerCase()),c+d[0].length):-1}function g(a,b,c){y.lastIndex=0;var d=y.exec(b.slice(c));return d?(a.m=z.get(d[0].toLowerCase()),c+d[0].length):-1}function h(a,b,d){return c(a,C.c.toString(),b,d)}function i(a,b,d){return c(a,C.x.toString(),b,d)}function j(a,b,d){return c(a,C.X.toString(),b,d)}function k(a,b,c){var d=t.get(b.slice(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}var l=a.dateTime,m=a.date,n=a.time,o=a.periods,p=a.days,q=a.shortDays,r=a.months,s=a.shortMonths;b.utc=function(a){function c(a){try{hh=Na;var b=new hh;return b._=a,d(b)}finally{hh=Date}}var d=b(a);return c.parse=function(a){try{hh=Na;var b=d.parse(a);return b&&b._}finally{hh=Date}},c.toString=d.toString,c},b.multi=b.utc.multi=ib;var t=cg.map(),u=Sa(p),v=Ta(p),w=Sa(q),x=Ta(q),y=Sa(r),z=Ta(r),A=Sa(s),B=Ta(s);o.forEach(function(a,b){t.set(a.toLowerCase(),b)});var C={a:function(a){return q[a.getDay()]},A:function(a){return p[a.getDay()]},b:function(a){return s[a.getMonth()]},B:function(a){return r[a.getMonth()]},c:b(l),d:function(a,b){return Ra(a.getDate(),b,2)},e:function(a,b){return Ra(a.getDate(),b,2)},H:function(a,b){return Ra(a.getHours(),b,2)},I:function(a,b){return Ra(a.getHours()%12||12,b,2)},j:function(a,b){return Ra(1+gh.dayOfYear(a),b,3)},L:function(a,b){return Ra(a.getMilliseconds(),b,3)},m:function(a,b){return Ra(a.getMonth()+1,b,2)},M:function(a,b){return Ra(a.getMinutes(),b,2)},p:function(a){return o[+(a.getHours()>=12)]},S:function(a,b){return Ra(a.getSeconds(),b,2)},U:function(a,b){return Ra(gh.sundayOfYear(a),b,2)},w:function(a){return a.getDay()},W:function(a,b){return Ra(gh.mondayOfYear(a),b,2)},x:b(m),X:b(n),y:function(a,b){return Ra(a.getFullYear()%100,b,2)},Y:function(a,b){return Ra(a.getFullYear()%1e4,b,4)},Z:gb,"%":function(){return"%"}},D={a:d,A:e,b:f,B:g,c:h,d:ab,e:ab,H:cb,I:cb,j:bb,L:fb,m:_a,M:db,p:k,S:eb,U:Va,w:Ua,W:Wa,x:i,X:j,y:Ya,Y:Xa,Z:Za,"%":hb};return b}function Ra(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f<c?new Array(c-f+1).join(b)+e:e)}function Sa(a){return new RegExp("^(?:"+a.map(cg.requote).join("|")+")","i")}function Ta(a){for(var b=new k,c=-1,d=a.length;++c<d;)b.set(a[c].toLowerCase(),c);return b}function Ua(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function Va(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.U=+d[0],c+d[0].length):-1}function Wa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c));return d?(a.W=+d[0],c+d[0].length):-1}function Xa(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function Ya(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.y=$a(+d[0]),c+d[0].length):-1}function Za(a,b,c){return/^[+-]\d{4}$/.test(b=b.slice(c,c+5))?(a.Z=-b,c+5):-1}function $a(a){return a+(a>68?1900:2e3)}function _a(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function ab(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function bb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.j=+d[0],c+d[0].length):-1}function cb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function db(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function eb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function fb(a,b,c){kh.lastIndex=0;var d=kh.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function gb(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=mg(b)/60|0,e=mg(b)%60;return c+Ra(d,"0",2)+Ra(e,"0",2)}function hb(a,b,c){lh.lastIndex=0;var d=lh.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function ib(a){for(var b=a.length,c=-1;++c<b;)a[c][0]=this(a[c][0]);return function(b){for(var c=0,d=a[c];!d[1](b);)d=a[++c];return d[0](b)}}function jb(){}function kb(a,b,c){var d=c.s=a+b,e=d-a,f=d-e;c.t=a-f+(b-e)}function lb(a,b){a&&ph.hasOwnProperty(a.type)&&ph[a.type](a,b)}function mb(a,b,c){var d,e=-1,f=a.length-c;for(b.lineStart();++e<f;)d=a[e],b.point(d[0],d[1],d[2]);b.lineEnd()}function nb(a,b){var c=-1,d=a.length;for(b.polygonStart();++c<d;)mb(a[c],b,1);b.polygonEnd()}function ob(){function a(a,b){a*=Ig,b=b*Ig/2+Eg/4;var c=a-d,g=c>=0?1:-1,h=g*c,i=Math.cos(b),j=Math.sin(b),k=f*j,l=e*i+k*Math.cos(h),m=k*g*Math.sin(h);rh.add(Math.atan2(m,l)),d=a,e=i,f=j}var b,c,d,e,f;sh.point=function(g,h){sh.point=a,d=(b=g)*Ig,e=Math.cos(h=(c=h)*Ig/2+Eg/4),f=Math.sin(h)},sh.lineEnd=function(){a(b,c)}}function pb(a){var b=a[0],c=a[1],d=Math.cos(c);return[d*Math.cos(b),d*Math.sin(b),Math.sin(c)]}function qb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function rb(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function sb(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function tb(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function ub(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function vb(a){return[Math.atan2(a[1],a[0]),ca(a[2])]}function wb(a,b){return mg(a[0]-b[0])<Cg&&mg(a[1]-b[1])<Cg}function xb(a,b){a*=Ig;var c=Math.cos(b*=Ig);yb(c*Math.cos(a),c*Math.sin(a),Math.sin(b))}function yb(a,b,c){++th,vh+=(a-vh)/th,wh+=(b-wh)/th,xh+=(c-xh)/th}function zb(){function a(a,e){a*=Ig;var f=Math.cos(e*=Ig),g=f*Math.cos(a),h=f*Math.sin(a),i=Math.sin(e),j=Math.atan2(Math.sqrt((j=c*i-d*h)*j+(j=d*g-b*i)*j+(j=b*h-c*g)*j),b*g+c*h+d*i);uh+=j,yh+=j*(b+(b=g)),zh+=j*(c+(c=h)),Ah+=j*(d+(d=i)),yb(b,c,d)}var b,c,d;Eh.point=function(e,f){e*=Ig;var g=Math.cos(f*=Ig);b=g*Math.cos(e),c=g*Math.sin(e),d=Math.sin(f),Eh.point=a,yb(b,c,d)}}function Ab(){Eh.point=xb}function Bb(){function a(a,b){a*=Ig;var c=Math.cos(b*=Ig),g=c*Math.cos(a),h=c*Math.sin(a),i=Math.sin(b),j=e*i-f*h,k=f*g-d*i,l=d*h-e*g,m=Math.sqrt(j*j+k*k+l*l),n=d*g+e*h+f*i,o=m&&-ba(n)/m,p=Math.atan2(m,n);Bh+=o*j,Ch+=o*k,Dh+=o*l,uh+=p,yh+=p*(d+(d=g)),zh+=p*(e+(e=h)),Ah+=p*(f+(f=i)),yb(d,e,f)}var b,c,d,e,f;Eh.point=function(g,h){b=g,c=h,Eh.point=a,g*=Ig;var i=Math.cos(h*=Ig);d=i*Math.cos(g),e=i*Math.sin(g),f=Math.sin(h),yb(d,e,f)},Eh.lineEnd=function(){a(b,c),Eh.lineEnd=Ab,Eh.point=xb}}function Cb(a,b){function c(c,d){return c=a(c,d),b(c[0],c[1])}return a.invert&&b.invert&&(c.invert=function(c,d){return c=b.invert(c,d),c&&a.invert(c[0],c[1])}),c}function Db(){return!0}function Eb(a,b,c,d,e){var f=[],g=[];if(a.forEach(function(a){if(!((b=a.length-1)<=0)){var b,c=a[0],d=a[b];if(wb(c,d)){e.lineStart();for(var h=0;h<b;++h)e.point((c=a[h])[0],c[1]);return void e.lineEnd()}var i=new Gb(c,a,null,!0),j=new Gb(c,null,i,!1);i.o=j,f.push(i),g.push(j),i=new Gb(d,a,null,!1),j=new Gb(d,null,i,!0),i.o=j,f.push(i),g.push(j)}}),g.sort(b),Fb(f),Fb(g),f.length){for(var h=0,i=c,j=g.length;h<j;++h)g[h].e=i=!i;for(var k,l,m=f[0];;){for(var n=m,o=!0;n.v;)if((n=n.n)===m)return;k=n.z,e.lineStart();do{if(n.v=n.o.v=!0,n.e){if(o)for(var h=0,j=k.length;h<j;++h)e.point((l=k[h])[0],l[1]);else d(n.x,n.n.x,1,e);n=n.n}else{if(o){k=n.p.z;for(var h=k.length-1;h>=0;--h)e.point((l=k[h])[0],l[1])}else d(n.x,n.p.x,-1,e);n=n.p}n=n.o,k=n.z,o=!o}while(!n.v);e.lineEnd()}}}function Fb(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d<b;)e.n=c=a[d],c.p=e,e=c;e.n=c=a[0],c.p=e}}function Gb(a,b,c,d){this.x=a,this.z=b,this.o=c,this.e=d,this.v=!1,this.n=this.p=null}function Hb(a,b,c,d){return function(e,f){function g(b,c){var d=e(b,c);a(b=d[0],c=d[1])&&f.point(b,c)}function h(a,b){var c=e(a,b);q.point(c[0],c[1])}function i(){s.point=h,q.lineStart()}function j(){s.point=g,q.lineEnd()}function k(a,b){p.push([a,b]);var c=e(a,b);u.point(c[0],c[1])}function l(){u.lineStart(),p=[]}function m(){k(p[0][0],p[0][1]),u.lineEnd();var a,b=u.clean(),c=t.buffer(),d=c.length;if(p.pop(),o.push(p),p=null,d)if(1&b){a=c[0];var e,d=a.length-1,g=-1;if(d>0){for(v||(f.polygonStart(),v=!0),f.lineStart();++g<d;)f.point((e=a[g])[0],e[1]);f.lineEnd()}}else d>1&&2&b&&c.push(c.pop().concat(c.shift())),n.push(c.filter(Ib))}var n,o,p,q=b(f),r=e.invert(d[0],d[1]),s={point:g,lineStart:i,lineEnd:j,polygonStart:function(){s.point=k,s.lineStart=l,s.lineEnd=m,n=[],o=[]},polygonEnd:function(){s.point=g,s.lineStart=i,s.lineEnd=j,n=cg.merge(n);var a=Ob(r,o);n.length?(v||(f.polygonStart(),v=!0),Eb(n,Kb,a,c,f)):a&&(v||(f.polygonStart(),v=!0),f.lineStart(),c(null,null,1,f),f.lineEnd()),v&&(f.polygonEnd(),v=!1),n=o=null},sphere:function(){f.polygonStart(),f.lineStart(),c(null,null,1,f),f.lineEnd(),f.polygonEnd()}},t=Jb(),u=b(t),v=!1;return s}}function Ib(a){return a.length>1}function Jb(){var a,b=[];return{lineStart:function(){b.push(a=[])},point:function(b,c){a.push([b,c])},lineEnd:w,buffer:function(){var c=b;return b=[],a=null,c},rejoin:function(){b.length>1&&b.push(b.pop().concat(b.shift()))}}}function Kb(a,b){return((a=a.x)[0]<0?a[1]-Hg-Cg:Hg-a[1])-((b=b.x)[0]<0?b[1]-Hg-Cg:Hg-b[1])}function Lb(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Eg:-Eg,i=mg(f-c);mg(i-Eg)<Cg?(a.point(c,d=(d+g)/2>0?Hg:-Hg),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Eg&&(mg(c-e)<Cg&&(c-=e*Cg),mg(f-h)<Cg&&(f-=h*Cg),d=Mb(c,d,f,g),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),b=0),a.point(c=f,d=g),e=h},lineEnd:function(){a.lineEnd(),c=d=NaN},clean:function(){return 2-b}}}function Mb(a,b,c,d){var e,f,g=Math.sin(a-c);return mg(g)>Cg?Math.atan((Math.sin(b)*(f=Math.cos(d))*Math.sin(c)-Math.sin(d)*(e=Math.cos(b))*Math.sin(a))/(e*f*g)):(b+d)/2}function Nb(a,b,c,d){var e;if(null==a)e=c*Hg,d.point(-Eg,e),d.point(0,e),d.point(Eg,e),d.point(Eg,0),d.point(Eg,-e),d.point(0,-e),d.point(-Eg,-e),d.point(-Eg,0),d.point(-Eg,e);else if(mg(a[0]-b[0])>Cg){var f=a[0]<b[0]?Eg:-Eg;e=c*f/2,d.point(-f,e),d.point(0,e),d.point(f,e)}else d.point(b[0],b[1])}function Ob(a,b){var c=a[0],d=a[1],e=[Math.sin(c),-Math.cos(c),0],f=0,g=0;rh.reset();for(var h=0,i=b.length;h<i;++h){var j=b[h],k=j.length;if(k)for(var l=j[0],m=l[0],n=l[1]/2+Eg/4,o=Math.sin(n),p=Math.cos(n),q=1;;){q===k&&(q=0),a=j[q];var r=a[0],s=a[1]/2+Eg/4,t=Math.sin(s),u=Math.cos(s),v=r-m,w=v>=0?1:-1,x=w*v,y=x>Eg,z=o*t;if(rh.add(Math.atan2(z*w*Math.sin(x),p*u+z*Math.cos(x))),f+=y?v+w*Fg:v,y^m>=c^r>=c){var A=rb(pb(l),pb(a));ub(A);var B=rb(e,A);ub(B);var C=(y^v>=0?-1:1)*ca(B[2]);(d>C||d===C&&(A[0]||A[1]))&&(g+=y^v>=0?1:-1)}if(!q++)break;m=r,o=t,p=u,l=a}}return(f<-Cg||f<Cg&&rh<0)^1&g}function Pb(a){function b(a,b){return Math.cos(a)*Math.cos(b)>f}function c(a){var c,f,i,j,k;return{lineStart:function(){j=i=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=g?p?0:e(l,m):p?e(l+(l<0?Eg:-Eg),m):0;if(!c&&(j=i=p)&&a.lineStart(),p!==i&&(n=d(c,o),(wb(c,n)||wb(o,n))&&(o[0]+=Cg,o[1]+=Cg,p=b(o[0],o[1]))),p!==i)k=0,p?(a.lineStart(),n=d(o,c),a.point(n[0],n[1])):(n=d(c,o),a.point(n[0],n[1]),a.lineEnd()),c=n;else if(h&&c&&g^p){var r;q&f||!(r=d(o,c,!0))||(k=0,g?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||c&&wb(c,o)||a.point(o[0],o[1]),c=o,i=p,f=q},lineEnd:function(){i&&a.lineEnd(),c=null},clean:function(){return k|(j&&i)<<1}}}function d(a,b,c){var d=pb(a),e=pb(b),g=[1,0,0],h=rb(d,e),i=qb(h,h),j=h[0],k=i-j*j;if(!k)return!c&&a;var l=f*i/k,m=-f*j/k,n=rb(g,h),o=tb(g,l),p=tb(h,m);sb(o,p);var q=n,r=qb(o,q),s=qb(q,q),t=r*r-s*(qb(o,o)-1);if(!(t<0)){var u=Math.sqrt(t),v=tb(q,(-r-u)/s);if(sb(v,o),v=vb(v),!c)return v;var w,x=a[0],y=b[0],z=a[1],A=b[1];y<x&&(w=x,x=y,y=w);var B=y-x,C=mg(B-Eg)<Cg,D=C||B<Cg;if(!C&&A<z&&(w=z,z=A,A=w),D?C?z+A>0^v[1]<(mg(v[0]-x)<Cg?z:A):z<=v[1]&&v[1]<=A:B>Eg^(x<=v[0]&&v[0]<=y)){var E=tb(q,(-r+u)/s);return sb(E,o),[v,vb(E)]}}}function e(b,c){var d=g?a:Eg-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var f=Math.cos(a),g=f>0,h=mg(f)>Cg,i=oc(a,6*Ig);return Hb(b,c,i,g?[0,-a]:[-Eg,a-Eg])}function Qb(a,b,c,d){return function(e){var f,g=e.a,h=e.b,i=g.x,j=g.y,k=h.x,l=h.y,m=0,n=1,o=k-i,p=l-j;if(f=a-i,o||!(f>0)){if(f/=o,o<0){if(f<m)return;f<n&&(n=f)}else if(o>0){if(f>n)return;f>m&&(m=f)}if(f=c-i,o||!(f<0)){if(f/=o,o<0){if(f>n)return;f>m&&(m=f)}else if(o>0){if(f<m)return;f<n&&(n=f)}if(f=b-j,p||!(f>0)){if(f/=p,p<0){if(f<m)return;f<n&&(n=f)}else if(p>0){if(f>n)return;f>m&&(m=f)}if(f=d-j,p||!(f<0)){if(f/=p,p<0){if(f>n)return;f>m&&(m=f)}else if(p>0){if(f<m)return;f<n&&(n=f)}return m>0&&(e.a={x:i+m*o,y:j+m*p}),n<1&&(e.b={x:i+n*o,y:j+n*p}),e}}}}}}function Rb(a,b,c,d){function e(d,e){return mg(d[0]-a)<Cg?e>0?0:3:mg(d[0]-c)<Cg?e>0?2:1:mg(d[1]-b)<Cg?e>0?1:0:e>0?3:2}function f(a,b){return g(a.x,b.x)}function g(a,b){var c=e(a,1),d=e(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}return function(h){function i(a){for(var b=0,c=q.length,d=a[1],e=0;e<c;++e)for(var f,g=1,h=q[e],i=h.length,j=h[0];g<i;++g)f=h[g],j[1]<=d?f[1]>d&&aa(j,f,a)>0&&++b:f[1]<=d&&aa(j,f,a)<0&&--b,j=f;return 0!==b}function j(f,h,i,j){var k=0,l=0;if(null==f||(k=e(f,i))!==(l=e(h,i))||g(f,h)<0^i>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+i+4)%4)!==l)}else j.point(h[0],h[1])}function k(e,f){return a<=e&&e<=c&&b<=f&&f<=d}function l(a,b){k(a,b)&&h.point(a,b)}function m(){D.point=o,q&&q.push(r=[]),y=!0,x=!1,v=w=NaN}function n(){p&&(o(s,t),u&&x&&B.rejoin(),p.push(B.buffer())),D.point=l,x&&h.lineEnd()}function o(a,b){a=Math.max(-Gh,Math.min(Gh,a)),b=Math.max(-Gh,Math.min(Gh,b));var c=k(a,b);if(q&&r.push([a,b]),y)s=a,t=b,u=c,y=!1,c&&(h.lineStart(),h.point(a,b));else if(c&&x)h.point(a,b);else{var d={a:{x:v,y:w},b:{x:a,y:b}};C(d)?(x||(h.lineStart(),h.point(d.a.x,d.a.y)),h.point(d.b.x,d.b.y),c||h.lineEnd(),z=!1):c&&(h.lineStart(),h.point(a,b),z=!1)}v=a,w=b,x=c}var p,q,r,s,t,u,v,w,x,y,z,A=h,B=Jb(),C=Qb(a,b,c,d),D={point:l,lineStart:m,lineEnd:n,polygonStart:function(){h=B,p=[],q=[],z=!0},polygonEnd:function(){h=A,p=cg.merge(p);var b=i([a,d]),c=z&&b,e=p.length;(c||e)&&(h.polygonStart(),c&&(h.lineStart(),j(null,null,1,h),h.lineEnd()),e&&Eb(p,f,b,j,h),h.polygonEnd()),p=q=r=null}};return D}}function Sb(a){var b=0,c=Eg/3,d=gc(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Eg/180,c=a[1]*Eg/180):[b/Eg*180,c/Eg*180]},e}function Tb(a,b){function c(a,b){var c=Math.sqrt(f-2*e*Math.sin(b))/e;return[c*Math.sin(a*=e),g-c*Math.cos(a)]}var d=Math.sin(a),e=(d+Math.sin(b))/2,f=1+d*(2*e-d),g=Math.sqrt(f)/e;return c.invert=function(a,b){var c=g-b;return[Math.atan2(a,c)/e,ca((f-(a*a+c*c)*e*e)/(2*e))]},c}function Ub(){function a(a,b){Ih+=e*a-d*b,d=a,e=b}var b,c,d,e;Nh.point=function(f,g){Nh.point=a,b=d=f,c=e=g},Nh.lineEnd=function(){a(b,c)}}function Vb(a,b){a<Jh&&(Jh=a),a>Lh&&(Lh=a),b<Kh&&(Kh=b),b>Mh&&(Mh=b)}function Wb(){function a(a,b){g.push("M",a,",",b,f)}function b(a,b){g.push("M",a,",",b),h.point=c}function c(a,b){g.push("L",a,",",b)}function d(){h.point=a}function e(){g.push("Z")}var f=Xb(4.5),g=[],h={point:a,lineStart:function(){h.point=b},lineEnd:d,polygonStart:function(){h.lineEnd=e},polygonEnd:function(){h.lineEnd=d,h.point=a},pointRadius:function(a){return f=Xb(a),h},result:function(){if(g.length){var a=g.join("");return g=[],a}}};return h}function Xb(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Yb(a,b){vh+=a,wh+=b,++xh}function Zb(){function a(a,d){var e=a-b,f=d-c,g=Math.sqrt(e*e+f*f);yh+=g*(b+a)/2,zh+=g*(c+d)/2,Ah+=g,Yb(b=a,c=d)}var b,c;Ph.point=function(d,e){Ph.point=a,Yb(b=d,c=e)}}function $b(){Ph.point=Yb}function _b(){function a(a,b){var c=a-d,f=b-e,g=Math.sqrt(c*c+f*f);yh+=g*(d+a)/2,zh+=g*(e+b)/2,Ah+=g,g=e*a-d*b,Bh+=g*(d+a),Ch+=g*(e+b),Dh+=3*g,Yb(d=a,e=b)}var b,c,d,e;Ph.point=function(f,g){Ph.point=a,Yb(b=d=f,c=e=g)},Ph.lineEnd=function(){a(b,c)}}function ac(a){function b(b,c){a.moveTo(b+g,c),a.arc(b,c,g,0,Fg)}function c(b,c){a.moveTo(b,c),h.point=d}function d(b,c){a.lineTo(b,c)}function e(){h.point=b}function f(){a.closePath()}var g=4.5,h={point:b,lineStart:function(){h.point=c},lineEnd:e,polygonStart:function(){h.lineEnd=f},polygonEnd:function(){h.lineEnd=e,h.point=b},pointRadius:function(a){return g=a,h},result:w};return h}function bc(a){function b(a){return(h?d:c)(a)}function c(b){return ec(b,function(c,d){c=a(c,d),b.point(c[0],c[1])})}function d(b){function c(c,d){c=a(c,d),b.point(c[0],c[1])}function d(){t=NaN,y.point=f,b.lineStart()}function f(c,d){var f=pb([c,d]),g=a(c,d);e(t,u,s,v,w,x,t=g[0],u=g[1],s=c,v=f[0],w=f[1],x=f[2],h,b),b.point(t,u)}function g(){y.point=c,b.lineEnd()}function i(){d(),y.point=j,y.lineEnd=k}function j(a,b){f(l=a,m=b),n=t,o=u,p=v,q=w,r=x,y.point=f}function k(){e(t,u,s,v,w,x,n,o,l,p,q,r,h,b),y.lineEnd=g,g()}var l,m,n,o,p,q,r,s,t,u,v,w,x,y={point:c,lineStart:d,lineEnd:g,polygonStart:function(){b.polygonStart(),y.lineStart=i},polygonEnd:function(){b.polygonEnd(),y.lineStart=d}};return y}function e(b,c,d,h,i,j,k,l,m,n,o,p,q,r){var s=k-b,t=l-c,u=s*s+t*t;if(u>4*f&&q--){var v=h+n,w=i+o,x=j+p,y=Math.sqrt(v*v+w*w+x*x),z=Math.asin(x/=y),A=mg(mg(x)-1)<Cg||mg(d-m)<Cg?(d+m)/2:Math.atan2(w,v),B=a(A,z),C=B[0],D=B[1],E=C-b,F=D-c,G=t*E-s*F;(G*G/u>f||mg((s*E+t*F)/u-.5)>.3||h*n+i*o+j*p<g)&&(e(b,c,d,h,i,j,C,D,A,v/=y,w/=y,x,q,r),r.point(C,D),e(C,D,A,v,w,x,k,l,m,n,o,p,q,r))}}var f=.5,g=Math.cos(30*Ig),h=16;return b.precision=function(a){return arguments.length?(h=(f=a*a)>0&&16,b):Math.sqrt(f)},b}function cc(a){var b=bc(function(b,c){return a([b*Jg,c*Jg])});return function(a){return hc(b(a))}}function dc(a){this.stream=a}function ec(a,b){return{point:b,sphere:function(){a.sphere()},lineStart:function(){a.lineStart()},lineEnd:function(){a.lineEnd()},polygonStart:function(){a.polygonStart()},polygonEnd:function(){a.polygonEnd()}}}function fc(a){return gc(function(){return a})()}function gc(a){function b(a){return a=h(a[0]*Ig,a[1]*Ig),[a[0]*m+i,j-a[1]*m]}function c(a){return a=h.invert((a[0]-i)/m,(j-a[1])/m),a&&[a[0]*Jg,a[1]*Jg]}function d(){h=Cb(g=kc(r,s,u),f);var a=f(p,q);return i=n-a[0]*m,j=o+a[1]*m,e()}function e(){return k&&(k.valid=!1,k=null),b}var f,g,h,i,j,k,l=bc(function(a,b){return a=f(a,b),[a[0]*m+i,j-a[1]*m]}),m=150,n=480,o=250,p=0,q=0,r=0,s=0,u=0,v=Fh,w=t,x=null,y=null;return b.stream=function(a){return k&&(k.valid=!1),k=hc(v(g,l(w(a)))),k.valid=!0,k},b.clipAngle=function(a){return arguments.length?(v=null==a?(x=a,Fh):Pb((x=+a)*Ig),e()):x},b.clipExtent=function(a){return arguments.length?(y=a,w=a?Rb(a[0][0],a[0][1],a[1][0],a[1][1]):t,e()):y},b.scale=function(a){return arguments.length?(m=+a,d()):m},b.translate=function(a){return arguments.length?(n=+a[0],o=+a[1],d()):[n,o]},b.center=function(a){return arguments.length?(p=a[0]%360*Ig,q=a[1]%360*Ig,d()):[p*Jg,q*Jg]},b.rotate=function(a){return arguments.length?(r=a[0]%360*Ig,s=a[1]%360*Ig,u=a.length>2?a[2]%360*Ig:0,d()):[r*Jg,s*Jg,u*Jg]},cg.rebind(b,l,"precision"),function(){
|
6
6
|
return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function hc(a){return ec(a,function(b,c){a.point(b*Ig,c*Ig)})}function ic(a,b){return[a,b]}function jc(a,b){return[a>Eg?a-Fg:a<-Eg?a+Fg:a,b]}function kc(a,b,c){return a?b||c?Cb(mc(a),nc(b,c)):mc(a):b||c?nc(b,c):jc}function lc(a){return function(b,c){return b+=a,[b>Eg?b-Fg:b<-Eg?b+Fg:b,c]}}function mc(a){var b=lc(a);return b.invert=lc(-a),b}function nc(a,b){function c(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*d+h*e;return[Math.atan2(i*f-k*g,h*d-j*e),ca(k*f+i*g)]}var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b);return c.invert=function(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*f-i*g;return[Math.atan2(i*f+j*g,h*d+k*e),ca(k*d-h*e)]},c}function oc(a,b){var c=Math.cos(a),d=Math.sin(a);return function(e,f,g,h){var i=g*b;null!=e?(e=pc(c,e),f=pc(c,f),(g>0?e<f:e>f)&&(e+=g*Fg)):(e=a+g*Fg,f=a-.5*i);for(var j,k=e;g>0?k>f:k<f;k-=i)h.point((j=vb([c,-d*Math.cos(k),-d*Math.sin(k)]))[0],j[1])}}function pc(a,b){var c=pb(b);c[0]-=a,ub(c);var d=ba(-c[1]);return((-c[2]<0?-d:d)+2*Math.PI-Cg)%(2*Math.PI)}function qc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[a,b]})}}function rc(a,b,c){var d=cg.range(a,b-Cg,c).concat(b);return function(a){return d.map(function(b){return[b,a]})}}function sc(a){return a.source}function tc(a){return a.target}function uc(a,b,c,d){var e=Math.cos(b),f=Math.sin(b),g=Math.cos(d),h=Math.sin(d),i=e*Math.cos(a),j=e*Math.sin(a),k=g*Math.cos(c),l=g*Math.sin(c),m=2*Math.asin(Math.sqrt(ga(d-b)+e*g*ga(c-a))),n=1/Math.sin(m),o=m?function(a){var b=Math.sin(a*=m)*n,c=Math.sin(m-a)*n,d=c*i+b*k,e=c*j+b*l,g=c*f+b*h;return[Math.atan2(e,d)*Jg,Math.atan2(g,Math.sqrt(d*d+e*e))*Jg]}:function(){return[a*Jg,b*Jg]};return o.distance=m,o}function vc(){function a(a,e){var f=Math.sin(e*=Ig),g=Math.cos(e),h=mg((a*=Ig)-b),i=Math.cos(h);Qh+=Math.atan2(Math.sqrt((h=g*Math.sin(h))*h+(h=d*f-c*g*i)*h),c*f+d*g*i),b=a,c=f,d=g}var b,c,d;Rh.point=function(e,f){b=e*Ig,c=Math.sin(f*=Ig),d=Math.cos(f),Rh.point=a},Rh.lineEnd=function(){Rh.point=Rh.lineEnd=w}}function wc(a,b){function c(b,c){var d=Math.cos(b),e=Math.cos(c),f=a(d*e);return[f*e*Math.sin(b),f*Math.sin(c)]}return c.invert=function(a,c){var d=Math.sqrt(a*a+c*c),e=b(d),f=Math.sin(e),g=Math.cos(e);return[Math.atan2(a*f,d*g),Math.asin(d&&c*f/d)]},c}function xc(a,b){function c(a,b){g>0?b<-Hg+Cg&&(b=-Hg+Cg):b>Hg-Cg&&(b=Hg-Cg);var c=g/Math.pow(e(b),f);return[c*Math.sin(f*a),g-c*Math.cos(f*a)]}var d=Math.cos(a),e=function(a){return Math.tan(Eg/4+a/2)},f=a===b?Math.sin(a):Math.log(d/Math.cos(b))/Math.log(e(b)/e(a)),g=d*Math.pow(e(a),f)/f;return f?(c.invert=function(a,b){var c=g-b,d=_(f)*Math.sqrt(a*a+c*c);return[Math.atan2(a,c)/f,2*Math.atan(Math.pow(g/d,1/f))-Hg]},c):zc}function yc(a,b){function c(a,b){var c=f-b;return[c*Math.sin(e*a),f-c*Math.cos(e*a)]}var d=Math.cos(a),e=a===b?Math.sin(a):(d-Math.cos(b))/(b-a),f=d/e+a;return mg(e)<Cg?ic:(c.invert=function(a,b){var c=f-b;return[Math.atan2(a,c)/e,f-_(e)*Math.sqrt(a*a+c*c)]},c)}function zc(a,b){return[a,Math.log(Math.tan(Eg/4+b/2))]}function Ac(a){var b,c=fc(a),d=c.scale,e=c.translate,f=c.clipExtent;return c.scale=function(){var a=d.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.translate=function(){var a=e.apply(c,arguments);return a===c?b?c.clipExtent(null):c:a},c.clipExtent=function(a){var g=f.apply(c,arguments);if(g===c){if(b=null==a){var h=Eg*d(),i=e();f([[i[0]-h,i[1]-h],[i[0]+h,i[1]+h]])}}else b&&(g=null);return g},c.clipExtent(null)}function Bc(a,b){return[Math.log(Math.tan(Eg/4+b/2)),-a]}function Cc(a){return a[0]}function Dc(a){return a[1]}function Ec(a){for(var b=a.length,c=[0,1],d=2,e=2;e<b;e++){for(;d>1&&aa(a[c[d-2]],a[c[d-1]],a[e])<=0;)--d;c[d++]=e}return c.slice(0,d)}function Fc(a,b){return a[0]-b[0]||a[1]-b[1]}function Gc(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function Hc(a,b,c,d){var e=a[0],f=c[0],g=b[0]-e,h=d[0]-f,i=a[1],j=c[1],k=b[1]-i,l=d[1]-j,m=(h*(i-j)-l*(e-f))/(l*g-h*k);return[e+m*g,i+m*k]}function Ic(a){var b=a[0],c=a[a.length-1];return!(b[0]-c[0]||b[1]-c[1])}function Jc(){cd(this),this.edge=this.site=this.circle=null}function Kc(a){var b=bi.pop()||new Jc;return b.site=a,b}function Lc(a){Vc(a),$h.remove(a),bi.push(a),cd(a)}function Mc(a){var b=a.circle,c=b.x,d=b.cy,e={x:c,y:d},f=a.P,g=a.N,h=[a];Lc(a);for(var i=f;i.circle&&mg(c-i.circle.x)<Cg&&mg(d-i.circle.cy)<Cg;)f=i.P,h.unshift(i),Lc(i),i=f;h.unshift(i),Vc(i);for(var j=g;j.circle&&mg(c-j.circle.x)<Cg&&mg(d-j.circle.cy)<Cg;)g=j.N,h.push(j),Lc(j),j=g;h.push(j),Vc(j);var k,l=h.length;for(k=1;k<l;++k)j=h[k],i=h[k-1],_c(j.edge,i.site,j.site,e);i=h[0],j=h[l-1],j.edge=Zc(i.site,j.site,null,e),Uc(i),Uc(j)}function Nc(a){for(var b,c,d,e,f=a.x,g=a.y,h=$h._;h;)if(d=Oc(h,g)-f,d>Cg)h=h.L;else{if(e=f-Pc(h,g),!(e>Cg)){d>-Cg?(b=h.P,c=h):e>-Cg?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}var i=Kc(a);if($h.insert(b,i),b||c){if(b===c)return Vc(b),c=Kc(b.site),$h.insert(i,c),i.edge=c.edge=Zc(b.site,i.site),Uc(b),void Uc(c);if(!c)return void(i.edge=Zc(b.site,i.site));Vc(b),Vc(c);var j=b.site,k=j.x,l=j.y,m=a.x-k,n=a.y-l,o=c.site,p=o.x-k,q=o.y-l,r=2*(m*q-n*p),s=m*m+n*n,t=p*p+q*q,u={x:(q*s-n*t)/r+k,y:(m*t-p*s)/r+l};_c(c.edge,j,o,u),i.edge=Zc(j,a,null,u),c.edge=Zc(a,o,null,u),Uc(b),Uc(c)}}function Oc(a,b){var c=a.site,d=c.x,e=c.y,f=e-b;if(!f)return d;var g=a.P;if(!g)return-(1/0);c=g.site;var h=c.x,i=c.y,j=i-b;if(!j)return h;var k=h-d,l=1/f-1/j,m=k/j;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*j)-i+j/2+e-f/2)))/l+d:(d+h)/2}function Pc(a,b){var c=a.N;if(c)return Oc(c,b);var d=a.site;return d.y===b?d.x:1/0}function Qc(a){this.site=a,this.edges=[]}function Rc(a){for(var b,c,d,e,f,g,h,i,j,k,l=a[0][0],m=a[1][0],n=a[0][1],o=a[1][1],p=Zh,q=p.length;q--;)if(f=p[q],f&&f.prepare())for(h=f.edges,i=h.length,g=0;g<i;)k=h[g].end(),d=k.x,e=k.y,j=h[++g%i].start(),b=j.x,c=j.y,(mg(d-b)>Cg||mg(e-c)>Cg)&&(h.splice(g,0,new ad($c(f.site,k,mg(d-l)<Cg&&o-e>Cg?{x:l,y:mg(b-l)<Cg?c:o}:mg(e-o)<Cg&&m-d>Cg?{x:mg(c-o)<Cg?b:m,y:o}:mg(d-m)<Cg&&e-n>Cg?{x:m,y:mg(b-m)<Cg?c:n}:mg(e-n)<Cg&&d-l>Cg?{x:mg(c-n)<Cg?b:l,y:n}:null),f.site,null)),++i)}function Sc(a,b){return b.angle-a.angle}function Tc(){cd(this),this.x=this.y=this.arc=this.site=this.cy=null}function Uc(a){var b=a.P,c=a.N;if(b&&c){var d=b.site,e=a.site,f=c.site;if(d!==f){var g=e.x,h=e.y,i=d.x-g,j=d.y-h,k=f.x-g,l=f.y-h,m=2*(i*l-j*k);if(!(m>=-Dg)){var n=i*i+j*j,o=k*k+l*l,p=(l*n-j*o)/m,q=(i*o-k*n)/m,l=q+h,r=ci.pop()||new Tc;r.arc=a,r.site=e,r.x=p+g,r.y=l+Math.sqrt(p*p+q*q),r.cy=l,a.circle=r;for(var s=null,t=ai._;t;)if(r.y<t.y||r.y===t.y&&r.x<=t.x){if(!t.L){s=t.P;break}t=t.L}else{if(!t.R){s=t;break}t=t.R}ai.insert(s,r),s||(_h=r)}}}}function Vc(a){var b=a.circle;b&&(b.P||(_h=b.N),ai.remove(b),ci.push(b),cd(b),a.circle=null)}function Wc(a){for(var b,c=Yh,d=Qb(a[0][0],a[0][1],a[1][0],a[1][1]),e=c.length;e--;)b=c[e],(!Xc(b,a)||!d(b)||mg(b.a.x-b.b.x)<Cg&&mg(b.a.y-b.b.y)<Cg)&&(b.a=b.b=null,c.splice(e,1))}function Xc(a,b){var c=a.b;if(c)return!0;var d,e,f=a.a,g=b[0][0],h=b[1][0],i=b[0][1],j=b[1][1],k=a.l,l=a.r,m=k.x,n=k.y,o=l.x,p=l.y,q=(m+o)/2,r=(n+p)/2;if(p===n){if(q<g||q>=h)return;if(m>o){if(f){if(f.y>=j)return}else f={x:q,y:i};c={x:q,y:j}}else{if(f){if(f.y<i)return}else f={x:q,y:j};c={x:q,y:i}}}else if(d=(m-o)/(p-n),e=r-d*q,d<-1||d>1)if(m>o){if(f){if(f.y>=j)return}else f={x:(i-e)/d,y:i};c={x:(j-e)/d,y:j}}else{if(f){if(f.y<i)return}else f={x:(j-e)/d,y:j};c={x:(i-e)/d,y:i}}else if(n<p){if(f){if(f.x>=h)return}else f={x:g,y:d*g+e};c={x:h,y:d*h+e}}else{if(f){if(f.x<g)return}else f={x:h,y:d*h+e};c={x:g,y:d*g+e}}return a.a=f,a.b=c,!0}function Yc(a,b){this.l=a,this.r=b,this.a=this.b=null}function Zc(a,b,c,d){var e=new Yc(a,b);return Yh.push(e),c&&_c(e,a,b,c),d&&_c(e,b,a,d),Zh[a.i].edges.push(new ad(e,a,b)),Zh[b.i].edges.push(new ad(e,b,a)),e}function $c(a,b,c){var d=new Yc(a,null);return d.a=b,d.b=c,Yh.push(d),d}function _c(a,b,c,d){a.a||a.b?a.l===c?a.b=d:a.a=d:(a.a=d,a.l=b,a.r=c)}function ad(a,b,c){var d=a.a,e=a.b;this.edge=a,this.site=b,this.angle=c?Math.atan2(c.y-b.y,c.x-b.x):a.l===b?Math.atan2(e.x-d.x,d.y-e.y):Math.atan2(d.x-e.x,e.y-d.y)}function bd(){this._=null}function cd(a){a.U=a.C=a.L=a.R=a.P=a.N=null}function dd(a,b){var c=b,d=b.R,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.R=d.L,c.R&&(c.R.U=c),d.L=c}function ed(a,b){var c=b,d=b.L,e=c.U;e?e.L===c?e.L=d:e.R=d:a._=d,d.U=e,c.U=d,c.L=d.R,c.L&&(c.L.U=c),d.R=c}function fd(a){for(;a.L;)a=a.L;return a}function gd(a,b){var c,d,e,f=a.sort(hd).pop();for(Yh=[],Zh=new Array(a.length),$h=new bd,ai=new bd;;)if(e=_h,f&&(!e||f.y<e.y||f.y===e.y&&f.x<e.x))f.x===c&&f.y===d||(Zh[f.i]=new Qc(f),Nc(f),c=f.x,d=f.y),f=a.pop();else{if(!e)break;Mc(e.arc)}b&&(Wc(b),Rc(b));var g={cells:Zh,edges:Yh};return $h=ai=Yh=Zh=null,g}function hd(a,b){return b.y-a.y||b.x-a.x}function id(a,b,c){return(a.x-c.x)*(b.y-a.y)-(a.x-b.x)*(c.y-a.y)}function jd(a){return a.x}function kd(a){return a.y}function ld(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function md(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&md(a,i[0],c,d,g,h),i[1]&&md(a,i[1],g,d,e,h),i[2]&&md(a,i[2],c,h,g,f),i[3]&&md(a,i[3],g,h,e,f)}}function nd(a,b,c,d,e,f,g){var h,i=1/0;return function a(j,k,l,m,n){if(!(k>f||l>g||m<d||n<e)){if(o=j.point){var o,p=b-j.x,q=c-j.y,r=p*p+q*q;if(r<i){var s=Math.sqrt(i=r);d=b-s,e=c-s,f=b+s,g=c+s,h=o}}for(var t=j.nodes,u=.5*(k+m),v=.5*(l+n),w=b>=u,x=c>=v,y=x<<1|w,z=y+4;y<z;++y)if(j=t[3&y])switch(3&y){case 0:a(j,k,l,u,v);break;case 1:a(j,u,l,m,v);break;case 2:a(j,k,v,u,n);break;case 3:a(j,u,v,m,n)}}}(a,d,e,f,g),h}function od(a,b){a=cg.rgb(a),b=cg.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+va(Math.round(c+f*a))+va(Math.round(d+g*a))+va(Math.round(e+h*a))}}function pd(a,b){var c,d={},e={};for(c in a)c in b?d[c]=sd(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}}function qd(a,b){return a=+a,b=+b,function(c){return a*(1-c)+b*c}}function rd(a,b){var c,d,e,f=ei.lastIndex=fi.lastIndex=0,g=-1,h=[],i=[];for(a+="",b+="";(c=ei.exec(a))&&(d=fi.exec(b));)(e=d.index)>f&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:qd(c,d)})),f=fi.lastIndex;return f<b.length&&(e=b.slice(f),h[g]?h[g]+=e:h[++g]=e),h.length<2?i[0]?(b=i[0].x,function(a){return b(a)+""}):function(){return b}:(b=i.length,function(a){for(var c,d=0;d<b;++d)h[(c=i[d]).i]=c.x(a);return h.join("")})}function sd(a,b){for(var c,d=cg.interpolators.length;--d>=0&&!(c=cg.interpolators[d](a,b)););return c}function td(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;c<h;++c)d.push(sd(a[c],b[c]));for(;c<f;++c)e[c]=a[c];for(;c<g;++c)e[c]=b[c];return function(a){for(c=0;c<h;++c)e[c]=d[c](a);return e}}function ud(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function vd(a){return function(b){return 1-a(1-b)}}function wd(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function xd(a){return a*a}function yd(a){return a*a*a}function zd(a){if(a<=0)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(a<.5?c:3*(a-b)+c-.75)}function Ad(a){return function(b){return Math.pow(b,a)}}function Bd(a){return 1-Math.cos(a*Hg)}function Cd(a){return Math.pow(2,10*(a-1))}function Dd(a){return 1-Math.sqrt(1-a*a)}function Ed(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/Fg*Math.asin(1/a):(a=1,c=b/4),function(d){return 1+a*Math.pow(2,-10*d)*Math.sin((d-c)*Fg/b)}}function Fd(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Gd(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Hd(a,b){a=cg.hcl(a),b=cg.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.c:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return la(c+f*a,d+g*a,e+h*a)+""}}function Id(a,b){a=cg.hsl(a),b=cg.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.s:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return ja(c+f*a,d+g*a,e+h*a)+""}}function Jd(a,b){a=cg.lab(a),b=cg.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return na(c+f*a,d+g*a,e+h*a)+""}}function Kd(a,b){return b-=a,function(c){return Math.round(a+b*c)}}function Ld(a){var b=[a.a,a.b],c=[a.c,a.d],d=Nd(b),e=Md(b,c),f=Nd(Od(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*Jg,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*Jg:0}function Md(a,b){return a[0]*b[0]+a[1]*b[1]}function Nd(a){var b=Math.sqrt(Md(a,a));return b&&(a[0]/=b,a[1]/=b),b}function Od(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function Pd(a,b){var c,d=[],e=[],f=cg.transform(a),g=cg.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:qd(h[0],i[0])},{i:3,x:qd(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:qd(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:qd(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:qd(n[0],o[0])},{i:c-2,x:qd(n[1],o[1])})):1==o[0]&&1==o[1]||d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}}function Qd(a,b){return b=(b-=a=+a)||1/b,function(c){return(c-a)/b}}function Rd(a,b){return b=(b-=a=+a)||1/b,function(c){return Math.max(0,Math.min(1,(c-a)/b))}}function Sd(a){for(var b=a.source,c=a.target,d=Ud(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Td(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Ud(a,b){if(a===b)return a;for(var c=Td(a),d=Td(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Vd(a){a.fixed|=2}function Wd(a){a.fixed&=-7}function Xd(a){a.fixed|=4,a.px=a.x,a.py=a.y}function Yd(a){a.fixed&=-5}function Zd(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Zd(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function $d(a,b){return cg.rebind(a,b,"sort","children","value"),a.nodes=a,a.links=ee,a}function _d(a,b){for(var c=[a];null!=(a=c.pop());)if(b(a),(e=a.children)&&(d=e.length))for(var d,e;--d>=0;)c.push(e[d])}function ae(a,b){for(var c=[a],d=[];null!=(a=c.pop());)if(d.push(a),(f=a.children)&&(e=f.length))for(var e,f,g=-1;++g<e;)c.push(f[g]);for(;null!=(a=d.pop());)b(a)}function be(a){return a.children}function ce(a){return a.value}function de(a,b){return b.value-a.value}function ee(a){return cg.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function fe(a){return a.x}function ge(a){return a.y}function he(a,b,c){a.y0=b,a.y=c}function ie(a){return cg.range(a.length)}function je(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ke(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;c<f;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function le(a){return a.reduce(me,0)}function me(a,b){return a+b[1]}function ne(a,b){return oe(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function oe(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function pe(a){return[cg.min(a),cg.max(a)]}function qe(a,b){return a.value-b.value}function re(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function se(a,b){a._pack_next=b,b._pack_prev=a}function te(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return.999*e*e>c*c+d*d}function ue(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-(1/0),m=1/0,n=-(1/0);if(c.forEach(ve),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],ye(d,e,f),b(f),re(d,f),d._pack_prev=f,re(f,e),e=d._pack_next,g=3;g<j;g++){ye(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(te(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!te(i,f);i=i._pack_prev,q++);o?(p<q||p==q&&e.r<d.r?se(d,e=h):se(d=i,e),g--):(re(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;g<j;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(we)}}function ve(a){a._pack_next=a._pack_prev=a}function we(a){delete a._pack_next,delete a._pack_prev}function xe(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)xe(e[f],b,c,d)}function ye(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ze(a,b){return a.parent==b.parent?1:2}function Ae(a){var b=a.children;return b.length?b[0]:a.t}function Be(a){var b,c=a.children;return(b=c.length)?c[b-1]:a.t}function Ce(a,b,c){var d=c/(b.i-a.i);b.c-=d,b.s+=c,a.c+=d,b.z+=c,b.m+=c}function De(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f],b.z+=c,b.m+=c,c+=b.s+(d+=b.c)}function Ee(a,b,c){return a.a.parent===b.parent?a.a:c}function Fe(a){return 1+cg.max(a,function(a){return a.y})}function Ge(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function He(a){var b=a.children;return b&&b.length?He(b[0]):a}function Ie(a){var b,c=a.children;return c&&(b=c.length)?Ie(c[b-1]):a}function Je(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Ke(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Le(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function Me(a){return a.rangeExtent?a.rangeExtent():Le(a.range())}function Ne(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Oe(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return g<f&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function Pe(a){return a?{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}:qi}function Qe(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=cg.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Re(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qe:Ne,i=d?Rd:Qd;return g=e(a,b,i,c),h=e(b,a,i,sd),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(Kd)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Ve(a,b)},f.tickFormat=function(b,c){return We(a,b,c)},f.nice=function(b){return Te(a,b),e()},f.copy=function(){return Re(a,b,c,d)},e()}function Se(a,b){return cg.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Te(a,b){return Oe(a,Pe(Ue(a,b)[2]))}function Ue(a,b){null==b&&(b=10);var c=Le(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Ve(a,b){return cg.range.apply(cg,Ue(a,b))}function We(a,b,c){var d=Ue(a,b);if(c){var e=eh.exec(c);if(e.shift(),"s"===e[8]){var f=cg.formatPrefix(Math.max(mg(d[0]),mg(d[1])));return e[7]||(e[7]="."+Xe(f.scale(d[2]))),e[8]="f",c=cg.format(e.join("")),function(a){return c(f.scale(a))+f.symbol}}e[7]||(e[7]="."+Ye(e[8],d)),c=e.join("")}else c=",."+Xe(d[2])+"f";return cg.format(c)}function Xe(a){return-Math.floor(Math.log(a)/Math.LN10+.01)}function Ye(a,b){var c=Xe(b[2]);return a in ri?Math.abs(c-Xe(Math.max(mg(b[0]),mg(b[1]))))+ +("e"!==a):c-2*("%"===a)}function Ze(a,b,c,d){function e(a){return(c?Math.log(a<0?0:a):-Math.log(a>0?0:-a))/Math.log(b)}function f(a){return c?Math.pow(b,a):-Math.pow(b,-a)}function g(b){return a(e(b))}return g.invert=function(b){return f(a.invert(b))},g.domain=function(b){return arguments.length?(c=b[0]>=0,a.domain((d=b.map(Number)).map(e)),g):d},g.base=function(c){return arguments.length?(b=+c,a.domain(d.map(e)),g):b},g.nice=function(){var b=Oe(d.map(e),c?Math:ti);return a.domain(b),d=b.map(f),g},g.ticks=function(){var a=Le(d),g=[],h=a[0],i=a[1],j=Math.floor(e(h)),k=Math.ceil(e(i)),l=b%1?2:b;if(isFinite(k-j)){if(c){for(;j<k;j++)for(var m=1;m<l;m++)g.push(f(j)*m);g.push(f(j))}else for(g.push(f(j));j++<k;)for(var m=l-1;m>0;m--)g.push(f(j)*m);for(j=0;g[j]<h;j++);for(k=g.length;g[k-1]>i;k--);g=g.slice(j,k)}return g},g.tickFormat=function(a,b){if(!arguments.length)return si;arguments.length<2?b=si:"function"!=typeof b&&(b=cg.format(b));var d,h=Math.max(.1,a/g.ticks().length),i=c?(d=1e-12,Math.ceil):(d=-1e-12,Math.floor);return function(a){return a/f(i(e(a)+d))<=h?b(a):""}},g.copy=function(){return Ze(a.copy(),b,c,d)},Se(g,a)}function $e(a,b,c){function d(b){return a(e(b))}var e=_e(b),f=_e(1/b);return d.invert=function(b){return f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain((c=b.map(Number)).map(e)),d):c},d.ticks=function(a){return Ve(c,a)},d.tickFormat=function(a,b){return We(c,a,b)},d.nice=function(a){return d.domain(Te(c,a))},d.exponent=function(g){return arguments.length?(e=_e(b=g),f=_e(1/b),a.domain(c.map(e)),d):b},d.copy=function(){return $e(a.copy(),b,c)},Se(d,a)}function _e(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function af(a,b){function c(c){return f[((e.get(c)||("range"===b.t?e.set(c,a.push(c)):NaN))-1)%f.length]}function d(b,c){return cg.range(a.length).map(function(a){return b+c*a})}var e,f,g;return c.domain=function(d){if(!arguments.length)return a;a=[],e=new k;for(var f,g=-1,h=d.length;++g<h;)e.has(f=d[g])||e.set(f,a.push(f));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(f=a,g=0,b={t:"range",a:arguments},c):f},c.rangePoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=(i+j)/2,0):(j-i)/(a.length-1+h);return f=d(i+k*h/2,k),g=0,b={t:"rangePoints",a:arguments},c},c.rangeRoundPoints=function(e,h){arguments.length<2&&(h=0);var i=e[0],j=e[1],k=a.length<2?(i=j=Math.round((i+j)/2),0):(j-i)/(a.length-1+h)|0;return f=d(i+Math.round(k*h/2+(j-i-(a.length-1+h)*k)/2),k),g=0,b={t:"rangeRoundPoints",a:arguments},c},c.rangeBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=(l-k)/(a.length-h+2*i);return f=d(k+m*i,m),j&&f.reverse(),g=m*(1-h),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(e,h,i){arguments.length<2&&(h=0),arguments.length<3&&(i=h);var j=e[1]<e[0],k=e[j-0],l=e[1-j],m=Math.floor((l-k)/(a.length-h+2*i));return f=d(k+Math.round((l-k-(a.length-h)*m)/2),m),j&&f.reverse(),g=Math.round(m*(1-h)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return g},c.rangeExtent=function(){return Le(b.a[0])},c.copy=function(){return af(a,b)},c.domain(a)}function bf(a,b){function f(){var c=0,d=b.length;for(h=[];++c<d;)h[c-1]=cg.quantile(a,c/d);return g}function g(a){if(!isNaN(a=+a))return b[cg.bisect(h,a)]}var h;return g.domain=function(b){return arguments.length?(a=b.map(d).filter(e).sort(c),f()):a},g.range=function(a){return arguments.length?(b=a,f()):b},g.quantiles=function(){return h},g.invertExtent=function(c){return c=b.indexOf(c),c<0?[NaN,NaN]:[c>0?h[c-1]:a[0],c<h.length?h[c]:a[a.length-1]]},g.copy=function(){return bf(a,b)},f()}function cf(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.invertExtent=function(b){return b=c.indexOf(b),b=b<0?NaN:b/f+a,[b,b+1/f]},d.copy=function(){return cf(a,b,c)},e()}function df(a,b){function c(c){if(c<=c)return b[cg.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.invertExtent=function(c){return c=b.indexOf(c),[a[c-1],a[c]]},c.copy=function(){return df(a,b)},c}function ef(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Ve(a,b)},b.tickFormat=function(b,c){return We(a,b,c)},b.copy=function(){return ef(a)},b}function ff(){return 0}function gf(a){return a.innerRadius}function hf(a){return a.outerRadius}function jf(a){return a.startAngle}function kf(a){return a.endAngle}function lf(a){return a&&a.padAngle}function mf(a,b,c,d){return(a-c)*b-(b-d)*a>0?0:1}function nf(a,b,c,d,e){var f=a[0]-b[0],g=a[1]-b[1],h=(e?d:-d)/Math.sqrt(f*f+g*g),i=h*g,j=-h*f,k=a[0]+i,l=a[1]+j,m=b[0]+i,n=b[1]+j,o=(k+m)/2,p=(l+n)/2,q=m-k,r=n-l,s=q*q+r*r,t=c-d,u=k*n-m*l,v=(r<0?-1:1)*Math.sqrt(t*t*s-u*u),w=(u*r-q*v)/s,x=(-u*q-r*v)/s,y=(u*r+q*v)/s,z=(-u*q+r*v)/s,A=w-o,B=x-p,C=y-o,D=z-p;return A*A+B*B>C*C+D*D&&(w=y,x=z),[[w-i,x-j],[w*c/t,x*c/t]]}function of(a){function b(b){function g(){j.push("M",f(a(k),h))}for(var i,j=[],k=[],l=-1,m=b.length,n=Ba(c),o=Ba(d);++l<m;)e.call(this,i=b[l],l)?k.push([+n.call(this,i,l),+o.call(this,i,l)]):k.length&&(g(),k=[]);return k.length&&g(),j.length?j.join(""):null}var c=Cc,d=Dc,e=Db,f=pf,g=f.key,h=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(g="function"==typeof a?f=a:(f=zi.get(a)||pf).key,b):g},b.tension=function(a){return arguments.length?(h=a,b):h},b}function pf(a){return a.join("L")}function qf(a){return pf(a)+"Z"}function rf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d[0]+(d=a[b])[0])/2,"V",d[1]);return c>1&&e.push("H",d[0]),e.join("")}function sf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function tf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function uf(a,b){return a.length<4?pf(a):a[1]+xf(a.slice(1,-1),yf(a,b))}function vf(a,b){return a.length<3?pf(a):a[0]+xf((a.push(a[0]),a),yf([a[a.length-2]].concat(a,[a[1]]),b))}function wf(a,b){return a.length<3?pf(a):a[0]+xf(a,yf(a,b))}function xf(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return pf(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function yf(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function zf(a){if(a.length<3)return pf(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f,"L",Df(Ci,g),",",Df(Ci,h)];for(a.push(a[c-1]);++b<=c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),Ef(i,g,h);return a.pop(),i.push("L",d),i.join("")}function Af(a){if(a.length<4)return pf(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(Df(Ci,f)+","+Df(Ci,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),Ef(c,f,g);return c.join("")}function Bf(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[Df(Ci,g),",",Df(Ci,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),Ef(b,g,h);return b.join("")}function Cf(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return zf(a)}function Df(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function Ef(a,b,c){a.push("C",Df(Ai,b),",",Df(Ai,c),",",Df(Bi,b),",",Df(Bi,c),",",Df(Ci,b),",",Df(Ci,c))}function Ff(a,b){return(b[1]-a[1])/(b[0]-a[0])}function Gf(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=Ff(e,f);++b<c;)d[b]=(g+(g=Ff(e=f,f=a[b+1])))/2;return d[b]=g,d}function Hf(a){for(var b,c,d,e,f=[],g=Gf(a),h=-1,i=a.length-1;++h<i;)b=Ff(a[h],a[h+1]),mg(b)<Cg?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function If(a){return a.length<3?pf(a):a[0]+xf(a,Hf(a))}function Jf(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]-Hg,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Kf(a){function b(b){function i(){p.push("M",h(a(r),l),k,j(a(q.reverse()),l),"Z")}for(var m,n,o,p=[],q=[],r=[],s=-1,t=b.length,u=Ba(c),v=Ba(e),w=c===d?function(){return n}:Ba(d),x=e===f?function(){return o}:Ba(f);++s<t;)g.call(this,m=b[s],s)?(q.push([n=+u.call(this,m,s),o=+v.call(this,m,s)]),r.push([+w.call(this,m,s),+x.call(this,m,s)])):q.length&&(i(),q=[],r=[]);return q.length&&i(),p.length?p.join(""):null}var c=Cc,d=Cc,e=0,f=Dc,g=Db,h=pf,i=h.key,j=h,k="L",l=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(g=a,b):g},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?h=a:(h=zi.get(a)||pf).key,j=h.reverse||h,k=h.closed?"M":"L",b):i},b.tension=function(a){return arguments.length?(l=a,b):l},b}function Lf(a){return a.radius}function Mf(a){return[a.x,a.y]}function Nf(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]-Hg;return[c*Math.cos(d),c*Math.sin(d)]}}function Of(){return 64}function Pf(){return"circle"}function Qf(a){var b=Math.sqrt(a/Eg);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Rf(a){return function(){var b,c;(b=this[a])&&(c=b[b.active])&&(--b.count?delete b[b.active]:delete this[a],b.active+=.5,c.event&&c.event.interrupt.call(this,this.__data__,c.index))}}function Sf(a,b,c){return rg(a,Ji),a.namespace=b,a.id=c,a}function Tf(a,b,c,d){var e=a.id,f=a.namespace;return S(a,"function"==typeof c?function(a,g,h){a[f][e].tween.set(b,d(c.call(a,a.__data__,g,h)))}:(c=d(c),function(a){a[f][e].tween.set(b,c)}))}function Uf(a){return null==a&&(a=""),function(){this.textContent=a}}function Vf(a){return null==a?"__transition__":"__transition_"+a+"__"}function Wf(a,b,c,d,e){var f=a[c]||(a[c]={active:0,count:0}),g=f[d];if(!g){var h=e.time;g=f[d]={tween:new k,time:h,delay:e.delay,duration:e.duration,ease:e.ease,index:b},e=null,++f.count,cg.timer(function(e){function i(c){if(f.active>d)return k();var e=f[f.active];e&&(--f.count,delete f[f.active],e.event&&e.event.interrupt.call(a,a.__data__,e.index)),f.active=d,g.event&&g.event.start.call(a,a.__data__,b),g.tween.forEach(function(c,d){(d=d.call(a,a.__data__,b))&&p.push(d)}),m=g.ease,l=g.duration,cg.timer(function(){return o.c=j(c||1)?Db:j,1},0,h)}function j(c){if(f.active!==d)return 1;for(var e=c/l,h=m(e),i=p.length;i>0;)p[--i].call(a,h);return e>=1?(g.event&&g.event.end.call(a,a.__data__,b),
|
7
7
|
k()):void 0}function k(){return--f.count?delete f[d]:delete a[c],1}var l,m,n=g.delay,o=bh,p=[];return o.t=n+h,n<=e?i(e-n):void(o.c=i)},0,h)}}function Xf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate("+(isFinite(d)?d:c(a))+",0)"})}function Yf(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate(0,"+(isFinite(d)?d:c(a))+")"})}function Zf(a){return a.toISOString()}function $f(a,b,c){function d(b){return a(b)}function e(a,c){var d=a[1]-a[0],e=d/c,f=cg.bisect(Si,e);return f==Si.length?[b.year,Ue(a.map(function(a){return a/31536e6}),c)[2]]:f?b[e/Si[f-1]<Si[f]/e?f-1:f]:[Vi,Ue(a,c)[2]]}return d.invert=function(b){return _f(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(_f)},d.nice=function(a,b){function c(c){return!isNaN(c)&&!a.range(c,_f(+c+1),b).length}var f=d.domain(),g=Le(f),h=null==a?e(g,10):"number"==typeof a&&e(g,a);return h&&(a=h[0],b=h[1]),d.domain(Oe(f,b>1?{floor:function(b){for(;c(b=a.floor(b));)b=_f(b-1);return b},ceil:function(b){for(;c(b=a.ceil(b));)b=_f(+b+1);return b}}:a))},d.ticks=function(a,b){var c=Le(d.domain()),f=null==a?e(c,10):"number"==typeof a?e(c,a):!a.range&&[{range:a},b];return f&&(a=f[0],b=f[1]),a.range(c[0],_f(+c[1]+1),b<1?1:b)},d.tickFormat=function(){return c},d.copy=function(){return $f(a.copy(),b,c)},Se(d,a)}function _f(a){return new Date(a)}function ag(a){return JSON.parse(a.responseText)}function bg(a){var b=fg.createRange();return b.selectNode(fg.body),b.createContextualFragment(a.responseText)}var cg={version:"3.5.6"},dg=[].slice,eg=function(a){return dg.call(a)},fg=this.document;if(fg)try{eg(fg.documentElement.childNodes)[0].nodeType}catch(a){eg=function(a){for(var b=a.length,c=new Array(b);b--;)c[b]=a[b];return c}}if(Date.now||(Date.now=function(){return+new Date}),fg)try{fg.createElement("DIV").style.setProperty("opacity",0,"")}catch(a){var gg=this.Element.prototype,hg=gg.setAttribute,ig=gg.setAttributeNS,jg=this.CSSStyleDeclaration.prototype,kg=jg.setProperty;gg.setAttribute=function(a,b){hg.call(this,a,b+"")},gg.setAttributeNS=function(a,b,c){ig.call(this,a,b,c+"")},jg.setProperty=function(a,b,c){kg.call(this,a,b+"",c)}}cg.ascending=c,cg.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},cg.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},cg.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f;)if(null!=(d=b.call(a,a[e],e))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},cg.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g;)if(null!=(d=a[f])&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),e<d&&(e=d))}else{for(;++f<g;)if(null!=(d=b.call(a,a[f],f))&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),e<d&&(e=d))}return[c,e]},cg.sum=function(a,b){var c,d=0,f=a.length,g=-1;if(1===arguments.length)for(;++g<f;)e(c=+a[g])&&(d+=c);else for(;++g<f;)e(c=+b.call(a,a[g],g))&&(d+=c);return d},cg.mean=function(a,b){var c,f=0,g=a.length,h=-1,i=g;if(1===arguments.length)for(;++h<g;)e(c=d(a[h]))?f+=c:--i;else for(;++h<g;)e(c=d(b.call(a,a[h],h)))?f+=c:--i;if(i)return f/i},cg.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=+a[d-1],f=c-d;return f?e+f*(a[d]-e):e},cg.median=function(a,b){var f,g=[],h=a.length,i=-1;if(1===arguments.length)for(;++i<h;)e(f=d(a[i]))&&g.push(f);else for(;++i<h;)e(f=d(b.call(a,a[i],i)))&&g.push(f);if(g.length)return cg.quantile(g.sort(c),.5)},cg.variance=function(a,b){var c,f,g=a.length,h=0,i=0,j=-1,k=0;if(1===arguments.length)for(;++j<g;)e(c=d(a[j]))&&(f=c-h,h+=f/++k,i+=f*(c-h));else for(;++j<g;)e(c=d(b.call(a,a[j],j)))&&(f=c-h,h+=f/++k,i+=f*(c-h));if(k>1)return i/(k-1)},cg.deviation=function(){var a=cg.variance.apply(this,arguments);return a?Math.sqrt(a):a};var lg=g(c);cg.bisectLeft=lg.left,cg.bisect=cg.bisectRight=lg.right,cg.bisector=function(a){return g(1===a.length?function(b,d){return c(a(b),d)}:a)},cg.shuffle=function(a,b,c){(f=arguments.length)<3&&(c=a.length,f<2&&(b=0));for(var d,e,f=c-b;f;)e=Math.random()*f--|0,d=a[f+b],a[f+b]=a[e+b],a[e+b]=d;return a},cg.permute=function(a,b){for(var c=b.length,d=new Array(c);c--;)d[c]=a[b[c]];return d},cg.pairs=function(a){for(var b,c=0,d=a.length-1,e=a[0],f=new Array(d<0?0:d);c<d;)f[c]=[b=e,e=a[++c]];return f},cg.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=cg.min(arguments,h),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},cg.transpose=function(a){return cg.zip.apply(cg,a)},cg.keys=function(a){var b=[];for(var c in a)b.push(c);return b},cg.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},cg.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},cg.merge=function(a){for(var b,c,d,e=a.length,f=-1,g=0;++f<e;)g+=a[f].length;for(c=new Array(g);--e>=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c};var mg=Math.abs;cg.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=i(mg(c)),g=-1;if(a*=f,b*=f,c*=f,c<0)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},cg.map=function(a,b){var c=new k;if(a instanceof k)a.forEach(function(a,b){c.set(a,b)});else if(Array.isArray(a)){var d,e=-1,f=a.length;if(1===arguments.length)for(;++e<f;)c.set(e,a[e]);else for(;++e<f;)c.set(b.call(a,d=a[e],e),d)}else for(var g in a)c.set(g,a[g]);return c};var ng="__proto__",og="\0";j(k,{has:n,get:function(a){return this._[l(a)]},set:function(a,b){return this._[l(a)]=b},remove:o,keys:p,values:function(){var a=[];for(var b in this._)a.push(this._[b]);return a},entries:function(){var a=[];for(var b in this._)a.push({key:m(b),value:this._[b]});return a},size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b),this._[b])}}),cg.nest=function(){function a(b,g,h){if(h>=f.length)return d?d.call(e,g):c?g.sort(c):g;for(var i,j,l,m,n=-1,o=g.length,p=f[h++],q=new k;++n<o;)(m=q.get(i=p(j=g[n])))?m.push(j):q.set(i,[j]);return b?(j=b(),l=function(c,d){j.set(c,a(b,d,h))}):(j={},l=function(c,d){j[c]=a(b,d,h)}),q.forEach(l),j}function b(a,c){if(c>=f.length)return a;var d=[],e=g[c++];return a.forEach(function(a,e){d.push({key:a,values:b(e,c)})}),e?d.sort(function(a,b){return e(a.key,b.key)}):d}var c,d,e={},f=[],g=[];return e.map=function(b,c){return a(c,b,0)},e.entries=function(c){return b(a(cg.map,c,0),0)},e.key=function(a){return f.push(a),e},e.sortKeys=function(a){return g[f.length-1]=a,e},e.sortValues=function(a){return c=a,e},e.rollup=function(a){return d=a,e},e},cg.set=function(a){var b=new s;if(a)for(var c=0,d=a.length;c<d;++c)b.add(a[c]);return b},j(s,{has:n,add:function(a){return this._[l(a+="")]=!0,a},remove:o,values:p,size:q,empty:r,forEach:function(a){for(var b in this._)a.call(this,m(b))}}),cg.behavior={},cg.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=u(a,b,b[c]);return a};var pg=["webkit","ms","moz","Moz","o","O"];cg.dispatch=function(){for(var a=new x,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=y(a);return a},x.prototype.on=function(a,b){var c=a.indexOf("."),d="";if(c>=0&&(d=a.slice(c+1),a=a.slice(0,c)),a)return arguments.length<2?this[a].on(d):this[a].on(d,b);if(2===arguments.length){if(null==b)for(a in this)this.hasOwnProperty(a)&&this[a].on(d,null);return this}},cg.event=null,cg.requote=function(a){return a.replace(qg,"\\$&")};var qg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,rg={}.__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]},sg=function(a,b){return b.querySelector(a)},tg=function(a,b){return b.querySelectorAll(a)},ug=function(a,b){var c=a.matches||a[v(a,"matchesSelector")];return(ug=function(a,b){return c.call(a,b)})(a,b)};"function"==typeof Sizzle&&(sg=function(a,b){return Sizzle(a,b)[0]||null},tg=Sizzle,ug=Sizzle.matchesSelector),cg.selection=function(){return cg.select(fg.documentElement)};var vg=cg.selection.prototype=[];vg.select=function(a){var b,c,d,e,f=[];a=D(a);for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i,g)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return C(f)},vg.selectAll=function(a){var b,c,d=[];a=E(a);for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=eg(a.call(c,c.__data__,h,e))),b.parentNode=c);return C(d)};var wg={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};cg.ns={prefix:wg,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.slice(0,b),a=a.slice(b+1)),wg.hasOwnProperty(c)?{space:wg[c],local:a}:a}},vg.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=cg.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(F(b,a[b]));return this}return this.each(F(a,b))},vg.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=I(a)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.getAttribute("class");++e<d;)if(!H(a[e]).test(b))return!1;return!0}for(b in a)this.each(J(b,a[b]));return this}return this.each(J(a,b))},vg.style=function(a,c,d){var e=arguments.length;if(e<3){if("string"!=typeof a){e<2&&(c="");for(d in a)this.each(L(d,a[d],c));return this}if(e<2){var f=this.node();return b(f).getComputedStyle(f,null).getPropertyValue(a)}d=""}return this.each(L(a,c,d))},vg.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(M(b,a[b]));return this}return this.each(M(a,b))},vg.text=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a}):this.node().textContent},vg.html=function(a){return arguments.length?this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a}):this.node().innerHTML},vg.append=function(a){return a=N(a),this.select(function(){return this.appendChild(a.apply(this,arguments))})},vg.insert=function(a,b){return a=N(a),b=D(b),this.select(function(){return this.insertBefore(a.apply(this,arguments),b.apply(this,arguments)||null)})},vg.remove=function(){return this.each(O)},vg.data=function(a,b){function c(a,c){var d,e,f,g=a.length,l=c.length,m=Math.min(g,l),n=new Array(l),o=new Array(l),p=new Array(g);if(b){var q,r=new k,s=new Array(g);for(d=-1;++d<g;)r.has(q=b.call(e=a[d],e.__data__,d))?p[d]=e:r.set(q,e),s[d]=q;for(d=-1;++d<l;)(e=r.get(q=b.call(c,f=c[d],d)))?e!==!0&&(n[d]=e,e.__data__=f):o[d]=P(f),r.set(q,!0);for(d=-1;++d<g;)r.get(s[d])!==!0&&(p[d]=a[d])}else{for(d=-1;++d<m;)e=a[d],f=c[d],e?(e.__data__=f,n[d]=e):o[d]=P(f);for(;d<l;++d)o[d]=P(c[d]);for(;d<g;++d)p[d]=a[d]}o.update=n,o.parentNode=n.parentNode=p.parentNode=a.parentNode,h.push(o),i.push(n),j.push(p)}var d,e,f=-1,g=this.length;if(!arguments.length){for(a=new Array(g=(d=this[0]).length);++f<g;)(e=d[f])&&(a[f]=e.__data__);return a}var h=T([]),i=C([]),j=C([]);if("function"==typeof a)for(;++f<g;)c(d=this[f],a.call(d,d.parentNode.__data__,f));else for(;++f<g;)c(d=this[f],a);return i.enter=function(){return h},i.exit=function(){return j},i},vg.datum=function(a){return arguments.length?this.property("__data__",a):this.property("__data__")},vg.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=Q(a));for(var f=0,g=this.length;f<g;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;h<i;h++)(d=c[h])&&a.call(d,d.__data__,h,f)&&b.push(d)}return C(e)},vg.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},vg.sort=function(a){a=R.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},vg.each=function(a){return S(this,function(b,c,d){a.call(b,b.__data__,c,d)})},vg.call=function(a){var b=eg(arguments);return a.apply(b[0]=this,b),this},vg.empty=function(){return!this.node()},vg.node=function(){for(var a=0,b=this.length;a<b;a++)for(var c=this[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f)return f}return null},vg.size=function(){var a=0;return S(this,function(){++a}),a};var xg=[];cg.selection.enter=T,cg.selection.enter.prototype=xg,xg.append=vg.append,xg.empty=vg.empty,xg.node=vg.node,xg.call=vg.call,xg.size=vg.size,xg.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j,h)),c.__data__=f.__data__):b.push(null)}return C(g)},xg.insert=function(a,b){return arguments.length<2&&(b=U(this)),vg.insert.call(this,a,b)},cg.select=function(b){var c;return"string"==typeof b?(c=[sg(b,fg)],c.parentNode=fg.documentElement):(c=[b],c.parentNode=a(b)),C([c])},cg.selectAll=function(a){var b;return"string"==typeof a?(b=eg(tg(a,fg)),b.parentNode=fg.documentElement):(b=a,b.parentNode=null),C([b])},vg.on=function(a,b,c){var d=arguments.length;if(d<3){if("string"!=typeof a){d<2&&(b=!1);for(c in a)this.each(V(c,a[c],b));return this}if(d<2)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(V(a,b,c))};var yg=cg.map({mouseenter:"mouseover",mouseleave:"mouseout"});fg&&yg.forEach(function(a){"on"+a in fg&&yg.remove(a)});var zg,Ag=0;cg.mouse=function(a){return Z(a,A())};var Bg=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;cg.touch=function(a,b,c){if(arguments.length<3&&(c=b,b=A().changedTouches),b)for(var d,e=0,f=b.length;e<f;++e)if((d=b[e]).identifier===c)return Z(a,d)},cg.behavior.drag=function(){function a(){this.on("mousedown.drag",f).on("touchstart.drag",g)}function c(a,b,c,f,g){return function(){function h(){var a,c,d=b(m,p);d&&(a=d[0]-t[0],c=d[1]-t[1],o|=a|c,t=d,n({type:"drag",x:d[0]+j[0],y:d[1]+j[1],dx:a,dy:c}))}function i(){b(m,p)&&(r.on(f+q,null).on(g+q,null),s(o&&cg.event.target===l),n({type:"dragend"}))}var j,k=this,l=cg.event.target,m=k.parentNode,n=d.of(k,arguments),o=0,p=a(),q=".drag"+(null==p?"":"-"+p),r=cg.select(c(l)).on(f+q,h).on(g+q,i),s=Y(l),t=b(m,p);e?(j=e.apply(k,arguments),j=[j.x-t[0],j.y-t[1]]):j=[0,0],n({type:"dragstart"})}}var d=B(a,"drag","dragstart","dragend"),e=null,f=c(w,cg.mouse,b,"mousemove","mouseup"),g=c($,cg.touch,t,"touchmove","touchend");return a.origin=function(b){return arguments.length?(e=b,a):e},cg.rebind(a,d,"on")},cg.touches=function(a,b){return arguments.length<2&&(b=A().touches),b?eg(b).map(function(b){var c=Z(a,b);return c.identifier=b.identifier,c}):[]};var Cg=1e-6,Dg=Cg*Cg,Eg=Math.PI,Fg=2*Eg,Gg=Fg-Cg,Hg=Eg/2,Ig=Eg/180,Jg=180/Eg,Kg=Math.SQRT2,Lg=2,Mg=4;cg.interpolateZoom=function(a,b){function c(a){var b=a*s;if(r){var c=ea(p),g=f/(Lg*m)*(c*fa(Kg*b+p)-da(p));return[d+g*j,e+g*k,f*c/ea(Kg*b+p)]}return[d+a*j,e+a*k,f*Math.exp(Kg*b)]}var d=a[0],e=a[1],f=a[2],g=b[0],h=b[1],i=b[2],j=g-d,k=h-e,l=j*j+k*k,m=Math.sqrt(l),n=(i*i-f*f+Mg*l)/(2*f*Lg*m),o=(i*i-f*f-Mg*l)/(2*i*Lg*m),p=Math.log(Math.sqrt(n*n+1)-n),q=Math.log(Math.sqrt(o*o+1)-o),r=q-p,s=(r||Math.log(i/f))/Kg;return c.duration=1e3*s,c},cg.behavior.zoom=function(){function a(a){a.on(F,l).on(Og+".zoom",n).on("dblclick.zoom",o).on(I,m)}function c(a){return[(a[0]-y.x)/y.k,(a[1]-y.y)/y.k]}function d(a){return[a[0]*y.k+y.x,a[1]*y.k+y.y]}function e(a){y.k=Math.max(C[0],Math.min(C[1],a))}function f(a,b){b=d(b),y.x+=a[0]-b[0],y.y+=a[1]-b[1]}function g(b,c,d,g){b.__chart__={x:y.x,y:y.y,k:y.k},e(Math.pow(2,g)),f(q=c,d),b=cg.select(b),D>0&&(b=b.transition().duration(D)),b.call(a.event)}function h(){v&&v.domain(u.range().map(function(a){return(a-y.x)/y.k}).map(u.invert)),x&&x.domain(w.range().map(function(a){return(a-y.y)/y.k}).map(w.invert))}function i(a){E++||a({type:"zoomstart"})}function j(a){h(),a({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function k(a){--E||(a({type:"zoomend"}),q=null)}function l(){function a(){l=1,f(cg.mouse(e),n),j(h)}function d(){m.on(G,null).on(H,null),o(l&&cg.event.target===g),k(h)}var e=this,g=cg.event.target,h=J.of(e,arguments),l=0,m=cg.select(b(e)).on(G,a).on(H,d),n=c(cg.mouse(e)),o=Y(e);Ii.call(e),i(h)}function m(){function a(){var a=cg.touches(o);return n=y.k,a.forEach(function(a){a.identifier in q&&(q[a.identifier]=c(a))}),a}function b(){var b=cg.event.target;cg.select(b).on(u,d).on(v,h),w.push(b);for(var c=cg.event.changedTouches,e=0,f=c.length;e<f;++e)q[c[e].identifier]=null;var i=a(),j=Date.now();if(1===i.length){if(j-t<500){var k=i[0];g(o,k,q[k.identifier],Math.floor(Math.log(y.k)/Math.LN2)+1),z()}t=j}else if(i.length>1){var k=i[0],l=i[1],m=k[0]-l[0],n=k[1]-l[1];r=m*m+n*n}}function d(){var a,b,c,d,g=cg.touches(o);Ii.call(o);for(var h=0,i=g.length;h<i;++h,d=null)if(c=g[h],d=q[c.identifier]){if(b)break;a=c,b=d}if(d){var k=(k=c[0]-a[0])*k+(k=c[1]-a[1])*k,l=r&&Math.sqrt(k/r);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],b=[(b[0]+d[0])/2,(b[1]+d[1])/2],e(l*n)}t=null,f(a,b),j(p)}function h(){if(cg.event.touches.length){for(var b=cg.event.changedTouches,c=0,d=b.length;c<d;++c)delete q[b[c].identifier];for(var e in q)return void a()}cg.selectAll(w).on(s,null),x.on(F,l).on(I,m),A(),k(p)}var n,o=this,p=J.of(o,arguments),q={},r=0,s=".zoom-"+cg.event.changedTouches[0].identifier,u="touchmove"+s,v="touchend"+s,w=[],x=cg.select(o),A=Y(o);b(),i(p),x.on(F,null).on(I,b)}function n(){var a=J.of(this,arguments);s?clearTimeout(s):(Ii.call(this),p=c(q=r||cg.mouse(this)),i(a)),s=setTimeout(function(){s=null,k(a)},50),z(),e(Math.pow(2,.002*Ng())*y.k),f(q,p),j(a)}function o(){var a=cg.mouse(this),b=Math.log(y.k)/Math.LN2;g(this,a,c(a),cg.event.shiftKey?Math.ceil(b)-1:Math.floor(b)+1)}var p,q,r,s,t,u,v,w,x,y={x:0,y:0,k:1},A=[960,500],C=Pg,D=250,E=0,F="mousedown.zoom",G="mousemove.zoom",H="mouseup.zoom",I="touchstart.zoom",J=B(a,"zoomstart","zoom","zoomend");return Og||(Og="onwheel"in fg?(Ng=function(){return-cg.event.deltaY*(cg.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fg?(Ng=function(){return cg.event.wheelDelta},"mousewheel"):(Ng=function(){return-cg.event.detail},"MozMousePixelScroll")),a.event=function(a){a.each(function(){var a=J.of(this,arguments),b=y;Gi?cg.select(this).transition().each("start.zoom",function(){y=this.__chart__||{x:0,y:0,k:1},i(a)}).tween("zoom:zoom",function(){var c=A[0],d=A[1],e=q?q[0]:c/2,f=q?q[1]:d/2,g=cg.interpolateZoom([(e-y.x)/y.k,(f-y.y)/y.k,c/y.k],[(e-b.x)/b.k,(f-b.y)/b.k,c/b.k]);return function(b){var d=g(b),h=c/d[2];this.__chart__=y={x:e-d[0]*h,y:f-d[1]*h,k:h},j(a)}}).each("interrupt.zoom",function(){k(a)}).each("end.zoom",function(){k(a)}):(this.__chart__=y,i(a),j(a),k(a))})},a.translate=function(b){return arguments.length?(y={x:+b[0],y:+b[1],k:y.k},h(),a):[y.x,y.y]},a.scale=function(b){return arguments.length?(y={x:y.x,y:y.y,k:+b},h(),a):y.k},a.scaleExtent=function(b){return arguments.length?(C=null==b?Pg:[+b[0],+b[1]],a):C},a.center=function(b){return arguments.length?(r=b&&[+b[0],+b[1]],a):r},a.size=function(b){return arguments.length?(A=b&&[+b[0],+b[1]],a):A},a.duration=function(b){return arguments.length?(D=+b,a):D},a.x=function(b){return arguments.length?(v=b,u=b.copy(),y={x:0,y:0,k:1},a):v},a.y=function(b){return arguments.length?(x=b,w=b.copy(),y={x:0,y:0,k:1},a):x},cg.rebind(a,J,"on")};var Ng,Og,Pg=[0,1/0];cg.color=ha,ha.prototype.toString=function(){return this.rgb()+""},cg.hsl=ia;var Qg=ia.prototype=new ha;Qg.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,this.l/a)},Qg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new ia(this.h,this.s,a*this.l)},Qg.rgb=function(){return ja(this.h,this.s,this.l)},cg.hcl=ka;var Rg=ka.prototype=new ha;Rg.brighter=function(a){return new ka(this.h,this.c,Math.min(100,this.l+Sg*(arguments.length?a:1)))},Rg.darker=function(a){return new ka(this.h,this.c,Math.max(0,this.l-Sg*(arguments.length?a:1)))},Rg.rgb=function(){return la(this.h,this.c,this.l).rgb()},cg.lab=ma;var Sg=18,Tg=.95047,Ug=1,Vg=1.08883,Wg=ma.prototype=new ha;Wg.brighter=function(a){return new ma(Math.min(100,this.l+Sg*(arguments.length?a:1)),this.a,this.b)},Wg.darker=function(a){return new ma(Math.max(0,this.l-Sg*(arguments.length?a:1)),this.a,this.b)},Wg.rgb=function(){return na(this.l,this.a,this.b)},cg.rgb=sa;var Xg=sa.prototype=new ha;Xg.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e),new sa(Math.min(255,b/a),Math.min(255,c/a),Math.min(255,d/a))):new sa(e,e,e)},Xg.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),new sa(a*this.r,a*this.g,a*this.b)},Xg.hsl=function(){return xa(this.r,this.g,this.b)},Xg.toString=function(){return"#"+va(this.r)+va(this.g)+va(this.b)};var Yg=cg.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Yg.forEach(function(a,b){Yg.set(a,ta(b))}),cg.functor=Ba,cg.xhr=Ca(t),cg.dsv=function(a,b){function c(a,c,f){arguments.length<3&&(f=c,c=null);var g=Da(a,b,null==c?d:e(c),f);return g.row=function(a){return arguments.length?g.response(null==(c=a)?d:e(a)):c},g}function d(a){return c.parse(a.responseText)}function e(a){return function(b){return c.parse(b.responseText,a)}}function f(b){return b.map(g).join(a)}function g(a){return h.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var h=new RegExp('["'+a+"\n]"),i=a.charCodeAt(0);return c.parse=function(a,b){var d;return c.parseRows(a,function(a,c){if(d)return d(a,c-1);var e=new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+"]"}).join(",")+"}");d=b?function(a,c){return b(e(a),c)}:e})},c.parseRows=function(a,b){function c(){if(k>=j)return g;if(e)return e=!1,f;var b=k;if(34===a.charCodeAt(b)){for(var c=b;c++<j;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;++c}k=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&++k):10===d&&(e=!0),a.slice(b+1,c).replace(/""/g,'"')}for(;k<j;){var d=a.charCodeAt(k++),h=1;if(10===d)e=!0;else if(13===d)e=!0,10===a.charCodeAt(k)&&(++k,++h);else if(d!==i)continue;return a.slice(b,k-h)}return a.slice(b)}for(var d,e,f={},g={},h=[],j=a.length,k=0,l=0;(d=c())!==g;){for(var m=[];d!==f&&d!==g;)m.push(d),d=c();b&&null==(m=b(m,l++))||h.push(m)}return h},c.format=function(b){if(Array.isArray(b[0]))return c.formatRows(b);var d=new s,e=[];return b.forEach(function(a){for(var b in a)d.has(b)||e.push(d.add(b))}),[e.map(g).join(a)].concat(b.map(function(b){return e.map(function(a){return g(b[a])}).join(a)})).join("\n")},c.formatRows=function(a){return a.map(f).join("\n")},c},cg.csv=cg.dsv(",","text/csv"),cg.tsv=cg.dsv("\t","text/tab-separated-values");var Zg,$g,_g,ah,bh,ch=this[v(this,"requestAnimationFrame")]||function(a){setTimeout(a,17)};cg.timer=function(a,b,c){var d=arguments.length;d<2&&(b=0),d<3&&(c=Date.now());var e=c+b,f={c:a,t:e,f:!1,n:null};$g?$g.n=f:Zg=f,$g=f,_g||(ah=clearTimeout(ah),_g=1,ch(Ga))},cg.timer.flush=function(){Ha(),Ia()},cg.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)};var dh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ka);cg.formatPrefix=function(a,b){var c=0;return a&&(a<0&&(a*=-1),b&&(a=cg.round(a,Ja(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((c-1)/3)))),dh[8+c/3]};var eh=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fh=cg.map({b:function(a){return a.toString(2)},c:function(a){return String.fromCharCode(a)},o:function(a){return a.toString(8)},x:function(a){return a.toString(16)},X:function(a){return a.toString(16).toUpperCase()},g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return(a=cg.round(a,Ja(a,b))).toFixed(Math.max(0,Math.min(20,Ja(a*(1+1e-15),b))))}}),gh=cg.time={},hh=Date;Na.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ih.setUTCDate.apply(this._,arguments)},setDay:function(){ih.setUTCDay.apply(this._,arguments)},setFullYear:function(){ih.setUTCFullYear.apply(this._,arguments)},setHours:function(){ih.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ih.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ih.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ih.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ih.setUTCSeconds.apply(this._,arguments)},setTime:function(){ih.setTime.apply(this._,arguments)}};var ih=Date.prototype;gh.year=Oa(function(a){return a=gh.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),gh.years=gh.year.range,gh.years.utc=gh.year.utc.range,gh.day=Oa(function(a){var b=new hh(2e3,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),gh.days=gh.day.range,gh.days.utc=gh.day.utc.range,gh.dayOfYear=function(a){var b=gh.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(a,b){b=7-b;var c=gh[a]=Oa(function(a){return(a=gh.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});gh[a+"s"]=c.range,gh[a+"s"].utc=c.utc.range,gh[a+"OfYear"]=function(a){var c=gh.year(a).getDay();return Math.floor((gh.dayOfYear(a)+(c+b)%7)/7)}}),gh.week=gh.sunday,gh.weeks=gh.sunday.range,gh.weeks.utc=gh.sunday.utc.range,gh.weekOfYear=gh.sundayOfYear;var jh={"-":"",_:" ",0:"0"},kh=/^\s*\d+/,lh=/^%/;cg.locale=function(a){return{numberFormat:La(a),timeFormat:Qa(a)}};var mh=cg.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});cg.format=mh.numberFormat,cg.geo={},jb.prototype={s:0,t:0,add:function(a){kb(a,this.t,nh),kb(nh.s,this.s,this),this.s?this.t+=nh.t:this.s=nh.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var nh=new jb;cg.geo.stream=function(a,b){a&&oh.hasOwnProperty(a.type)?oh[a.type](a,b):lb(a,b)};var oh={Feature:function(a,b){lb(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++d<e;)lb(c[d].geometry,b)}},ph={Sphere:function(a,b){b.sphere()},Point:function(a,b){a=a.coordinates,b.point(a[0],a[1],a[2])},MultiPoint:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)a=c[d],b.point(a[0],a[1],a[2])},LineString:function(a,b){mb(a.coordinates,b,0)},MultiLineString:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)mb(c[d],b,0)},Polygon:function(a,b){nb(a.coordinates,b)},MultiPolygon:function(a,b){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)nb(c[d],b)},GeometryCollection:function(a,b){for(var c=a.geometries,d=-1,e=c.length;++d<e;)lb(c[d],b)}};cg.geo.area=function(a){return qh=0,cg.geo.stream(a,sh),qh};var qh,rh=new jb,sh={sphere:function(){qh+=4*Eg},point:w,lineStart:w,lineEnd:w,polygonStart:function(){rh.reset(),sh.lineStart=ob},polygonEnd:function(){var a=2*rh;qh+=a<0?4*Eg+a:a,sh.lineStart=sh.lineEnd=sh.point=w}};cg.geo.bounds=function(){function a(a,b){t.push(u=[k=a,m=a]),b<l&&(l=b),b>n&&(n=b)}function b(b,c){var d=pb([b*Ig,c*Ig]);if(r){var e=rb(r,d),f=[e[1],-e[0],0],g=rb(f,e);ub(g),g=vb(g);var i=b-o,j=i>0?1:-1,p=g[0]*Jg*j,q=mg(i)>180;if(q^(j*o<p&&p<j*b)){var s=g[1]*Jg;s>n&&(n=s)}else if(p=(p+360)%360-180,q^(j*o<p&&p<j*b)){var s=-g[1]*Jg;s<l&&(l=s)}else c<l&&(l=c),c>n&&(n=c);q?b<o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b):m>=k?(b<k&&(k=b),b>m&&(m=b)):b>o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b)}else a(b,c);r=d,o=b}function c(){v.point=b}function d(){u[0]=k,u[1]=m,v.point=a,r=null}function e(a,c){if(r){var d=a-o;s+=mg(d)>180?d+(d>0?360:-360):d}else p=a,q=c;sh.point(a,c),b(a,c)}function f(){sh.lineStart()}function g(){e(p,q),sh.lineEnd(),mg(s)>Cg&&(k=-(m=180)),u[0]=k,u[1]=m,r=null}function h(a,b){return(b-=a)<0?b+360:b}function i(a,b){return a[0]-b[0]}function j(a,b){return b[0]<=b[1]?b[0]<=a&&a<=b[1]:a<b[0]||b[1]<a;
|
@@ -16,4 +16,4 @@ u.uniqueId=function(a){var b=++M+"";return a?a+b:b},u.templateSettings={evaluate
|
|
16
16
|
c._dispatchIDs=n(c._dispatchIDs,a))}}function h(a){a&&a.dispatchConfig.registrationName&&g(a.dispatchMarker,null,a)}function i(a){o(a,f)}function j(a,b,c,d){m.injection.getInstanceHandle().traverseEnterLeave(c,d,g,a,b)}function k(a){o(a,h)}var l=a("53"),m=a("58"),n=a("70"),o=a("71"),p=l.PropagationPhases,q=m.getListener,r={accumulateTwoPhaseDispatches:i,accumulateDirectDispatches:k,accumulateEnterLeaveDispatches:j};c.exports=r}(a("47"))}),c.registerDynamic("b1",["50"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("50")),f={clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("b2",["b3"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("b3")),f={relatedTarget:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("b4",["b5"],!0,function(a,b,c){"use strict";function d(a){if(a.key){var b=f[a.key]||a.key;if("Unidentified"!==b)return b}if("keypress"===a.type){var c=e(a);return 13===c?"Enter":String.fromCharCode(c)}return"keydown"===a.type||"keyup"===a.type?g[a.keyCode]||"Unidentified":""}var e=(this||self,a("b5")),f={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};c.exports=d}),c.registerDynamic("b6",["b3","b5","b4","b7"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("b3")),f=a("b5"),g=a("b4"),h=a("b7"),i={key:g,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:h,charCode:function(a){return"keypress"===a.type?f(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?f(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}};e.augmentClass(d,i),c.exports=d}),c.registerDynamic("b8",["5f"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5f")),f={dataTransfer:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("b9",["b3","b7"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("b3")),f=a("b7"),g={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:f};e.augmentClass(d,g),c.exports=d}),c.registerDynamic("50",["43","4d","64","85"],!0,function(a,b,c){"use strict";function d(a,b,c){this.dispatchConfig=a,this.dispatchMarker=b,this.nativeEvent=c;var d=this.constructor.Interface;for(var e in d)if(d.hasOwnProperty(e)){var f=d[e];f?this[e]=f(c):this[e]=c[e]}var h=null!=c.defaultPrevented?c.defaultPrevented:c.returnValue===!1;h?this.isDefaultPrevented=g.thatReturnsTrue:this.isDefaultPrevented=g.thatReturnsFalse,this.isPropagationStopped=g.thatReturnsFalse}var e=(this||self,a("43")),f=a("4d"),g=a("64"),h=a("85"),i={type:null,target:h,currentTarget:g.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};f(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a.preventDefault?a.preventDefault():a.returnValue=!1,this.isDefaultPrevented=g.thatReturnsTrue},stopPropagation:function(){var a=this.nativeEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.isPropagationStopped=g.thatReturnsTrue},persist:function(){this.isPersistent=g.thatReturnsTrue},isPersistent:g.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface;for(var b in a)this[b]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),d.Interface=i,d.augmentClass=function(a,b){var c=this,d=Object.create(c.prototype);f(d,a.prototype),a.prototype=d,a.prototype.constructor=a,a.Interface=f({},c.Interface,b),a.augmentClass=c.augmentClass,e.addPoolingTo(a,e.threeArgumentPooler)},e.addPoolingTo(d,e.threeArgumentPooler),c.exports=d}),c.registerDynamic("85",[],!0,function(a,b,c){"use strict";function d(a){var b=a.target||a.srcElement||window;return 3===b.nodeType?b.parentNode:b}this||self;c.exports=d}),c.registerDynamic("b3",["50","85"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("50")),f=a("85"),g={view:function(a){if(a.view)return a.view;var b=f(a);if(null!=b&&b.window===b)return b;var c=b.ownerDocument;return c?c.defaultView||c.parentWindow:window},detail:function(a){return a.detail||0}};e.augmentClass(d,g),c.exports=d}),c.registerDynamic("b7",[],!0,function(a,b,c){"use strict";function d(a){var b=this,c=b.nativeEvent;if(c.getModifierState)return c.getModifierState(a);var d=f[a];return!!d&&!!c[d]}function e(a){return d}var f=(this||self,{Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"});c.exports=e}),c.registerDynamic("5f",["b3","ba","b7"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("b3")),f=a("ba"),g=a("b7"),h={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:g,button:function(a){var b=a.button;return"which"in a?b:2===b?2:4===b?1:0},buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},pageX:function(a){return"pageX"in a?a.pageX:a.clientX+f.currentScrollLeft},pageY:function(a){return"pageY"in a?a.pageY:a.clientY+f.currentScrollTop}};e.augmentClass(d,h),c.exports=d}),c.registerDynamic("bb",["5f"],!0,function(a,b,c){"use strict";function d(a,b,c){e.call(this,a,b,c)}var e=(this||self,a("5f")),f={deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null};e.augmentClass(d,f),c.exports=d}),c.registerDynamic("b5",[],!0,function(a,b,c){"use strict";function d(a){var b,c=a.keyCode;return"charCode"in a?(b=a.charCode,0===b&&13===c&&(b=13)):b=c,b>=32||13===b?b:0}this||self;c.exports=d}),c.registerDynamic("bc",["53","bd","54","b1","50","b2","b6","5f","b8","b9","b3","bb","b5","72","56","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("53"),e=a("bd"),f=a("54"),g=a("b1"),h=a("50"),i=a("b2"),j=a("b6"),k=a("5f"),l=a("b8"),m=a("b9"),n=a("b3"),o=a("bb"),p=a("b5"),q=a("72"),r=a("56"),s=(a("46"),d.topLevelTypes),t={blur:{phasedRegistrationNames:{bubbled:r({onBlur:!0}),captured:r({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:r({onClick:!0}),captured:r({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:r({onContextMenu:!0}),captured:r({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:r({onCopy:!0}),captured:r({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:r({onCut:!0}),captured:r({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:r({onDoubleClick:!0}),captured:r({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:r({onDrag:!0}),captured:r({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:r({onDragEnd:!0}),captured:r({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:r({onDragEnter:!0}),captured:r({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:r({onDragExit:!0}),captured:r({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:r({onDragLeave:!0}),captured:r({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:r({onDragOver:!0}),captured:r({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:r({onDragStart:!0}),captured:r({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:r({onDrop:!0}),captured:r({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:r({onFocus:!0}),captured:r({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:r({onInput:!0}),captured:r({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:r({onKeyDown:!0}),captured:r({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:r({onKeyPress:!0}),captured:r({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:r({onKeyUp:!0}),captured:r({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:r({onLoad:!0}),captured:r({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:r({onError:!0}),captured:r({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:r({onMouseDown:!0}),captured:r({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:r({onMouseMove:!0}),captured:r({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:r({onMouseOut:!0}),captured:r({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:r({onMouseOver:!0}),captured:r({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:r({onMouseUp:!0}),captured:r({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:r({onPaste:!0}),captured:r({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:r({onReset:!0}),captured:r({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:r({onScroll:!0}),captured:r({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:r({onSubmit:!0}),captured:r({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:r({onTouchCancel:!0}),captured:r({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:r({onTouchEnd:!0}),captured:r({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:r({onTouchMove:!0}),captured:r({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:r({onTouchStart:!0}),captured:r({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:r({onWheel:!0}),captured:r({onWheelCapture:!0})}}},u={topBlur:t.blur,topClick:t.click,topContextMenu:t.contextMenu,topCopy:t.copy,topCut:t.cut,topDoubleClick:t.doubleClick,topDrag:t.drag,topDragEnd:t.dragEnd,topDragEnter:t.dragEnter,topDragExit:t.dragExit,topDragLeave:t.dragLeave,topDragOver:t.dragOver,topDragStart:t.dragStart,topDrop:t.drop,topError:t.error,topFocus:t.focus,topInput:t.input,topKeyDown:t.keyDown,topKeyPress:t.keyPress,topKeyUp:t.keyUp,topLoad:t.load,topMouseDown:t.mouseDown,topMouseMove:t.mouseMove,topMouseOut:t.mouseOut,topMouseOver:t.mouseOver,topMouseUp:t.mouseUp,topPaste:t.paste,topReset:t.reset,topScroll:t.scroll,topSubmit:t.submit,topTouchCancel:t.touchCancel,topTouchEnd:t.touchEnd,topTouchMove:t.touchMove,topTouchStart:t.touchStart,topWheel:t.wheel};for(var v in u)u[v].dependencies=[v];var w={eventTypes:t,executeDispatch:function(a,b,c){var d=e.executeDispatch(a,b,c);d===!1&&(a.stopPropagation(),a.preventDefault())},extractEvents:function(a,b,c,d){var e=u[a];if(!e)return null;var r;switch(a){case s.topInput:case s.topLoad:case s.topError:case s.topReset:case s.topSubmit:r=h;break;case s.topKeyPress:if(0===p(d))return null;case s.topKeyDown:case s.topKeyUp:r=j;break;case s.topBlur:case s.topFocus:r=i;break;case s.topClick:if(2===d.button)return null;case s.topContextMenu:case s.topDoubleClick:case s.topMouseDown:case s.topMouseMove:case s.topMouseOut:case s.topMouseOver:case s.topMouseUp:r=k;break;case s.topDrag:case s.topDragEnd:case s.topDragEnter:case s.topDragExit:case s.topDragLeave:case s.topDragOver:case s.topDragStart:case s.topDrop:r=l;break;case s.topTouchCancel:case s.topTouchEnd:case s.topTouchMove:case s.topTouchStart:r=m;break;case s.topScroll:r=n;break;case s.topWheel:r=o;break;case s.topCopy:case s.topCut:case s.topPaste:r=g}q(r);var t=r.getPooled(e,c,d);return f.accumulateTwoPhaseDispatches(t),t}};c.exports=w}(a("47"))}),c.registerDynamic("be",["62"],!0,function(a,b,c){"use strict";var d=(this||self,a("62")),e=d.injection.MUST_USE_ATTRIBUTE,f={Properties:{clipPath:e,cx:e,cy:e,d:e,dx:e,dy:e,fill:e,fillOpacity:e,fontFamily:e,fontSize:e,fx:e,fy:e,gradientTransform:e,gradientUnits:e,markerEnd:e,markerMid:e,markerStart:e,offset:e,opacity:e,patternContentUnits:e,patternUnits:e,points:e,preserveAspectRatio:e,r:e,rx:e,ry:e,spreadMethod:e,stopColor:e,stopOpacity:e,stroke:e,strokeDasharray:e,strokeLinecap:e,strokeOpacity:e,strokeWidth:e,textAnchor:e,transform:e,version:e,viewBox:e,x1:e,x2:e,x:e,y1:e,y2:e,y:e},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};c.exports=f}),c.registerDynamic("bf",["c0","72","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){this.props=a,this.context=b}var e=a("c0"),f=a("72");a("46");d.prototype.setState=function(a,b){f("object"==typeof a||"function"==typeof a||null==a),e.enqueueSetState(this,a),b&&e.enqueueCallback(this,b)},d.prototype.forceUpdate=function(a){e.enqueueForceUpdate(this),a&&e.enqueueCallback(this,a)};c.exports=d}(a("47"))}),c.registerDynamic("c1",[],!0,function(a,b,c){"use strict";var d=(this||self,{guard:function(a,b){return a}});c.exports=d}),c.registerDynamic("56",[],!0,function(a,b,c){var d=(this||self,function(a){var b;for(b in a)if(a.hasOwnProperty(b))return b;return null});c.exports=d}),c.registerDynamic("6a",["bf","c2","4a","c1","c3","c4","c5","c6","c0","4d","72","6b","56","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){var c=y.hasOwnProperty(b)?y[b]:null;A.hasOwnProperty(b)&&s(c===w.OVERRIDE_BASE),a.hasOwnProperty(b)&&s(c===w.DEFINE_MANY||c===w.DEFINE_MANY_MERGED)}function e(a,b){if(b){s("function"!=typeof b),s(!m.isValidElement(b));var c=a.prototype;b.hasOwnProperty(v)&&z.mixins(a,b.mixins);for(var e in b)if(b.hasOwnProperty(e)&&e!==v){var f=b[e];if(d(c,e),z.hasOwnProperty(e))z[e](a,f);else{var g=y.hasOwnProperty(e),j=c.hasOwnProperty(e),k=f&&f.__reactDontBind,l="function"==typeof f,n=l&&!g&&!j&&!k;if(n)c.__reactAutoBindMap||(c.__reactAutoBindMap={}),c.__reactAutoBindMap[e]=f,c[e]=f;else if(j){var o=y[e];s(g&&(o===w.DEFINE_MANY_MERGED||o===w.DEFINE_MANY)),o===w.DEFINE_MANY_MERGED?c[e]=h(c[e],f):o===w.DEFINE_MANY&&(c[e]=i(c[e],f))}else c[e]=f}}}}function f(a,b){if(b)for(var c in b){var d=b[c];if(b.hasOwnProperty(c)){var e=c in z;s(!e);var f=c in a;s(!f),a[c]=d}}}function g(a,b){s(a&&b&&"object"==typeof a&&"object"==typeof b);for(var c in b)b.hasOwnProperty(c)&&(s(void 0===a[c]),a[c]=b[c]);return a}function h(a,b){return function(){var c=a.apply(this,arguments),d=b.apply(this,arguments);if(null==c)return d;if(null==d)return c;var e={};return g(e,c),g(e,d),e}}function i(a,b){return function(){a.apply(this,arguments),b.apply(this,arguments)}}function j(a,b){var c=b.bind(a);return c}function k(a){for(var b in a.__reactAutoBindMap)if(a.__reactAutoBindMap.hasOwnProperty(b)){var c=a.__reactAutoBindMap[b];a[b]=j(a,n.guard(c,a.constructor.displayName+"."+b))}}var l=a("bf"),m=(a("c2"),a("4a")),n=a("c1"),o=a("c3"),p=a("c4"),q=(a("c5"),a("c6"),a("c0")),r=a("4d"),s=a("72"),t=a("6b"),u=a("56"),v=(a("46"),u({mixins:null})),w=t({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],y={mixins:w.DEFINE_MANY,statics:w.DEFINE_MANY,propTypes:w.DEFINE_MANY,contextTypes:w.DEFINE_MANY,childContextTypes:w.DEFINE_MANY,getDefaultProps:w.DEFINE_MANY_MERGED,getInitialState:w.DEFINE_MANY_MERGED,getChildContext:w.DEFINE_MANY_MERGED,render:w.DEFINE_ONCE,componentWillMount:w.DEFINE_MANY,componentDidMount:w.DEFINE_MANY,componentWillReceiveProps:w.DEFINE_MANY,shouldComponentUpdate:w.DEFINE_ONCE,componentWillUpdate:w.DEFINE_MANY,componentDidUpdate:w.DEFINE_MANY,componentWillUnmount:w.DEFINE_MANY,updateComponent:w.OVERRIDE_BASE},z={displayName:function(a,b){a.displayName=b},mixins:function(a,b){if(b)for(var c=0;c<b.length;c++)e(a,b[c])},childContextTypes:function(a,b){a.childContextTypes=r({},a.childContextTypes,b)},contextTypes:function(a,b){a.contextTypes=r({},a.contextTypes,b)},getDefaultProps:function(a,b){a.getDefaultProps?a.getDefaultProps=h(a.getDefaultProps,b):a.getDefaultProps=b},propTypes:function(a,b){a.propTypes=r({},a.propTypes,b)},statics:function(a,b){f(a,b)}},A={replaceState:function(a,b){q.enqueueReplaceState(this,a),b&&q.enqueueCallback(this,b)},isMounted:function(){var a=o.get(this);return a&&a!==p.currentlyMountingInstance},setProps:function(a,b){q.enqueueSetProps(this,a),b&&q.enqueueCallback(this,b)},replaceProps:function(a,b){q.enqueueReplaceProps(this,a),b&&q.enqueueCallback(this,b)}},B=function(){};r(B.prototype,l.prototype,A);var C={createClass:function(a){var b=function(a,b){this.__reactAutoBindMap&&k(this),this.props=a,this.context=b,this.state=null;var c=this.getInitialState?this.getInitialState():null;s("object"==typeof c&&!Array.isArray(c)),this.state=c};b.prototype=new B,b.prototype.constructor=b,x.forEach(e.bind(null,b)),e(b,a),b.getDefaultProps&&(b.defaultProps=b.getDefaultProps()),s(b.prototype.render);for(var c in y)b.prototype[c]||(b.prototype[c]=null);return b.type=b,b},injection:{injectMixin:function(a){x.push(a)}}};c.exports=C}(a("47"))}),c.registerDynamic("c7",["6a","4a","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){var b=f.createFactory(a),c=e.createClass({tagName:a.toUpperCase(),displayName:"ReactFullPageComponent"+a,componentWillUnmount:function(){g(!1)},render:function(){return b(this.props)}});return c}var e=a("6a"),f=a("4a"),g=a("72");c.exports=d}(a("47"))}),c.registerDynamic("c8",["4d"],!0,function(a,b,c){function d(a){for(var b=0,c=0;c<a.length;c++){var d=a[c];b+=d.totalTime}return b}function e(a){for(var b=[],c=0;c<a.length;c++){var d,e=a[c];for(d in e.writes)e.writes[d].forEach(function(a){b.push({id:d,type:k[a.type]||a.type,args:a.args})})}return b}function f(a){for(var b,c={},d=0;d<a.length;d++){var e=a[d],f=i({},e.exclusive,e.inclusive);for(var g in f)b=e.displayNames[g].current,c[b]=c[b]||{componentName:b,inclusive:0,exclusive:0,render:0,count:0},e.render[g]&&(c[b].render+=e.render[g]),e.exclusive[g]&&(c[b].exclusive+=e.exclusive[g]),e.inclusive[g]&&(c[b].inclusive+=e.inclusive[g]),e.counts[g]&&(c[b].count+=e.counts[g])}var h=[];for(b in c)c[b].exclusive>=j&&h.push(c[b]);return h.sort(function(a,b){return b.exclusive-a.exclusive}),h}function g(a,b){for(var c,d={},e=0;e<a.length;e++){var f,g=a[e],k=i({},g.exclusive,g.inclusive);b&&(f=h(g));for(var l in k)if(!b||f[l]){var m=g.displayNames[l];c=m.owner+" > "+m.current,d[c]=d[c]||{componentName:c,time:0,count:0},g.inclusive[l]&&(d[c].time+=g.inclusive[l]),g.counts[l]&&(d[c].count+=g.counts[l])}}var n=[];for(c in d)d[c].time>=j&&n.push(d[c]);return n.sort(function(a,b){return b.time-a.time}),n}function h(a){var b={},c=Object.keys(a.writes),d=i({},a.exclusive,a.inclusive);for(var e in d){for(var f=!1,g=0;g<c.length;g++)if(0===c[g].indexOf(e)){f=!0;break}!f&&a.counts[e]>0&&(b[e]=!0)}return b}var i=(this||self,a("4d")),j=1.2,k={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},l={getExclusiveSummary:f,getInclusiveSummary:g,getDOMSummary:e,getTotalTime:d};c.exports=l}),c.registerDynamic("c9",["55"],!0,function(a,b,c){"use strict";var d,e=(this||self,a("55"));e.canUseDOM&&(d=window.performance||window.msPerformance||window.webkitPerformance),c.exports=d||{}}),c.registerDynamic("ca",["c9"],!0,function(a,b,c){var d=(this||self,a("c9"));d&&d.now||(d=Date);var e=d.now.bind(d);c.exports=e}),c.registerDynamic("cb",["62","c8","60","99","ca"],!0,function(a,b,c){"use strict";function d(a){return Math.floor(100*a)/100}function e(a,b,c){a[b]=(a[b]||0)+c}var f=(this||self,a("62")),g=a("c8"),h=a("60"),i=a("99"),j=a("ca"),k={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){k._injected||i.injection.injectMeasure(k.measure),k._allMeasurements.length=0,i.enableMeasure=!0},stop:function(){i.enableMeasure=!1},getLastMeasurements:function(){return k._allMeasurements},printExclusive:function(a){a=a||k._allMeasurements;var b=g.getExclusiveSummary(a);console.table(b.map(function(a){return{"Component class name":a.componentName,"Total inclusive time (ms)":d(a.inclusive),"Exclusive mount time (ms)":d(a.exclusive),"Exclusive render time (ms)":d(a.render),"Mount time per instance (ms)":d(a.exclusive/a.count),"Render time per instance (ms)":d(a.render/a.count),Instances:a.count}}))},printInclusive:function(a){a=a||k._allMeasurements;var b=g.getInclusiveSummary(a);console.table(b.map(function(a){return{"Owner > component":a.componentName,"Inclusive time (ms)":d(a.time),Instances:a.count}})),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(a){var b=g.getInclusiveSummary(a,!0);return b.map(function(a){return{"Owner > component":a.componentName,"Wasted time (ms)":a.time,Instances:a.count}})},printWasted:function(a){a=a||k._allMeasurements,console.table(k.getMeasurementsSummaryMap(a)),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},printDOM:function(a){a=a||k._allMeasurements;var b=g.getDOMSummary(a);console.table(b.map(function(a){var b={};return b[f.ID_ATTRIBUTE_NAME]=a.id,b.type=a.type,b.args=JSON.stringify(a.args),b})),console.log("Total time:",g.getTotalTime(a).toFixed(2)+" ms")},_recordWrite:function(a,b,c,d){var e=k._allMeasurements[k._allMeasurements.length-1].writes;e[a]=e[a]||[],e[a].push({type:b,time:c,args:d})},measure:function(a,b,c){return function(){for(var d=[],f=0,g=arguments.length;f<g;f++)d.push(arguments[f]);var i,l,m;if("_renderNewRootComponent"===b||"flushBatchedUpdates"===b)return k._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),m=j(),l=c.apply(this,d),k._allMeasurements[k._allMeasurements.length-1].totalTime=j()-m,l;if("_mountImageIntoNode"===b||"ReactDOMIDOperations"===a){if(m=j(),l=c.apply(this,d),i=j()-m,"_mountImageIntoNode"===b){var n=h.getID(d[1]);k._recordWrite(n,b,i,d[0])}else"dangerouslyProcessChildrenUpdates"===b?d[0].forEach(function(a){var b={};null!==a.fromIndex&&(b.fromIndex=a.fromIndex),null!==a.toIndex&&(b.toIndex=a.toIndex),null!==a.textContent&&(b.textContent=a.textContent),null!==a.markupIndex&&(b.markup=d[1][a.markupIndex]),k._recordWrite(a.parentID,a.type,i,b)}):k._recordWrite(d[0],b,i,Array.prototype.slice.call(d,1));return l}if("ReactCompositeComponent"!==a||"mountComponent"!==b&&"updateComponent"!==b&&"_renderValidatedComponent"!==b)return c.apply(this,d);if("string"==typeof this._currentElement.type)return c.apply(this,d);var o="mountComponent"===b?d[0]:this._rootNodeID,p="_renderValidatedComponent"===b,q="mountComponent"===b,r=k._mountStack,s=k._allMeasurements[k._allMeasurements.length-1];if(p?e(s.counts,o,1):q&&r.push(0),m=j(),l=c.apply(this,d),i=j()-m,p)e(s.render,o,i);else if(q){var t=r.pop();r[r.length-1]+=i,e(s.exclusive,o,i-t),e(s.inclusive,o,i)}else e(s.inclusive,o,i);return s.displayNames[o]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},l}}};c.exports=k}),c.registerDynamic("cc",["52","57","5c","5d","5e","55","61","63","69","6a","7e","65","7f","67","6c","6e","98","73","74","77","78","7c","7d","4a","83","a2","84","60","a6","af","b0","bc","be","c7","cb","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return o.createClass({tagName:a.toUpperCase(),render:function(){return new C(a,null,null,null,null,this.props)}})}function e(){E.EventEmitter.injectReactEventListener(D),E.EventPluginHub.injectEventPluginOrder(i),E.EventPluginHub.injectInstanceHandle(F),E.EventPluginHub.injectMount(G),E.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:K,EnterLeaveEventPlugin:j,ChangeEventPlugin:g,MobileSafariClickEventPlugin:m,SelectEventPlugin:I,BeforeInputEventPlugin:f}),E.NativeComponent.injectGenericComponentClass(r),E.NativeComponent.injectTextComponentClass(B),E.NativeComponent.injectAutoWrapper(d),E.Class.injectMixin(n),E.NativeComponent.injectComponentClasses({button:s,form:t,iframe:w,img:u,input:x,option:y,select:z,textarea:A,html:M("html"),head:M("head"),body:M("body")}),E.DOMProperty.injectDOMPropertyConfig(l),E.DOMProperty.injectDOMPropertyConfig(L),E.EmptyComponent.injectEmptyComponent("noscript"),E.Updates.injectReconcileTransaction(H),E.Updates.injectBatchingStrategy(q),E.RootIndex.injectCreateReactRootIndex(k.canUseDOM?h.createReactRootIndex:J.createReactRootIndex),E.Component.injectEnvironment(p),E.DOMComponent.injectIDOperations(v)}var f=a("52"),g=a("57"),h=a("5c"),i=a("5d"),j=a("5e"),k=a("55"),l=a("61"),m=a("63"),n=a("69"),o=a("6a"),p=a("7e"),q=a("65"),r=a("7f"),s=a("67"),t=a("6c"),u=a("6e"),v=a("98"),w=a("73"),x=a("74"),y=a("77"),z=a("78"),A=a("7c"),B=a("7d"),C=a("4a"),D=a("83"),E=a("a2"),F=a("84"),G=a("60"),H=a("a6"),I=a("af"),J=a("b0"),K=a("bc"),L=a("be"),M=a("c7");c.exports={inject:e}}(a("47"))}),c.registerDynamic("7a",["4a","44","c6","64"],!0,function(a,b,c){"use strict";function d(a){function b(b,c,d,e,f){if(e=e||v,null==c[d]){var g=t[f];return b?new Error("Required "+g+" `"+d+"` was not specified in "+("`"+e+"`.")):null}return a(c,d,e,f)}var c=b.bind(null,!1);return c.isRequired=b.bind(null,!0),c}function e(a){function b(b,c,d,e){var f=b[c],g=p(f);if(g!==a){var h=t[e],i=q(f);return new Error("Invalid "+h+" `"+c+"` of type `"+i+"` "+("supplied to `"+d+"`, expected `"+a+"`."))}return null}return d(b)}function f(){return d(u.thatReturns(null))}function g(a){function b(b,c,d,e){var f=b[c];if(!Array.isArray(f)){var g=t[e],h=p(f);return new Error("Invalid "+g+" `"+c+"` of type "+("`"+h+"` supplied to `"+d+"`, expected an array."))}for(var i=0;i<f.length;i++){var j=a(f,i,d,e);if(j instanceof Error)return j}return null}return d(b)}function h(){function a(a,b,c,d){if(!r.isValidElement(a[b])){var e=t[d];return new Error("Invalid "+e+" `"+b+"` supplied to "+("`"+c+"`, expected a ReactElement."))}return null}return d(a)}function i(a){function b(b,c,d,e){if(!(b[c]instanceof a)){var f=t[e],g=a.name||v;return new Error("Invalid "+f+" `"+c+"` supplied to "+("`"+d+"`, expected instance of `"+g+"`."))}return null}return d(b)}function j(a){function b(b,c,d,e){for(var f=b[c],g=0;g<a.length;g++)if(f===a[g])return null;var h=t[e],i=JSON.stringify(a);return new Error("Invalid "+h+" `"+c+"` of value `"+f+"` "+("supplied to `"+d+"`, expected one of "+i+"."))}return d(b)}function k(a){function b(b,c,d,e){var f=b[c],g=p(f);if("object"!==g){var h=t[e];return new Error("Invalid "+h+" `"+c+"` of type "+("`"+g+"` supplied to `"+d+"`, expected an object."))}for(var i in f)if(f.hasOwnProperty(i)){var j=a(f,i,d,e);if(j instanceof Error)return j}return null}return d(b)}function l(a){function b(b,c,d,e){for(var f=0;f<a.length;f++){var g=a[f];if(null==g(b,c,d,e))return null}var h=t[e];return new Error("Invalid "+h+" `"+c+"` supplied to "+("`"+d+"`."))}return d(b)}function m(){function a(a,b,c,d){if(!o(a[b])){var e=t[d];return new Error("Invalid "+e+" `"+b+"` supplied to "+("`"+c+"`, expected a ReactNode."))}return null}return d(a)}function n(a){function b(b,c,d,e){var f=b[c],g=p(f);if("object"!==g){var h=t[e];return new Error("Invalid "+h+" `"+c+"` of type `"+g+"` "+("supplied to `"+d+"`, expected `object`."))}for(var i in a){var j=a[i];if(j){var k=j(f,i,d,e);if(k)return k}}return null}return d(b)}function o(a){switch(typeof a){case"number":case"string":case"undefined":return!0;case"boolean":return!a;case"object":if(Array.isArray(a))return a.every(o);if(null===a||r.isValidElement(a))return!0;a=s.extractIfFragment(a);for(var b in a)if(!o(a[b]))return!1;return!0;default:return!1}}function p(a){var b=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":b}function q(a){var b=p(a);if("object"===b){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return b}var r=(this||self,a("4a")),s=a("44"),t=a("c6"),u=a("64"),v="<<anonymous>>",w=h(),x=m(),y={array:e("array"),bool:e("boolean"),func:e("function"),number:e("number"),object:e("object"),string:e("string"),any:f(),arrayOf:g,element:w,instanceOf:i,node:x,objectOf:k,oneOf:j,oneOfType:l,shape:n};c.exports=y}),c.registerDynamic("a9",["43","6f","4d"],!0,function(a,b,c){"use strict";function d(){this.listenersToPut=[]}var e=(this||self,a("43")),f=a("6f"),g=a("4d");g(d.prototype,{enqueuePutListener:function(a,b,c){this.listenersToPut.push({rootNodeID:a,propKey:b,propValue:c})},putListeners:function(){for(var a=0;a<this.listenersToPut.length;a++){var b=this.listenersToPut[a];f.putListener(b.rootNodeID,b.propKey,b.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),e.addPoolingTo(d),c.exports=d}),c.registerDynamic("cd",["43","a7","a9","66","4d","64"],!0,function(a,b,c){"use strict";function d(a){this.reinitializeTransaction(),this.renderToStaticMarkup=a,this.reactMountReady=f.getPooled(null),this.putListenerQueue=g.getPooled()}var e=(this||self,a("43")),f=a("a7"),g=a("a9"),h=a("66"),i=a("4d"),j=a("64"),k={initialize:function(){this.reactMountReady.reset()},close:j},l={initialize:function(){this.putListenerQueue.reset()},close:j},m=[l,k],n={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){f.release(this.reactMountReady),this.reactMountReady=null,g.release(this.putListenerQueue),this.putListenerQueue=null}};i(d.prototype,h.Mixin,n),e.addPoolingTo(d),c.exports=d}),c.registerDynamic("ce",["4a","84","cf","cd","d0","9e","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){l(f.isValidElement(a));var b;try{var c=g.createReactRootID();return b=i.getPooled(!1),b.perform(function(){var d=k(a,null),e=d.mountComponent(c,b,j);return h.addChecksumToMarkup(e)},null)}finally{i.release(b)}}function e(a){l(f.isValidElement(a));var b;try{var c=g.createReactRootID();return b=i.getPooled(!0),b.perform(function(){var d=k(a,null);return d.mountComponent(c,b,j)},null)}finally{i.release(b)}}var f=a("4a"),g=a("84"),h=a("cf"),i=a("cd"),j=a("d0"),k=a("9e"),l=a("72");c.exports={renderToString:d,renderToStaticMarkup:e}}(a("47"))}),c.registerDynamic("62",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){return(a&b)===b}var e=a("72"),f={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(a){var b=a.Properties||{},c=a.DOMAttributeNames||{},g=a.DOMPropertyNames||{},i=a.DOMMutationMethods||{};a.isCustomAttribute&&h._isCustomAttributeFunctions.push(a.isCustomAttribute);for(var j in b){e(!h.isStandardName.hasOwnProperty(j)),h.isStandardName[j]=!0;var k=j.toLowerCase();if(h.getPossibleStandardName[k]=j,c.hasOwnProperty(j)){var l=c[j];h.getPossibleStandardName[l]=j,h.getAttributeName[j]=l}else h.getAttributeName[j]=k;h.getPropertyName[j]=g.hasOwnProperty(j)?g[j]:j,i.hasOwnProperty(j)?h.getMutationMethod[j]=i[j]:h.getMutationMethod[j]=null;var m=b[j];h.mustUseAttribute[j]=d(m,f.MUST_USE_ATTRIBUTE),h.mustUseProperty[j]=d(m,f.MUST_USE_PROPERTY),
|
17
17
|
h.hasSideEffects[j]=d(m,f.HAS_SIDE_EFFECTS),h.hasBooleanValue[j]=d(m,f.HAS_BOOLEAN_VALUE),h.hasNumericValue[j]=d(m,f.HAS_NUMERIC_VALUE),h.hasPositiveNumericValue[j]=d(m,f.HAS_POSITIVE_NUMERIC_VALUE),h.hasOverloadedBooleanValue[j]=d(m,f.HAS_OVERLOADED_BOOLEAN_VALUE),e(!h.mustUseAttribute[j]||!h.mustUseProperty[j]),e(h.mustUseProperty[j]||!h.hasSideEffects[j]),e(!!h.hasBooleanValue[j]+!!h.hasNumericValue[j]+!!h.hasOverloadedBooleanValue[j]<=1)}}},g={},h={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(a){for(var b=0;b<h._isCustomAttributeFunctions.length;b++){var c=h._isCustomAttributeFunctions[b];if(c(a))return!0}return!1},getDefaultValueForProperty:function(a,b){var c,d=g[a];return d||(g[a]=d={}),b in d||(c=document.createElement(a),d[b]=c[b]),d[b]},injection:f};c.exports=h}(a("47"))}),c.registerDynamic("d1",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){if(h)for(var a in i){var b=i[a],c=h.indexOf(a);if(g(c>-1),!j.plugins[c]){g(b.extractEvents),j.plugins[c]=b;var d=b.eventTypes;for(var f in d)g(e(d[f],b,f))}}}function e(a,b,c){g(!j.eventNameDispatchConfigs.hasOwnProperty(c)),j.eventNameDispatchConfigs[c]=a;var d=a.phasedRegistrationNames;if(d){for(var e in d)if(d.hasOwnProperty(e)){var h=d[e];f(h,b,c)}return!0}return!!a.registrationName&&(f(a.registrationName,b,c),!0)}function f(a,b,c){g(!j.registrationNameModules[a]),j.registrationNameModules[a]=b,j.registrationNameDependencies[a]=b.eventTypes[c].dependencies}var g=a("72"),h=null,i={},j={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(a){g(!h),h=Array.prototype.slice.call(a),d()},injectEventPluginsByName:function(a){var b=!1;for(var c in a)if(a.hasOwnProperty(c)){var e=a[c];i.hasOwnProperty(c)&&i[c]===e||(g(!i[c]),i[c]=e,b=!0)}b&&d()},getPluginModuleForEvent:function(a){var b=a.dispatchConfig;if(b.registrationName)return j.registrationNameModules[b.registrationName]||null;for(var c in b.phasedRegistrationNames)if(b.phasedRegistrationNames.hasOwnProperty(c)){var d=j.registrationNameModules[b.phasedRegistrationNames[c]];if(d)return d}return null},_resetEventPlugins:function(){h=null;for(var a in i)i.hasOwnProperty(a)&&delete i[a];j.plugins.length=0;var b=j.eventNameDispatchConfigs;for(var c in b)b.hasOwnProperty(c)&&delete b[c];var d=j.registrationNameModules;for(var e in d)d.hasOwnProperty(e)&&delete d[e]}};c.exports=j}(a("47"))}),c.registerDynamic("53",["6b"],!0,function(a,b,c){"use strict";var d=(this||self,a("6b")),e=d({bubbled:null,captured:null}),f=d({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),g={topLevelTypes:f,PropagationPhases:e};c.exports=g}),c.registerDynamic("bd",["53","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return a===q.topMouseUp||a===q.topTouchEnd||a===q.topTouchCancel}function e(a){return a===q.topMouseMove||a===q.topTouchMove}function f(a){return a===q.topMouseDown||a===q.topTouchStart}function g(a,b){var c=a._dispatchListeners,d=a._dispatchIDs;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)b(a,c[e],d[e]);else c&&b(a,c,d)}function h(a,b,c){a.currentTarget=p.Mount.getNode(c);var d=b(a,c);return a.currentTarget=null,d}function i(a,b){g(a,b),a._dispatchListeners=null,a._dispatchIDs=null}function j(a){var b=a._dispatchListeners,c=a._dispatchIDs;if(Array.isArray(b)){for(var d=0;d<b.length&&!a.isPropagationStopped();d++)if(b[d](a,c[d]))return c[d]}else if(b&&b(a,c))return c;return null}function k(a){var b=j(a);return a._dispatchIDs=null,a._dispatchListeners=null,b}function l(a){var b=a._dispatchListeners,c=a._dispatchIDs;o(!Array.isArray(b));var d=b?b(a,c):null;return a._dispatchListeners=null,a._dispatchIDs=null,d}function m(a){return!!a._dispatchListeners}var n=a("53"),o=a("72"),p={Mount:null,injectMount:function(a){p.Mount=a}},q=n.topLevelTypes,r={isEndish:d,isMoveish:e,isStartish:f,executeDirectDispatch:l,executeDispatch:h,executeDispatchesInOrder:i,executeDispatchesInOrderStopAtTrue:k,hasDispatches:m,injection:p,useTouchEvents:!1};c.exports=r}(a("47"))}),c.registerDynamic("70",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){if(e(null!=b),null==a)return b;var c=Array.isArray(a),d=Array.isArray(b);return c&&d?(a.push.apply(a,b),a):c?(a.push(b),a):d?[a].concat(b):[a,b]}var e=a("72");c.exports=d}(a("47"))}),c.registerDynamic("71",[],!0,function(a,b,c){"use strict";var d=(this||self,function(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)});c.exports=d}),c.registerDynamic("58",["d1","bd","70","71","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("d1"),e=a("bd"),f=a("70"),g=a("71"),h=a("72"),i={},j=null,k=function(a){if(a){var b=e.executeDispatch,c=d.getPluginModuleForEvent(a);c&&c.executeDispatch&&(b=c.executeDispatch),e.executeDispatchesInOrder(a,b),a.isPersistent()||a.constructor.release(a)}},l=null,m={injection:{injectMount:e.injection.injectMount,injectInstanceHandle:function(a){l=a},getInstanceHandle:function(){return l},injectEventPluginOrder:d.injectEventPluginOrder,injectEventPluginsByName:d.injectEventPluginsByName},eventNameDispatchConfigs:d.eventNameDispatchConfigs,registrationNameModules:d.registrationNameModules,putListener:function(a,b,c){h(!c||"function"==typeof c);var d=i[b]||(i[b]={});d[a]=c},getListener:function(a,b){var c=i[b];return c&&c[a]},deleteListener:function(a,b){var c=i[b];c&&delete c[a]},deleteAllListeners:function(a){for(var b in i)delete i[b][a]},extractEvents:function(a,b,c,e){for(var g,h=d.plugins,i=0,j=h.length;i<j;i++){var k=h[i];if(k){var l=k.extractEvents(a,b,c,e);l&&(g=f(g,l))}}return g},enqueueEvents:function(a){a&&(j=f(j,a))},processEventQueue:function(){var a=j;j=null,g(a,k),h(!j)},__purge:function(){i={}},__getListenerBank:function(){return i}};c.exports=m}(a("47"))}),c.registerDynamic("d2",["58"],!0,function(a,b,c){"use strict";function d(a){e.enqueueEvents(a),e.processEventQueue()}var e=(this||self,a("58")),f={handleTopLevel:function(a,b,c,f){var g=e.extractEvents(a,b,c,f);d(g)}};c.exports=f}),c.registerDynamic("ba",[],!0,function(a,b,c){"use strict";var d=(this||self,{currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(a){d.currentScrollLeft=a.x,d.currentScrollTop=a.y}});c.exports=d}),c.registerDynamic("5a",["55"],!0,function(a,b,c){"use strict";function d(a,b){if(!f.canUseDOM||b&&!("addEventListener"in document))return!1;var c="on"+a,d=c in document;if(!d){var g=document.createElement("div");g.setAttribute(c,"return;"),d="function"==typeof g[c]}return!d&&e&&"wheel"===a&&(d=document.implementation.hasFeature("Events.wheel","3.0")),d}var e,f=(this||self,a("55"));f.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),c.exports=d}),c.registerDynamic("6f",["53","58","d1","d2","ba","4d","5a","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return Object.prototype.hasOwnProperty.call(a,p)||(a[p]=n++,l[a[p]]={}),l[a[p]]}var e=a("53"),f=a("58"),g=a("d1"),h=a("d2"),i=a("ba"),j=a("4d"),k=a("5a"),l={},m=!1,n=0,o={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},p="_reactListenersID"+String(Math.random()).slice(2),q=j({},h,{ReactEventListener:null,injection:{injectReactEventListener:function(a){a.setHandleTopLevel(q.handleTopLevel),q.ReactEventListener=a}},setEnabled:function(a){q.ReactEventListener&&q.ReactEventListener.setEnabled(a)},isEnabled:function(){return!(!q.ReactEventListener||!q.ReactEventListener.isEnabled())},listenTo:function(a,b){for(var c=b,f=d(c),h=g.registrationNameDependencies[a],i=e.topLevelTypes,j=0,l=h.length;j<l;j++){var m=h[j];f.hasOwnProperty(m)&&f[m]||(m===i.topWheel?k("wheel")?q.ReactEventListener.trapBubbledEvent(i.topWheel,"wheel",c):k("mousewheel")?q.ReactEventListener.trapBubbledEvent(i.topWheel,"mousewheel",c):q.ReactEventListener.trapBubbledEvent(i.topWheel,"DOMMouseScroll",c):m===i.topScroll?k("scroll",!0)?q.ReactEventListener.trapCapturedEvent(i.topScroll,"scroll",c):q.ReactEventListener.trapBubbledEvent(i.topScroll,"scroll",q.ReactEventListener.WINDOW_HANDLE):m===i.topFocus||m===i.topBlur?(k("focus",!0)?(q.ReactEventListener.trapCapturedEvent(i.topFocus,"focus",c),q.ReactEventListener.trapCapturedEvent(i.topBlur,"blur",c)):k("focusin")&&(q.ReactEventListener.trapBubbledEvent(i.topFocus,"focusin",c),q.ReactEventListener.trapBubbledEvent(i.topBlur,"focusout",c)),f[i.topBlur]=!0,f[i.topFocus]=!0):o.hasOwnProperty(m)&&q.ReactEventListener.trapBubbledEvent(m,o[m],c),f[m]=!0)}},trapBubbledEvent:function(a,b,c){return q.ReactEventListener.trapBubbledEvent(a,b,c)},trapCapturedEvent:function(a,b,c){return q.ReactEventListener.trapCapturedEvent(a,b,c)},ensureScrollValueMonitoring:function(){if(!m){var a=i.refreshScrollValues;q.ReactEventListener.monitorScrollValue(a),m=!0}},eventNameDispatchConfigs:f.eventNameDispatchConfigs,registrationNameModules:f.registrationNameModules,putListener:f.putListener,getListener:f.getListener,deleteListener:f.deleteListener,deleteAllListeners:f.deleteAllListeners});c.exports=q}(a("47"))}),c.registerDynamic("a5",[],!0,function(a,b,c){"use strict";var d=(this||self,{injectCreateReactRootIndex:function(a){e.createReactRootIndex=a}}),e={createReactRootIndex:null,injection:d};c.exports=e}),c.registerDynamic("84",["a5","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return n+a.toString(36)}function e(a,b){return a.charAt(b)===n||b===a.length}function f(a){return""===a||a.charAt(0)===n&&a.charAt(a.length-1)!==n}function g(a,b){return 0===b.indexOf(a)&&e(b,a.length)}function h(a){return a?a.substr(0,a.lastIndexOf(n)):""}function i(a,b){if(m(f(a)&&f(b)),m(g(a,b)),a===b)return a;var c,d=a.length+o;for(c=d;c<b.length&&!e(b,c);c++);return b.substr(0,c)}function j(a,b){var c=Math.min(a.length,b.length);if(0===c)return"";for(var d=0,g=0;g<=c;g++)if(e(a,g)&&e(b,g))d=g;else if(a.charAt(g)!==b.charAt(g))break;var h=a.substr(0,d);return m(f(h)),h}function k(a,b,c,d,e,f){a=a||"",b=b||"",m(a!==b);var j=g(b,a);m(j||g(a,b));for(var k=0,l=j?h:i,n=a;;n=l(n,b)){var o;if(e&&n===a||f&&n===b||(o=c(n,j,d)),o===!1||n===b)break;m(k++<p)}}var l=a("a5"),m=a("72"),n=".",o=n.length,p=100,q={createReactRootID:function(){return d(l.createReactRootIndex())},createReactID:function(a,b){return a+b},getReactRootIDFromNodeID:function(a){if(a&&a.charAt(0)===n&&a.length>1){var b=a.indexOf(n,1);return b>-1?a.substr(0,b):a}return null},traverseEnterLeave:function(a,b,c,d,e){var f=j(a,b);f!==a&&k(a,f,c,d,!1,!0),f!==b&&k(f,b,c,e,!0,!1)},traverseTwoPhase:function(a,b,c){a&&(k("",a,b,c,!0,!1),k(a,"",b,c,!1,!0))},traverseAncestors:function(a,b,c){k("",a,b,c,!0,!1)},_getFirstCommonAncestorID:j,_getNextDescendantID:i,isAncestorIDOf:g,SEPARATOR:n};c.exports=q}(a("47"))}),c.registerDynamic("d3",[],!0,function(a,b,c){"use strict";function d(a){for(var b=1,c=0,d=0;d<a.length;d++)b=(b+a.charCodeAt(d))%e,c=(c+b)%e;return b|c<<16}var e=(this||self,65521);c.exports=d}),c.registerDynamic("cf",["d3"],!0,function(a,b,c){"use strict";var d=(this||self,a("d3")),e={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(a){var b=d(a);return a.replace(">"," "+e.CHECKSUM_ATTR_NAME+'="'+b+'">')},canReuseMarkup:function(a,b){var c=b.getAttribute(e.CHECKSUM_ATTR_NAME);c=c&&parseInt(c,10);var f=d(a);return f===c}};c.exports=e}),c.registerDynamic("c0",["c4","c2","4a","c3","59","4d","72","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){a!==f.currentlyMountingInstance&&j.enqueueUpdate(a)}function e(a,b){l(null==g.current);var c=i.get(a);return c?c===f.currentlyUnmountingInstance?null:c:null}var f=a("c4"),g=a("c2"),h=a("4a"),i=a("c3"),j=a("59"),k=a("4d"),l=a("72"),m=(a("46"),{enqueueCallback:function(a,b){l("function"==typeof b);var c=e(a);return c&&c!==f.currentlyMountingInstance?(c._pendingCallbacks?c._pendingCallbacks.push(b):c._pendingCallbacks=[b],void d(c)):null},enqueueCallbackInternal:function(a,b){l("function"==typeof b),a._pendingCallbacks?a._pendingCallbacks.push(b):a._pendingCallbacks=[b],d(a)},enqueueForceUpdate:function(a){var b=e(a,"forceUpdate");b&&(b._pendingForceUpdate=!0,d(b))},enqueueReplaceState:function(a,b){var c=e(a,"replaceState");c&&(c._pendingStateQueue=[b],c._pendingReplaceState=!0,d(c))},enqueueSetState:function(a,b){var c=e(a,"setState");if(c){var f=c._pendingStateQueue||(c._pendingStateQueue=[]);f.push(b),d(c)}},enqueueSetProps:function(a,b){var c=e(a,"setProps");if(c){l(c._isTopLevel);var f=c._pendingElement||c._currentElement,g=k({},f.props,b);c._pendingElement=h.cloneAndReplaceProps(f,g),d(c)}},enqueueReplaceProps:function(a,b){var c=e(a,"replaceProps");if(c){l(c._isTopLevel);var f=c._pendingElement||c._currentElement;c._pendingElement=h.cloneAndReplaceProps(f,b),d(c)}},enqueueElementInternal:function(a,b){a._pendingElement=b,d(a)}});c.exports=m}(a("47"))}),c.registerDynamic("d4",["d5"],!0,function(a,b,c){function d(a){return e(a)&&3==a.nodeType}var e=(this||self,a("d5"));c.exports=d}),c.registerDynamic("ac",["d4"],!0,function(a,b,c){function d(a,b){return!(!a||!b)&&(a===b||!e(a)&&(e(b)?d(a,b.parentNode):a.contains?a.contains(b):!!a.compareDocumentPosition&&!!(16&a.compareDocumentPosition(b))))}var e=(this||self,a("d4"));c.exports=d}),c.registerDynamic("d6",[],!0,function(a,b,c){"use strict";function d(a){return a?a.nodeType===e?a.documentElement:a.firstChild:null}var e=(this||self,9);c.exports=d}),c.registerDynamic("a1",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("72"),e=!1,f={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(a){d(!e),f.unmountIDFromEnvironment=a.unmountIDFromEnvironment,f.replaceNodeWithMarkupByID=a.replaceNodeWithMarkupByID,f.processChildrenUpdates=a.processChildrenUpdates,e=!0}}};c.exports=f}(a("47"))}),c.registerDynamic("c4",["47"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={currentlyMountingInstance:null,currentlyUnmountingInstance:null};c.exports=b}(a("47"))}),c.registerDynamic("a7",["43","4d","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){this._callbacks=null,this._contexts=null}var e=a("43"),f=a("4d"),g=a("72");f(d.prototype,{enqueue:function(a,b){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(a),this._contexts.push(b)},notifyAll:function(){var a=this._callbacks,b=this._contexts;if(a){g(a.length===b.length),this._callbacks=null,this._contexts=null;for(var c=0,d=a.length;c<d;c++)a[c].call(b[c]);a.length=0,b.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),e.addPoolingTo(d),c.exports=d}(a("47"))}),c.registerDynamic("43",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("72"),e=function(a){var b=this;if(b.instancePool.length){var c=b.instancePool.pop();return b.call(c,a),c}return new b(a)},f=function(a,b){var c=this;if(c.instancePool.length){var d=c.instancePool.pop();return c.call(d,a,b),d}return new c(a,b)},g=function(a,b,c){var d=this;if(d.instancePool.length){var e=d.instancePool.pop();return d.call(e,a,b,c),e}return new d(a,b,c)},h=function(a,b,c,d,e){var f=this;if(f.instancePool.length){var g=f.instancePool.pop();return f.call(g,a,b,c,d,e),g}return new f(a,b,c,d,e)},i=function(a){var b=this;d(a instanceof b),a.destructor&&a.destructor(),b.instancePool.length<b.poolSize&&b.instancePool.push(a)},j=10,k=e,l=function(a,b){var c=a;return c.instancePool=[],c.getPooled=b||k,c.poolSize||(c.poolSize=j),c.release=i,c},m={addPoolingTo:l,oneArgumentPooler:e,twoArgumentPooler:f,threeArgumentPooler:g,fiveArgumentPooler:h};c.exports=m}(a("47"))}),c.registerDynamic("99",["47"],!0,function(a,b,c){this||self;!function(a){"use strict";function b(a,b,c){return c}var d={enableMeasure:!1,storedMeasure:b,measureMethods:function(a,b,c){},measure:function(a,b,c){return c},injection:{injectMeasure:function(a){d.storedMeasure=a}}};c.exports=d}(a("47"))}),c.registerDynamic("d7",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("72"),e={isValidOwner:function(a){return!(!a||"function"!=typeof a.attachRef||"function"!=typeof a.detachRef)},addComponentAsRefTo:function(a,b,c){d(e.isValidOwner(c)),c.attachRef(b,a)},removeComponentAsRefFrom:function(a,b,c){d(e.isValidOwner(c)),c.getPublicInstance().refs[b]===a.getPublicInstance()&&c.detachRef(b)}};c.exports=e}(a("47"))}),c.registerDynamic("d8",["d7","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b,c){"function"==typeof a?a(b.getPublicInstance()):f.addComponentAsRefTo(b,a,c)}function e(a,b,c){"function"==typeof a?a(null):f.removeComponentAsRefFrom(b,a,c)}var f=a("d7"),g={};g.attachRefs=function(a,b){var c=b.ref;null!=c&&d(c,a,b._owner)},g.shouldUpdateRefs=function(a,b){return b._owner!==a._owner||b.ref!==a.ref},g.detachRefs=function(a,b){var c=b.ref;null!=c&&e(c,a,b._owner)},c.exports=g}(a("47"))}),c.registerDynamic("44",["4a","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=(a("4a"),a("46"),{create:function(a){return a},extract:function(a){return a},extractIfFragment:function(a){return a}});c.exports=d}(a("47"))}),c.registerDynamic("6b",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("72"),e=function(a){var b,c={};d(a instanceof Object&&!Array.isArray(a));for(b in a)a.hasOwnProperty(b)&&(c[b]=b);return c};c.exports=e}(a("47"))}),c.registerDynamic("c5",["6b"],!0,function(a,b,c){"use strict";var d=(this||self,a("6b")),e=d({prop:null,context:null,childContext:null});c.exports=e}),c.registerDynamic("c6",["47"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={};c.exports=b}(a("47"))}),c.registerDynamic("9a",[],!0,function(a,b,c){"use strict";function d(a){var b=a&&(e&&a[e]||a[f]);if("function"==typeof b)return b}var e=(this||self,"function"==typeof Symbol&&Symbol.iterator),f="@@iterator";c.exports=d}),c.registerDynamic("4b",["4a","44","c5","c6","c2","a4","9a","72","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){if(s.current){var a=s.current.getName();if(a)return" Check the render method of `"+a+"`."}return""}function e(a){var b=a&&a.getPublicInstance();if(b){var c=b.constructor;if(c)return c.displayName||c.name||void 0}}function f(){var a=s.current;return a&&e(a)||void 0}function g(a,b){a._store.validated||null!=a.key||(a._store.validated=!0,i('Each child in an array or iterator should have a unique "key" prop.',a,b))}function h(a,b,c){y.test(a)&&i("Child objects should have non-numeric keys so ordering is preserved.",b,c)}function i(a,b,c){var d=f(),g="string"==typeof c?c:c.displayName||c.name,h=d||g,i=w[a]||(w[a]={});if(!i.hasOwnProperty(h)){i[h]=!0;var j="";if(b&&b._owner&&b._owner!==s.current){var k=e(b._owner);j=" It was passed a child from "+k+"."}}}function j(a,b){if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];p.isValidElement(d)&&g(d,b)}else if(p.isValidElement(a))a._store.validated=!0;else if(a){var e=u(a);if(e){if(e!==a.entries)for(var f,i=e.call(a);!(f=i.next()).done;)p.isValidElement(f.value)&&g(f.value,b)}else if("object"==typeof a){var j=q.extractIfFragment(a);for(var k in j)j.hasOwnProperty(k)&&h(k,j[k],b)}}}function k(a,b,c,e){for(var f in b)if(b.hasOwnProperty(f)){var g;try{v("function"==typeof b[f]),g=b[f](c,f,a,e)}catch(a){g=a}if(g instanceof Error&&!(g.message in x)){x[g.message]=!0;d(this)}}}function l(a,b){var c=b.type,d="string"==typeof c?c:c.displayName,e=b._owner?b._owner.getPublicInstance().constructor.displayName:null,f=a+"|"+d+"|"+e;if(!z.hasOwnProperty(f)){z[f]=!0;var g="";d&&(g=" <"+d+" />");var h="";e&&(h=" The element was created by "+e+".")}}function m(a,b){return a!==a?b!==b:0===a&&0===b?1/a===1/b:a===b}function n(a){if(a._store){var b=a._store.originalProps,c=a.props;for(var d in c)c.hasOwnProperty(d)&&(b.hasOwnProperty(d)&&m(b[d],c[d])||(l(d,a),b[d]=c[d]))}}function o(a){if(null!=a.type){var b=t.getComponentClassForElement(a),c=b.displayName||b.name;b.propTypes&&k(c,b.propTypes,a.props,r.prop),"function"==typeof b.getDefaultProps}}var p=a("4a"),q=a("44"),r=a("c5"),s=(a("c6"),a("c2")),t=a("a4"),u=a("9a"),v=a("72"),w=(a("46"),{}),x={},y=/^\d+$/,z={},A={checkAndWarnForMutatedProps:n,createElement:function(a,b,c){var d=p.createElement.apply(this,arguments);if(null==d)return d;for(var e=2;e<arguments.length;e++)j(arguments[e],a);return o(d),d},createFactory:function(a){var b=A.createElement.bind(null,a);return b.type=a,b},cloneElement:function(a,b,c){for(var d=p.cloneElement.apply(this,arguments),e=2;e<arguments.length;e++)j(arguments[e],d.type);return o(d),d}};c.exports=A}(a("47"))}),c.registerDynamic("9d",["d8","4b","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){e.attachRefs(this,this._currentElement)}var e=a("d8"),f=(a("4b"),{mountComponent:function(a,b,c,e){var f=a.mountComponent(b,c,e);return c.getReactMountReady().enqueue(d,a),f},unmountComponent:function(a){e.detachRefs(a,a._currentElement),a.unmountComponent()},receiveComponent:function(a,b,c,f){var g=a._currentElement;if(b!==g||null==b._owner){var h=e.shouldUpdateRefs(g,b);h&&e.detachRefs(a,g),a.receiveComponent(b,c,f),h&&c.getReactMountReady().enqueue(d,a)}},performUpdateIfNecessary:function(a,b){a.performUpdateIfNecessary(b)}});c.exports=f}(a("47"))}),c.registerDynamic("66",["72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("72"),e={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(a,b,c,e,f,g,h,i){d(!this.isInTransaction());var j,k;try{this._isInTransaction=!0,j=!0,this.initializeAll(0),k=a.call(b,c,e,f,g,h,i),j=!1}finally{try{if(j)try{this.closeAll(0)}catch(a){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return k},initializeAll:function(a){for(var b=this.transactionWrappers,c=a;c<b.length;c++){var d=b[c];try{this.wrapperInitData[c]=f.OBSERVED_ERROR,this.wrapperInitData[c]=d.initialize?d.initialize.call(this):null}finally{if(this.wrapperInitData[c]===f.OBSERVED_ERROR)try{this.initializeAll(c+1)}catch(a){}}}},closeAll:function(a){d(this.isInTransaction());for(var b=this.transactionWrappers,c=a;c<b.length;c++){var e,g=b[c],h=this.wrapperInitData[c];try{e=!0,h!==f.OBSERVED_ERROR&&g.close&&g.close.call(this,h),e=!1}finally{if(e)try{this.closeAll(c+1)}catch(a){}}}this.wrapperInitData.length=0}},f={Mixin:e,OBSERVED_ERROR:{}};c.exports=f}(a("47"))}),c.registerDynamic("59",["a7","43","c2","99","9d","66","4d","72","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(){q(A.ReactReconcileTransaction&&u)}function e(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=k.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled()}function f(a,b,c,e,f){d(),u.batchedUpdates(a,b,c,e,f)}function g(a,b){return a._mountOrder-b._mountOrder}function h(a){var b=a.dirtyComponentsLength;q(b===r.length),r.sort(g);for(var c=0;c<b;c++){var d=r[c],e=d._pendingCallbacks;if(d._pendingCallbacks=null,n.performUpdateIfNecessary(d,a.reconcileTransaction),e)for(var f=0;f<e.length;f++)a.callbackQueue.enqueue(e[f],d.getPublicInstance())}}function i(a){return d(),u.isBatchingUpdates?void r.push(a):void u.batchedUpdates(i,a)}function j(a,b){q(u.isBatchingUpdates),s.enqueue(a,b),t=!0}var k=a("a7"),l=a("43"),m=(a("c2"),a("99")),n=a("9d"),o=a("66"),p=a("4d"),q=a("72"),r=(a("46"),[]),s=k.getPooled(),t=!1,u=null,v={initialize:function(){this.dirtyComponentsLength=r.length},close:function(){this.dirtyComponentsLength!==r.length?(r.splice(0,this.dirtyComponentsLength),y()):r.length=0}},w={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[v,w];p(e.prototype,o.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,k.release(this.callbackQueue),this.callbackQueue=null,A.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(a,b,c){return o.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,a,b,c)}}),l.addPoolingTo(e);var y=function(){for(;r.length||t;){if(r.length){var a=e.getPooled();a.perform(h,null,a),e.release(a)}if(t){t=!1;var b=s;s=k.getPooled(),b.notifyAll(),k.release(b)}}};y=m.measure("ReactUpdates","flushBatchedUpdates",y);var z={injectReconcileTransaction:function(a){q(a),A.ReactReconcileTransaction=a},injectBatchingStrategy:function(a){q(a),q("function"==typeof a.batchedUpdates),q("boolean"==typeof a.isBatchingUpdates),u=a}},A={ReactReconcileTransaction:null,batchedUpdates:f,enqueueUpdate:i,flushBatchedUpdates:y,injection:z,asap:j};c.exports=A}(a("47"))}),c.registerDynamic("d9",["a1","da","c2","4a","4b","c3","c4","a4","99","c5","c6","9d","59","4d","d0","72","9f","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){var b=a._currentElement._owner||null;if(b){var c=b.getName();if(c)return" Check the render method of `"+c+"`."}return""}var e=a("a1"),f=a("da"),g=a("c2"),h=a("4a"),i=(a("4b"),a("c3")),j=a("c4"),k=a("a4"),l=a("99"),m=a("c5"),n=(a("c6"),a("9d")),o=a("59"),p=a("4d"),q=a("d0"),r=a("72"),s=a("9f"),t=(a("46"),1),u={construct:function(a){this._currentElement=a,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(a,b,c){this._context=c,this._mountOrder=t++,this._rootNodeID=a;var d=this._processProps(this._currentElement.props),e=this._processContext(this._currentElement._context),f=k.getComponentClassForElement(this._currentElement),g=new f(d,e);g.props=d,g.context=e,g.refs=q,this._instance=g,i.set(g,this);var h=g.state;void 0===h&&(g.state=h=null),r("object"==typeof h&&!Array.isArray(h)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var l,m,o=j.currentlyMountingInstance;j.currentlyMountingInstance=this;try{g.componentWillMount&&(g.componentWillMount(),this._pendingStateQueue&&(g.state=this._processPendingState(g.props,g.context))),l=this._getValidatedChildContext(c),m=this._renderValidatedComponent(l)}finally{j.currentlyMountingInstance=o}this._renderedComponent=this._instantiateReactComponent(m,this._currentElement.type);var p=n.mountComponent(this._renderedComponent,a,b,this._mergeChildContext(c,l));return g.componentDidMount&&b.getReactMountReady().enqueue(g.componentDidMount,g),p},unmountComponent:function(){var a=this._instance;if(a.componentWillUnmount){var b=j.currentlyUnmountingInstance;j.currentlyUnmountingInstance=this;try{a.componentWillUnmount()}finally{j.currentlyUnmountingInstance=b}}n.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,i.remove(a)},_setPropsInternal:function(a,b){var c=this._pendingElement||this._currentElement;this._pendingElement=h.cloneAndReplaceProps(c,p({},c.props,a)),o.enqueueUpdate(this,b)},_maskContext:function(a){var b=null;if("string"==typeof this._currentElement.type)return q;var c=this._currentElement.type.contextTypes;if(!c)return q;b={};for(var d in c)b[d]=a[d];return b},_processContext:function(a){var b=this._maskContext(a);return b},_getValidatedChildContext:function(a){var b=this._instance,c=b.getChildContext&&b.getChildContext();if(c){r("object"==typeof b.constructor.childContextTypes);for(var d in c)r(d in b.constructor.childContextTypes);return c}return null},_mergeChildContext:function(a,b){return b?p({},a,b):a},_processProps:function(a){return a},_checkPropTypes:function(a,b,c){var e=this.getName();for(var f in a)if(a.hasOwnProperty(f)){var g;try{r("function"==typeof a[f]),g=a[f](b,f,e,c)}catch(a){g=a}if(g instanceof Error){d(this);c===m.prop}}},receiveComponent:function(a,b,c){var d=this._currentElement,e=this._context;this._pendingElement=null,this.updateComponent(b,d,a,e,c)},performUpdateIfNecessary:function(a){null!=this._pendingElement&&n.receiveComponent(this,this._pendingElement||this._currentElement,a,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(a,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(a,b){a=this._maskContext(a),b=this._maskContext(b);for(var c=Object.keys(b).sort(),d=(this.getName()||"ReactCompositeComponent",0);d<c.length;d++){c[d]}},updateComponent:function(a,b,c,d,e){var f=this._instance,g=f.context,h=f.props;b!==c&&(g=this._processContext(c._context),h=this._processProps(c.props),f.componentWillReceiveProps&&f.componentWillReceiveProps(h,g));var i=this._processPendingState(h,g),j=this._pendingForceUpdate||!f.shouldComponentUpdate||f.shouldComponentUpdate(h,i,g);j?(this._pendingForceUpdate=!1,this._performComponentUpdate(c,h,i,g,a,e)):(this._currentElement=c,this._context=e,f.props=h,f.state=i,f.context=g)},_processPendingState:function(a,b){var c=this._instance,d=this._pendingStateQueue,e=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!d)return c.state;if(e&&1===d.length)return d[0];for(var f=p({},e?d[0]:c.state),g=e?1:0;g<d.length;g++){var h=d[g];p(f,"function"==typeof h?h.call(c,f,a,b):h)}return f},_performComponentUpdate:function(a,b,c,d,e,f){var g=this._instance,h=g.props,i=g.state,j=g.context;g.componentWillUpdate&&g.componentWillUpdate(b,c,d),this._currentElement=a,this._context=f,g.props=b,g.state=c,g.context=d,this._updateRenderedComponent(e,f),g.componentDidUpdate&&e.getReactMountReady().enqueue(g.componentDidUpdate.bind(g,h,i,j),g)},_updateRenderedComponent:function(a,b){var c=this._renderedComponent,d=c._currentElement,e=this._getValidatedChildContext(),f=this._renderValidatedComponent(e);if(s(d,f))n.receiveComponent(c,f,a,this._mergeChildContext(b,e));else{var g=this._rootNodeID,h=c._rootNodeID;
|
18
18
|
n.unmountComponent(c),this._renderedComponent=this._instantiateReactComponent(f,this._currentElement.type);var i=n.mountComponent(this._renderedComponent,g,a,this._mergeChildContext(b,e));this._replaceNodeWithMarkupByID(h,i)}},_replaceNodeWithMarkupByID:function(a,b){e.replaceNodeWithMarkupByID(a,b)},_renderValidatedComponentWithoutOwnerOrContext:function(){var a=this._instance,b=a.render();return b},_renderValidatedComponent:function(a){var b,c=f.current;f.current=this._mergeChildContext(this._currentElement._context,a),g.current=this;try{b=this._renderValidatedComponentWithoutOwnerOrContext()}finally{f.current=c,g.current=null}return r(null===b||b===!1||h.isValidElement(b)),b},attachRef:function(a,b){var c=this.getPublicInstance(),d=c.refs===q?c.refs={}:c.refs;d[a]=b.getPublicInstance()},detachRef:function(a){var b=this.getPublicInstance().refs;delete b[a]},getName:function(){var a=this._currentElement.type,b=this._instance&&this._instance.constructor;return a.displayName||b&&b.displayName||a.name||b&&b.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};l.measureMethods(u,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var v={Mixin:u};c.exports=v}(a("47"))}),c.registerDynamic("c3",[],!0,function(a,b,c){"use strict";var d=(this||self,{remove:function(a){a._reactInternalInstance=void 0},get:function(a){return a._reactInternalInstance},has:function(a){return void 0!==a._reactInternalInstance},set:function(a,b){a._reactInternalInstance=b}});c.exports=d});c.registerDynamic("a3",["4a","c3","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){k[a]=!0}function e(a){delete k[a]}function f(a){return!!k[a]}var g,h=a("4a"),i=a("c3"),j=a("72"),k={},l={injectEmptyComponent:function(a){g=h.createFactory(a)}},m=function(){};m.prototype.componentDidMount=function(){var a=i.get(this);a&&d(a._rootNodeID)},m.prototype.componentWillUnmount=function(){var a=i.get(this);a&&e(a._rootNodeID)},m.prototype.render=function(){return j(g),g()};var n=h.createElement(m),o={emptyElement:n,injection:l,isNullComponentID:f};c.exports=o}(a("47"))});c.registerDynamic("a4",["4d","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){if("function"==typeof a.type)return a.type;var b=a.type,c=l[b];return null==c&&(l[b]=c=j(b)),c}function e(a){return i(k),new k(a.type,a.props)}function f(a){return new m(a)}function g(a){return a instanceof m}var h=a("4d"),i=a("72"),j=null,k=null,l={},m=null,n={injectGenericComponentClass:function(a){k=a},injectTextComponentClass:function(a){m=a},injectComponentClasses:function(a){h(l,a)},injectAutoWrapper:function(a){j=a}},o={getComponentClassForElement:d,createInternalComponent:e,createInstanceForText:f,isTextComponent:g,injection:n};c.exports=o}(a("47"))}),c.registerDynamic("9e",["d9","a3","a4","4d","72","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return"function"==typeof a&&"undefined"!=typeof a.prototype&&"function"==typeof a.prototype.mountComponent&&"function"==typeof a.prototype.receiveComponent}function e(a,b){var c;if(null!==a&&a!==!1||(a=g.emptyElement),"object"==typeof a){var e=a;c=b===e.type&&"string"==typeof e.type?h.createInternalComponent(e):d(e.type)?new e.type(e):new k}else"string"==typeof a||"number"==typeof a?c=h.createInstanceForText(a):j(!1);return c.construct(a),c._mountIndex=0,c._mountImage=null,c}var f=a("d9"),g=a("a3"),h=a("a4"),i=a("4d"),j=a("72"),k=(a("46"),function(){});i(k.prototype,f.Mixin,{_instantiateReactComponent:e}),c.exports=e}(a("47"))}),c.registerDynamic("94",["55","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("55"),e=/^[ \r\n\t\f]/,f=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,g=function(a,b){a.innerHTML=b};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(g=function(a,b){MSApp.execUnsafeLocalFunction(function(){a.innerHTML=b})}),d.canUseDOM){var h=document.createElement("div");h.innerHTML=" ",""===h.innerHTML&&(g=function(a,b){if(a.parentNode&&a.parentNode.replaceChild(a,a),e.test(b)||"<"===b[0]&&f.test(b)){a.innerHTML="\ufeff"+b;var c=a.firstChild;1===c.data.length?a.removeChild(c):c.deleteData(0,1)}else a.innerHTML=b})}c.exports=g}(a("47"))}),c.registerDynamic("9f",["46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){if(null!=a&&null!=b){var c=typeof a,d=typeof b;if("string"===c||"number"===c)return"string"===d||"number"===d;if("object"===d&&a.type===b.type&&a.key===b.key){var e=a._owner===b._owner;return e}}return!1}a("46");c.exports=d}(a("47"))}),c.registerDynamic("60",["62","6f","c2","4a","4b","a3","84","c3","cf","99","9d","c0","59","d0","ac","d6","9e","72","94","9f","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a,b){for(var c=Math.min(a.length,b.length),d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d))return d;return a.length===b.length?-1:c}function e(a){var b=D(a);return b&&R.getID(b)}function f(a){var b=g(a);if(b)if(K.hasOwnProperty(b)){var c=K[b];c!==a&&(F(!k(c,b)),K[b]=a)}else K[b]=a;return b}function g(a){return a&&a.getAttribute&&a.getAttribute(J)||""}function h(a,b){var c=g(a);c!==b&&delete K[c],a.setAttribute(J,b),K[b]=a}function i(a){return K.hasOwnProperty(a)&&k(K[a],a)||(K[a]=R.findReactNodeByID(a)),K[a]}function j(a){var b=v.get(a)._rootNodeID;return t.isNullComponentID(b)?null:(K.hasOwnProperty(b)&&k(K[b],b)||(K[b]=R.findReactNodeByID(b)),K[b])}function k(a,b){if(a){F(g(a)===b);var c=R.findReactContainerForID(b);if(c&&C(c,a))return!0}return!1}function l(a){delete K[a]}function m(a){var b=K[a];return!(!b||!k(b,a))&&void(Q=b)}function n(a){Q=null,u.traverseAncestors(a,m);var b=Q;return Q=null,b}function o(a,b,c,d,e){var f=y.mountComponent(a,b,d,B);a._isTopLevel=!0,R._mountImageIntoNode(f,c,e)}function p(a,b,c,d){var e=A.ReactReconcileTransaction.getPooled();e.perform(o,null,a,b,c,e,d),A.ReactReconcileTransaction.release(e)}var q=a("62"),r=a("6f"),s=(a("c2"),a("4a")),t=(a("4b"),a("a3")),u=a("84"),v=a("c3"),w=a("cf"),x=a("99"),y=a("9d"),z=a("c0"),A=a("59"),B=a("d0"),C=a("ac"),D=a("d6"),E=a("9e"),F=a("72"),G=a("94"),H=a("9f"),I=(a("46"),u.SEPARATOR),J=q.ID_ATTRIBUTE_NAME,K={},L=1,M=9,N={},O={},P=[],Q=null,R={_instancesByReactRootID:N,scrollMonitor:function(a,b){b()},_updateRootComponent:function(a,b,c,d){return R.scrollMonitor(c,function(){z.enqueueElementInternal(a,b),d&&z.enqueueCallbackInternal(a,d)}),a},_registerComponent:function(a,b){F(b&&(b.nodeType===L||b.nodeType===M)),r.ensureScrollValueMonitoring();var c=R.registerContainer(b);return N[c]=a,c},_renderNewRootComponent:function(a,b,c){var d=E(a,null),e=R._registerComponent(d,b);return A.batchedUpdates(p,d,e,b,c),d},render:function(a,b,c){F(s.isValidElement(a));var d=N[e(b)];if(d){var f=d._currentElement;if(H(f,a))return R._updateRootComponent(d,a,b,c).getPublicInstance();R.unmountComponentAtNode(b)}var g=D(b),h=g&&R.isRenderedByReact(g),i=h&&!d,j=R._renderNewRootComponent(a,b,i).getPublicInstance();return c&&c.call(j),j},constructAndRenderComponent:function(a,b,c){var d=s.createElement(a,b);return R.render(d,c)},constructAndRenderComponentByID:function(a,b,c){var d=document.getElementById(c);return F(d),R.constructAndRenderComponent(a,b,d)},registerContainer:function(a){var b=e(a);return b&&(b=u.getReactRootIDFromNodeID(b)),b||(b=u.createReactRootID()),O[b]=a,b},unmountComponentAtNode:function(a){F(a&&(a.nodeType===L||a.nodeType===M));var b=e(a),c=N[b];return!!c&&(R.unmountComponentFromNode(c,a),delete N[b],delete O[b],!0)},unmountComponentFromNode:function(a,b){for(y.unmountComponent(a),b.nodeType===M&&(b=b.documentElement);b.lastChild;)b.removeChild(b.lastChild)},findReactContainerForID:function(a){var b=u.getReactRootIDFromNodeID(a),c=O[b];return c},findReactNodeByID:function(a){var b=R.findReactContainerForID(a);return R.findComponentRoot(b,a)},isRenderedByReact:function(a){if(1!==a.nodeType)return!1;var b=R.getID(a);return!!b&&b.charAt(0)===I},getFirstReactDOM:function(a){for(var b=a;b&&b.parentNode!==b;){if(R.isRenderedByReact(b))return b;b=b.parentNode}return null},findComponentRoot:function(a,b){var c=P,d=0,e=n(b)||a;for(c[0]=e.firstChild,c.length=1;d<c.length;){for(var f,g=c[d++];g;){var h=R.getID(g);h?b===h?f=g:u.isAncestorIDOf(h,b)&&(c.length=d=0,c.push(g.firstChild)):c.push(g.firstChild),g=g.nextSibling}if(f)return c.length=0,f}c.length=0,F(!1)},_mountImageIntoNode:function(a,b,c){if(F(b&&(b.nodeType===L||b.nodeType===M)),c){var e=D(b);if(w.canReuseMarkup(a,e))return;var f=e.getAttribute(w.CHECKSUM_ATTR_NAME);e.removeAttribute(w.CHECKSUM_ATTR_NAME);var g=e.outerHTML;e.setAttribute(w.CHECKSUM_ATTR_NAME,f);var h=d(a,g);" (client) "+a.substring(h-20,h+20)+"\n (server) "+g.substring(h-20,h+20);F(b.nodeType!==M)}F(b.nodeType!==M),G(b,a)},getReactRootID:e,getID:f,setID:h,getNode:i,getNodeFromInstance:j,purgeID:l};x.measureMethods(R,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),c.exports=R}(a("47"))}),c.registerDynamic("d5",[],!0,function(a,b,c){function d(a){return!(!a||!("function"==typeof Node?a instanceof Node:"object"==typeof a&&"number"==typeof a.nodeType&&"string"==typeof a.nodeName))}this||self;c.exports=d}),c.registerDynamic("7b",["c2","c3","60","72","d5","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return null==a?null:h(a)?a:e.has(a)?f.getNodeFromInstance(a):(g(null==a.render||"function"!=typeof a.render),void g(!1))}var e=(a("c2"),a("c3")),f=a("60"),g=a("72"),h=a("d5");a("46");c.exports=d}(a("47"))}),c.registerDynamic("d0",["47"],!0,function(a,b,c){this||self;!function(a){"use strict";var b={};c.exports=b}(a("47"))}),c.registerDynamic("da",["4d","d0","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("4d"),e=a("d0"),f=(a("46"),{current:e,withContext:function(a,b){var c,e=f.current;f.current=d({},e,a);try{c=b()}finally{f.current=e}return c}});c.exports=f}(a("47"))}),c.registerDynamic("c2",[],!0,function(a,b,c){"use strict";var d=(this||self,{current:null});c.exports=d}),c.registerDynamic("4d",[],!0,function(a,b,c){"use strict";function d(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var c=Object(a),d=Object.prototype.hasOwnProperty,e=1;e<arguments.length;e++){var f=arguments[e];if(null!=f){var g=Object(f);for(var h in g)d.call(g,h)&&(c[h]=g[h])}}return c}this||self;c.exports=d}),c.registerDynamic("64",[],!0,function(a,b,c){function d(a){return function(){return a}}function e(){}this||self;e.thatReturns=d,e.thatReturnsFalse=d(!1),e.thatReturnsTrue=d(!0),e.thatReturnsNull=d(null),e.thatReturnsThis=function(){return this},e.thatReturnsArgument=function(a){return a},c.exports=e}),c.registerDynamic("46",["64","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("64"),e=d;c.exports=e}(a("47"))}),c.registerDynamic("4a",["da","c2","4d","46","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("da"),e=a("c2"),f=a("4d"),g=(a("46"),{key:!0,ref:!0}),h=function(a,b,c,d,e,f){this.type=a,this.key=b,this.ref=c,this._owner=d,this._context=e,this.props=f};h.prototype={_isReactElement:!0},h.createElement=function(a,b,c){var f,i={},j=null,k=null;if(null!=b){k=void 0===b.ref?null:b.ref,j=void 0===b.key?null:""+b.key;for(f in b)b.hasOwnProperty(f)&&!g.hasOwnProperty(f)&&(i[f]=b[f])}var l=arguments.length-2;if(1===l)i.children=c;else if(l>1){for(var m=Array(l),n=0;n<l;n++)m[n]=arguments[n+2];i.children=m}if(a&&a.defaultProps){var o=a.defaultProps;for(f in o)"undefined"==typeof i[f]&&(i[f]=o[f])}return new h(a,j,k,e.current,d.current,i)},h.createFactory=function(a){var b=h.createElement.bind(null,a);return b.type=a,b},h.cloneAndReplaceProps=function(a,b){var c=new h(a.type,a.key,a.ref,a._owner,a._context,b);return c},h.cloneElement=function(a,b,c){var d,i=f({},a.props),j=a.key,k=a.ref,l=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,l=e.current),void 0!==b.key&&(j=""+b.key);for(d in b)b.hasOwnProperty(d)&&!g.hasOwnProperty(d)&&(i[d]=b[d])}var m=arguments.length-2;if(1===m)i.children=c;else if(m>1){for(var n=Array(m),o=0;o<m;o++)n[o]=arguments[o+2];i.children=n}return new h(a.type,j,k,l,a._context,i)},h.isValidElement=function(a){var b=!(!a||!a._isReactElement);return b},c.exports=h}(a("47"))}),c.registerDynamic("72",["47"],!0,function(a,b,c){this||self;!function(a){"use strict";var b=function(a,b,c,d,e,f,g,h){if(!a){var i;if(void 0===b)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var j=[c,d,e,f,g,h],k=0;i=new Error("Invariant Violation: "+b.replace(/%s/g,function(){return j[k++]}))}throw i.framesToPop=1,i}};c.exports=b}(a("47"))}),c.registerDynamic("db",["4a","72","47"],!0,function(a,b,c){this||self;!function(b){"use strict";function d(a){return f(e.isValidElement(a)),a}var e=a("4a"),f=a("72");c.exports=d}(a("47"))}),c.registerDynamic("55",[],!0,function(a,b,c){"use strict";var d=(this||self,!("undefined"==typeof window||!window.document||!window.document.createElement)),e={canUseDOM:d,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:d&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:d&&!!window.screen,isInWorker:!d};c.exports=e}),c.registerDynamic("dc",[],!0,function(a,b,c){function d(){if(!h){h=!0;for(var a,b=g.length;b;){a=g,g=[];for(var c=-1;++c<b;)a[c]();b=g.length}h=!1}}function e(){}var f=(this||self,c.exports={}),g=[],h=!1;f.nextTick=function(a){g.push(a),h||setTimeout(d,0)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=e,f.addListener=e,f.once=e,f.off=e,f.removeListener=e,f.removeAllListeners=e,f.emit=e,f.binding=function(a){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(a){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}}),c.registerDynamic("dd",["dc"],!0,function(a,b,c){this||self;c.exports=a("dc")}),c.registerDynamic("de",["dd"],!0,function(a,b,d){this||self;d.exports=c._nodeRequire?process:a("dd")}),c.registerDynamic("47",["de"],!0,function(a,b,c){this||self;c.exports=a("de")}),c.registerDynamic("df",["bd","42","bf","6a","da","c2","4a","4b","49","7d","cc","84","60","99","7a","9d","ce","4d","7b","db","55","47"],!0,function(a,b,c){this||self;!function(b){"use strict";var d=a("bd"),e=a("42"),f=a("bf"),g=a("6a"),h=a("da"),i=a("c2"),j=a("4a"),k=(a("4b"),a("49")),l=a("7d"),m=a("cc"),n=a("84"),o=a("60"),p=a("99"),q=a("7a"),r=a("9d"),s=a("ce"),t=a("4d"),u=a("7b"),v=a("db");m.inject();var w=j.createElement,x=j.createFactory,y=j.cloneElement,z=p.measure("React","render",o.render),A={Children:{map:e.map,forEach:e.forEach,count:e.count,only:v},Component:f,DOM:k,PropTypes:q,initializeTouchEvents:function(a){d.useTouchEvents=a},createClass:g.createClass,createElement:w,cloneElement:y,createFactory:x,createMixin:function(a){return a},constructAndRenderComponent:o.constructAndRenderComponent,constructAndRenderComponentByID:o.constructAndRenderComponentByID,findDOMNode:u,render:z,renderToString:s.renderToString,renderToStaticMarkup:s.renderToStaticMarkup,unmountComponentAtNode:o.unmountComponentAtNode,isValidElement:j.isValidElement,withContext:h.withContext,__spread:t};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:i,InstanceHandles:n,Mount:o,Reconciler:r,TextComponent:l});A.version="0.13.3",c.exports=A}(a("47"))}),c.registerDynamic("e0",["df"],!0,function(a,b,c){this||self;c.exports=a("df")}),c.registerDynamic("19",["e0"],!0,function(a,b,c){this||self;c.exports=a("e0")}),c.register("e1",["12","13","19","1a","1b"],function(a){function b(a,b){e.render(e.createElement(h,{errorData:a,beforeShow:b}),document.getElementById("view"))}var c,d,e,f,g,h;return{setters:[function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default}],execute:function(){a("default",b),h=function(a){function b(a){d(this,b),f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a)}return g(b,a),c(b,[{key:"render",value:function(){return e.createElement("div",{id:"error",ref:"errorModal",className:"modal fade","data-keyboard":"false","data-backdrop":"static"},e.createElement("div",{className:"modal-dialog modal-lg"},e.createElement("div",{className:"modal-content"},e.createElement("div",{className:"modal-header"},e.createElement("h3",null,this.props.errorData.title)),e.createElement("div",{className:"modal-body"},e.createElement("p",{dangerouslySetInnerHTML:{__html:this.props.errorData.message}}),this.props.errorData.more_info&&e.createElement("pre",{className:"pre-scrollable"},this.props.errorData.more_info)))))}},{key:"componentDidMount",value:function(){setTimeout(function(){$(e.findDOMNode(this.refs.errorModal)).modal("show")}.bind(this),this.props.beforeShow||0)}}]),b}(e.Component)}}}),c.register("1",["11","14","15","19","a","f","d","1c","1e","2c","e1"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;return{setters:[function(a){b=a},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default},function(a){},function(a){j=a.default}],execute:function(){k=function(a,b){function c(a,b){d.append($("<input>").attr("type","hidden").attr("name",a).val(b))}var d=$("<form/>").attr("method","post").attr("action","/get_sequence");c("sequence_ids",a),c("database_ids",b),d.appendTo("body").submit().remove()},l={a:function(a){if(a.title&&a.url)return e.createElement("a",{href:a.url,className:a.class,target:"_blank"},a.icon&&e.createElement("i",{className:"fa "+a.icon})," "+a.title+" ")},format_2_tuple:function(a){return a[0]+" ("+a[a.length-1]+")"},inPercentage:function(a,b){return(100*a/b).toFixed(2)},inFraction:function(a,b){return a+"/"+b},inTwoDecimal:function(a){return a.toFixed(2)},inExponential:function(a){if(0===a)return 0;if(a>=1&&a<10)return this.inTwoDecimal(a);var b=a.toExponential(2),c=b.split("e"),d=c[0],f=c[1];return e.createElement("span",null,d," × 10",e.createElement("sup",null,f))}},m=function(){var a=e.createClass({displayName:"Viewer",widgetClass:"biojs-vis-sequence",render:function(){return this.widgetID=this.widgetClass+"-"+(new Date).getUTCMilliseconds(),e.createElement("div",{className:"fastan"},e.createElement("div",{className:"section-header"},e.createElement("h4",null,this.props.sequence.id,e.createElement("small",null," ",this.props.sequence.title))),e.createElement("div",{className:"section-content"},e.createElement("div",{className:this.widgetClass,id:this.widgetID})))},componentDidMount:function(){var a=new Sequence({sequence:this.props.sequence.value,target:this.widgetID,format:"PRIDE",columns:{size:40,spacedEach:5},formatOptions:{title:!1,footer:!1}});a.hideFormatSelector()}});return e.createClass({show:function(){this.modal().modal("show")},modal:function(){return $(e.findDOMNode(this.refs.modal))},resultsJSX:function(){return e.createElement("div",{className:"modal-body"},f.map(this.state.error_msgs,f.bind(function(a){return e.createElement("div",{className:"fastan"},e.createElement("div",{className:"section-header"},e.createElement("h4",null,a[0])),e.createElement("div",{className:"section-content"},e.createElement("pre",{className:"pre-reset"},a[1])))},this)),f.map(this.state.sequences,f.bind(function(b){return e.createElement(a,{sequence:b})},this)))},loadingJSX:function(){return e.createElement("div",{className:"modal-body text-center"},e.createElement("i",{className:"fa fa-spinner fa-3x fa-spin"}))},getInitialState:function(){return{error_msgs:[],sequences:[],requestCompleted:!1}},render:function(){return e.createElement("div",{className:"modal sequence-viewer",ref:"modal",tabIndex:"-1"},e.createElement("div",{className:"modal-dialog"},e.createElement("div",{className:"modal-content"},e.createElement("div",{className:"modal-header"},e.createElement("h3",null,"View sequence")),this.state.requestCompleted&&this.resultsJSX()||this.loadingJSX())))},componentDidMount:function(){this.show(),$.getJSON(this.props.url).done(f.bind(function(a){this.setState({sequences:a.sequences,error_msgs:a.error_msgs,requestCompleted:!0})},this)).fail(function(a,b,c){j(a,function(){this.hide()})}),this.modal().on("hidden.bs.modal",this.props.onHide)}})}(),n=e.createClass({displayName:"Hit",mixins:[l],accession:function(){return this.props.hit.accession},length:function(){return this.props.hit.length},domID:function(){return"Query_"+this.props.query.number+"_hit_"+this.props.hit.number},databaseIDs:function(){return f.map(this.props.querydb,f.iteratee("id"))},showSequenceViewer:function(a){this.setState({showSequenceViewer:!0}),a&&a.preventDefault()},hideSequenceViewer:function(){this.setState({showSequenceViewer:!1})},viewSequenceLink:function(){return encodeURI("get_sequence/?sequence_ids="+this.accession()+"&database_ids="+this.databaseIDs())},downloadFASTA:function(a){var b=[this.accession()];k(b,this.databaseIDs())},downloadAlignment:function(a){var b=f.map(this.props.hit.hsps,f.bind(function(a){return a.query_id=this.props.query.id,a.hit_id=this.props.hit.id,a},this)),c=new i;c.export_alignments(b,this.props.query.id+"_"+this.props.hit.id)},getHSPStats:function(a){var b={Score:this.format_2_tuple([this.inTwoDecimal(a.bit_score),a.score]),"E value":this.inExponential(a.evalue),Identities:this.format_2_tuple([this.inFraction(a.identity,a.length),this.inPercentage(a.identity,a.length)]),Gaps:this.format_2_tuple([this.inFraction(a.gaps,a.length),this.inPercentage(a.gaps,a.length)]),Coverage:a.qcovhsp};switch(this.props.algorithm){case"tblastx":f.extend(b,{Frame:this.inFraction(a.qframe,a.sframe)});case"blastp":f.extend(b,{Positives:this.format_2_tuple([this.inFraction(a.positives,a.length),this.inPercentage(a.positives,a.length)])});break;case"blastn":f.extend(b,{Strand:(a.qframe>0?"+":"-")+"/"+(a.sframe>0?"+":"-")});break;case"blastx":f.extend(b,{"Query Frame":a.qframe});break;case"tblastn":f.extend(b,{"Hit Frame":a.sframe})}return b},getInitialState:function(){return{showSequenceViewer:!1}},viewSequenceButton:function(){return this.length()>1e4?e.createElement("button",{className:"btn btn-link view-sequence disabled",title:"Sequence too long",disabled:"true"},e.createElement("i",{className:"fa fa-eye"})," Sequence"):e.createElement("button",{className:"btn btn-link view-sequence",onClick:this.showSequenceViewer},e.createElement("i",{className:"fa fa-eye"})," Sequence")},render:function(){return e.createElement("div",{className:"hit",id:this.domID(),"data-hit-def":this.props.hit.id,"data-hit-evalue":this.props.hit.evalue,"data-hit-len":this.props.hit.length},e.createElement("div",{className:"section-header"},e.createElement("h4",{"data-toggle":"collapse","data-target":"#Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_alignment"},e.createElement("i",{className:"fa fa-chevron-down"})," ",e.createElement("span",null,this.props.hit.id," ",e.createElement("small",null,this.props.hit.title))),e.createElement("span",{className:"label label-reset pos-label",title:"Query "+this.props.query.number+". Hit "+this.props.hit.number+" of "+this.props.query.hits.length+".","data-toggle":"tooltip"},this.props.hit.number+"/"+this.props.query.hits.length)),e.createElement("div",{className:"section-content collapse in",id:"Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_alignment"},e.createElement("div",{className:"hit-links"},e.createElement("label",null,e.createElement("input",{type:"checkbox",id:this.domID()+"_checkbox",value:this.accession(),"data-target":"#Query_"+this.props.query.number+"_hit_"+this.props.hit.number,onChange:f.bind(function(){this.props.selectHit(this.domID()+"_checkbox")},this)}),e.createElement("span",null," Select ")),e.createElement("span",null," | "),this.viewSequenceButton(),this.state.showSequenceViewer&&e.createElement(m,{url:this.viewSequenceLink(),onHide:this.hideSequenceViewer}),e.createElement("span",null," | "),e.createElement("button",{className:"btn btn-link download-fa",onClick:this.downloadFASTA},e.createElement("i",{className:"fa fa-download"})," FASTA"),e.createElement("span",null," | "),e.createElement("button",{className:"btn btn-link download-aln",onClick:this.downloadAlignment},e.createElement("i",{className:"fa fa-download"})," Alignment"),f.map(this.props.hit.links,f.bind(function(a){return[e.createElement("span",null," | "),this.a(a)]},this))),e.createElement(h,{key:"kablammo"+this.props.query.id,query:this.props.query,hit:this.props.hit,algorithm:this.props.algorithm}),e.createElement("table",{className:"table hsps"},e.createElement("tbody",null,f.map(this.props.hit.hsps,f.bind(function(a){return stats_returned=this.getHSPStats(a),e.createElement("tr",{id:"Alignment_Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_"+a.number,key:"Query_"+this.props.query.id+"_Hit_"+this.props.hit.id+"_"+a.number},e.createElement("td",null,b.toLetters(a.number)+"."),e.createElement("td",{style:{width:"100%"}},e.createElement("div",{className:"hsp",id:"Query_"+this.props.query.number+"_hit_"+this.props.hit.number+"_"+a.number,"data-hsp-evalue":a.evalue,"data-hsp-start":a.qstart,"data-hsp-end":a.qend,"data-hsp-frame":a.sframe},e.createElement("table",{className:"table table-condensed hsp-stats"},e.createElement("thead",null,f.map(stats_returned,function(a,b){return e.createElement("th",{key:a+"_"+b},b)})),e.createElement("tbody",null,e.createElement("tr",null,f.map(stats_returned,f.bind(function(a,b){return e.createElement("th",{key:a+"_"+b},a)},this))))),e.createElement("div",{className:"alignment"},a.pp))))},this))))))}}),o=e.createClass({displayName:"HitsTable",mixins:[l],render:function(){var a=f.every(this.props.query.hits,function(a){return""!==a.sciname});return e.createElement("table",{className:"table table-hover table-condensed tabular-view"},e.createElement("thead",null,e.createElement("th",{className:"text-left"},"#"),e.createElement("th",null,"Similar sequences"),a&&e.createElement("th",{className:"text-left"},"Species"),e.createElement("th",{className:"text-right"},"Query coverage (%)"),e.createElement("th",{className:"text-right"},"Total score"),e.createElement("th",{className:"text-right"},"E value"),e.createElement("th",{className:"text-right","data-toggle":"tooltip","data-placement":"left",title:"Total identity of all hsps / total length of all hsps"},"Identity (%)")),e.createElement("tbody",null,f.map(this.props.query.hits,f.bind(function(b){return e.createElement("tr",{key:b.number},e.createElement("td",{className:"text-left"},b.number+"."),e.createElement("td",null,e.createElement("a",{href:"#Query_"+this.props.query.number+"_hit_"+b.number},b.id)),a&&e.createElement("td",{className:"text-left"},b.sciname),e.createElement("td",{className:"text-right"},b.qcovs),e.createElement("td",{className:"text-right"},b.score),e.createElement("td",{className:"text-right"},this.inExponential(b.hsps[0].evalue)),e.createElement("td",{className:"text-right"},b.identity))},this))))}}),p=e.createClass({displayName:"Query",domID:function(){return"Query_"+this.props.query.number},numhits:function(){return this.props.query.hits.length},render:function(){return e.createElement("div",{className:"resultn",id:this.domID(),"data-query-len":this.props.query.length,"data-algorithm":this.props.data.program},e.createElement("div",{className:"section-header"},e.createElement("h3",null,"Query= ",this.props.query.id," ",e.createElement("small",null,this.props.query.title)),e.createElement("span",{className:"label label-reset pos-label",title:"Query"+this.props.query.number+".","data-toggle":"tooltip"},this.props.query.number+"/"+this.props.data.queries.length)),this.numhits()&&e.createElement("div",{className:"section-content"},e.createElement(c,{key:"GO_"+this.props.query.number,query:this.props.query,program:this.props.data.program,collapsed:this.props.data.veryBig}),e.createElement(d,{key:"LD_"+this.props.query.id,query:this.props.query,algorithm:this.props.data.program,collapsed:"true"}),e.createElement(o,{key:"HT_"+this.props.query.number,query:this.props.query}),e.createElement("div",{id:"hits"},f.map(this.props.query.hits,f.bind(function(a){return e.createElement(n,{hit:a,key:"HIT_"+a.number,algorithm:this.props.data.program,querydb:this.props.data.querydb,query:this.props.query,selectHit:this.props.selectHit})},this))))||e.createElement("div",{className:"section-content"},e.createElement("p",null,"Query length: ",this.props.query.length),e.createElement("br",null),e.createElement("br",null),e.createElement("p",null,e.createElement("strong",null," ****** No hits found ****** "))))}}),q=e.createClass({displayName:"SideBar",downloadFastaOfAll:function(){var a=$(".hit-links :checkbox").map(function(){return this.value}).get(),b=f.map(this.props.data.querydb,f.iteratee("id"));k(a,b)},downloadFastaOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),b=f.map(this.props.data.querydb,f.iteratee("id"));k(a,b)},downloadAlignmentOfAll:function(){var a=$(".hit-links :checkbox").map(function(){return this.value}).get(),b=[],c=new i;f.each(this.props.data.queries,f.bind(function(a){f.each(a.hits,function(c){f.each(c.hsps,function(d){d.hit_id=c.id,d.query_id=a.id,b.push(d)})})},this)),console.log("len "+b.length),c.export_alignments(b,"alignment-"+a.length+"_hits")},downloadAlignmentOfSelected:function(){var a=$(".hit-links :checkbox:checked").map(function(){return this.value}).get(),b=[],c=new i;console.log("check "+a.toString()),f.each(this.props.data.queries,f.bind(function(c){f.each(c.hits,function(d){f.indexOf(a,d.id)!=-1&&f.each(d.hsps,function(a){a.hit_id=d.id,a.query_id=c.id,b.push(a)})})},this)),c.export_alignments(b,"alignment-"+a.length+"_hits")},render:function(){return e.createElement("div",{className:"sidebar"},this.props.shouldShowIndex&&this.index(),this.downloads())},index:function(){return e.createElement("div",{className:"index"},e.createElement("div",{className:"section-header"},e.createElement("h4",null,this.summary())),e.createElement("ul",{className:"nav hover-reset active-bold"},f.map(this.props.data.queries,f.bind(function(a){return e.createElement("li",{key:"Side_bar_"+a.id},e.createElement("a",{className:"nowrap-ellipsis hover-bold",href:"#Query_"+a.number,title:"Query= "+a.id+" "+a.title},"Query= "+a.id))},this))))},summary:function(){var a=this.props.data.program,b=this.props.data.queries.length,c=this.props.data.querydb.length;return a.toUpperCase()+": "+b+" "+(b>1?"queries":"query")+", "+c+" "+(c>1?"databases":"database")},downloads:function(){return e.createElement("div",{className:"downloads"},e.createElement("div",{className:"section-header"},e.createElement("h4",null,"Download FASTA, XML, TSV")),e.createElement("ul",{className:"nav"},e.createElement("li",null,e.createElement("a",{className:"download-fasta-of-all",onClick:this.downloadFastaOfAll},"FASTA of all hits")),e.createElement("li",null,e.createElement("a",{className:"download-fasta-of-selected disabled",onClick:this.downloadFastaOfSelected},"FASTA of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),e.createElement("li",null,e.createElement("a",{className:"download-alignment-of-all",onClick:this.downloadAlignmentOfAll},"Alignment of all hits")),e.createElement("li",null,e.createElement("a",{className:"download-alignment-of-selected disabled",onClick:this.downloadAlignmentOfSelected},"Alignment of ",e.createElement("span",{className:"text-bold"})," selected hit(s)")),e.createElement("li",null,e.createElement("a",{className:"download","data-toggle":"tooltip",title:"15 columns: query and subject ID; scientific name, alignment length, mismatches, gaps, identity, start and end coordinates, e value, bitscore, query coverage per subject and per HSP.",
|
19
|
-
href:"download/"+this.props.data.search_id+".std_tsv"},"Standard tabular report")),e.createElement("li",null,e.createElement("a",{className:"download","data-toggle":"tooltip",title:"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".full_tsv"},"Full tabular report")),e.createElement("li",null,e.createElement("a",{className:"download","data-toggle":"tooltip",title:"Results in XML format.",href:"download/"+this.props.data.search_id+".xml"},"Full XML report"))))}}),r=e.createClass({displayName:"Report",getInitialState:function(){return this.fetchResults(),this.updateCycle=0,{search_id:"",program:"",program_version:"",queries:[],querydb:[],params:[],stats:[]}},fetchResults:function(){
|
19
|
+
href:"download/"+this.props.data.search_id+".std_tsv"},"Standard tabular report")),e.createElement("li",null,e.createElement("a",{className:"download","data-toggle":"tooltip",title:"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.",href:"download/"+this.props.data.search_id+".full_tsv"},"Full tabular report")),e.createElement("li",null,e.createElement("a",{className:"download","data-toggle":"tooltip",title:"Results in XML format.",href:"download/"+this.props.data.search_id+".xml"},"Full XML report"))))}}),r=e.createClass({displayName:"Report",getInitialState:function(){return this.fetchResults(),this.updateCycle=0,{search_id:"",program:"",program_version:"",queries:[],querydb:[],params:[],stats:[]}},fetchResults:function(){function a(){$.getJSON(location.pathname+".json").complete(function(d){switch(d.status){case 202:var e;e=1===b.length?b[0]:b.shift(),setTimeout(a,e);break;case 200:c.updateState(d.responseJSON);break;case 404:case 400:case 500:j(d.responseJSON)}})}var b=[200,400,800,1200,2e3,3e3,5e3],c=this;a()},updateState:function(a){var b=a.queries;a.veryBig=b.length>250,a.queries=b.splice(0,50),this.setState(a);var c=function a(){b.length>0?(this.setState({queries:this.state.queries.concat(b.splice(0,50))}),setTimeout(a.bind(this),500)):this.componentFinishedUpdating()};setTimeout(c.bind(this),500)},render:function(){return this.isResultAvailable()?this.resultsJSX():this.loadingJSX()},loadingJSX:function(){return e.createElement("div",{className:"row"},e.createElement("div",{className:"col-md-6 col-md-offset-3 text-center"},e.createElement("h1",null,e.createElement("i",{className:"fa fa-cog fa-spin"})," BLAST-ing"),e.createElement("p",null,e.createElement("br",null),"This can take some time depending on the size of your query and database(s). The page will update automatically when BLAST is done.",e.createElement("br",null),e.createElement("br",null),"You can bookmark the page and come back to it later or share the link with someone.")))},resultsJSX:function(){return e.createElement("div",{className:"row"},this.shouldShowSidebar()&&e.createElement("div",{className:"col-md-3 hidden-sm hidden-xs"},e.createElement(q,{data:this.state,shouldShowIndex:this.shouldShowIndex()})),e.createElement("div",{className:this.shouldShowSidebar()?"col-md-9":"col-md-12"},this.overviewJSX(),this.isHitsAvailable()?e.createElement(g,{queries:this.state.queries,program:this.state.program,collapsed:"true"}):e.createElement("span",null),f.map(this.state.queries,f.bind(function(a){return e.createElement(p,{key:"Query_"+a.id,query:a,data:this.state,selectHit:this.selectHit})},this))))},overviewJSX:function(){return e.createElement("div",{className:"overview"},e.createElement("pre",{className:"pre-reset"},this.state.program_version,e.createElement("br",null),e.createElement("br",null),f.map(this.state.querydb,function(a){return a.title}).join(", "),e.createElement("br",null),"Total: ",this.state.stats.nsequences," sequences,",this.state.stats.ncharacters," characters",e.createElement("br",null),e.createElement("br",null),f.map(this.state.params,function(a,b){return b+" "+a}).join(", ")))},isResultAvailable:function(){return this.state.queries.length>=1},isHitsAvailable:function(){var a=0;return f.each(this.state.queries,function(b){0==b.hits.length&&a++}),!(a==this.state.queries.length)},shouldShowSidebar:function(){return!(1==this.state.queries.length&&0==this.state.queries[0].hits.length)},shouldShowIndex:function(){return this.state.queries.length<=8},componentDidMount:function(){this.preventCollapseOnSelection()},componentDidUpdate:function(){this.updateCycle+=1,1===this.updateCycle&&this.affixSidebar()},componentFinishedUpdating:function(){this.shouldShowIndex()&&this.setupScrollSpy()},preventCollapseOnSelection:function(){$("body").on("mousedown",".hit > .section-header > h4",function(a){var b=$(this);b.on("mouseup mousemove",function a(c){"mouseup"===c.type?(b.attr("data-toggle","collapse"),b.find(".fa-chevron-down").toggleClass("fa-rotate-270")):b.attr("data-toggle",""),b.off("mouseup mousemove",a)})})},affixSidebar:function(){var a=$(".sidebar");a.affix({offset:{top:a.offset().top}})},setupScrollSpy:function(){$("body").scrollspy({target:".sidebar"})},selectHit:function(a){var b=$("#"+a),c=$(".hit-links :checkbox:checked").length;if(b&&b.val()){var d=$(b.data("target"));if(b.is(":checked")){d.addClass("glow").find(":checkbox").not(b).check();var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");f.enable();e.find("span");e.enable()}else d.removeClass("glow").find(":checkbox").not(b).uncheck();if(c>=1){var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");e.find(".text-bold").html(c),f.find(".text-bold").html(c)}if(0==c){var e=$(".download-fasta-of-selected"),f=$(".download-alignment-of-selected");e.addClass("disabled").find(".text-bold").html(""),f.addClass("disabled").find(".text-bold").html("")}}}}),s=e.createClass({displayName:"Page",render:function(){return e.createElement("div",null,e.createElement("div",{className:"container"},e.createElement(r,{ref:"report"})),e.createElement("div",{id:"circos-demo",className:"modal"}),e.createElement("canvas",{id:"png-exporter",hidden:!0}))}}),e.render(e.createElement(s,null),document.getElementById("view"))}}})})(function(a){a()});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequenceserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.
|
4
|
+
version: 1.1.0.beta8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anurag Priyam
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-05-
|
14
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: sinatra
|