Skip to content

Instantly share code, notes, and snippets.

@yonatang
Created June 17, 2016 20:52
Show Gist options
  • Save yonatang/5c78a329bbec069a7e4ea51beed6d9ce to your computer and use it in GitHub Desktop.
Save yonatang/5c78a329bbec069a7e4ea51beed6d9ce to your computer and use it in GitHub Desktop.
simpsons paradox
[
{"xOrder":0,"x":"Women", "y0": 0.0, "y1": 0.3, "color":"#e377c2", "id":"0"},
{"xOrder":0,"x":"Women", "y0": 0.3, "y1": 1.0, "color":"#c7c7c7", "id":"1"},
{"xOrder":1,"x":"Men", "y0": 0.0, "y1":0.46, "color":"#1f77b4", "id":"2"},
{"xOrder":1,"x":"Men", "y0": 0.46, "y1": 1.0, "color":"#c7c7c7", "id":"3"}
]
[
{"xOrder":0,"x":"W-F1", "y0": 0.0, "y1": 0.82, "color":"#e377c2", "id":"0"},
{"xOrder":0,"x":"W-F1", "y0": 0.82, "y1": 1.0, "color":"#c7c7c7", "id":"1"},
{"xOrder":1,"x":"M-F1", "y0": 0.0, "y1":0.62, "color":" #1f77b4", "id":"2"},
{"xOrder":1,"x":"M-F1", "y0": 0.62, "y1": 1.0, "color":"#c7c7c7", "id":"3"},
{"xOrder":2,"x":"W-F2", "y0": 0.0, "y1": 0.67, "color":"#e377c2", "id":"4"},
{"xOrder":2,"x":"W-F2", "y0": 0.67, "y1": 1.0, "color":"#c7c7c7", "id":"5"},
{"xOrder":3,"x":"M-F2", "y0": 0.0, "y1":0.63, "color":" #1f77b4", "id":"6"},
{"xOrder":3,"x":"M-F2", "y0": 0.63, "y1": 1.0, "color":"#c7c7c7", "id":"7"},
{"xOrder":4,"x":"W-F3", "y0": 0.0, "y1": 0.34, "color":"#e377c2", "id":"8"},
{"xOrder":4,"x":"W-F3", "y0": 0.34, "y1": 1.0, "color":"#c7c7c7", "id":"9"},
{"xOrder":5,"x":"M-F3", "y0": 0.0, "y1":0.36, "color":" #1f77b4", "id":"10"},
{"xOrder":5,"x":"M-F3", "y0": 0.36, "y1": 1.0, "color":"#c7c7c7", "id":"11"},
{"xOrder":6,"x":"W-F4", "y0": 0.0, "y1": 0.34, "color":"#e377c2", "id":"12"},
{"xOrder":6,"x":"W-F4", "y0": 0.34, "y1": 1.0, "color":"#c7c7c7", "id":"13"},
{"xOrder":7,"x":"M-F4", "y0": 0.0, "y1":0.33, "color":" #1f77b4", "id":"14"},
{"xOrder":7,"x":"M-F4", "y0": 0.33, "y1": 1.0, "color":"#c7c7c7", "id":"15"},
{"xOrder":8,"x":"W-F5", "y0": 0.0, "y1": 0.23, "color":"#e377c2", "id":"16"},
{"xOrder":8,"x":"W-F5", "y0": 0.23, "y1": 1.0, "color":"#c7c7c7", "id":"17"},
{"xOrder":9,"x":"M-F5", "y0": 0.0, "y1":0.26, "color":" #1f77b4", "id":"18"},
{"xOrder":9,"x":"M-F5", "y0": 0.26, "y1": 1.0, "color":"#c7c7c7", "id":"19"},
{"xOrder":10,"x":"W-F6", "y0": 0.0, "y1": 0.06, "color":"#e377c2", "id":"20"},
{"xOrder":10,"x":"W-F6", "y0": 0.06, "y1": 1.0, "color":"#c7c7c7", "id":"21"},
{"xOrder":11,"x":"M-F6", "y0": 0.0, "y1":0.07, "color":" #1f77b4", "id":"22"},
{"xOrder":11,"x":"M-F6", "y0": 0.07, "y1": 1.0, "color":"#c7c7c7", "id":"23"}
]
[
{"xOrder":0,"x":"W-F1", "y0": 0, "y1": 52, "color":"#e377c2", "id":"0"},
{"xOrder":0,"x":"W-F1", "y0": 52, "y1": 64, "color":"#c7c7c7", "id":"1"},
{"xOrder":1,"x":"M-F1", "y0": 0, "y1": 150, "color":" #1f77b4", "id":"2"},
{"xOrder":1,"x":"M-F1", "y0": 150, "y1": 243, "color":"#c7c7c7", "id":"3"},
{"xOrder":2,"x":"W-F2", "y0": 0, "y1": 69, "color":"#e377c2", "id":"4"},
{"xOrder":2,"x":"W-F2", "y0": 69, "y1": 104, "color":"#c7c7c7", "id":"5"},
{"xOrder":3,"x":"M-F2", "y0": 0, "y1": 133, "color":" #1f77b4", "id":"6"},
{"xOrder":3,"x":"M-F2", "y0": 133, "y1": 212, "color":"#c7c7c7", "id":"7"},
{"xOrder":4,"x":"W-F3", "y0": 0, "y1": 83, "color":"#e377c2", "id":"8"},
{"xOrder":4,"x":"W-F3", "y0": 83, "y1": 247, "color":"#c7c7c7", "id":"9"},
{"xOrder":5,"x":"M-F3", "y0": 0, "y1": 53, "color":" #1f77b4", "id":"10"},
{"xOrder":5,"x":"M-F3", "y0": 53, "y1": 149, "color":"#c7c7c7", "id":"11"},
{"xOrder":6,"x":"W-F4", "y0": 0, "y1": 77, "color":"#e377c2", "id":"12"},
{"xOrder":6,"x":"W-F4", "y0": 77, "y1": 227, "color":"#c7c7c7", "id":"13"},
{"xOrder":7,"x":"M-F4", "y0": 0, "y1": 41, "color":" #1f77b4", "id":"14"},
{"xOrder":7,"x":"M-F4", "y0": 41, "y1": 125, "color":"#c7c7c7", "id":"15"},
{"xOrder":8,"x":"W-F5", "y0": 0, "y1": 36, "color":"#e377c2", "id":"16"},
{"xOrder":8,"x":"W-F5", "y0": 36, "y1": 159, "color":"#c7c7c7", "id":"17"},
{"xOrder":9,"x":"M-F5", "y0": 0, "y1": 36, "color":" #1f77b4", "id":"18"},
{"xOrder":9,"x":"M-F5", "y0": 36, "y1": 142, "color":"#c7c7c7", "id":"19"},
{"xOrder":10,"x":"W-F6", "y0": 0, "y1": 14, "color":"#e377c2", "id":"20"},
{"xOrder":10,"x":"W-F6", "y0": 14, "y1": 244, "color":"#c7c7c7", "id":"21"},
{"xOrder":11,"x":"M-F6", "y0": 0, "y1": 5, "color":" #1f77b4", "id":"22"},
{"xOrder":11,"x":"M-F6", "y0": 5, "y1": 72, "color":"#c7c7c7", "id":"23"}
]
[
{"xOrder":0,"x":"Women", "y0": 0, "y1": 339, "color":"#e377c2", "id":"0"},
{"xOrder":0,"x":"Women", "y0": 339, "y1": 1045, "color":"#c7c7c7", "id":"1"},
{"xOrder":1,"x":"Men", "y0": 0, "y1": 418, "color":"#1f77b4", "id":"2"},
{"xOrder":1,"x":"Men", "y0": 418, "y1": 943, "color":"#c7c7c7", "id":"3"}
]
<html>
<head>
<meta charset="UTF-8">
<title>Covariance Story</title>
<script src="jquery-3.0.0.min.js" type="application/javascript"></script>
<script src="main.js" data-main="scripts/app" type="application/javascript"></script>
</head>
<body>
<span id="spn_message"></span>
<br>
<button id="btn_back" class="progress-button" type="button">Back</button>
&nbsp;
<button id="btn_next" class="progress-button" type="button">Next</button>
&nbsp;
Duration:&nbsp;<input id="input_duration" type="number" value="1000">
<br>
<span id="view1"></span>
</body>
</html>
/*! jQuery v3.0.0 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.0.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return a&&"[object Object]"===k.call(a)?(b=e(a))?(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n):!0:!1},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;d>f;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a)?(d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e):void 0},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"===c||r.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\x00"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[0>c?c+b:c]}),even:pa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,e>i&&ya(a.slice(i,e)),f>e&&ya(a=a.slice(e)),f>e&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;d>b;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;d>b;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(f>b)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(1>=b&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){
return j.call(r(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;g>f;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;g>f;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;d>c;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;o>n;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){return this.originalEvent?b(this.originalEvent):void 0}:function(){return this.originalEvent?this.originalEvent[a]:void 0},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==va()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===va()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&r.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ta:ua,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:ua,isPropagationStopped:ua,isImmediatePropagationStopped:ua,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ta,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ta,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ta,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&qa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ra.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return wa(this,a,b,c,d)},one:function(a,b,c,d){return wa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ua),this.each(function(){r.event.remove(this,a,c,b)})}});var xa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/<script|<style|<link/i,za=/checked\s*(?:[^=]|=\s*.checked.)/i,Aa=/^true\/(.*)/,Ba=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;m>l;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;i>l;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;e>d;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;e>d;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;f>=g;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",fontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),0>=d||null==d){if(d=Ma(a,b,f),(0>d||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"===e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){return c?!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)}):void 0},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){return b?(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;e>g;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);g>f;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;e>d;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Ya=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){Za||(Za=a.requestAnimationFrame?a.requestAnimationFrame(ab):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame(Za):a.clearInterval(Za),Za=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var hb,ib=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c);
}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){return r.isArray(b)?a.checked=r.inArray(r(a).val(),b)>-1:void 0}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?r.event.trigger(a,b,c,!0):void 0}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",0>b&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;return o.cors||Pb&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=oa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=r.trim(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||pa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Na(o.pixelPosition,function(a,c){return c?(c=Ma(a,b),Ka.test(c)?r(a).position()[b]+"px":c):void 0})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.2.0 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/requirejs/LICENSE
*/
!function(){var requirejs,require,define;!function(global){function commentReplace(n,t,e,r){return r||""}function isFunction(n){return"[object Function]"===ostring.call(n)}function isArray(n){return"[object Array]"===ostring.call(n)}function each(n,t){if(n){var e;for(e=0;e<n.length&&(!n[e]||!t(n[e],e,n));e+=1);}}function eachReverse(n,t){if(n){var e;for(e=n.length-1;e>-1&&(!n[e]||!t(n[e],e,n));e-=1);}}function hasProp(n,t){return hasOwn.call(n,t)}function getOwn(n,t){return hasProp(n,t)&&n[t]}function eachProp(n,t){var e;for(e in n)if(hasProp(n,e)&&t(n[e],e))break}function mixin(n,t,e,r){return t&&eachProp(t,function(t,i){(e||!hasProp(n,i))&&(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?n[i]=t:(n[i]||(n[i]={}),mixin(n[i],t,e,r)))}),n}function bind(n,t){return function(){return t.apply(n,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(n){throw n}function getGlobal(n){if(!n)return n;var t=global;return each(n.split("."),function(n){t=t[n]}),t}function makeError(n,t,e,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+n);return i.requireType=n,i.requireModules=r,e&&(i.originalError=e),i}function newContext(n){function t(n){var t,e;for(t=0;t<n.length;t++)if(e=n[t],"."===e)n.splice(t,1),t-=1;else if(".."===e){if(0===t||1===t&&".."===n[2]||".."===n[t-1])continue;t>0&&(n.splice(t-1,2),t-=2)}}function e(n,e,r){var i,u,a,o,s,c,l,f,h,g,p,d,m=e&&e.split("/"),v=_.map,y=v&&v["*"];if(n&&(n=n.split("/"),l=n.length-1,_.nodeIdCompat&&jsSuffixRegExp.test(n[l])&&(n[l]=n[l].replace(jsSuffixRegExp,"")),"."===n[0].charAt(0)&&m&&(d=m.slice(0,m.length-1),n=d.concat(n)),t(n),n=n.join("/")),r&&v&&(m||y)){a=n.split("/");n:for(o=a.length;o>0;o-=1){if(c=a.slice(0,o).join("/"),m)for(s=m.length;s>0;s-=1)if(u=getOwn(v,m.slice(0,s).join("/")),u&&(u=getOwn(u,c))){f=u,h=o;break n}!g&&y&&getOwn(y,c)&&(g=getOwn(y,c),p=o)}!f&&g&&(f=g,h=p),f&&(a.splice(0,h,f),n=a.join("/"))}return i=getOwn(_.pkgs,n),i?i:n}function r(n){isBrowser&&each(scripts(),function(t){return t.getAttribute("data-requiremodule")===n&&t.getAttribute("data-requirecontext")===M.contextName?(t.parentNode.removeChild(t),!0):void 0})}function i(n){var t=getOwn(_.paths,n);return t&&isArray(t)&&t.length>1?(t.shift(),M.require.undef(n),M.makeRequire(null,{skipMap:!0})([n]),!0):void 0}function u(n){var t,e=n?n.indexOf("!"):-1;return e>-1&&(t=n.substring(0,e),n=n.substring(e+1,n.length)),[t,n]}function a(n,t,r,i){var a,o,s,c,l=null,f=t?t.name:null,h=n,g=!0,p="";return n||(g=!1,n="_@r"+(T+=1)),c=u(n),l=c[0],n=c[1],l&&(l=e(l,f,i),o=getOwn(q,l)),n&&(l?p=o&&o.normalize?o.normalize(n,function(n){return e(n,f,i)}):-1===n.indexOf("!")?e(n,f,i):n:(p=e(n,f,i),c=u(p),l=c[0],p=c[1],r=!0,a=M.nameToUrl(p))),s=!l||o||r?"":"_unnormalized"+(z+=1),{prefix:l,name:p,parentMap:t,unnormalized:!!s,url:a,originalName:h,isDefine:g,id:(l?l+"!"+p:p)+s}}function o(n){var t=n.id,e=getOwn(E,t);return e||(e=E[t]=new M.Module(n)),e}function s(n,t,e){var r=n.id,i=getOwn(E,r);!hasProp(q,r)||i&&!i.defineEmitComplete?(i=o(n),i.error&&"error"===t?e(i.error):i.on(t,e)):"defined"===t&&e(q[r])}function c(n,t){var e=n.requireModules,r=!1;t?t(n):(each(e,function(t){var e=getOwn(E,t);e&&(e.error=n,e.events.error&&(r=!0,e.emit("error",n)))}),r||req.onError(n))}function l(){globalDefQueue.length&&(each(globalDefQueue,function(n){var t=n[0];"string"==typeof t&&(M.defQueueMap[t]=!0),N.push(n)}),globalDefQueue=[])}function f(n){delete E[n],delete k[n]}function h(n,t,e){var r=n.map.id;n.error?n.emit("error",n.error):(t[r]=!0,each(n.depMaps,function(r,i){var u=r.id,a=getOwn(E,u);!a||n.depMatched[i]||e[u]||(getOwn(t,u)?(n.defineDep(i,q[u]),n.check()):h(a,t,e))}),e[r]=!0)}function g(){var n,t,e=1e3*_.waitSeconds,u=e&&M.startTime+e<(new Date).getTime(),a=[],o=[],s=!1,l=!0;if(!y){if(y=!0,eachProp(k,function(n){var e=n.map,c=e.id;if(n.enabled&&(e.isDefine||o.push(n),!n.error))if(!n.inited&&u)i(c)?(t=!0,s=!0):(a.push(c),r(c));else if(!n.inited&&n.fetched&&e.isDefine&&(s=!0,!e.prefix))return l=!1}),u&&a.length)return n=makeError("timeout","Load timeout for modules: "+a,null,a),n.contextName=M.contextName,c(n);l&&each(o,function(n){h(n,{},{})}),u&&!t||!s||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,g()},50)),y=!1}}function p(n){hasProp(q,n[0])||o(a(n[0],null,!0)).init(n[1],n[2])}function d(n,t,e,r){n.detachEvent&&!isOpera?r&&n.detachEvent(r,t):n.removeEventListener(e,t,!1)}function m(n){var t=n.currentTarget||n.srcElement;return d(t,M.onScriptLoad,"load","onreadystatechange"),d(t,M.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var n;for(l();N.length;){if(n=N.shift(),null===n[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+n[n.length-1]));p(n)}M.defQueueMap={}}var y,x,M,b,w,_={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},E={},k={},S={},N=[],q={},A={},C={},T=1,z=1;return b={require:function(n){return n.require?n.require:n.require=M.makeRequire(n.map)},exports:function(n){return n.usingExports=!0,n.map.isDefine?n.exports?q[n.map.id]=n.exports:n.exports=q[n.map.id]={}:void 0},module:function(n){return n.module?n.module:n.module={id:n.map.id,uri:n.map.url,config:function(){return getOwn(_.config,n.map.id)||{}},exports:n.exports||(n.exports={})}}},x=function(n){this.events=getOwn(S,n.id)||{},this.map=n,this.shim=getOwn(_.shim,n.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},x.prototype={init:function(n,t,e,r){r=r||{},this.inited||(this.factory=t,e?this.on("error",e):this.events.error&&(e=bind(this,function(n){this.emit("error",n)})),this.depMaps=n&&n.slice(0),this.errback=e,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(n,t){this.depMatched[n]||(this.depMatched[n]=!0,this.depCount-=1,this.depExports[n]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,M.startTime=(new Date).getTime();var n=this.map;return this.shim?void M.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return n.prefix?this.callPlugin():this.load()})):n.prefix?this.callPlugin():this.load()}},load:function(){var n=this.map.url;A[n]||(A[n]=!0,M.load(this.map.id,n))},check:function(){if(this.enabled&&!this.enabling){var n,t,e=this.map.id,r=this.depExports,i=this.exports,u=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(u)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{i=M.execCb(e,u,r,i)}catch(a){n=a}else i=M.execCb(e,u,r,i);if(this.map.isDefine&&void 0===i&&(t=this.module,t?i=t.exports:this.usingExports&&(i=this.exports)),n)return n.requireMap=this.map,n.requireModules=this.map.isDefine?[this.map.id]:null,n.requireType=this.map.isDefine?"define":"require",c(this.error=n)}else i=u;if(this.exports=i,this.map.isDefine&&!this.ignore&&(q[e]=i,req.onResourceLoad)){var o=[];each(this.depMaps,function(n){o.push(n.normalizedMap||n)}),req.onResourceLoad(M,this.map,o)}f(e),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(M.defQueueMap,e)||this.fetch()}},callPlugin:function(){var n=this.map,t=n.id,r=a(n.prefix);this.depMaps.push(r),s(r,"defined",bind(this,function(r){var i,u,l,h=getOwn(C,this.map.id),g=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,d=M.makeRequire(n.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(g=r.normalize(g,function(n){return e(n,p,!0)})||""),u=a(n.prefix+"!"+g,this.map.parentMap),s(u,"defined",bind(this,function(n){this.map.normalizedMap=u,this.init([],function(){return n},null,{enabled:!0,ignore:!0})})),l=getOwn(E,u.id),void(l&&(this.depMaps.push(u),this.events.error&&l.on("error",bind(this,function(n){this.emit("error",n)})),l.enable()))):h?(this.map.url=M.nameToUrl(h),void this.load()):(i=bind(this,function(n){this.init([],function(){return n},null,{enabled:!0})}),i.error=bind(this,function(n){this.inited=!0,this.error=n,n.requireModules=[t],eachProp(E,function(n){0===n.map.id.indexOf(t+"_unnormalized")&&f(n.map.id)}),c(n)}),i.fromText=bind(this,function(e,r){var u=n.name,s=a(u),l=useInteractive;r&&(e=r),l&&(useInteractive=!1),o(s),hasProp(_.config,t)&&(_.config[u]=_.config[t]);try{req.exec(e)}catch(f){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+f,f,[t]))}l&&(useInteractive=!0),this.depMaps.push(s),M.completeLoad(u),d([u],i)}),void r.load(n.name,d,i,_))})),M.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){k[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(n,t){var e,r,i;if("string"==typeof n){if(n=a(n,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=n,i=getOwn(b,n.id))return void(this.depExports[t]=i(this));this.depCount+=1,s(n,"defined",bind(this,function(n){this.undefed||(this.defineDep(t,n),this.check())})),this.errback?s(n,"error",bind(this,this.errback)):this.events.error&&s(n,"error",bind(this,function(n){this.emit("error",n)}))}e=n.id,r=E[e],hasProp(b,e)||!r||r.enabled||M.enable(n,this)})),eachProp(this.pluginMaps,bind(this,function(n){var t=getOwn(E,n.id);t&&!t.enabled&&M.enable(n,this)})),this.enabling=!1,this.check()},on:function(n,t){var e=this.events[n];e||(e=this.events[n]=[]),e.push(t)},emit:function(n,t){each(this.events[n],function(n){n(t)}),"error"===n&&delete this.events[n]}},M={config:_,contextName:n,registry:E,defined:q,urlFetched:A,defQueue:N,defQueueMap:{},Module:x,makeModuleMap:a,nextTick:req.nextTick,onError:c,configure:function(n){if(n.baseUrl&&"/"!==n.baseUrl.charAt(n.baseUrl.length-1)&&(n.baseUrl+="/"),"string"==typeof n.urlArgs){var t=n.urlArgs;n.urlArgs=function(n,e){return(-1===e.indexOf("?")?"?":"&")+t}}var e=_.shim,r={paths:!0,bundles:!0,config:!0,map:!0};eachProp(n,function(n,t){r[t]?(_[t]||(_[t]={}),mixin(_[t],n,!0,!0)):_[t]=n}),n.bundles&&eachProp(n.bundles,function(n,t){each(n,function(n){n!==t&&(C[n]=t)})}),n.shim&&(eachProp(n.shim,function(n,t){isArray(n)&&(n={deps:n}),!n.exports&&!n.init||n.exportsFn||(n.exportsFn=M.makeShimExports(n)),e[t]=n}),_.shim=e),n.packages&&each(n.packages,function(n){var t,e;n="string"==typeof n?{name:n}:n,e=n.name,t=n.location,t&&(_.paths[e]=n.location),_.pkgs[e]=n.name+"/"+(n.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(E,function(n,t){n.inited||n.map.unnormalized||(n.map=a(t,null,!0))}),(n.deps||n.callback)&&M.require(n.deps||[],n.callback)},makeShimExports:function(n){function t(){var t;return n.init&&(t=n.init.apply(global,arguments)),t||n.exports&&getGlobal(n.exports)}return t},makeRequire:function(t,i){function u(e,r,s){var l,f,h;return i.enableBuildCallback&&r&&isFunction(r)&&(r.__requireJsBuild=!0),"string"==typeof e?isFunction(r)?c(makeError("requireargs","Invalid require call"),s):t&&hasProp(b,e)?b[e](E[t.id]):req.get?req.get(M,e,t,u):(f=a(e,t,!1,!0),l=f.id,hasProp(q,l)?q[l]:c(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+n+(t?"":". Use require([])")))):(v(),M.nextTick(function(){v(),h=o(a(null,t)),h.skipMap=i.skipMap,h.init(e,r,s,{enabled:!0}),g()}),u)}return i=i||{},mixin(u,{isBrowser:isBrowser,toUrl:function(n){var r,i=n.lastIndexOf("."),u=n.split("/")[0],a="."===u||".."===u;return-1!==i&&(!a||i>1)&&(r=n.substring(i,n.length),n=n.substring(0,i)),M.nameToUrl(e(n,t&&t.id,!0),r,!0)},defined:function(n){return hasProp(q,a(n,t,!1,!0).id)},specified:function(n){return n=a(n,t,!1,!0).id,hasProp(q,n)||hasProp(E,n)}}),t||(u.undef=function(n){l();var e=a(n,t,!0),i=getOwn(E,n);i.undefed=!0,r(n),delete q[n],delete A[e.url],delete S[n],eachReverse(N,function(t,e){t[0]===n&&N.splice(e,1)}),delete M.defQueueMap[n],i&&(i.events.defined&&(S[n]=i.events),f(n))}),u},enable:function(n){var t=getOwn(E,n.id);t&&o(n).enable()},completeLoad:function(n){var t,e,r,u=getOwn(_.shim,n)||{},a=u.exports;for(l();N.length;){if(e=N.shift(),null===e[0]){if(e[0]=n,t)break;t=!0}else e[0]===n&&(t=!0);p(e)}if(M.defQueueMap={},r=getOwn(E,n),!t&&!hasProp(q,n)&&r&&!r.inited){if(!(!_.enforceDefine||a&&getGlobal(a)))return i(n)?void 0:c(makeError("nodefine","No define call for "+n,null,[n]));p([n,u.deps||[],u.exportsFn])}g()},nameToUrl:function(n,t,e){var r,i,u,a,o,s,c,l=getOwn(_.pkgs,n);if(l&&(n=l),c=getOwn(C,n))return M.nameToUrl(c,t,e);if(req.jsExtRegExp.test(n))o=n+(t||"");else{for(r=_.paths,i=n.split("/"),u=i.length;u>0;u-=1)if(a=i.slice(0,u).join("/"),s=getOwn(r,a)){isArray(s)&&(s=s[0]),i.splice(0,u,s);break}o=i.join("/"),o+=t||(/^data\:|^blob\:|\?/.test(o)||e?"":".js"),o=("/"===o.charAt(0)||o.match(/^[\w\+\.\-]+:/)?"":_.baseUrl)+o}return _.urlArgs&&!/^blob\:/.test(o)?o+_.urlArgs(n,o):o},load:function(n,t){req.load(M,n,t)},execCb:function(n,t,e,r){return t.apply(r,e)},onScriptLoad:function(n){if("load"===n.type||readyRegExp.test((n.currentTarget||n.srcElement).readyState)){interactiveScript=null;var t=m(n);M.completeLoad(t.id)}},onScriptError:function(n){var t=m(n);if(!i(t.id)){var e=[];return eachProp(E,function(n,r){0!==r.indexOf("_@r")&&each(n.depMaps,function(n){return n.id===t.id?(e.push(r),!0):void 0})}),c(makeError("scripterror",'Script error for "'+t.id+(e.length?'", needed by: '+e.join(", "):'"'),n,[t.id]))}}},M.require=M.makeRequire(),M}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(n){return"interactive"===n.readyState?interactiveScript=n:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.2.0",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(n,t,e,r){var i,u,a=defContextName;return isArray(n)||"string"==typeof n||(u=n,isArray(t)?(n=t,t=e,e=r):n=[]),u&&u.context&&(a=u.context),i=getOwn(contexts,a),i||(i=contexts[a]=req.s.newContext(a)),u&&i.configure(u),i.require(n,t,e)},req.config=function(n){return req(n)},req.nextTick="undefined"!=typeof setTimeout?function(n){setTimeout(n,4)}:function(n){n()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(n){req[n]=function(){var t=contexts[defContextName];return t.require[n].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(n,t,e){var r=n.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=n.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(n,t,e){var r,i=n&&n.config||{};if(isBrowser)return r=req.createNode(i,t,e),r.setAttribute("data-requirecontext",n.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",n.onScriptLoad,!1),r.addEventListener("error",n.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",n.onScriptLoad)),r.src=e,i.onNodeCreated&&i.onNodeCreated(r,i,t,e),currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{setTimeout(function(){},0),importScripts(e),n.completeLoad(t)}catch(u){n.onError(makeError("importscripts","importScripts failed for "+t+" at "+e,u,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(n){return head||(head=n.parentNode),dataMain=n.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(n,t,e){var r,i;"string"!=typeof n&&(e=t,t=n,n=null),isArray(t)||(e=t,t=null),!t&&isFunction(e)&&(t=[],e.length&&(e.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(n,e){t.push(e)}),t=(1===e.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(n||(n=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),i?(i.defQueue.push([n,t,e]),i.defQueueMap[n]=!0):globalDefQueue.push([n,t,e])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),define("lib/require",function(){}),!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function s(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function l(n){return(n+="")===Ma||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return l(n)in this._}function g(n){return(n=l(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function d(){var n=0;for(var t in this._)++n;return n}function m(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(n){return n}function x(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function M(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wa.length;r>e;++e){var i=wa[e]+t;if(i in n)return i}}function b(){}function w(){}function _(n){function t(){for(var t,r=e,i=-1,u=r.length;++i<u;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,i){var u,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,u=e.indexOf(a)).concat(e.slice(u+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function E(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function S(n){for(var t=new w,e=0,r=arguments.length;++e<r;)t[arguments[e]]=_(t);return t.of=function(e,r){return function(i){try{var u=i.sourceEvent=oa.event;i.target=n,oa.event=i,t[i.type].apply(e,r)}finally{oa.event=u}}},t}function N(n){return Ea(n,qa),n}function q(n){return"function"==typeof n?n:function(){return ka(n,this)}}function A(n){return"function"==typeof n?n:function(){return Sa(n,this)}}function C(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function u(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?u:i}function T(n){return n.trim().replace(/\s+/g," ")}function z(n){return new RegExp("(?:^|\\s+)"+oa.requote(n)+"(?:\\s+|$)","g")}function L(n){return(n+"").trim().split(/^|\s+/)}function R(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=L(n).map(j);var i=n.length;return"function"==typeof t?r:e}function j(n){var t=z(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||e.setAttribute("class",T(i+" "+n))):e.setAttribute("class",T(i.replace(t," ")))}}function O(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function u(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?u:i}function D(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?i:r}function P(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Aa&&t.documentElement.namespaceURI===Aa?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function U(){var n=this.parentNode;n&&n.removeChild(this)}function Y(n){return{__data__:n}}function F(n){return function(){return Na(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function B(n,t){for(var e=0,r=n.length;r>e;e++)for(var i,u=n[e],a=0,o=u.length;o>a;a++)(i=u[a])&&t(i,a,e);return n}function H(n){return Ea(n,Ta),n}function X(n){var t,e;return function(r,i,u){var a,o=n[u].update,s=o.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(a=o[t])&&++t<s;);return a}}function $(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function i(){var i=s(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=i,i.$=e),i._=t}function u(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),s=Z;o>0&&(n=n.slice(0,o));var c=za.get(n);return c&&(n=c,s=V),o?t?i:r:t?b:u}function Z(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function V(n,t){var e=Z(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function Q(e){var r=".dragsuppress-"+ ++Ra,i="click"+r,u=oa.select(t(e)).on("touchmove"+r,E).on("dragstart"+r,E).on("selectstart"+r,E);if(null==La&&(La="onselectstart"in e?!1:M(e.style,"userSelect")),La){var a=n(e).style,o=a[La];a[La]="none"}return function(n){if(u.on(r,null),La&&(a[La]=o),n){var t=function(){u.on(i,null)};u.on(i,function(){E(),t()},!0),setTimeout(t,0)}}}function W(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>ja){var u=t(n);if(u.scrollX||u.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();ja=!(a.f||a.e),r.remove()}}return ja?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function J(){return oa.event.changedTouches[0].identifier}function G(n){return n>0?1:0>n?-1:0}function K(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Pa:Math.acos(n)}function tn(n){return n>1?Fa:-1>n?-Fa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.s,n.l):wn(""+n,_n,sn):new sn(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(a-u)*n/60:180>n?a:240>n?u+(a-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,u=2*e-a,new yn(i(n+120),i(n),i(n-120))}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=En((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new ln(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof ln?fn(n.h,n.c,n.l):En((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=dn(i)*Ka,r=dn(r)*no,u=dn(u)*to,new yn(vn(3.2404542*i-1.5371385*r-.4985314*u),vn(-.969266*i+1.8760108*r+.041556*u),vn(.0556434*i-.2040259*r+1.0572252*u))}function pn(n,t,e){return n>0?new ln(Math.atan2(e,t)*Ba,Math.sqrt(t*t+e*e),n):new ln(NaN,NaN,n)}function dn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function mn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function vn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):wn(""+n,yn,cn):new yn(n,t,e)}function xn(n){return new yn(n>>16,n>>8&255,255&n)}function Mn(n){return xn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function wn(n,t,e){var r,i,u,a=0,o=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Sn(i[0]),Sn(i[1]),Sn(i[2]))}return(u=io.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&u)>>4,a=a>>4|a,o=240&u,o=o>>4|o,s=15&u,s=s<<4|s):7===n.length&&(a=(16711680&u)>>16,o=(65280&u)>>8,s=255&u)),t(a,o,s))}function _n(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-u,s=(a+u)/2;return o?(i=.5>s?o/(a+u):o/(2-a-u),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,i=s>0&&1>s?0:r),new sn(r,i,s)}function En(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=mn((.4124564*n+.3575761*t+.1804375*e)/Ka),i=mn((.2126729*n+.7151522*t+.072175*e)/no),u=mn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Sn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Nn(n){return"function"==typeof n?n:function(){return n}}function qn(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),An(t,e,n,r)}}function An(n,t,e,r){function i(){var n,t=s.status;if(!t&&Tn(s)||t>=200&&300>t||304===t){try{n=e.call(u,s)}catch(r){return void a.error.call(u,r)}a.load.call(u,n)}else a.error.call(u,s)}var u={},a=oa.dispatch("beforesend","progress","load","error"),o={},s=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(n)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(u,s)}finally{oa.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(ca(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),s.setRequestHeader)for(var l in o)s.setRequestHeader(l,o[l]);return null!=t&&s.overrideMimeType&&s.overrideMimeType(t),null!=c&&(s.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),a.beforesend.call(u,s),s.send(null==r?null:r),u},u.abort=function(){return s.abort(),u},oa.rebind(u,a,"on"),null==r?u:u.get(Cn(r))}function Cn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Tn(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function zn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return ao?ao.n=u:uo=u,ao=u,oo||(so=clearTimeout(so),oo=1,co(Ln)),u}function Ln(){var n=Rn(),t=jn()-n;t>24?(isFinite(t)&&(clearTimeout(so),so=setTimeout(Ln,t)),oo=0):(oo=1,co(Ln))}function Rn(){for(var n=Date.now(),t=uo;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function jn(){for(var n,t=uo,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:uo=t.n;return ao=n,e}function On(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Dn(n,t){var e=Math.pow(10,3*xa(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],a=0,o=r[0],s=0;i>0&&o>0&&(s+o+1>t&&(o=Math.max(1,t-s)),u.push(n.substring(i-=o,i+o)),!((s+=o+1)>t));)o=r[a=(a+1)%r.length];return u.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",s=e[4]||"",c=e[5],l=+e[6],f=e[7],h=e[8],g=e[9],p=1,d="",m="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,m="%",g="f";break;case"p":p=100,m="%",g="r";break;case"b":case"o":case"x":case"X":"#"===s&&(d="0"+g.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,g="r"}"$"===s&&(d=i[0],m=i[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Un;var x=c&&f;return function(n){var e=m;if(v&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var s=oa.formatPrefix(n,h);n=s.scale(n),e=s.symbol+m}else n*=p;n=g(n,h);var M,b,w=n.lastIndexOf(".");if(0>w){var _=y?n.lastIndexOf("e"):-1;0>_?(M=n,b=""):(M=n.substring(0,_),b=n.substring(_))}else M=n.substring(0,w),b=t+n.substring(w+1);!c&&f&&(M=u(M,1/0));var E=d.length+M.length+b.length+(x?0:i.length),k=l>E?new Array(E=l-E+1).join(r):"";return x&&(M=u(k+M,k.length?l-b.length:1/0)),i+=d,n=M+b,("<"===a?i+n+k:">"===a?k+i+n:"^"===a?k.substring(0,E>>=1)+i+n+k.substring(E):i+(x?n:k+n))+e}}}function Un(n){return n+""}function Yn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Fn(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new po(e-1)),1),e}function u(n,e){return t(n=new po(+n),e),n}function a(n,r,u){var a=i(n),o=[];if(u>1)for(;r>a;)e(a)%u||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Yn;var r=new Yn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=a;var s=n.utc=In(n);return s.floor=s,s.round=In(r),s.ceil=In(i),s.offset=In(u),s.range=o,n}function In(n){return function(t,e){
try{po=Yn;var r=new Yn;return r._=t,n(r,e)._}finally{po=Date}}}function Bn(n){function t(n){function t(t){for(var e,i,u,a=[],o=-1,s=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(s,o)),null!=(i=vo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(u=q[e])&&(e=u(t,null==i?"e"===e?" ":"0":i)),a.push(e),s=o+1);return a.push(n.slice(s,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,n,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var u=null!=r.Z&&po!==Yn,a=new(u?Yn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),u?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,u,a,o=0,s=t.length,c=e.length;s>o;){if(r>=c)return-1;if(i=t.charCodeAt(o++),37===i){if(a=t.charAt(o++),u=A[a in vo?t.charAt(o++):a],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){w.lastIndex=0;var r=w.exec(t.slice(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){M.lastIndex=0;var r=M.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=N.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,q.c.toString(),t,r)}function s(n,t,r){return e(n,q.x.toString(),t,r)}function c(n,t,r){return e(n,q.X.toString(),t,r)}function l(n,t,e){var r=x.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,d=n.days,m=n.shortDays,v=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Yn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Yn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var x=oa.map(),M=Xn(d),b=$n(d),w=Xn(m),_=$n(m),E=Xn(v),k=$n(v),S=Xn(y),N=$n(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var q={a:function(n){return m[n.getDay()]},A:function(n){return d[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return v[n.getMonth()]},c:t(f),d:function(n,t){return Hn(n.getDate(),t,2)},e:function(n,t){return Hn(n.getDate(),t,2)},H:function(n,t){return Hn(n.getHours(),t,2)},I:function(n,t){return Hn(n.getHours()%12||12,t,2)},j:function(n,t){return Hn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Hn(n.getMilliseconds(),t,3)},m:function(n,t){return Hn(n.getMonth()+1,t,2)},M:function(n,t){return Hn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Hn(n.getSeconds(),t,2)},U:function(n,t){return Hn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Hn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Hn(n.getFullYear()%100,t,2)},Y:function(n,t){return Hn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},A={a:r,A:i,b:u,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:it,p:l,S:ut,U:Vn,w:Zn,W:Qn,x:s,X:c,y:Jn,Y:Wn,Z:Gn,"%":st};return t}function Hn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Xn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function $n(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Zn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Vn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Qn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Kn(+r[0]),e+r[0].length):-1}function Gn(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=xa(t)/60|0,i=xa(t)%60;return e+Hn(r,"0",2)+Hn(i,"0",2)}function st(n,t,e){xo.lastIndex=0;var r=xo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function lt(){}function ft(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function ht(n,t){n&&_o.hasOwnProperty(n.type)&&_o[n.type](n,t)}function gt(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function dt(){function n(n,t){n*=Ia,t=t*Ia/2+Pa/4;var e=n-r,a=e>=0?1:-1,o=a*e,s=Math.cos(t),c=Math.sin(t),l=u*c,f=i*s+l*Math.cos(o),h=l*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,i=s,u=c}var t,e,r,i,u;So.point=function(a,o){So.point=n,r=(t=a)*Ia,i=Math.cos(o=(e=o)*Ia/2+Pa/4),u=Math.sin(o)},So.lineEnd=function(){n(t,e)}}function mt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function vt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function xt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function wt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function _t(n,t){return xa(n[0]-t[0])<Oa&&xa(n[1]-t[1])<Oa}function Et(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++No,Ao+=(n-Ao)/No,Co+=(t-Co)/No,To+=(e-To)/No}function St(){function n(n,i){n*=Ia;var u=Math.cos(i*=Ia),a=u*Math.cos(n),o=u*Math.sin(n),s=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*s-r*o)*c+(c=r*a-t*s)*c+(c=t*o-e*a)*c),t*a+e*o+r*s);qo+=c,zo+=c*(t+(t=a)),Lo+=c*(e+(e=o)),Ro+=c*(r+(r=s)),kt(t,e,r)}var t,e,r;Po.point=function(i,u){i*=Ia;var a=Math.cos(u*=Ia);t=a*Math.cos(i),e=a*Math.sin(i),r=Math.sin(u),Po.point=n,kt(t,e,r)}}function Nt(){Po.point=Et}function qt(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),s=Math.sin(t),c=i*s-u*o,l=u*a-r*s,f=r*o-i*a,h=Math.sqrt(c*c+l*l+f*f),g=r*a+i*o+u*s,p=h&&-nn(g)/h,d=Math.atan2(h,g);jo+=p*c,Oo+=p*l,Do+=p*f,qo+=d,zo+=d*(r+(r=a)),Lo+=d*(i+(i=o)),Ro+=d*(u+(u=s)),kt(r,i,u)}var t,e,r,i,u;Po.point=function(a,o){t=a,e=o,Po.point=n,a*=Ia;var s=Math.cos(o*=Ia);r=s*Math.cos(a),i=s*Math.sin(a),u=Math.sin(o),kt(r,i,u)},Po.lineEnd=function(){n(t,e),Po.lineEnd=Nt,Po.point=Et}}function At(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ct(){return!0}function Tt(n,t,e,r,i){var u=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_t(e,r)){i.lineStart();for(var o=0;t>o;++o)i.point((e=n[o])[0],e[1]);return void i.lineEnd()}var s=new Lt(e,n,null,!0),c=new Lt(e,null,s,!1);s.o=c,u.push(s),a.push(c),s=new Lt(r,n,null,!1),c=new Lt(r,null,s,!0),s.o=c,u.push(s),a.push(c)}}),a.sort(t),zt(u),zt(a),u.length){for(var o=0,s=e,c=a.length;c>o;++o)a[o].e=s=!s;for(var l,f,h=u[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,i.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=l.length;c>o;++o)i.point((f=l[o])[0],f[1]);else r(g.x,g.n.x,1,i);g=g.n}else{if(p){l=g.p.z;for(var o=l.length-1;o>=0;--o)i.point((f=l[o])[0],f[1])}else r(g.x,g.p.x,-1,i);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);i.lineEnd()}}}function zt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function Lt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(i,u){function a(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&u.point(t,e)}function o(n,t){var e=i(n,t);m.point(e[0],e[1])}function s(){y.point=o,m.lineStart()}function c(){y.point=a,m.lineEnd()}function l(n,t){d.push([n,t]);var e=i(n,t);M.point(e[0],e[1])}function f(){M.lineStart(),d=[]}function h(){l(d[0][0],d[0][1]),M.lineEnd();var n,t=M.clean(),e=x.buffer(),r=e.length;if(d.pop(),p.push(d),d=null,r)if(1&t){n=e[0];var i,r=n.length-1,a=-1;if(r>0){for(b||(u.polygonStart(),b=!0),u.lineStart();++a<r;)u.point((i=n[a])[0],i[1]);u.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(jt))}var g,p,d,m=t(u),v=i.invert(r[0],r[1]),y={point:a,lineStart:s,lineEnd:c,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=s,y.lineEnd=c,g=oa.merge(g);var n=Ft(v,p);g.length?(b||(u.polygonStart(),b=!0),Tt(g,Dt,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),g=p=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},x=Ot(),M=t(x),b=!1;return y}}function jt(n){return n.length>1}function Ot(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Dt(n,t){return((n=n.x)[0]<0?n[1]-Fa-Oa:Fa-n[1])-((t=t.x)[0]<0?t[1]-Fa-Oa:Fa-t[1])}function Pt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,a){var o=u>0?Pa:-Pa,s=xa(u-e);xa(s-Pa)<Oa?(n.point(e,r=(r+a)/2>0?Fa:-Fa),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(u,r),t=0):i!==o&&s>=Pa&&(xa(e-i)<Oa&&(e-=i*Oa),xa(u-o)<Oa&&(u-=o*Oa),r=Ut(e,r,u,a),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=u,r=a),i=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ut(n,t,e,r){var i,u,a=Math.sin(n-e);return xa(a)>Oa?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*a)):(t+r)/2}function Yt(n,t,e,r){var i;if(null==n)i=e*Fa,r.point(-Pa,i),r.point(0,i),r.point(Pa,i),r.point(Pa,0),r.point(Pa,-i),r.point(0,-i),r.point(-Pa,-i),r.point(-Pa,0),r.point(-Pa,i);else if(xa(n[0]-t[0])>Oa){var u=n[0]<t[0]?Pa:-Pa;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])}function Ft(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,a=0;ko.reset();for(var o=0,s=t.length;s>o;++o){var c=t[o],l=c.length;if(l)for(var f=c[0],h=f[0],g=f[1]/2+Pa/4,p=Math.sin(g),d=Math.cos(g),m=1;;){m===l&&(m=0),n=c[m];var v=n[0],y=n[1]/2+Pa/4,x=Math.sin(y),M=Math.cos(y),b=v-h,w=b>=0?1:-1,_=w*b,E=_>Pa,k=p*x;if(ko.add(Math.atan2(k*w*Math.sin(_),d*M+k*Math.cos(_))),u+=E?b+w*Ua:b,E^h>=e^v>=e){var S=yt(mt(f),mt(n));bt(S);var N=yt(i,S);bt(N);var q=(E^b>=0?-1:1)*tn(N[2]);(r>q||r===q&&(S[0]||S[1]))&&(a+=E^b>=0?1:-1)}if(!m++)break;h=v,p=x,d=M,f=n}}return(-Oa>u||Oa>u&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(f,h){var g,p=[f,h],d=t(f,h),m=a?d?0:i(f,h):d?i(f+(0>f?Pa:-Pa),h):0;if(!e&&(c=s=d)&&n.lineStart(),d!==s&&(g=r(e,p),(_t(e,g)||_t(p,g))&&(p[0]+=Oa,p[1]+=Oa,d=t(p[0],p[1]))),d!==s)l=0,d?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^d){var v;m&u||!(v=r(p,e,!0))||(l=0,a?(n.lineStart(),n.point(v[0][0],v[0][1]),n.point(v[1][0],v[1][1]),n.lineEnd()):(n.point(v[1][0],v[1][1]),n.lineEnd(),n.lineStart(),n.point(v[0][0],v[0][1])))}!d||e&&_t(e,p)||n.point(p[0],p[1]),e=p,s=d,u=m},lineEnd:function(){s&&n.lineEnd(),e=null},clean:function(){return l|(c&&s)<<1}}}function r(n,t,e){var r=mt(n),i=mt(t),a=[1,0,0],o=yt(r,i),s=vt(o,o),c=o[0],l=s-c*c;if(!l)return!e&&n;var f=u*s/l,h=-u*c/l,g=yt(a,o),p=Mt(a,f),d=Mt(o,h);xt(p,d);var m=g,v=vt(p,m),y=vt(m,m),x=v*v-y*(vt(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),b=Mt(m,(-v-M)/y);if(xt(b,p),b=wt(b),!e)return b;var w,_=n[0],E=t[0],k=n[1],S=t[1];_>E&&(w=_,_=E,E=w);var N=E-_,q=xa(N-Pa)<Oa,A=q||Oa>N;if(!q&&k>S&&(w=k,k=S,S=w),A?q?k+S>0^b[1]<(xa(b[0]-_)<Oa?k:S):k<=b[1]&&b[1]<=S:N>Pa^(_<=b[0]&&b[0]<=E)){var C=Mt(m,(-v+M)/y);return xt(C,p),[b,wt(C)]}}}function i(t,e){var r=a?n:Pa-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),a=u>0,o=xa(u)>Oa,s=de(n,6*Ia);return Rt(t,e,s,a?[0,-n]:[-Pa,n-Pa])}function Bt(n,t,e,r){return function(i){var u,a=i.a,o=i.b,s=a.x,c=a.y,l=o.x,f=o.y,h=0,g=1,p=l-s,d=f-c;if(u=n-s,p||!(u>0)){if(u/=p,0>p){if(h>u)return;g>u&&(g=u)}else if(p>0){if(u>g)return;u>h&&(h=u)}if(u=e-s,p||!(0>u)){if(u/=p,0>p){if(u>g)return;u>h&&(h=u)}else if(p>0){if(h>u)return;g>u&&(g=u)}if(u=t-c,d||!(u>0)){if(u/=d,0>d){if(h>u)return;g>u&&(g=u)}else if(d>0){if(u>g)return;u>h&&(h=u)}if(u=r-c,d||!(0>u)){if(u/=d,0>d){if(u>g)return;u>h&&(h=u)}else if(d>0){if(h>u)return;g>u&&(g=u)}return h>0&&(i.a={x:s+h*p,y:c+h*d}),1>g&&(i.b={x:s+g*p,y:c+g*d}),i}}}}}}function Ht(n,t,e,r){function i(r,i){return xa(r[0]-n)<Oa?i>0?0:3:xa(r[0]-e)<Oa?i>0?2:1:xa(r[1]-t)<Oa?i>0?1:0:i>0?3:2}function u(n,t){return a(n.x,t.x)}function a(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function s(n){for(var t=0,e=m.length,r=n[1],i=0;e>i;++i)for(var u,a=1,o=m[i],s=o.length,c=o[0];s>a;++a)u=o[a],c[1]<=r?u[1]>r&&K(c,u,n)>0&&++t:u[1]<=r&&K(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,o,s,c){var l=0,f=0;if(null==u||(l=i(u,s))!==(f=i(o,s))||a(u,o)<0^s>0){do c.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+s+4)%4)!==f)}else c.point(o[0],o[1])}function l(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function f(n,t){l(n,t)&&o.point(n,t)}function h(){A.point=p,m&&m.push(v=[]),E=!0,_=!1,b=w=NaN}function g(){d&&(p(y,x),M&&_&&N.rejoin(),d.push(N.buffer())),A.point=f,_&&o.lineEnd()}function p(n,t){n=Math.max(-Yo,Math.min(Yo,n)),t=Math.max(-Yo,Math.min(Yo,t));var e=l(n,t);if(m&&v.push([n,t]),E)y=n,x=t,M=e,E=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&_)o.point(n,t);else{var r={a:{x:b,y:w},b:{x:n,y:t}};q(r)?(_||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,w=t,_=e}var d,m,v,y,x,M,b,w,_,E,k,S=o,N=Ot(),q=Bt(n,t,e,r),A={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=N,d=[],m=[],k=!0},polygonEnd:function(){o=S,d=oa.merge(d);var t=s([n,r]),e=k&&t,i=d.length;(e||i)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),i&&Tt(d,u,t,c,o),o.polygonEnd()),d=m=v=null}};return A}}function Xt(n){var t=0,e=Pa/3,r=oe(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Pa/180,e=n[1]*Pa/180):[t/Pa*180,e/Pa*180]},i}function $t(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),a-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),a=Math.sqrt(u)/i;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function Zt(){function n(n,t){Io+=i*n-r*t,r=n,i=t}var t,e,r,i;Zo.point=function(u,a){Zo.point=n,t=r=u,e=i=a},Zo.lineEnd=function(){n(t,e)}}function Vt(n,t){Bo>n&&(Bo=n),n>Xo&&(Xo=n),Ho>t&&(Ho=t),t>$o&&($o=t)}function Qt(){function n(n,t){a.push("M",n,",",t,u)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function i(){a.push("Z")}var u=Wt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return u=Wt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Wt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Jt(n,t){Ao+=n,Co+=t,++To}function Gt(){function n(n,r){var i=n-t,u=r-e,a=Math.sqrt(i*i+u*u);zo+=a*(t+n)/2,Lo+=a*(e+r)/2,Ro+=a,Jt(t=n,e=r)}var t,e;Qo.point=function(r,i){Qo.point=n,Jt(t=r,e=i)}}function Kt(){Qo.point=Jt}function ne(){function n(n,t){var e=n-r,u=t-i,a=Math.sqrt(e*e+u*u);zo+=a*(r+n)/2,Lo+=a*(i+t)/2,Ro+=a,a=i*n-r*t,jo+=a*(r+n),Oo+=a*(i+t),Do+=3*a,Jt(r=n,i=t)}var t,e,r,i;Qo.point=function(u,a){Qo.point=n,Jt(t=r=u,e=i=a)},Qo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Ua)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function i(){o.point=t}function u(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:i,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=i,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=NaN,E.point=u,t.lineStart()}function u(e,r){var u=mt([e,r]),a=n(e,r);i(x,M,y,b,w,_,x=a[0],M=a[1],y=e,b=u[0],w=u[1],_=u[2],o,t),t.point(x,M)}function a(){E.point=e,t.lineEnd()}function s(){r(),E.point=c,E.lineEnd=l}function c(n,t){u(f=n,h=t),g=x,p=M,d=b,m=w,v=_,E.point=u}function l(){i(x,M,y,b,w,_,g,p,f,d,m,v,o,t),E.lineEnd=a,a()}var f,h,g,p,d,m,v,y,x,M,b,w,_,E={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),E.lineStart=s},polygonEnd:function(){t.polygonEnd(),E.lineStart=r}};return E}function i(t,e,r,o,s,c,l,f,h,g,p,d,m,v){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*u&&m--){var b=o+g,w=s+p,_=c+d,E=Math.sqrt(b*b+w*w+_*_),k=Math.asin(_/=E),S=xa(xa(_)-1)<Oa||xa(r-h)<Oa?(r+h)/2:Math.atan2(w,b),N=n(S,k),q=N[0],A=N[1],C=q-t,T=A-e,z=x*C-y*T;(z*z/M>u||xa((y*C+x*T)/M-.5)>.3||a>o*g+s*p+c*d)&&(i(t,e,r,o,s,c,q,A,S,b/=E,w/=E,_,m,v),v.point(q,A),i(q,A,S,b,w,_,l,f,h,g,p,d,m,v))}}var u=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Ba,e*Ba])});return function(n){return se(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+s,c-n[1]*h]}function e(n){return n=o.invert((n[0]-s)/h,(c-n[1])/h),n&&[n[0]*Ba,n[1]*Ba]}function r(){o=At(a=fe(v,x,M),u);var n=u(d,m);return s=g-n[0]*h,c=p+n[1]*h,i()}function i(){return l&&(l.valid=!1,l=null),t}var u,a,o,s,c,l,f=ee(function(n,t){return n=u(n,t),[n[0]*h+s,c-n[1]*h]}),h=150,g=480,p=250,d=0,m=0,v=0,x=0,M=0,b=Uo,w=y,_=null,E=null;return t.stream=function(n){return l&&(l.valid=!1),l=se(b(a,f(w(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(b=null==n?(_=n,Uo):It((_=+n)*Ia),i()):_},t.clipExtent=function(n){return arguments.length?(E=n,w=n?Ht(n[0][0],n[0][1],n[1][0],n[1][1]):y,i()):E},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(d=n[0]%360*Ia,m=n[1]%360*Ia,r()):[d*Ba,m*Ba]},t.rotate=function(n){return arguments.length?(v=n[0]%360*Ia,x=n[1]%360*Ia,M=n.length>2?n[2]%360*Ia:0,r()):[v*Ba,x*Ba,M*Ba]},oa.rebind(t,f,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function se(n){return ue(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function le(n,t){return[n>Pa?n-Ua:-Pa>n?n+Ua:n,t]}function fe(n,t,e){return n?t||e?At(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):le}function he(n){return function(t,e){return t+=n,[t>Pa?t-Ua:-Pa>t?t+Ua:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,s=Math.sin(n)*e,c=Math.sin(t),l=c*r+o*i;return[Math.atan2(s*u-l*a,o*r-c*i),tn(l*u+s*a)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,s=Math.sin(n)*e,c=Math.sin(t),l=c*u-s*a;return[Math.atan2(s*u+c*a,o*r+l*i),tn(l*r-o*i)]},e}function de(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,a,o){var s=a*t;null!=i?(i=me(e,i),u=me(e,u),(a>0?u>i:i>u)&&(i+=a*Ua)):(i=n+a*Ua,u=n-.5*s);for(var c,l=i;a>0?l>u:u>l;l-=s)o.point((c=wt([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function me(n,t){var e=mt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Oa)%(2*Math.PI)}function ve(n,t,e){var r=oa.range(n,t-Oa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Oa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function xe(n){return n.source}function Me(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),a=Math.cos(r),o=Math.sin(r),s=i*Math.cos(n),c=i*Math.sin(n),l=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+i*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*s+t*l,i=e*c+t*f,a=e*u+t*o;return[Math.atan2(i,r)*Ba,Math.atan2(a,Math.sqrt(r*r+i*i))*Ba]}:function(){return[n*Ba,t*Ba]};return p.distance=h,p}function we(){function n(n,i){var u=Math.sin(i*=Ia),a=Math.cos(i),o=xa((n*=Ia)-t),s=Math.cos(o);Wo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*u-e*a*s)*o),e*u+r*a*s),t=n,e=u,r=a}var t,e,r;Jo.point=function(i,u){t=i*Ia,e=Math.sin(u*=Ia),r=Math.cos(u),Jo.point=n},Jo.lineEnd=function(){Jo.point=Jo.lineEnd=b}}function _e(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),a=Math.cos(i);return[Math.atan2(n*u,r*a),Math.asin(r&&e*u/r)]},e}function Ee(n,t){function e(n,t){a>0?-Fa+Oa>t&&(t=-Fa+Oa):t>Fa-Oa&&(t=Fa-Oa);var e=a/Math.pow(i(t),u);return[e*Math.sin(u*n),a-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Pa/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),a=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=a-t,r=G(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(a/r,1/u))-Fa]},e):Se}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xa(i)<Oa?ce:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-G(i)*Math.sqrt(n*n+e*e)]},e)}function Se(n,t){return[n,Math.log(Math.tan(Pa/4+t/2))]}function Ne(n){var t,e=ae(n),r=e.scale,i=e.translate,u=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=u.apply(e,arguments);if(a===e){if(t=null==n){var o=Pa*r(),s=i();u([[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function qe(n,t){return[Math.log(Math.tan(Pa/4+t/2)),-n]}function Ae(n){return n[0]}function Ce(n){return n[1]}function Te(n){for(var t=n.length,e=[0,1],r=2,i=2;t>i;i++){for(;r>1&&K(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function ze(n,t){return n[0]-t[0]||n[1]-t[1]}function Le(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],a=t[0]-i,o=r[0]-u,s=n[1],c=e[1],l=t[1]-s,f=r[1]-c,h=(o*(s-c)-f*(i-u))/(f*a-o*l);return[i+h*a,s+h*l]}function je(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Oe(){rr(this),this.edge=this.site=this.circle=null}function De(n){var t=cs.pop()||new Oe;return t.site=n,t}function Pe(n){Ve(n),as.remove(n),cs.push(n),rr(n)}function Ue(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,a=n.N,o=[n];Pe(n);for(var s=u;s.circle&&xa(e-s.circle.x)<Oa&&xa(r-s.circle.cy)<Oa;)u=s.P,o.unshift(s),Pe(s),s=u;o.unshift(s),Ve(s);for(var c=a;c.circle&&xa(e-c.circle.x)<Oa&&xa(r-c.circle.cy)<Oa;)a=c.N,o.push(c),Pe(c),c=a;o.push(c),Ve(c);var l,f=o.length;for(l=1;f>l;++l)c=o[l],s=o[l-1],nr(c.edge,s.site,c.site,i);s=o[0],c=o[f-1],c.edge=Ge(s.site,c.site,null,i),Ze(s),Ze(c)}function Ye(n){for(var t,e,r,i,u=n.x,a=n.y,o=as._;o;)if(r=Fe(o,a)-u,r>Oa)o=o.L;else{if(i=u-Ie(o,a),!(i>Oa)){r>-Oa?(t=o.P,e=o):i>-Oa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var s=De(n);if(as.insert(t,s),t||e){if(t===e)return Ve(t),e=De(t.site),as.insert(s,e),s.edge=e.edge=Ge(t.site,s.site),Ze(t),void Ze(e);if(!e)return void(s.edge=Ge(t.site,s.site));Ve(t),Ve(e);var c=t.site,l=c.x,f=c.y,h=n.x-l,g=n.y-f,p=e.site,d=p.x-l,m=p.y-f,v=2*(h*m-g*d),y=h*h+g*g,x=d*d+m*m,M={x:(m*y-g*x)/v+l,y:(h*x-d*y)/v+f};nr(e.edge,c,p,M),s.edge=Ge(c,n,null,M),e.edge=Ge(n,p,null,M),Ze(t),Ze(e)}}function Fe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,s=e.y,c=s-t;if(!c)return o;var l=o-r,f=1/u-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-s+c/2+i-u/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Fe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Be(n){this.site=n,this.edges=[]}function He(n){for(var t,e,r,i,u,a,o,s,c,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],d=us,m=d.length;m--;)if(u=d[m],u&&u.prepare())for(o=u.edges,s=o.length,a=0;s>a;)l=o[a].end(),r=l.x,i=l.y,c=o[++a%s].start(),t=c.x,e=c.y,(xa(r-t)>Oa||xa(i-e)>Oa)&&(o.splice(a,0,new tr(Ke(u.site,l,xa(r-f)<Oa&&p-i>Oa?{x:f,y:xa(t-f)<Oa?e:p}:xa(i-p)<Oa&&h-r>Oa?{x:xa(e-p)<Oa?t:h,y:p}:xa(r-h)<Oa&&i-g>Oa?{x:h,y:xa(t-h)<Oa?e:g}:xa(i-g)<Oa&&r-f>Oa?{x:xa(e-g)<Oa?t:f,y:g}:null),u.site,null)),++s)}function Xe(n,t){return t.angle-n.angle}function $e(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ze(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var a=i.x,o=i.y,s=r.x-a,c=r.y-o,l=u.x-a,f=u.y-o,h=2*(s*f-c*l);if(!(h>=-Da)){var g=s*s+c*c,p=l*l+f*f,d=(f*g-c*p)/h,m=(s*p-l*g)/h,f=m+o,v=ls.pop()||new $e;v.arc=n,v.site=i,v.x=d+a,v.y=f+Math.sqrt(d*d+m*m),v.cy=f,n.circle=v;for(var y=null,x=ss._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}ss.insert(y,v),y||(os=v)}}}}function Ve(n){var t=n.circle;t&&(t.P||(os=t.N),ss.remove(t),ls.push(t),rr(t),n.circle=null)}function Qe(n){for(var t,e=is,r=Bt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!We(t,n)||!r(t)||xa(t.a.x-t.b.x)<Oa&&xa(t.a.y-t.b.y)<Oa)&&(t.a=t.b=null,e.splice(i,1))}function We(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,a=t[0][0],o=t[1][0],s=t[0][1],c=t[1][1],l=n.l,f=n.r,h=l.x,g=l.y,p=f.x,d=f.y,m=(h+p)/2,v=(g+d)/2;if(d===g){if(a>m||m>=o)return;if(h>p){if(u){if(u.y>=c)return}else u={x:m,y:s};e={x:m,y:c}}else{if(u){if(u.y<s)return}else u={x:m,y:c};e={x:m,y:s}}}else if(r=(h-p)/(d-g),i=v-r*m,-1>r||r>1)if(h>p){if(u){if(u.y>=c)return}else u={x:(s-i)/r,y:s};e={x:(c-i)/r,y:c}}else{if(u){if(u.y<s)return}else u={x:(c-i)/r,y:c};e={x:(s-i)/r,y:s}}else if(d>g){if(u){if(u.x>=o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}else{if(u){if(u.x<a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}return n.a=u,n.b=e,!0}function Je(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ge(n,t,e,r){var i=new Je(n,t);return is.push(i),e&&nr(i,n,t,e),r&&nr(i,t,n,r),us[n.i].edges.push(new tr(i,n,t)),us[t.i].edges.push(new tr(i,t,n)),i}function Ke(n,t,e){var r=new Je(n,null);return r.a=t,r.b=e,is.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ir(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ur(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,i,u=n.sort(sr).pop();for(is=[],us=new Array(n.length),as=new er,ss=new er;;)if(i=os,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))(u.x!==e||u.y!==r)&&(us[u.i]=new Be(u),Ye(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;Ue(i.arc)}t&&(Qe(t),He(t));var a={cells:us,edges:is};return as=ss=is=us=null,a}function sr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,i,u){if(!n(t,e,r,i,u)){var a=.5*(e+i),o=.5*(r+u),s=t.nodes;s[0]&&gr(n,s[0],e,r,a,o),s[1]&&gr(n,s[1],a,r,i,o),s[2]&&gr(n,s[2],e,o,a,u),s[3]&&gr(n,s[3],a,o,i,u)}}function pr(n,t,e,r,i,u,a){var o,s=1/0;return function c(n,l,f,h,g){if(!(l>u||f>a||r>h||i>g)){if(p=n.point){var p,d=t-n.x,m=e-n.y,v=d*d+m*m;if(s>v){var y=Math.sqrt(s=v);r=t-y,i=e-y,u=t+y,a=e+y,o=p}}for(var x=n.nodes,M=.5*(l+h),b=.5*(f+g),w=t>=M,_=e>=b,E=_<<1|w,k=E+4;k>E;++E)if(n=x[3&E])switch(3&E){case 0:c(n,l,f,M,b);break;case 1:c(n,M,f,h,b);break;case 2:c(n,l,b,M,g);break;case 3:c(n,M,b,h,g)}}}(n,r,i,u,a),o}function dr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,a=t.g-r,o=t.b-i;return function(n){return"#"+bn(Math.round(e+u*n))+bn(Math.round(r+a*n))+bn(Math.round(i+o*n))}}function mr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=xr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function vr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,i,u=hs.lastIndex=gs.lastIndex=0,a=-1,o=[],s=[];for(n+="",t+="";(e=hs.exec(n))&&(r=gs.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),o[a]?o[a]+=i:o[++a]=i),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,s.push({i:a,x:vr(e,r)})),u=gs.lastIndex;return u<t.length&&(i=t.slice(u),o[a]?o[a]+=i:o[++a]=i),o.length<2?s[0]?(t=s[0].x,function(n){return t(n)+""}):function(){return t}:(t=s.length,function(n){for(var e,r=0;t>r;++r)o[(e=s[r]).i]=e.x(n);return o.join("")})}function xr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function Mr(n,t){var e,r=[],i=[],u=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(xr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;a>e;++e)i[e]=t[e];return function(n){for(e=0;o>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function wr(n){return function(t){return 1-n(1-t)}}function _r(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Er(n){return n*n}function kr(n){return n*n*n}function Sr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Nr(n){return function(t){return Math.pow(t,n)}}function qr(n){return 1-Math.cos(n*Fa)}function Ar(n){return Math.pow(2,10*(n-1))}function Cr(n){return 1-Math.sqrt(1-n*n)}function Tr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ua*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ua/t)}}function zr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,a=t.c-r,o=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return fn(e+u*n,r+a*n,i+o*n)+""}}function jr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,a=t.s-r,o=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),
isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+a*n,i+o*n)+""}}function Or(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,a=t.a-r,o=t.b-i;return function(n){return gn(e+u*n,r+a*n,i+o*n)+""}}function Dr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Yr(t),i=Ur(t,e),u=Yr(Fr(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ba,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Ba:0}function Ur(n,t){return n[0]*t[0]+n[1]*t[1]}function Yr(n){var t=Math.sqrt(Ur(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Fr(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Br(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:vr(n[0],t[0])},{i:i-2,x:vr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Hr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:vr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Xr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:vr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function $r(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:vr(n[0],t[0])},{i:i-2,x:vr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function Zr(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Br(n.translate,t.translate,e,r),Hr(n.rotate,t.rotate,e,r),Xr(n.skew,t.skew,e,r),$r(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i<u;)e[(t=r[i]).i]=t.x(n);return e.join("")}}function Vr(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Qr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Wr(n){for(var t=n.source,e=n.target,r=Gr(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Jr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Gr(n,t){if(n===t)return n;for(var e=Jr(n),r=Jr(t),i=e.pop(),u=r.pop(),a=null;i===u;)a=i,i=e.pop(),u=r.pop();return a}function Kr(n){n.fixed|=2}function ni(n){n.fixed&=-7}function ti(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ei(n){n.fixed&=-5}function ri(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var u,a=n.nodes,o=a.length,s=-1;++s<o;)u=a[s],null!=u&&(ri(u,t,e),n.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,i+=c*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function ii(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=li,n}function ui(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function ai(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,a=-1;++a<i;)e.push(u[a]);for(;null!=(n=r.pop());)t(n)}function oi(n){return n.children}function si(n){return n.value}function ci(n,t){return t.value-n.value}function li(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fi(n){return n.x}function hi(n){return n.y}function gi(n,t,e){n.y0=t,n.y=e}function pi(n){return oa.range(n.length)}function di(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function mi(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;u>e;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function vi(n){return n.reduce(yi,0)}function yi(n,t){return n+t[1]}function xi(n,t){return Mi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Mi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[oa.min(n),oa.max(n)]}function wi(n,t){return n.value-t.value}function _i(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Ei(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Si(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,i,u,a,o,s,c,l=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Ni),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],Ci(r,i,u),t(u),_i(r,u),r._pack_prev=u,_i(u,i),i=r._pack_next,a=3;c>a;a++){Ci(r,i,u=e[a]);var p=0,d=1,m=1;for(o=i._pack_next;o!==i;o=o._pack_next,d++)if(ki(o,u)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&&!ki(s,u);s=s._pack_prev,m++);p?(m>d||d==m&&i.r<r.r?Ei(r,i=o):Ei(r=s,i),a--):(_i(r,u),i=u,t(u))}var v=(l+f)/2,y=(h+g)/2,x=0;for(a=0;c>a;a++)u=e[a],u.x-=v,u.y-=y,x=Math.max(x,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=x,e.forEach(qi)}}function Ni(n){n._pack_next=n._pack_prev=n}function qi(n){delete n._pack_next,delete n._pack_prev}function Ai(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,a=i.length;++u<a;)Ai(i[u],t,e,r)}function Ci(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var a=t.r+e.r,o=i*i+u*u;a*=a,r*=r;var s=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+s*i+c*u,e.y=n.y+s*u-c*i}else e.x=n.x+r,e.y=n.y}function Ti(n,t){return n.parent==t.parent?1:2}function zi(n){var t=n.children;return t.length?t[0]:n.t}function Li(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ri(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function ji(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Oi(n,t,e){return n.a.parent===t.parent?n.a:e}function Di(n){return 1+oa.max(n,function(n){return n.y})}function Pi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ui(n){var t=n.children;return t&&t.length?Ui(t[0]):n}function Yi(n){var t,e=n.children;return e&&(t=e.length)?Yi(e[t-1]):n}function Fi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Bi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Hi(n){return n.rangeExtent?n.rangeExtent():Bi(n.range())}function Xi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function $i(n,t){var e,r=0,i=n.length-1,u=n[r],a=n[i];return u>a&&(e=r,r=i,i=e,e=u,u=a,a=e),n[r]=t.floor(u),n[i]=t.ceil(a),n}function Zi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Es}function Vi(n,t,e,r){var i=[],u=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)i.push(e(n[a-1],n[a])),u.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return u[e](i[e](t))}}function Qi(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Vi:Xi,s=r?Qr:Vr;return a=i(n,t,s,e),o=i(t,n,s,xr),u}function u(n){return a(n)}var a,o;return u.invert=function(n){return o(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Dr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Ki(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Ji(n,t),i()},u.copy=function(){return Qi(n,t,e,r)},i()}function Wi(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Ji(n,t){return $i(n,Zi(Gi(n,t)[2])),$i(n,Zi(Gi(n,t)[2])),n}function Gi(n,t){null==t&&(t=10);var e=Bi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Ki(n,t){return oa.range.apply(oa,Gi(n,t))}function nu(n,t,e){var r=Gi(n,t);if(e){var i=fo.exec(e);if(i.shift(),"s"===i[8]){var u=oa.formatPrefix(Math.max(xa(r[0]),xa(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=oa.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return oa.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in ks?Math.abs(e-tu(Math.max(xa(t[0]),xa(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(i(t))}return a.invert=function(t){return u(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),a):t},a.nice=function(){var t=$i(r.map(i),e?Math:Ns);return n.domain(t),r=t.map(u),a},a.ticks=function(){var n=Bi(r),a=[],o=n[0],s=n[1],c=Math.floor(i(o)),l=Math.ceil(i(s)),f=t%1?2:t;if(isFinite(l-c)){if(e){for(;l>c;c++)for(var h=1;f>h;h++)a.push(u(c)*h);a.push(u(c))}else for(a.push(u(c));c++<l;)for(var h=f-1;h>0;h--)a.push(u(c)*h);for(c=0;a[c]<o;c++);for(l=a.length;a[l-1]>s;l--);a=a.slice(c,l)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Ss;arguments.length<2?e=Ss:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/u(Math.round(i(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ru(n.copy(),t,e,r)},Wi(a,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Ki(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Ji(e,n))},r.exponent=function(a){return arguments.length?(i=uu(t=a),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Wi(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function au(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var i,u,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,a=-1,o=r.length;++a<o;)i.has(u=r[a])||i.set(u,n.push(u));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(u=n,a=0,t={t:"range",a:arguments},e):u},e.rangePoints=function(i,o){arguments.length<2&&(o=0);var s=i[0],c=i[1],l=n.length<2?(s=(s+c)/2,0):(c-s)/(n.length-1+o);return u=r(s+l*o/2,l),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,o){arguments.length<2&&(o=0);var s=i[0],c=i[1],l=n.length<2?(s=c=Math.round((s+c)/2),0):(c-s)/(n.length-1+o)|0;return u=r(s+Math.round(l*o/2+(c-s-(n.length-1+o)*l)/2),l),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,o,s){arguments.length<2&&(o=0),arguments.length<3&&(s=o);var c=i[1]<i[0],l=i[c-0],f=i[1-c],h=(f-l)/(n.length-o+2*s);return u=r(l+h*s,h),c&&u.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,o,s){arguments.length<2&&(o=0),arguments.length<3&&(s=o);var c=i[1]<i[0],l=i[c-0],f=i[1-c],h=Math.floor((f-l)/(n.length-o+2*s));return u=r(l+Math.round((f-l-(n.length-o)*h)/2),h),c&&u.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Bi(t.a[0])},e.copy=function(){return au(n,t)},e.domain(n)}function ou(n,t){function u(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(i).sort(e),u()):n},a.range=function(n){return arguments.length?(t=n,u()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return ou(n,t)},u()}function su(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(u*(t-n))))]}function i(){return u=e.length/(t-n),a=e.length-1,r}var u,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return su(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function lu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Ki(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return lu(n)},t}function fu(){return 0}function hu(n){return n.innerRadius}function gu(n){return n.outerRadius}function pu(n){return n.startAngle}function du(n){return n.endAngle}function mu(n){return n&&n.padAngle}function vu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yu(n,t,e,r,i){var u=n[0]-t[0],a=n[1]-t[1],o=(i?r:-r)/Math.sqrt(u*u+a*a),s=o*a,c=-o*u,l=n[0]+s,f=n[1]+c,h=t[0]+s,g=t[1]+c,p=(l+h)/2,d=(f+g)/2,m=h-l,v=g-f,y=m*m+v*v,x=e-r,M=l*g-h*f,b=(0>v?-1:1)*Math.sqrt(Math.max(0,x*x*y-M*M)),w=(M*v-m*b)/y,_=(-M*m-v*b)/y,E=(M*v+m*b)/y,k=(-M*m+v*b)/y,S=w-p,N=_-d,q=E-p,A=k-d;return S*S+N*N>q*q+A*A&&(w=E,_=k),[[w-s,_-c],[w*e/x,_*e/x]]}function xu(n){function t(t){function a(){c.push("M",u(n(l),o))}for(var s,c=[],l=[],f=-1,h=t.length,g=Nn(e),p=Nn(r);++f<h;)i.call(this,s=t[f],f)?l.push([+g.call(this,s,f),+p.call(this,s,f)]):l.length&&(a(),l=[]);return l.length&&a(),c.length?c.join(""):null}var e=Ae,r=Ce,i=Ct,u=Mu,a=u.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?u=n:(u=Ls.get(n)||Mu).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function Mu(n){return n.length>1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function Eu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function ku(n,t){return n.length<4?Mu(n):n[1]+qu(n.slice(1,-1),Au(n,t))}function Su(n,t){return n.length<3?bu(n):n[0]+qu((n.push(n[0]),n),Au([n[n.length-2]].concat(n,[n[1]]),t))}function Nu(n,t){return n.length<3?Mu(n):n[0]+qu(n,Au(n,t))}function qu(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return Mu(n);var e=n.length!=t.length,r="",i=n[0],u=n[1],a=t[0],o=a,s=1;if(e&&(r+="Q"+(u[0]-2*a[0]/3)+","+(u[1]-2*a[1]/3)+","+u[0]+","+u[1],i=n[1],s=2),t.length>1){o=t[1],u=n[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1];for(var c=2;c<t.length;c++,s++)u=n[s],o=t[c],r+="S"+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1]}if(e){var l=n[s];r+="Q"+(u[0]+2*o[0]/3)+","+(u[1]+2*o[1]/3)+","+l[0]+","+l[1]}return r}function Au(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],a=n[1],o=1,s=n.length;++o<s;)e=u,u=a,a=n[o],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function Cu(n){if(n.length<3)return Mu(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],a=[i,i,i,(r=n[1])[0]],o=[u,u,u,r[1]],s=[i,",",u,"L",Ru(Os,a),",",Ru(Os,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),ju(s,a,o);return n.pop(),s.push("L",r),s.join("")}function Tu(n){if(n.length<4)return Mu(n);for(var t,e=[],r=-1,i=n.length,u=[0],a=[0];++r<3;)t=n[r],u.push(t[0]),a.push(t[1]);for(e.push(Ru(Os,u)+","+Ru(Os,a)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),a.shift(),a.push(t[1]),ju(e,u,a);return e.join("")}function zu(n){for(var t,e,r=-1,i=n.length,u=i+4,a=[],o=[];++r<4;)e=n[r%i],a.push(e[0]),o.push(e[1]);for(t=[Ru(Os,a),",",Ru(Os,o)],--r;++r<u;)e=n[r%i],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),ju(t,a,o);return t.join("")}function Lu(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],a=n[0][1],o=n[e][0]-u,s=n[e][1]-a,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(u+i*o),r[1]=t*r[1]+(1-t)*(a+i*s);return Cu(n)}function Ru(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function ju(n,t,e){n.push("C",Ru(Rs,t),",",Ru(Rs,e),",",Ru(js,t),",",Ru(js,e),",",Ru(Os,t),",",Ru(Os,e))}function Ou(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Du(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],a=r[0]=Ou(i,u);++t<e;)r[t]=(a+(a=Ou(i=u,u=n[t+1])))/2;return r[t]=a,r}function Pu(n){for(var t,e,r,i,u=[],a=Du(n),o=-1,s=n.length-1;++o<s;)t=Ou(n[o],n[o+1]),xa(t)<Oa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,i=e*e+r*r,i>9&&(i=3*t/Math.sqrt(i),a[o]=i*e,a[o+1]=i*r));for(o=-1;++o<=s;)i=(n[Math.min(s,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),u.push([i||0,a[o]*i||0]);return u}function Uu(n){return n.length<3?Mu(n):n[0]+qu(n,Pu(n))}function Yu(n){for(var t,e,r,i=-1,u=n.length;++i<u;)t=n[i],e=t[0],r=t[1]-Fa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Fu(n){function t(t){function s(){d.push("M",o(n(v),f),l,c(n(m.reverse()),f),"Z")}for(var h,g,p,d=[],m=[],v=[],y=-1,x=t.length,M=Nn(e),b=Nn(i),w=e===r?function(){return g}:Nn(r),_=i===u?function(){return p}:Nn(u);++y<x;)a.call(this,h=t[y],y)?(m.push([g=+M.call(this,h,y),p=+b.call(this,h,y)]),v.push([+w.call(this,h,y),+_.call(this,h,y)])):m.length&&(s(),m=[],v=[]);return m.length&&s(),d.length?d.join(""):null}var e=Ae,r=Ae,i=0,u=Ce,a=Ct,o=Mu,s=o.key,c=o,l="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=u=n,t):u},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(s="function"==typeof n?o=n:(o=Ls.get(n)||Mu).key,c=o.reverse||o,l=o.closed?"M":"L",t):s},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Iu(n){return n.radius}function Bu(n){return[n.x,n.y]}function Hu(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Fa;return[e*Math.cos(r),e*Math.sin(r)]}}function Xu(){return 64}function $u(){return"circle"}function Zu(n){var t=Math.sqrt(n/Pa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Vu(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Qu(n,t,e){return Ea(n,Bs),n.namespace=t,n.id=e,n}function Wu(n,t,e,r){var i=n.id,u=n.namespace;return B(n,"function"==typeof e?function(n,a,o){n[u][i].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[u][i].tween.set(t,e)}))}function Ju(n){return null==n&&(n=""),function(){this.textContent=n}}function Gu(n){return null==n?"__transition__":"__transition_"+n+"__"}function Ku(n,t,e,r,i){function u(n){var t=d.delay;return l.t=t+s,n>=t?a(n-t):void(l.c=a)}function a(e){var i=p.active,u=p[i];u&&(u.timer.c=null,u.timer.t=NaN,--p.count,delete p[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}l.c=o,zn(function(){return l.c&&o(e||1)&&(l.c=null,l.t=NaN),1},0,s),p.active=r,d.event&&d.event.start.call(n,n.__data__,t),g=[],d.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=d.ease,f=d.duration}function o(i){for(var u=i/f,a=h(u),o=g.length;o>0;)g[--o].call(n,a);return u>=1?(d.event&&d.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var s,l,f,h,g,p=n[e]||(n[e]={active:0,count:0}),d=p[r];d||(s=i.time,l=zn(u,0,s),d=p[r]={tween:new c,time:s,timer:l,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=oa.bisect(Gs,i);return u==Gs.length?[t.year,Gi(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Gs[u-1]<Gs[u]/i?u-1:u]:[tc,Gi(n,e)[2]]}return r.invert=function(t){return ia(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ia)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ia(+e+1),t).length}var u=r.domain(),a=Bi(u),o=null==n?i(a,10):"number"==typeof n&&i(a,n);return o&&(n=o[0],t=o[1]),r.domain($i(u,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ia(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ia(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Bi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],ia(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Wi(r,n)}function ia(n){return new Date(n)}function ua(n){return JSON.parse(n.responseText)}function aa(n){var t=la.createRange();return t.selectNode(la.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},sa=[].slice,ca=function(n){return sa.call(n)},la=this.document;if(la)try{ca(la.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),la)try{la.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,da=ga.setAttributeNS,ma=this.CSSStyleDeclaration.prototype,va=ma.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){da.call(this,n,t,e+"")},ma.setProperty=function(n,t,e){va.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,i,u=-1,a=n.length;if(1===arguments.length){for(;++u<a;)if(null!=(r=n[u])&&r>=r){e=i=r;break}for(;++u<a;)null!=(r=n[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++u<a;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=i=r;break}for(;++u<a;)null!=(r=t.call(n,n[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},oa.sum=function(n,t){var e,r=0,u=n.length,a=-1;if(1===arguments.length)for(;++a<u;)i(e=+n[a])&&(r+=e);else for(;++a<u;)i(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,u=0,a=n.length,o=-1,s=a;if(1===arguments.length)for(;++o<a;)i(e=r(n[o]))?u+=e:--s;else for(;++o<a;)i(e=r(t.call(n,n[o],o)))?u+=e:--s;return s?u/s:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},oa.median=function(n,t){var u,a=[],o=n.length,s=-1;if(1===arguments.length)for(;++s<o;)i(u=r(n[s]))&&a.push(u);else for(;++s<o;)i(u=r(t.call(n,n[s],s)))&&a.push(u);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,u,a=n.length,o=0,s=0,c=-1,l=0;if(1===arguments.length)for(;++c<a;)i(e=r(n[c]))&&(u=e-o,o+=u/++l,s+=u*(e-o));else for(;++c<a;)i(e=r(t.call(n,n[c],c)))&&(u=e-o,o+=u/++l,s+=u*(e-o));return l>1?s/(l-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=u(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},oa.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var i,u=-1,o=r[t]=new Array(i);++u<i;)o[u]=n[u][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,i=n.length,u=-1,a=0;++u<i;)a+=n[u].length;for(e=new Array(a);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--a]=r[t];return e};var xa=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,i=[],u=o(xa(e)),a=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++a)>t;)i.push(r/u);else for(;(r=n+e*++a)<t;)i.push(r/u);return i},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,u=n.length;if(1===arguments.length)for(;++i<u;)e.set(i,n[i]);else for(;++i<u;)e.set(t.call(n,r=n[i],i),r)}else for(var a in n)e.set(a,n[a]);return e};var Ma="__proto__",ba="\x00";s(c,{has:h,get:function(n){return this._[l(n)]},set:function(n,t){return this._[l(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:d,empty:m,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=u.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,l,f,h,g=-1,p=a.length,d=u[o++],m=new c;++g<p;)(h=m.get(s=d(l=a[g])))?h.push(l):m.set(s,[l]);return t?(l=t(),f=function(e,r){l.set(e,n(t,r,o))}):(l={},f=function(e,r){l[e]=n(t,r,o)}),m.forEach(f),l}function t(n,e){if(e>=u.length)return n;var r=[],i=a[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(oa.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return a[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},oa.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},s(v,{has:h,add:function(n){return this._[l(n+="")]=!0,n},remove:g,values:p,size:d,empty:m,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=x(n,t,t[e]);return n};var wa=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new w,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=_(n);return n},w.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(_a,"\\$&")};var _a=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ea={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Sa=function(n,t){return t.querySelectorAll(n)},Na=function(n,t){var e=n.matches||n[M(n,"matchesSelector")];return(Na=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Sa=Sizzle,Na=Sizzle.matchesSelector),oa.selection=function(){return oa.select(la.documentElement)};var qa=oa.selection.prototype=[];qa.select=function(n){var t,e,r,i,u=[];n=q(n);for(var a=-1,o=this.length;++a<o;){u.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var s=-1,c=r.length;++s<c;)(i=r[s])?(t.push(e=n.call(i,i.__data__,s,a)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return N(u)},qa.selectAll=function(n){var t,e,r=[];n=A(n);for(var i=-1,u=this.length;++i<u;)for(var a=this[i],o=-1,s=a.length;++o<s;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,i))),t.parentNode=e);return N(r)};var Aa="http://www.w3.org/1999/xhtml",Ca={svg:"http://www.w3.org/2000/svg",xhtml:Aa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:Ca,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Ca.hasOwnProperty(e)?{space:Ca[e],local:n}:n}},qa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(C(t,n[t]));return this}return this.each(C(n,t))},qa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=L(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!z(n[i]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},qa.style=function(n,e,r){var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(e="");for(r in n)this.each(O(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=""}return this.each(O(n,e,r))},qa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(D(t,n[t]));return this}return this.each(D(n,t))},qa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},qa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},qa.append=function(n){return n=P(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},qa.insert=function(n,t){return n=P(n),t=q(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},qa.remove=function(){return this.each(U)},qa.data=function(n,t){function e(n,e){var r,i,u,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),d=new Array(a);if(t){var m,v=new c,y=new Array(a);for(r=-1;++r<a;)(i=n[r])&&(v.has(m=t.call(i,i.__data__,r))?d[r]=i:v.set(m,i),y[r]=m);for(r=-1;++r<f;)(i=v.get(m=t.call(e,u=e[r],r)))?i!==!0&&(g[r]=i,i.__data__=u):p[r]=Y(u),v.set(m,!0);for(r=-1;++r<a;)r in y&&v.get(y[r])!==!0&&(d[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],u=e[r],i?(i.__data__=u,g[r]=i):p[r]=Y(u);for(;f>r;++r)p[r]=Y(e[r]);for(;a>r;++r)d[r]=n[r]}p.update=g,p.parentNode=g.parentNode=d.parentNode=n.parentNode,o.push(p),s.push(g),l.push(d)}var r,i,u=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++u<a;)(i=r[u])&&(n[u]=i.__data__);return n}var o=H([]),s=N([]),l=N([]);if("function"==typeof n)for(;++u<a;)e(r=this[u],n.call(r,r.parentNode.__data__,u));else for(;++u<a;)e(r=this[u],n);
return s.enter=function(){return o},s.exit=function(){return l},s},qa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},qa.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=F(n));for(var u=0,a=this.length;a>u;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var o=0,s=e.length;s>o;o++)(r=e[o])&&n.call(r,r.__data__,o,u)&&t.push(r)}return N(i)},qa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},qa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},qa.each=function(n){return B(this,function(t,e,r){n.call(t,t.__data__,e,r)})},qa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},qa.empty=function(){return!this.node()},qa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},qa.size=function(){var n=0;return B(this,function(){++n}),n};var Ta=[];oa.selection.enter=H,oa.selection.enter.prototype=Ta,Ta.append=qa.append,Ta.empty=qa.empty,Ta.node=qa.node,Ta.call=qa.call,Ta.size=qa.size,Ta.select=function(n){for(var t,e,r,i,u,a=[],o=-1,s=this.length;++o<s;){r=(i=this[o]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(u=i[c])?(t.push(r[c]=e=n.call(i.parentNode,u.__data__,c,o)),e.__data__=u.__data__):t.push(null)}return N(a)},Ta.insert=function(n,t){return arguments.length<2&&(t=X(this)),qa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,la)],e.parentNode=la.documentElement):(e=[t],e.parentNode=n(t)),N([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Sa(n,la)),t.parentNode=la.documentElement):(t=ca(n),t.parentNode=null),N([t])},qa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each($(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each($(n,t,e))};var za=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});la&&za.forEach(function(n){"on"+n in la&&za.remove(n)});var La,Ra=0;oa.mouse=function(n){return W(n,k())};var ja=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return W(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",a)}function e(n,t,e,u,a){return function(){function o(){var n,e,r=t(h,d);r&&(n=r[0]-x[0],e=r[1]-x[1],p|=n|e,x=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function s(){t(h,d)&&(v.on(u+m,null).on(a+m,null),y(p),g({type:"dragend"}))}var c,l=this,f=oa.event.target.correspondingElement||oa.event.target,h=l.parentNode,g=r.of(l,arguments),p=0,d=n(),m=".drag"+(null==d?"":"-"+d),v=oa.select(e(f)).on(u+m,o).on(a+m,s),y=Q(f),x=t(h,d);i?(c=i.apply(l,arguments),c=[c.x-x[0],c.y-x[1]]):c=[0,0],g({type:"dragstart"})}}var r=S(n,"drag","dragstart","dragend"),i=null,u=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(J,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=W(n,t);return e.identifier=t.identifier,e}):[]};var Oa=1e-6,Da=Oa*Oa,Pa=Math.PI,Ua=2*Pa,Ya=Ua-Oa,Fa=Pa/2,Ia=Pa/180,Ba=180/Pa,Ha=Math.SQRT2,Xa=2,$a=4;oa.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],a=n[2],o=t[0],s=t[1],c=t[2],l=o-i,f=s-u,h=l*l+f*f;if(Da>h)r=Math.log(c/a)/Ha,e=function(n){return[i+n*l,u+n*f,a*Math.exp(Ha*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+$a*h)/(2*a*Xa*g),d=(c*c-a*a-$a*h)/(2*c*Xa*g),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(d*d+1)-d);r=(v-m)/Ha,e=function(n){var t=n*r,e=rn(m),o=a/(Xa*g)*(e*un(Ha*t+m)-en(m));return[i+o*l,u+o*f,a*e/rn(Ha*t+m)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(T,f).on(Va+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(q[0],Math.min(q[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,a)),u(m=e,r),t=oa.select(t),A>0&&(t=t.transition().duration(A)),t.call(n.event)}function o(){b&&b.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),_&&_.domain(w.range().map(function(n){return(n-k.y)/k.k}).map(w.invert))}function s(n){C++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--C||(n({type:"zoomend"}),m=null)}function f(){function n(){o=1,u(oa.mouse(i),h),c(a)}function r(){f.on(z,null).on(L,null),g(o),l(a)}var i=this,a=j.of(i,arguments),o=0,f=oa.select(t(i)).on(z,n).on(L,r),h=e(oa.mouse(i)),g=Q(i);Is.call(i),s(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in m&&(m[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(M,r).on(b,o),w.push(t);for(var e=oa.event.changedTouches,i=0,u=e.length;u>i;++i)m[e[i].identifier]=null;var s=n(),c=Date.now();if(1===s.length){if(500>c-x){var l=s[0];a(p,l,m[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),E()}x=c}else if(s.length>1){var l=s[0],f=s[1],h=l[0]-f[0],g=l[1]-f[1];v=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Is.call(p);for(var o=0,s=a.length;s>o;++o,r=null)if(e=a[o],r=m[e.identifier]){if(t)break;n=e,t=r}if(r){var l=(l=e[0]-n[0])*l+(l=e[1]-n[1])*l,f=v&&Math.sqrt(l/v);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(f*g)}x=null,u(n,t),c(d)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete m[t[e].identifier];for(var i in m)return void n()}oa.selectAll(w).on(y,null),_.on(T,f).on(R,h),S(),l(d)}var g,p=this,d=j.of(p,arguments),m={},v=0,y=".zoom-"+oa.event.changedTouches[0].identifier,M="touchmove"+y,b="touchend"+y,w=[],_=oa.select(p),S=Q(p);t(),s(d),_.on(T,null).on(R,t)}function g(){var n=j.of(this,arguments);y?clearTimeout(y):(Is.call(this),d=e(m=v||oa.mouse(this)),s(n)),y=setTimeout(function(){y=null,l(n)},50),E(),i(Math.pow(2,.002*Za())*k.k),u(m,d),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var d,m,v,y,x,M,b,w,_,k={x:0,y:0,k:1},N=[960,500],q=Qa,A=250,C=0,T="mousedown.zoom",z="mousemove.zoom",L="mouseup.zoom",R="touchstart.zoom",j=S(n,"zoomstart","zoom","zoomend");return Va||(Va="onwheel"in la?(Za=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in la?(Za=function(){return oa.event.wheelDelta},"mousewheel"):(Za=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=j.of(this,arguments),t=k;Ys?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},s(n)}).tween("zoom:zoom",function(){var e=N[0],r=N[1],i=m?m[0]:e/2,u=m?m[1]:r/2,a=oa.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:i-r[0]*o,y:u-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,s(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(q=null==t?Qa:[+t[0],+t[1]],n):q},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(N=t&&[+t[0],+t[1]],n):N},n.duration=function(t){return arguments.length?(A=+t,n):A},n.x=function(t){return arguments.length?(b=t,M=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(_=t,w=t.copy(),k={x:0,y:0,k:1},n):_},oa.rebind(n,j,"on")};var Za,Va,Qa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=sn;var Wa=sn.prototype=new on;Wa.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new sn(this.h,this.s,this.l/n)},Wa.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new sn(this.h,this.s,n*this.l)},Wa.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return new ln(this.h,this.c,Math.min(100,this.l+Ga*(arguments.length?n:1)))},Ja.darker=function(n){return new ln(this.h,this.c,Math.max(0,this.l-Ga*(arguments.length?n:1)))},Ja.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ga=18,Ka=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ga*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ga*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(i,i,i)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return _n(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var io=oa.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});io.forEach(function(n,t){io.set(n,xn(t))}),oa.functor=Nn,oa.xhr=qn(y),oa.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var a=An(n,t,null==e?r:i(e),u);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:i(n)):e},a}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(a).join(n)}function a(n){return o.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var o=new RegExp('["'+n+"\n]"),s=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(l>=c)return a;if(i)return i=!1,u;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}l=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++l):10===r&&(i=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;c>l;){var r=n.charCodeAt(l++),o=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(l)&&(++l,++o);else if(r!==s)continue;return n.slice(t,l-o)}return n.slice(t)}for(var r,i,u={},a={},o=[],c=n.length,l=0,f=0;(r=e())!==a;){for(var h=[];r!==u&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(a).join(n)].concat(t.map(function(t){return i.map(function(n){return a(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv(" ","text/tab-separated-values");var uo,ao,oo,so,co=this[M(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){zn.apply(this,arguments)},oa.timer.flush=function(){Rn(),jn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var lo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Dn);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,On(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),lo[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,On(n,t))).toFixed(Math.max(0,Math.min(20,On(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Yn.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(){mo.setUTCDate.apply(this._,arguments)},setDay:function(){mo.setUTCDay.apply(this._,arguments)},setFullYear:function(){mo.setUTCFullYear.apply(this._,arguments)},setHours:function(){mo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mo.setUTCSeconds.apply(this._,arguments)},setTime:function(){mo.setTime.apply(this._,arguments)}};var mo=Date.prototype;go.year=Fn(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=Fn(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=Fn(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var vo={"-":"",_:" ",0:"0"},yo=/^\s*\d+/,xo=/^%/;oa.locale=function(n){return{numberFormat:Pn(n),timeFormat:Bn(n)}};var Mo=oa.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"]});oa.format=Mo.numberFormat,oa.geo={},lt.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new lt;oa.geo.stream=function(n,t){n&&wo.hasOwnProperty(n.type)?wo[n.type](n,t):ht(n,t)};var wo={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)ht(e[r].geometry,t)}},_o={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)ht(e[r],t)}};oa.geo.area=function(n){return Eo=0,oa.geo.stream(n,So),Eo};var Eo,ko=new lt,So={sphere:function(){Eo+=4*Pa},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),So.lineStart=dt},polygonEnd:function(){var n=2*ko;Eo+=0>n?4*Pa+n:n,So.lineStart=So.lineEnd=So.point=b}};oa.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=mt([t*Ia,e*Ia]);if(v){var i=yt(v,r),u=[i[1],-i[0],0],a=yt(u,i);bt(a),a=wt(a);var s=t-p,c=s>0?1:-1,d=a[0]*Ba*c,m=xa(s)>180;if(m^(d>c*p&&c*t>d)){var y=a[1]*Ba;y>g&&(g=y)}else if(d=(d+360)%360-180,m^(d>c*p&&c*t>d)){var y=-a[1]*Ba;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);m?p>t?o(l,t)>o(l,h)&&(h=t):o(t,h)>o(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?o(l,t)>o(l,h)&&(h=t):o(t,h)>o(l,h)&&(l=t)}else n(t,e);v=r,p=t}function e(){b.point=t}function r(){M[0]=l,M[1]=h,b.point=n,v=null}function i(n,e){if(v){var r=n-p;y+=xa(r)>180?r+(r>0?360:-360):r}else d=n,m=e;So.point(n,e),t(n,e)}function u(){So.lineStart()}function a(){i(d,m),So.lineEnd(),xa(y)>Oa&&(l=-(h=180)),M[0]=l,M[1]=h,v=null}function o(n,t){return(t-=n)<0?t+360:t}function s(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var l,f,h,g,p,d,m,v,y,x,M,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=u,b.lineEnd=a,y=0,So.polygonStart()},polygonEnd:function(){So.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(l=-(h=180),f=-(g=90)):y>Oa?g=90:-Oa>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],oa.geo.stream(n,b);var t=x.length;if(t){x.sort(s);for(var e,r=1,i=x[0],u=[i];t>r;++r)e=x[r],c(e[0],i)||c(e[1],i)?(o(i[0],e[1])>o(i[0],i[1])&&(i[1]=e[1]),o(e[0],i[1])>o(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var a,e,p=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(a=o(i[1],e[0]))>p&&(p=a,l=e[0],h=i[1])}return x=M=null,l===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,f],[h,g]]}}(),oa.geo.centroid=function(n){No=qo=Ao=Co=To=zo=Lo=Ro=jo=Oo=Do=0,oa.geo.stream(n,Po);var t=jo,e=Oo,r=Do,i=t*t+e*e+r*r;return Da>i&&(t=zo,e=Lo,r=Ro,Oa>qo&&(t=Ao,e=Co,r=To),i=t*t+e*e+r*r,Da>i)?[NaN,NaN]:[Math.atan2(e,t)*Ba,tn(r/Math.sqrt(i))*Ba]};var No,qo,Ao,Co,To,zo,Lo,Ro,jo,Oo,Do,Po={sphere:b,point:Et,lineStart:St,lineEnd:Nt,polygonStart:function(){Po.lineStart=qt},polygonEnd:function(){Po.lineStart=St}},Uo=Rt(Ct,Pt,Yt,[-Pa,-Pa/2]),Yo=1e9;oa.geo.clipExtent=function(){var n,t,e,r,i,u,a={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(o){return arguments.length?(u=Ht(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),i&&(i.valid=!1,i=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Xt($t)}).raw=$t,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var u=n[0],a=n[1];return t=null,e(u,a),t||(r(u,a),t)||i(u,a),t}var t,e,r,i,u=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?o:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),a.precision(t),o.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),a.scale(.35*t),o.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),l=+t[0],f=+t[1];return e=u.translate(t).clipExtent([[l-.455*c,f-.238*c],[l+.455*c,f+.238*c]]).stream(s).point,r=a.translate([l-.307*c,f+.201*c]).clipExtent([[l-.425*c+Oa,f+.12*c+Oa],[l-.214*c-Oa,f+.234*c-Oa]]).stream(s).point,i=o.translate([l-.205*c,f+.212*c]).clipExtent([[l-.214*c+Oa,f+.166*c+Oa],[l-.115*c-Oa,f+.234*c-Oa]]).stream(s).point,n},n.scale(1070)};var Fo,Io,Bo,Ho,Xo,$o,Zo={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,Zo.lineStart=Zt},polygonEnd:function(){Zo.lineStart=Zo.lineEnd=Zo.point=b,Fo+=xa(Io/2)}},Vo={point:Vt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Qo={point:Jt,lineStart:Gt,lineEnd:Kt,polygonStart:function(){Qo.lineStart=ne},polygonEnd:function(){Qo.point=Jt,Qo.lineStart=Gt,Qo.lineEnd=Kt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&u.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=i(u)),oa.geo.stream(n,a)),u.result()}function t(){return a=null,n}var e,r,i,u,a,o=4.5;return n.area=function(n){return Fo=0,oa.geo.stream(n,i(Zo)),Fo},n.centroid=function(n){return Ao=Co=To=zo=Lo=Ro=jo=Oo=Do=0,oa.geo.stream(n,i(Qo)),Do?[jo/Do,Oo/Do]:Ro?[zo/Ro,Lo/Ro]:To?[Ao/To,Co/To]:[NaN,NaN]},n.bounds=function(n){return Xo=$o=-(Bo=Ho=1/0),oa.geo.stream(n,i(Vo)),[[Bo,Ho],[Xo,$o]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Qt:new te(n),"function"!=typeof o&&u.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(u.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ba,t[1]*=Ba,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ba,t[1]*=Ba,t},t},le.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Ba,n[1]*=Ba}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=de((t=+r)*Ia,i*Ia),n):t},n.precision=function(r){return arguments.length?(e=de(t*Ia,(i=+r)*Ia),n):i},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,i=n[1]*Ia,u=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(u),f=Math.cos(u);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*l-s*f*o)*e),s*l+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(u/m)*m,i,m).map(h).concat(oa.range(Math.ceil(c/v)*v,s,v).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return xa(n%m)>Oa}).map(l)).concat(oa.range(Math.ceil(o/d)*d,a,d).filter(function(n){return xa(n%v)>Oa}).map(f))}var e,r,i,u,a,o,s,c,l,f,h,g,p=10,d=p,m=90,v=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(g(s).slice(1),h(i).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],s=+t[1][1],u>i&&(t=u,u=i,i=t),c>s&&(t=c,c=s,s=t),n.precision(y)):[[u,c],[i,s]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],n):[m,v]},n.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],n):[p,d]},n.precision=function(t){return arguments.length?(y=+t,l=ve(o,a,90),f=ye(r,e,y),h=ve(c,s,90),g=ye(u,i,y),n):y},n.majorExtent([[-180,-90+Oa],[180,90-Oa]]).minorExtent([[-180,-80-Oa],[180,80+Oa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=xe,i=Me;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Wo=0,oa.geo.stream(n,Jo),Wo};var Wo,Jo={sphere:b,point:b,lineStart:we,lineEnd:b,polygonStart:b,polygonEnd:b},Go=_e(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Go)}).raw=Go;var Ko=_e(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Ko)}).raw=Ko,(oa.geo.conicConformal=function(){return Xt(Ee)}).raw=Ee,(oa.geo.conicEquidistant=function(){return Xt(ke)}).raw=ke;var ns=_e(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(ns)}).raw=ns,Se.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Fa]},(oa.geo.mercator=function(){return Ne(Se)}).raw=Se;var ts=_e(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(ts)}).raw=ts;var es=_e(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(es)}).raw=es,qe.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Fa]},(oa.geo.transverseMercator=function(){var n=Ne(qe),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=qe,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=Nn(e),u=Nn(r),a=n.length,o=[],s=[];for(t=0;a>t;t++)o.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(o.sort(ze),t=0;a>t;t++)s.push([o[t][0],-o[t][1]]);var c=Te(o),l=Te(s),f=l[0]===c[0],h=l[l.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<l.length-h;++t)g.push(n[o[l[t]][2]]);return g}var e=Ae,r=Ce;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Ea(n,rs),n};var rs=oa.geom.polygon.prototype=[];rs.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},rs.centroid=function(n){var t,e,r=-1,i=this.length,u=0,a=0,o=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],u+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[u*n,a*n]},rs.clip=function(n){for(var t,e,r,i,u,a,o=je(n),s=-1,c=this.length-je(this),l=this[c-1];++s<c;){for(t=n.slice(),n.length=0,i=this[s],u=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Le(a,l,i)?(Le(u,l,i)||n.push(Re(u,a,l,i)),n.push(a)):Le(u,l,i)&&n.push(Re(u,a,l,i)),u=a;o&&n.push(n[0]),l=i}return n};var is,us,as,os,ss,cs=[],ls=[];Be.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Xe),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,a=n.R;if(e=u?a?ar(a):u:a,i?i.L===n?i.L=e:i.R=e:this._=e,u&&a?(r=e.C,e.C=n.C,e.L=u,u.U=e,e!==a?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=a,a.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,ir(this,i),t=i.R),
t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ur(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,ir(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ir(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,ur(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],i=o[0][1],u=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var s=e.edges,c=e.site,l=t[o]=s.length?s.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=u&&c.y>=i&&c.y<=a?[[r,a],[u,a],[u,i],[r,i]]:[];l.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Oa)*Oa,y:Math.round(a(n,t)/Oa)*Oa,i:t}})}var r=Ae,i=Ce,u=r,a=i,o=fs;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var i,u,a=e.site,o=e.edges.sort(Xe),s=-1,c=o.length,l=o[c-1].edge,f=l.l===a?l.r:l.l;++s<c;)i=l,u=f,l=o[s].edge,f=l.l===a?l.r:l.l,r<u.i&&r<f.i&&cr(a,u,f)<0&&t.push([n[r],n[u.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(u=Nn(r=n),t):r},t.y=function(n){return arguments.length?(a=Nn(i=n),t):i},t.clipExtent=function(n){return arguments.length?(o=null==n?fs:n,t):o===fs?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fs?null:o&&o[1]},t)};var fs=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,i){function u(n){function u(n,t,e,r,i,u,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var s=n.x,l=n.y;if(null!=s)if(xa(s-e)+xa(l-r)<.01)c(n,t,e,r,i,u,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,s,l,i,u,a,o),c(n,t,e,r,i,u,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,i,u,a,o)}function c(n,t,e,r,i,a,o,s){var c=.5*(i+o),l=.5*(a+s),f=e>=c,h=r>=l,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?i=c:o=c,h?a=l:s=l,u(n,t,e,r,i,a,o,s)}var l,f,h,g,p,d,m,v,y,x=Nn(o),M=Nn(s);if(null!=t)d=t,m=e,v=r,y=i;else if(v=y=-(d=m=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)l=n[g],l.x<d&&(d=l.x),l.y<m&&(m=l.y),l.x>v&&(v=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var b=+x(l=n[g],g),w=+M(l,g);d>b&&(d=b),m>w&&(m=w),b>v&&(v=b),w>y&&(y=w),f.push(b),h.push(w)}var _=v-d,E=y-m;_>E?y=m+_:v=d+E;var k=hr();if(k.add=function(n){u(k,n,+x(n,++g),+M(n,g),d,m,v,y)},k.visit=function(n){gr(n,k,d,m,v,y)},k.find=function(n){return pr(k,n[0],n[1],d,m,v,y)},g=-1,null==t){for(;++g<p;)u(k,n[g],f[g],h[g],d,m,v,y);--g}else n.forEach(k.add);return f=h=n=l=null,k}var a,o=Ae,s=Ce;return(a=arguments.length)?(o=lr,s=fr,3===a&&(i=e,r=t,e=t=0),u(n)):(u.x=function(n){return arguments.length?(o=n,u):o},u.y=function(n){return arguments.length?(s=n,u):s},u.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u):null==t?null:[[t,e],[r,i]]},u.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),u):null==t?null:[r-t,i-e]},u)},oa.interpolateRgb=dr,oa.interpolateObject=mr,oa.interpolateNumber=vr,oa.interpolateString=yr;var hs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gs=new RegExp(hs.source,"g");oa.interpolate=xr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?io.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?dr:yr:t instanceof on?dr:Array.isArray(t)?Mr:"object"===e&&isNaN(t)?mr:vr)(n,t)}],oa.interpolateArray=Mr;var ps=function(){return y},ds=oa.map({linear:ps,poly:Nr,quad:function(){return Er},cubic:function(){return kr},sin:function(){return qr},exp:function(){return Ar},circle:function(){return Cr},elastic:Tr,back:zr,bounce:function(){return Lr}}),ms=oa.map({"in":y,out:wr,"in-out":_r,"out-in":function(n){return _r(wr(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=ds.get(e)||ps,r=ms.get(r)||y,br(r(e.apply(null,sa.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=jr,oa.interpolateLab=Or,oa.interpolateRound=Dr,oa.transform=function(n){var t=la.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pr(e?e.matrix:vs)})(n)},Pr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var vs={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=Zr,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Wr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},d=[],m=oa.range(u),v=[];for(e=[],r=[],n=0,h=-1;++h<u;){for(c=0,g=-1;++g<u;)c+=i[h][g];d.push(c),v.push(oa.range(u)),n+=c}for(a&&m.sort(function(n,t){return a(d[n],d[t])}),o&&v.forEach(function(n,t){n.sort(function(n,e){return o(i[t][n],i[t][e])})}),n=(Ua-l*u)/n,c=0,h=-1;++h<u;){for(f=c,g=-1;++g<u;){var y=m[h],x=v[y][g],M=i[y][x],b=c,w=c+=M*n;p[y+"-"+x]={index:y,subindex:x,startAngle:b,endAngle:w,value:M}}r[y]={index:y,startAngle:f,endAngle:c,value:d[y]},c+=l}for(h=-1;++h<u;)for(g=h-1;++g<u;){var _=p[h+"-"+g],E=p[g+"-"+h];(_.value||E.value)&&e.push(_.value<E.value?{source:E,target:_}:{source:_,target:E})}s&&t()}function t(){e.sort(function(n,t){return s((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,u,a,o,s,c={},l=0;return c.matrix=function(n){return arguments.length?(u=(i=n)&&i.length,e=r=null,c):i},c.padding=function(n){return arguments.length?(l=n,e=r=null,c):l},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(s=n,e&&t(),c):s},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var u=t.cx-n.x,a=t.cy-n.y,o=i-e,s=u*u+a*a;if(s>o*o/v){if(d>s){var c=t.charge/s;n.px-=u*c,n.py-=a*c}return!0}if(t.point&&s&&d>s){var c=t.pointCharge/s;n.px-=u*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,s.resume()}var e,r,i,u,a,o,s={},c=oa.dispatch("start","tick","end"),l=[1,1],f=.9,h=ys,g=xs,p=-30,d=Ms,m=.1,v=.64,x=[],M=[];return s.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,s,h,g,d,v,y,b,w=x.length,_=M.length;for(r=0;_>r;++r)s=M[r],h=s.source,g=s.target,y=g.x-h.x,b=g.y-h.y,(d=y*y+b*b)&&(d=i*a[r]*((d=Math.sqrt(d))-u[r])/d,y*=d,b*=d,g.x-=y*(v=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*v,h.x+=y*(v=1-v),h.y+=b*v);if((v=i*m)&&(y=l[0]/2,b=l[1]/2,r=-1,v))for(;++r<w;)s=x[r],s.x+=(y-s.x)*v,s.y+=(b-s.y)*v;if(p)for(ri(t=oa.geom.quadtree(x),i,o),r=-1;++r<w;)(s=x[r]).fixed||t.visit(n(s));for(r=-1;++r<w;)s=x[r],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*f,s.y-=(s.py-(s.py=s.y))*f);c.tick({type:"tick",alpha:i})},s.nodes=function(n){return arguments.length?(x=n,s):x},s.links=function(n){return arguments.length?(M=n,s):M},s.size=function(n){return arguments.length?(l=n,s):l},s.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,s):h},s.distance=s.linkDistance,s.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,s):g},s.friction=function(n){return arguments.length?(f=+n,s):f},s.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,s):p},s.chargeDistance=function(n){return arguments.length?(d=n*n,s):Math.sqrt(d)},s.gravity=function(n){return arguments.length?(m=+n,s):m},s.theta=function(n){return arguments.length?(v=n*n,s):Math.sqrt(v)},s.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=zn(s.tick)),s):i},s.start=function(){function n(n,r){if(!e){for(e=new Array(i),s=0;i>s;++s)e[s]=[];for(s=0;c>s;++s){var u=M[s];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var a,o=e[t],s=-1,l=o.length;++s<l;)if(!isNaN(a=o[s][n]))return a;return Math.random()*r}var t,e,r,i=x.length,c=M.length,f=l[0],d=l[1];for(t=0;i>t;++t)(r=x[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=M[t],"number"==typeof r.source&&(r.source=x[r.source]),"number"==typeof r.target&&(r.target=x[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=x[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,M[t],t);else for(t=0;c>t;++t)u[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;i>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;i>t;++t)o[t]=p;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Kr).on("drag.force",t).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ti).on("mouseout.force",ei).call(r):r},oa.rebind(s,c,"on")};var ys=20,xs=1,Ms=1/0;oa.layout.hierarchy=function(){function n(i){var u,a=[i],o=[];for(i.depth=0;null!=(u=a.pop());)if(o.push(u),(c=e.call(n,u,u.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)a.push(l=c[s]),l.parent=u,l.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return ai(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),o}var t=ci,e=oi,r=si;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),ai(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(a=u.length)){var a,o,s,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=u[c],e,s=o.value*r,i),e+=s}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,t(e[u]));return 1+r}function e(e,u){var a=r.call(this,e,u);return n(a[0],0,i[0],i[1]/t(a[0])),a}var r=oa.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},ii(e,r)},oa.layout.pie=function(){function n(a){var o,s=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),l=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-l,h=Math.min(Math.abs(f)/s,+("function"==typeof u?u.apply(this,arguments):u)),g=h*(0>f?-1:1),p=oa.sum(c),d=p?(f-s*g)/p:0,m=oa.range(s),v=[];return null!=e&&m.sort(e===bs?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),m.forEach(function(n){v[n]={data:a[n],value:o=c[n],startAngle:l,endAngle:l+=o*d+g,padAngle:h}}),v}var t=Number,e=bs,r=0,i=Ua,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bs={};oa.layout.stack=function(){function n(o,s){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),l=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,l,s);c=oa.permute(c,f),l=oa.permute(l,f);var h,g,p,d,m=r.call(n,l,s),v=c[0].length;for(p=0;v>p;++p)for(i.call(n,c[0][p],d=m[p],l[0][p][1]),g=1;h>g;++g)i.call(n,c[g][p],d+=l[g-1][p][1],l[g][p][1]);return o}var t=y,e=pi,r=di,i=gi,u=fi,a=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:ws.get(t)||pi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:_s.get(t)||di,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(i=t,n):i},n};var ws=oa.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(mi),u=n.map(vi),a=oa.range(r).sort(function(n,t){return i[n]-i[t]}),o=0,s=0,c=[],l=[];for(t=0;r>t;++t)e=a[t],s>o?(o+=u[e],c.push(e)):(s+=u[e],l.push(e));return l.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pi}),_s=oa.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,a=[],o=0,s=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;u>e;++e)s[e]=(o-a[e])/2;return s},wiggle:function(n){var t,e,r,i,u,a,o,s,c,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=s=c=0,e=1;h>e;++e){for(t=0,i=0;l>t;++t)i+=n[t][e][1];for(t=0,u=0,o=f[e][0]-f[e-1][0];l>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;u+=a*n[t][e][1]}g[e]=s-=i?u/i*o:0,c>s&&(c=s)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,i=n.length,u=n[0].length,a=1/i,o=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=a}for(e=0;u>e;++e)o[e]=0;return o},zero:di});oa.layout.histogram=function(){function n(n,u){for(var a,o,s=[],c=n.map(e,this),l=r.call(this,c,u),f=i.call(this,l,c,u),u=-1,h=c.length,g=f.length-1,p=t?1:1/h;++u<g;)a=s[u]=[],a.dx=f[u+1]-(a.x=f[u]),a.y=0;if(g>0)for(u=-1;++u<h;)o=c[u],o>=l[0]&&o<=l[1]&&(a=s[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[u]));return s}var t=!0,e=Number,r=bi,i=xi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Nn(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return Mi(n,t)}:Nn(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,u){var a=e.call(this,n,u),o=a[0],s=i[0],c=i[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,ai(o,function(n){n.r=+l(n.value)}),ai(o,Si),r){var f=r*(t?1:Math.max(2*o.r/s,2*o.r/c))/2;ai(o,function(n){n.r+=f}),ai(o,Si),ai(o,function(n){n.r-=f})}return Ai(o,s/2,c/2,t?1:1/Math.max(2*o.r/s,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(wi),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},oa.layout.tree=function(){function n(n,i){var l=a.call(this,n,i),f=l[0],h=t(f);if(ai(h,e),h.parent.m=-h.z,ui(h,r),c)ui(f,u);else{var g=f,p=f,d=f;ui(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>d.depth&&(d=n)});var m=o(g,p)/2-g.x,v=s[0]/(p.x+o(p,g)/2+m),y=s[1]/(d.depth||1);ui(f,function(n){n.x=(n.x+m)*v,n.y=n.depth*y})}return l}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,a=0,o=u.length;o>a;++a)r.push((u[a]=i={_:u[a],parent:t,children:(i=u[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){ji(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+o(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,a=t,s=i.parent.children[0],c=i.m,l=u.m,f=a.m,h=s.m;a=Li(a),i=zi(i),a&&i;)s=zi(s),u=Li(u),u.a=n,r=a.z+f-i.z-c+o(a._,i._),r>0&&(Ri(Oi(a,n,e),n,r),c+=r,l+=r),f+=a.m,c+=i.m,h+=s.m,l+=u.m;a&&!Li(u)&&(u.t=a,u.m+=f-l),i&&!zi(s)&&(s.t=i,s.m+=c-h,e=n)}return e}function u(n){n.x*=s[0],n.y=n.depth*s[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Ti,s=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(s=t)?u:null,n):c?null:s},n.nodeSize=function(t){return arguments.length?(c=null==(s=t)?null:u,n):c?s:null},ii(n,a)},oa.layout.cluster=function(){function n(n,u){var a,o=t.call(this,n,u),s=o[0],c=0;ai(s,function(n){var t=n.children;t&&t.length?(n.x=Pi(t),n.y=Di(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var l=Ui(s),f=Yi(s),h=l.x-e(l,f)/2,g=f.x+e(f,l)/2;return ai(s,i?function(n){n.x=(n.x-s.x)*r[0],n.y=(s.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(s.y?n.y/s.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Ti,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var a,o,s,c=f(e),l=[],h=u.slice(),p=1/0,d="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),l.area=0;(s=h.length)>0;)l.push(a=h[s-1]),l.area+=a.area,"squarify"!==g||(o=r(l,d))<=p?(h.pop(),p=o):(l.area-=l.pop().area,i(l,d,c,!1),d=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,d,c,!0),l.length=l.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,a=f(t),o=r.slice(),s=[];for(n(o,a.dx*a.dy/t.value),s.area=0;u=o.pop();)s.push(u),s.area+=u.area,null!=u.z&&(i(s,u.z?a.dx:a.dy,a,!o.length),s.length=s.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*p/r,r/(t*u*p)):1/0}function i(n,t,e,r){var i,u=-1,a=n.length,o=e.x,c=e.y,l=t?s(n.area/t):0;if(t==e.dx){for((r||l>e.dy)&&(l=e.dy);++u<a;)i=n[u],i.x=o,i.y=c,i.dy=l,o+=i.dx=Math.min(e.x+e.dx-o,l?s(i.area/l):0);i.z=!0,i.dx+=e.x+e.dx-o,e.y+=l,e.dy-=l}else{for((r||l>e.dx)&&(l=e.dx);++u<a;)i=n[u],i.x=o,i.y=c,i.dx=l,c+=i.dy=Math.min(e.y+e.dy-c,l?s(i.area/l):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=l,e.dx-=l}}function u(r){var i=a||o(r),u=i[0];return u.x=u.y=0,u.value?(u.dx=c[0],u.dy=c[1]):u.dx=u.dy=0,a&&o.revalue(u),n([u],u.dx*u.dy/u.value),(a?e:t)(u),h&&(a=i),i}var a,o=oa.layout.hierarchy(),s=Math.round,c=[1,1],l=null,f=Fi,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return u.size=function(n){return arguments.length?(c=n,u):c},u.padding=function(n){function t(t){var e=n.call(u,t,t.depth);return null==e?Fi(t):Ii(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Ii(t,n)}if(!arguments.length)return l;var r;return f=null==(l=n)?Fi:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,u},u.round=function(n){return arguments.length?(s=n?Math.round:Number,u):s!=Number},u.sticky=function(n){return arguments.length?(h=n,a=null,u):h},u.ratio=function(n){return arguments.length?(p=n,u):p},u.mode=function(n){return arguments.length?(g=n+"",u):g},ii(u,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Es={floor:y,ceil:y};oa.scale.linear=function(){return Qi([0,1],[0,1],xr,!1)};var ks={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ru(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Ss=oa.format(".0e"),Ns={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return iu(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return au([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(qs)},oa.scale.category20=function(){return oa.scale.ordinal().range(As)},oa.scale.category20b=function(){return oa.scale.ordinal().range(Cs)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ts)};var qs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mn),As=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mn),Cs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mn),Ts=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mn);oa.scale.quantile=function(){return ou([],[])},oa.scale.quantize=function(){return su(0,1,[0,1])},oa.scale.threshold=function(){return cu([.5],[0,1])},oa.scale.identity=function(){return lu([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),l=a.apply(this,arguments)-Fa,f=o.apply(this,arguments)-Fa,h=Math.abs(f-l),g=l>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ya)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,d,m,v,y,x,M,b,w,_,E,k,S=0,N=0,q=[];if((v=(+s.apply(this,arguments)||0)/2)&&(m=u===zs?Math.sqrt(n*n+c*c):+u.apply(this,arguments),g||(N*=-1),c&&(N=tn(m/c*Math.sin(v))),n&&(S=tn(m/n*Math.sin(v)))),c){y=c*Math.cos(l+N),x=c*Math.sin(l+N),M=c*Math.cos(f-N),b=c*Math.sin(f-N);var A=Math.abs(f-l-2*N)<=Pa?0:1;if(N&&vu(y,x,M,b)===g^A){var C=(l+f)/2;y=c*Math.cos(C),x=c*Math.sin(C),M=b=null}}else y=x=0;if(n){w=n*Math.cos(f-S),_=n*Math.sin(f-S),E=n*Math.cos(l+S),k=n*Math.sin(l+S);var T=Math.abs(l-f+2*S)<=Pa?0:1;if(S&&vu(w,_,E,k)===1-g^T){var z=(l+f)/2;w=n*Math.cos(z),_=n*Math.sin(z),E=k=null}}else w=_=0;if(h>Oa&&(p=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){d=c>n^g?0:1;var L=p,R=p;if(Pa>h){var j=null==E?[w,_]:null==M?[y,x]:Re([y,x],[E,k],[M,b],[w,_]),O=y-j[0],D=x-j[1],P=M-j[0],U=b-j[1],Y=1/Math.sin(Math.acos((O*P+D*U)/(Math.sqrt(O*O+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(j[0]*j[0]+j[1]*j[1]);R=Math.min(p,(n-F)/(Y-1)),L=Math.min(p,(c-F)/(Y+1))}if(null!=M){var I=yu(null==E?[w,_]:[E,k],[y,x],c,L,g),B=yu([M,b],[w,_],c,L,g);p===L?q.push("M",I[0],"A",L,",",L," 0 0,",d," ",I[1],"A",c,",",c," 0 ",1-g^vu(I[1][0],I[1][1],B[1][0],B[1][1]),",",g," ",B[1],"A",L,",",L," 0 0,",d," ",B[0]):q.push("M",I[0],"A",L,",",L," 0 1,",d," ",B[0])}else q.push("M",y,",",x);if(null!=E){var H=yu([y,x],[E,k],n,-R,g),X=yu([w,_],null==M?[y,x]:[M,b],n,-R,g);p===R?q.push("L",X[0],"A",R,",",R," 0 0,",d," ",X[1],"A",n,",",n," 0 ",g^vu(X[1][0],X[1][1],H[1][0],H[1][1]),",",1-g," ",H[1],"A",R,",",R," 0 0,",d," ",H[0]):q.push("L",X[0],"A",R,",",R," 0 0,",d," ",H[0])}else q.push("L",w,",",_)}else q.push("M",y,",",x),null!=M&&q.push("A",c,",",c," 0 ",A,",",g," ",M,",",b),q.push("L",w,",",_),null!=E&&q.push("A",n,",",n," 0 ",T,",",1-g," ",E,",",k);return q.push("Z"),q.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hu,r=gu,i=fu,u=zs,a=pu,o=du,s=mu;return n.innerRadius=function(t){return arguments.length?(e=Nn(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Nn(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=Nn(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==zs?zs:Nn(t),n):u},n.startAngle=function(t){return arguments.length?(a=Nn(t),n):a},n.endAngle=function(t){return arguments.length?(o=Nn(t),n):o},n.padAngle=function(t){return arguments.length?(s=Nn(t),n):s},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Fa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var zs="auto";oa.svg.line=function(){return xu(y)};var Ls=oa.map({linear:Mu,"linear-closed":bu,step:wu,"step-before":_u,"step-after":Eu,basis:Cu,"basis-open":Tu,"basis-closed":zu,bundle:Lu,cardinal:Nu,"cardinal-open":ku,"cardinal-closed":Su,monotone:Uu});Ls.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rs=[0,2/3,1/3,0],js=[0,1/3,2/3,0],Os=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=xu(Yu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},_u.reverse=Eu,Eu.reverse=_u,oa.svg.area=function(){return Fu(y)},oa.svg.area.radial=function(){var n=Fu(Yu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var s=t(this,u,n,o),c=t(this,a,n,o);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(e(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=o.call(n,i,r),a=s.call(n,i,r)-Fa,l=c.call(n,i,r)-Fa;return{r:u,a0:a,a1:l,p0:[u*Math.cos(a),u*Math.sin(a)],p1:[u*Math.cos(l),u*Math.sin(l)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Pa)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=xe,a=Me,o=Iu,s=pu,c=du;return n.radius=function(t){return arguments.length?(o=Nn(t),n):o},n.source=function(t){return arguments.length?(u=Nn(t),n):u},n.target=function(t){return arguments.length?(a=Nn(t),n):a},n.startAngle=function(t){return arguments.length?(s=Nn(t),n):s},n.endAngle=function(t){return arguments.length?(c=Nn(t),n):c},n},oa.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),a=e.call(this,n,i),o=(u.y+a.y)/2,s=[u,{x:u.x,y:o},{x:a.x,y:o},a];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var t=xe,e=Me,r=Bu;return n.source=function(e){return arguments.length?(t=Nn(e),n):t},n.target=function(t){return arguments.length?(e=Nn(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Bu,e=n.projection;return n.projection=function(n){return arguments.length?e(Hu(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ds.get(t.call(this,n,r))||Zu)(e.call(this,n,r))}var t=$u,e=Xu;return n.type=function(e){return arguments.length?(t=Nn(e),n):t},n.size=function(t){return arguments.length?(e=Nn(t),n):e},n};var Ds=oa.map({circle:Zu,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Us)),e=t*Us;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ps),e=t*Ps/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ps),e=t*Ps/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ds.keys();var Ps=Math.sqrt(3),Us=Math.tan(30*Ia);qa.transition=function(n){for(var t,e,r=Ys||++Hs,i=Gu(n),u=[],a=Fs||{time:Date.now(),ease:Sr,delay:0,duration:250},o=-1,s=this.length;++o<s;){u.push(t=[]);for(var c=this[o],l=-1,f=c.length;++l<f;)(e=c[l])&&Ku(e,l,i,r,a),t.push(e)}return Qu(u,i,r)},qa.interrupt=function(n){return this.each(null==n?Is:Vu(Gu(n)))};var Ys,Fs,Is=Vu(Gu()),Bs=[],Hs=0;Bs.call=qa.call,Bs.empty=qa.empty,Bs.node=qa.node,Bs.size=qa.size,oa.transition=function(n,t){return n&&n.transition?Ys?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Bs,Bs.select=function(n){var t,e,r,i=this.id,u=this.namespace,a=[];n=q(n);for(var o=-1,s=this.length;++o<s;){a.push(t=[]);for(var c=this[o],l=-1,f=c.length;++l<f;)(r=c[l])&&(e=n.call(r,r.__data__,l,o))?("__data__"in r&&(e.__data__=r.__data__),Ku(e,l,u,i,r[u][i]),t.push(e)):t.push(null)}return Qu(a,u,i)},Bs.selectAll=function(n){var t,e,r,i,u,a=this.id,o=this.namespace,s=[];n=A(n);for(var c=-1,l=this.length;++c<l;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){u=r[o][a],e=n.call(r,r.__data__,h,c),s.push(t=[]);for(var p=-1,d=e.length;++p<d;)(i=e[p])&&Ku(i,p,o,a,u),t.push(i)}return Qu(s,o,a)},Bs.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=F(n));for(var u=0,a=this.length;a>u;u++){i.push(t=[]);for(var e=this[u],o=0,s=e.length;s>o;o++)(r=e[o])&&n.call(r,r.__data__,o,u)&&t.push(r)}return Qu(i,this.namespace,this.id)},Bs.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):B(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Bs.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?Zr:xr,o=oa.ns.qualify(n);return Wu(this,"attr."+n,t,o.local?u:i)},Bs.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=oa.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Bs.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+="",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=xr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Wu(this,"style."+n,e,u)},Bs.styleTween=function(n,e,r){function i(i,u){var a=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Bs.text=function(n){return Wu(this,"text",n,Ju)},Bs.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Bs.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),B(this,function(r){r[e][t].ease=n}))},Bs.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:B(this,"function"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Bs.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:B(this,"function"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Bs.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Fs,u=Ys;try{Ys=e,B(this,function(t,i,u){Fs=t[r][e],n.call(t,t.__data__,i,u)})}finally{Fs=i,Ys=u}}else B(this,function(i){var u=i[r][e];(u.event||(u.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Bs.transition=function(){for(var n,t,e,r,i=this.id,u=++Hs,a=this.namespace,o=[],s=0,c=this.length;c>s;s++){o.push(n=[]);for(var t=this[s],l=0,f=t.length;f>l;l++)(e=t[l])&&(r=e[a][i],Ku(e,l,a,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Qu(o,a,u)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),l=this.__chart__||e,f=this.__chart__=e.copy(),h=null==s?f.ticks?f.ticks.apply(f,o):f.domain():s,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),d=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Oa),m=oa.transition(p.exit()).style("opacity",Oa).remove(),v=oa.transition(p.order()).style("opacity",1),x=Math.max(i,0)+a,M=Hi(f),b=c.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),
oa.transition(b));d.append("line"),d.append("text");var _,E,k,S,N=d.select("line"),q=v.select("line"),A=p.select("text").text(g),C=d.select("text"),T=v.select("text"),z="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,_="x",k="y",E="x2",S="y2",A.attr("dy",0>z?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+M[0]+","+z*u+"V0H"+M[1]+"V"+z*u)):(n=ta,_="y",k="x",E="y2",S="x2",A.attr("dy",".32em").style("text-anchor",0>z?"end":"start"),w.attr("d","M"+z*u+","+M[0]+"H0V"+M[1]+"H"+z*u)),N.attr(S,z*i),C.attr(k,z*x),q.attr(E,0).attr(S,z*i),T.attr(_,0).attr(k,z*x),f.rangeBand){var L=f,R=L.rangeBand()/2;l=f=function(n){return L(n)+R}}else l.rangeBand?l=f:m.call(n,f,l);d.call(n,l,f),v.call(n,f,f)})}var t,e=oa.scale.linear(),r=Xs,i=6,u=6,a=3,o=[10],s=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in $s?t+"":Xs,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(s=t,n):s},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Xs="bottom",$s={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(d,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Zs[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var s,f=oa.transition(t),h=oa.transition(a);c&&(s=Hi(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),r(f)),l&&(s=Hi(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),i(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==oa.event.keyCode&&(A||(x=null,T[0]-=f[1],T[1]-=h[1],A=2),E())}function d(){32==oa.event.keyCode&&2==A&&(T[0]+=f[1],T[1]+=h[1],A=0,E())}function m(){var n=oa.mouse(b),t=!1;M&&(n[0]+=M[0],n[1]+=M[1]),A||(oa.event.altKey?(x||(x=[(f[0]+f[1])/2,(h[0]+h[1])/2]),T[0]=f[+(n[0]<x[0])],T[1]=h[+(n[1]<x[1])]):x=null),N&&v(n,c,0)&&(r(k),t=!0),q&&v(n,l,1)&&(i(k),t=!0),t&&(e(k),_({type:"brush",mode:A?"move":"resize"}))}function v(n,t,e){var r,i,u=Hi(t),s=u[0],c=u[1],l=T[e],d=e?h:f,m=d[1]-d[0];return A&&(s-=l,c-=m+l),r=(e?p:g)?Math.max(s,Math.min(c,n[e])):n[e],A?i=(r+=l)+m:(x&&(l=Math.max(s,Math.min(c,2*x[e]-r))),r>l?(i=r,r=l):i=l),d[0]!=r||d[1]!=i?(e?o=null:a=null,d[0]=r,d[1]=i,!0):void 0}function y(){m(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),z.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),_({type:"brushend"})}var x,M,b=this,w=oa.select(oa.event.target),_=s.of(b,arguments),k=oa.select(b),S=w.datum(),N=!/^(n|s)$/.test(S)&&c,q=!/^(e|w)$/.test(S)&&l,A=w.classed("extent"),C=Q(b),T=oa.mouse(b),z=oa.select(t(b)).on("keydown.brush",u).on("keyup.brush",d);if(oa.event.changedTouches?z.on("touchmove.brush",m).on("touchend.brush",y):z.on("mousemove.brush",m).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),A)T[0]=f[0]-T[0],T[1]=h[0]-T[1];else if(S){var L=+/w$/.test(S),R=+/^n/.test(S);M=[f[1-L]-T[0],h[1-R]-T[1]],T[0]=f[L],T[1]=h[R]}else oa.event.altKey&&(x=T.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",w.style("cursor")),_({type:"brushstart"}),m()}var a,o,s=S(n,"brushstart","brush","brushend"),c=null,l=null,f=[0,0],h=[0,0],g=!0,p=!0,d=Vs[0];return n.event=function(n){n.each(function(){var n=s.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Ys?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mr(f,t.x),r=Mr(h,t.y);return a=o=null,function(i){f=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,d=Vs[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,d=Vs[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(g=!!t[0],p=!!t[1]):c?g=!!t:l&&(p=!!t),n):c&&l?[g,p]:c?g:l?p:null},n.extent=function(t){var e,r,i,u,s;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(s=e,e=r,r=s),(e!=f[0]||r!=f[1])&&(f=[e,r])),l&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),o=[i,u],l.invert&&(i=l(i),u=l(u)),i>u&&(s=i,i=u,u=s),(i!=h[0]||u!=h[1])&&(h=[i,u])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(s=e,e=r,r=s))),l&&(o?(i=o[0],u=o[1]):(i=h[0],u=h[1],l.invert&&(i=l.invert(i),u=l.invert(u)),i>u&&(s=i,i=u,u=s))),c&&l?[[e,i],[r,u]]:c?[e,r]:l&&[i,u])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!l&&h[0]==h[1]},oa.rebind(n,s,"on")};var Zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Vs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Qs=go.format=Mo.timeFormat,Ws=Qs.utc,Js=Ws("%Y-%m-%dT%H:%M:%S.%LZ");Qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Js,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Js.toString,go.second=Fn(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=Fn(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=Fn(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=Fn(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Gs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ks=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Qs.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ct]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ia)},floor:y,ceil:y};Ks.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ks,nc)};var ec=Ks.map(function(n){return[n[0].utc,n[1]]}),rc=Ws.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ct]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=qn(function(n){return n.responseText}),oa.json=function(n,t){return An(n,"application/json",ua,t)},oa.html=function(n,t){return An(n,"text/html",aa,t)},oa.xml=qn(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define("d3",oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}(),define("views/stacked-bars",["d3"],function(n){function t(t){var e={},r={top:20,right:20,bottom:30,left:40},i=960-r.left-r.right,u=500-r.top-r.bottom,a=n.scale.ordinal(),o=n.scale.linear().range([u,0]),s={};t.forEach(function(n){s[n.x]=n.xOrder}),o.domain([n.min(t.sort(),function(n){return n.y0}),n.max(t,function(n){return n.y1})]),a.domain(t.map(function(n){return n.x}).sort(function(n,t){return s[n]-s[t]})).rangeBands([0,i],.1);var c=n.svg.axis().scale(a).orient("bottom"),l=n.svg.axis().scale(o).orient("left");return e.dimension={width:i,height:u,margin:r},e.axis={xAxis:c,yAxis:l},e.scale={x:a,y:o},e.data=t,e}function e(t,e){var r,i=e.data,u=e.axis.xAxis,a=e.axis.yAxis,o=e.scale.x,s=e.scale.y,c=e.dimension.width,l=e.dimension.height,f=e.dimension.margin;e.svg?r=e.svg:(r=n.select(t).append("svg").attr("width",c+f.left+f.right).attr("height",l+f.top+f.bottom).append("g").attr("transform","translate("+f.left+","+f.top+")"),e.svg=r),r.append("g").attr("class","x axis").attr("transform","translate(0,"+l+")").call(u),r.append("g").attr("class","y axis").call(a),r.selectAll(".bar").data(i).enter().append("rect").attr("class","bar").style("fill",function(n){return n.color}).attr("x",function(n){return o(n.x)}).attr("width",o.rangeBand()).attr("y",function(n){return s(n.y1)}).attr("height",function(n){return s(n.y0)-s(n.y1)})}function r(n){n.svg.selectAll(".x.axis").remove(),n.svg.selectAll(".y.axis").remove()}return{draw:e,hideAxises:r,generateContext:t}}),define("utils",[],function(){return{clone:function(n){return JSON.parse(JSON.stringify(n))},forEach:function(n,t){if(null!=n){for(var e in Object.keys(n))if(t(n[e],e)===!1)return}}}}),define("trans/sbars2sbars",["d3","utils","../views/stacked-bars"],function(n,t,e){function r(n,t,e){var r=s(e),i={},u={},a={},o={};n.forEach(function(n){a[n.id]=n}),t.forEach(function(n){o[n.id]=n}),r.forEach(function(n){i[n.from]||(i[n.from]={to:[],sum:0});var t=s(o[n.to]),e=s(a[n.from]);i[n.from].from=e,i[n.from].to.push(t),i[n.from].sum+=t.y1-t.y0,u[n.to]||(u[n.to]={to:t,from:[],sum:0}),u[n.to].from.push(e),u[n.to].sum+=e.y1-e.y0});var l=[],f={},h={};return c(i,function(n){var t=n.from,e=t.y1-t.y0,r=t.y0;c(n.to,function(i){var a=n.sum,o=i.y1-i.y0,s={};s.parentOldDataPoint=t,s.parentNewDataPoint=i,s.srcY0=r,s.srcY1=r+e*(o/a),s.srcX=t.x,s.srcId=t.id,s.srcXOrder=t.xOrder,f[s.srcXOrder]||(f[s.srcXOrder]=0),s.srcYOrder=f[s.srcXOrder],s.srcColor=t.color,f[s.srcXOrder]++,r=s.srcY1;var c=u[i.id].sum;h[i.id]||(h[i.id]=i.y0),s.destId=i.id,s.destY0=h[i.id],s.destY1=s.destY0+e*(o/c),s.destX=i.x,s.destColor=i.color,h[i.id]=s.destY1,l.push(s)})}),{transitElements:l,newDataById:o,oldDataById:a,mapByOldBar:i,mapByNewBar:u}}function i(t,r,i){n.selectAll(".tmp").remove(),e.draw("#view1",r),i&&i(r)}function u(n,t,u,a,o){function s(n){var t=!1;return m.rangeBand()!=y.rangeBand()&&(t=!0),g.forEach(function(n){m(n.srcX)!=y(n.destX)&&(t=!0)}),t&&n.attr("width",y.rangeBand()).attr("x",function(n){return y(n.destX)}),t}function c(n){var t=!1;return g.forEach(function(n){(x(n.destY0)-x(n.destY1)!=v(n.srcY0)-v(n.srcY1)||x(n.destY1)!=v(n.srcY1))&&(t=!0)}),t&&n.attr("height",function(n){return x(n.destY0)-x(n.destY1)}).attr("y",function(n){return x(n.destY1)}),t}var l={firstX:!0,duration:1e3},a=$.extend({},l,a),f=n.data,h=r(f,u,t),g=(h.mapByOldBar,h.mapByNewBar,h.transitElements),p=e.generateContext(u);p.svg=n.svg;var d=n.svg,m=n.scale.x,v=n.scale.y,y=p.scale.x,x=p.scale.y,M=d.selectAll("tmpBar").data(g).enter().append("rect").attr("class","tmp").style("stroke",function(n){return n.srcColor}).style("fill",function(n){return n.srcColor}).attr("x",function(n){return m(n.srcX)}).attr("y",function(n){return v(n.srcY1)}).attr("height",function(n){return v(n.srcY0)-v(n.srcY1)}).attr("width",m.rangeBand());d.selectAll(".bar").remove();var b=0,w=M.transition().attr("y",function(n){return v(n.srcY1)-2*n.srcYOrder}).style("stroke","black").style("fill-opacity","0.4").transition().delay(500).duration(a.duration);if(e.hideAxises(n),a.firstX){var _=s(w);_&&(w=w.transition()),c(w)}else{var _=c(w);_&&(w=w.transition()),s(w)}w.style("fill-opacity","1").each(function(){++b}).each("end",function(){--b||setTimeout(function(){i(n,p,o)},200)})}function a(n){var e=t.clone(n);return e.forEach(function(n){var t=n.from;n.from=n.to,n.to=t}),e}function o(n,t,e,r,i){u(n,a(t),e,r,i)}var s=t.clone,c=t.forEach;return{transform:u,reverse:o}}),define("main",["require","d3","views/stacked-bars","trans/sbars2sbars"],function(n){function t(n,t){function r(e){return function(r,o){a++;{if(!r)return o&&(i[e]=o),a!=n.length||u?void 0:t(null,i);if(!u)return u=!0,t(r)}}}var i=[],u=!1,a=0;n.forEach(function(n,t){e.json(n,r(t))})}var e=n("d3"),r=n("views/stacked-bars"),i=n("trans/sbars2sbars");t(["graph1.json","graph2.json","graph3.json","graph4.json","map_g1_to_g2.json","map_g2_to_g3.json","map_g3_to_g4.json","map_g4_to_g1.json"],function(n,t){function e(){$("#spn_message").text("Step "+(m+1))}function u(n,t){return(n%t+t)%t}function a(n){function t(t){m=u(n?m+1:m-1,4),v=t,$(".progress-button").attr("disabled",!1),e()}$(".progress-button").attr("disabled",!0),$("#spn_message").text("Going from step "+(m+1)+" to "+(u(n?m+1:m-1,4)+1));var r,a,d=$("#input_duration").val(),y={duration:d};switch(m){case 0:n?(r=f,a=s):(r=p,a=l);break;case 1:n?(r=h,a=c):(r=f,a=o,y.firstX=!1);break;case 2:n?(r=g,a=l,y.firstX=!1):(r=h,a=s);break;case 3:n?(r=p,a=o):(r=g,a=c)}n?i.transform(v,r,a,y,t):i.reverse(v,r,a,y,t)}if(n)throw n;var o=t[0],s=t[1],c=t[2],l=t[3],f=t[4],h=t[5],g=t[6],p=t[7],d=o,m=0,v=r.generateContext(d);r.draw("#view1",v),e(),$("#btn_next").click(function(){a(!0)}),$("#btn_back").click(function(){a(!1)})})}),requirejs.config({baseUrl:"scripts",paths:{d3:"lib/d3.min",utils:"utils"}}),requirejs(["main"]),define("app",function(){})}();
[
{"from":"0", "to": "0"},
{"from":"0", "to": "4"},
{"from":"0", "to": "8"},
{"from":"0", "to": "12"},
{"from":"0", "to": "16"},
{"from":"0", "to": "20"},
{"from":"1", "to": "1"},
{"from":"1", "to": "5"},
{"from":"1", "to": "9"},
{"from":"1", "to": "13"},
{"from":"1", "to": "17"},
{"from":"1", "to": "21"},
{"from":"2", "to": "2"},
{"from":"2", "to": "6"},
{"from":"2", "to": "10"},
{"from":"2", "to": "14"},
{"from":"2", "to": "18"},
{"from":"2", "to": "22"},
{"from":"3", "to": "3"},
{"from":"3", "to": "7"},
{"from":"3", "to": "11"},
{"from":"3", "to": "15"},
{"from":"3", "to": "19"},
{"from":"3", "to": "23"}
]
[
{"from":"0", "to": "0"},
{"from":"1", "to": "1"},
{"from":"2", "to": "2"},
{"from":"3", "to": "3"},
{"from":"4", "to": "4"},
{"from":"5", "to": "5"},
{"from":"6", "to": "6"},
{"from":"7", "to": "7"},
{"from":"8", "to": "8"},
{"from":"9", "to": "9"},
{"from":"10", "to": "10"},
{"from":"11", "to": "11"},
{"from":"12", "to": "12"},
{"from":"13", "to": "13"},
{"from":"14", "to": "14"},
{"from":"15", "to": "15"},
{"from":"16", "to": "16"},
{"from":"17", "to": "17"},
{"from":"18", "to": "18"},
{"from":"19", "to": "19"},
{"from":"20", "to": "20"},
{"from":"21", "to": "21"},
{"from":"22", "to": "22"},
{"from":"23", "to": "23"}
]
[
{"to":"0", "from": "0" },
{"to":"0", "from": "4" },
{"to":"0", "from": "8" },
{"to":"0", "from": "12"},
{"to":"0", "from": "16"},
{"to":"0", "from": "20"},
{"to":"1", "from": "1" },
{"to":"1", "from": "5" },
{"to":"1", "from": "9" },
{"to":"1", "from": "13"},
{"to":"1", "from": "17"},
{"to":"1", "from": "21"},
{"to":"2", "from": "2" },
{"to":"2", "from": "6" },
{"to":"2", "from": "10"},
{"to":"2", "from": "14"},
{"to":"2", "from": "18"},
{"to":"2", "from": "22"},
{"to":"3", "from": "3" },
{"to":"3", "from": "7" },
{"to":"3", "from": "11"},
{"to":"3", "from": "15"},
{"to":"3", "from": "19"},
{"to":"3", "from": "23"}
]
[
{"from":"0", "to": "0"},
{"from":"1", "to": "1"},
{"from":"2", "to": "2"},
{"from":"3", "to": "3"}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment