From 713b3df29e7a819d3b6a97d410e529edddc53ece Mon Sep 17 00:00:00 2001 From: Richard Czechowski Date: Tue, 19 Nov 2019 09:23:00 -0800 Subject: [PATCH] Add missing dependency for carousel vis, rebuild for new release --- dist/advanced_table.js | 4 ++-- dist/chord.js | 2 +- dist/collapsible_tree.js | 2 +- dist/hello_world.js | 2 +- dist/hello_world_react.js | 10 +++++----- dist/image_carousel.js | 41 +++++++++++++++++++++++++++++++++++++++ dist/liquid_fill_gauge.js | 4 ++-- dist/sankey.js | 2 +- dist/subtotal.js | 4 ++-- dist/sunburst.js | 2 +- dist/treemap.js | 2 +- dist/v1_common.js | 2 +- package.json | 1 + yarn.lock | 37 ++++++++++++++++++++++++++++++++++- 14 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 dist/image_carousel.js diff --git a/dist/advanced_table.js b/dist/advanced_table.js index 097aa929..874d816c 100644 --- a/dist/advanced_table.js +++ b/dist/advanced_table.js @@ -1,4 +1,4 @@ -!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.advanced_table=t():n.advanced_table=t()}(window,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)e.d(r,i,function(t){return n[t]}.bind(null,i));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=36)}({13:function(n,t,e){(function(n,r){var i; +!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.advanced_table=t():n.advanced_table=t()}(window,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)e.d(r,i,function(t){return n[t]}.bind(null,i));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=52)}({22:function(n,t,e){(function(n,r){var i; /** * @license * Lodash @@ -6,4 +6,4 @@ * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var u,o=200,a="Expected a function",l="__lodash_hash_undefined__",c="__lodash_placeholder__",f=1,s=2,h=4,p=1,v=2,d=1,g=2,_=4,y=8,m=16,b=32,w=64,x=128,C=256,k=512,E=800,j=16,F=1/0,A=9007199254740991,S=17976931348623157e292,R=NaN,O=4294967295,z=O-1,N=O>>>1,T=[["ary",x],["bind",d],["bindKey",g],["curry",y],["curryRight",m],["flip",k],["partial",b],["partialRight",w],["rearg",C]],L="[object Arguments]",I="[object Array]",D="[object AsyncFunction]",P="[object Boolean]",B="[object Date]",W="[object DOMException]",U="[object Error]",M="[object Function]",G="[object GeneratorFunction]",$="[object Map]",H="[object Number]",q="[object Null]",Z="[object Object]",V="[object Proxy]",K="[object RegExp]",J="[object Set]",Y="[object String]",Q="[object Symbol]",X="[object Undefined]",nn="[object WeakMap]",tn="[object ArrayBuffer]",en="[object DataView]",rn="[object Float32Array]",un="[object Float64Array]",on="[object Int8Array]",an="[object Int16Array]",ln="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",sn="[object Uint16Array]",hn="[object Uint32Array]",pn=/\b__p \+= '';/g,vn=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gn=/&(?:amp|lt|gt|quot|#39);/g,_n=/[&<>"']/g,yn=RegExp(gn.source),mn=RegExp(_n.source),bn=/<%-([\s\S]+?)%>/g,wn=/<%([\s\S]+?)%>/g,xn=/<%=([\s\S]+?)%>/g,Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kn=/^\w*$/,En=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jn=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(jn.source),An=/^\s+|\s+$/g,Sn=/^\s+/,Rn=/\s+$/,On=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zn=/\{\n\/\* \[wrapped with (.+)\] \*/,Nn=/,? & /,Tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ln=/\\(\\)?/g,In=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dn=/\w*$/,Pn=/^[-+]0x[0-9a-f]+$/i,Bn=/^0b[01]+$/i,Wn=/^\[object .+?Constructor\]$/,Un=/^0o[0-7]+$/i,Mn=/^(?:0|[1-9]\d*)$/,Gn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$n=/($^)/,Hn=/['\n\r\u2028\u2029\\]/g,qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vn="["+Zn+"]",Kn="["+qn+"]",Jn="\\d+",Yn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Qn="[^\\ud800-\\udfff"+Zn+Jn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Xn="\\ud83c[\\udffb-\\udfff]",nt="[^\\ud800-\\udfff]",tt="(?:\\ud83c[\\udde6-\\uddff]){2}",et="[\\ud800-\\udbff][\\udc00-\\udfff]",rt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",it="(?:"+Yn+"|"+Qn+")",ut="(?:"+rt+"|"+Qn+")",ot="(?:"+Kn+"|"+Xn+")?",at="[\\ufe0e\\ufe0f]?"+ot+"(?:\\u200d(?:"+[nt,tt,et].join("|")+")[\\ufe0e\\ufe0f]?"+ot+")*",lt="(?:"+["[\\u2700-\\u27bf]",tt,et].join("|")+")"+at,ct="(?:"+[nt+Kn+"?",Kn,tt,et,"[\\ud800-\\udfff]"].join("|")+")",ft=RegExp("['’]","g"),st=RegExp(Kn,"g"),ht=RegExp(Xn+"(?="+Xn+")|"+ct+at,"g"),pt=RegExp([rt+"?"+Yn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Vn,rt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Vn,rt+it,"$"].join("|")+")",rt+"?"+it+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jn,lt].join("|"),"g"),vt=RegExp("[\\u200d\\ud800-\\udfff"+qn+"\\ufe0e\\ufe0f]"),dt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_t=-1,yt={};yt[rn]=yt[un]=yt[on]=yt[an]=yt[ln]=yt[cn]=yt[fn]=yt[sn]=yt[hn]=!0,yt[L]=yt[I]=yt[tn]=yt[P]=yt[en]=yt[B]=yt[U]=yt[M]=yt[$]=yt[H]=yt[Z]=yt[K]=yt[J]=yt[Y]=yt[nn]=!1;var mt={};mt[L]=mt[I]=mt[tn]=mt[en]=mt[P]=mt[B]=mt[rn]=mt[un]=mt[on]=mt[an]=mt[ln]=mt[$]=mt[H]=mt[Z]=mt[K]=mt[J]=mt[Y]=mt[Q]=mt[cn]=mt[fn]=mt[sn]=mt[hn]=!0,mt[U]=mt[M]=mt[nn]=!1;var bt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wt=parseFloat,xt=parseInt,Ct="object"==typeof n&&n&&n.Object===Object&&n,kt="object"==typeof self&&self&&self.Object===Object&&self,Et=Ct||kt||Function("return this")(),jt=t&&!t.nodeType&&t,Ft=jt&&"object"==typeof r&&r&&!r.nodeType&&r,At=Ft&&Ft.exports===jt,St=At&&Ct.process,Rt=function(){try{return Ft&&Ft.require&&Ft.require("util").types||St&&St.binding&&St.binding("util")}catch(n){}}(),Ot=Rt&&Rt.isArrayBuffer,zt=Rt&&Rt.isDate,Nt=Rt&&Rt.isMap,Tt=Rt&&Rt.isRegExp,Lt=Rt&&Rt.isSet,It=Rt&&Rt.isTypedArray;function Dt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Pt(n,t,e,r){for(var i=-1,u=null==n?0:n.length;++i-1}function $t(n,t,e){for(var r=-1,i=null==n?0:n.length;++r-1;);return e}function he(n,t){for(var e=n.length;e--&&Xt(t,n[e],0)>-1;);return e}var pe=ie({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ve=ie({"&":"&","<":"<",">":">",'"':""","'":"'"});function de(n){return"\\"+bt[n]}function ge(n){return vt.test(n)}function _e(n){var t=-1,e=Array(n.size);return n.forEach((function(n,r){e[++t]=[r,n]})),e}function ye(n,t){return function(e){return n(t(e))}}function me(n,t){for(var e=-1,r=n.length,i=0,u=[];++e",""":'"',"'":"'"}),ke=function n(t){var e,r=(t=null==t?Et:ke.defaults(Et.Object(),t,ke.pick(Et,gt))).Array,i=t.Date,qn=t.Error,Zn=t.Function,Vn=t.Math,Kn=t.Object,Jn=t.RegExp,Yn=t.String,Qn=t.TypeError,Xn=r.prototype,nt=Zn.prototype,tt=Kn.prototype,et=t["__core-js_shared__"],rt=nt.toString,it=tt.hasOwnProperty,ut=0,ot=(e=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",at=tt.toString,lt=rt.call(Kn),ct=Et._,ht=Jn("^"+rt.call(it).replace(jn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=At?t.Buffer:u,bt=t.Symbol,Ct=t.Uint8Array,kt=vt?vt.allocUnsafe:u,jt=ye(Kn.getPrototypeOf,Kn),Ft=Kn.create,St=tt.propertyIsEnumerable,Rt=Xn.splice,Jt=bt?bt.isConcatSpreadable:u,ie=bt?bt.iterator:u,Ee=bt?bt.toStringTag:u,je=function(){try{var n=Su(Kn,"defineProperty");return n({},"",{}),n}catch(n){}}(),Fe=t.clearTimeout!==Et.clearTimeout&&t.clearTimeout,Ae=i&&i.now!==Et.Date.now&&i.now,Se=t.setTimeout!==Et.setTimeout&&t.setTimeout,Re=Vn.ceil,Oe=Vn.floor,ze=Kn.getOwnPropertySymbols,Ne=vt?vt.isBuffer:u,Te=t.isFinite,Le=Xn.join,Ie=ye(Kn.keys,Kn),De=Vn.max,Pe=Vn.min,Be=i.now,We=t.parseInt,Ue=Vn.random,Me=Xn.reverse,Ge=Su(t,"DataView"),$e=Su(t,"Map"),He=Su(t,"Promise"),qe=Su(t,"Set"),Ze=Su(t,"WeakMap"),Ve=Su(Kn,"create"),Ke=Ze&&new Ze,Je={},Ye=to(Ge),Qe=to($e),Xe=to(He),nr=to(qe),tr=to(Ze),er=bt?bt.prototype:u,rr=er?er.valueOf:u,ir=er?er.toString:u;function ur(n){if(ma(n)&&!la(n)&&!(n instanceof cr)){if(n instanceof lr)return n;if(it.call(n,"__wrapped__"))return eo(n)}return new lr(n)}var or=function(){function n(){}return function(t){if(!ya(t))return{};if(Ft)return Ft(t);n.prototype=t;var e=new n;return n.prototype=u,e}}();function ar(){}function lr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=u}function cr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=O,this.__views__=[]}function fr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Fr(n,t,e,r,i,o){var a,l=t&f,c=t&s,p=t&h;if(e&&(a=i?e(n,r,i,o):e(n)),a!==u)return a;if(!ya(n))return n;var v=la(n);if(v){if(a=function(n){var t=n.length,e=new n.constructor(t);return t&&"string"==typeof n[0]&&it.call(n,"index")&&(e.index=n.index,e.input=n.input),e}(n),!l)return Zi(n,a)}else{var d=zu(n),g=d==M||d==G;if(ha(n))return Ui(n,l);if(d==Z||d==L||g&&!i){if(a=c||g?{}:Tu(n),!l)return c?function(n,t){return Vi(n,Ou(n),t)}(n,function(n,t){return n&&Vi(t,Ja(t),n)}(a,n)):function(n,t){return Vi(n,Ru(n),t)}(n,Cr(a,n))}else{if(!mt[d])return i?n:{};a=function(n,t,e){var r,i,u,o=n.constructor;switch(t){case tn:return Mi(n);case P:case B:return new o(+n);case en:return function(n,t){var e=t?Mi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n,e);case rn:case un:case on:case an:case ln:case cn:case fn:case sn:case hn:return Gi(n,e);case $:return new o;case H:case Y:return new o(n);case K:return(u=new(i=n).constructor(i.source,Dn.exec(i))).lastIndex=i.lastIndex,u;case J:return new o;case Q:return r=n,rr?Kn(rr.call(r)):{}}}(n,d,l)}}o||(o=new vr);var _=o.get(n);if(_)return _;o.set(n,a),ka(n)?n.forEach((function(r){a.add(Fr(r,t,e,r,n,o))})):ba(n)&&n.forEach((function(r,i){a.set(i,Fr(r,t,e,i,n,o))}));var y=v?u:(p?c?xu:wu:c?Ja:Ka)(n);return Bt(y||n,(function(r,i){y&&(r=n[i=r]),br(a,i,Fr(r,t,e,i,n,o))})),a}function Ar(n,t,e){var r=e.length;if(null==n)return!r;for(n=Kn(n);r--;){var i=e[r],o=t[i],a=n[i];if(a===u&&!(i in n)||!o(a))return!1}return!0}function Sr(n,t,e){if("function"!=typeof n)throw new Qn(a);return Vu((function(){n.apply(u,e)}),t)}function Rr(n,t,e,r){var i=-1,u=Gt,a=!0,l=n.length,c=[],f=t.length;if(!l)return c;e&&(t=Ht(t,le(e))),r?(u=$t,a=!1):t.length>=o&&(u=fe,a=!1,t=new pr(t));n:for(;++i-1},sr.prototype.set=function(n,t){var e=this.__data__,r=wr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},hr.prototype.clear=function(){this.size=0,this.__data__={hash:new fr,map:new($e||sr),string:new fr}},hr.prototype.delete=function(n){var t=Fu(this,n).delete(n);return this.size-=t?1:0,t},hr.prototype.get=function(n){return Fu(this,n).get(n)},hr.prototype.has=function(n){return Fu(this,n).has(n)},hr.prototype.set=function(n,t){var e=Fu(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},pr.prototype.add=pr.prototype.push=function(n){return this.__data__.set(n,l),this},pr.prototype.has=function(n){return this.__data__.has(n)},vr.prototype.clear=function(){this.__data__=new sr,this.size=0},vr.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},vr.prototype.get=function(n){return this.__data__.get(n)},vr.prototype.has=function(n){return this.__data__.has(n)},vr.prototype.set=function(n,t){var e=this.__data__;if(e instanceof sr){var r=e.__data__;if(!$e||r.length0&&e(a)?t>1?Ir(a,t-1,e,r,i):qt(i,a):r||(i[i.length]=a)}return i}var Dr=Qi(),Pr=Qi(!0);function Br(n,t){return n&&Dr(n,t,Ka)}function Wr(n,t){return n&&Pr(n,t,Ka)}function Ur(n,t){return Mt(t,(function(t){return da(n[t])}))}function Mr(n,t){for(var e=0,r=(t=Di(t,n)).length;null!=n&&et}function qr(n,t){return null!=n&&it.call(n,t)}function Zr(n,t){return null!=n&&t in Kn(n)}function Vr(n,t,e){for(var i=e?$t:Gt,o=n[0].length,a=n.length,l=a,c=r(a),f=1/0,s=[];l--;){var h=n[l];l&&t&&(h=Ht(h,le(t))),f=Pe(h.length,f),c[l]=!e&&(t||o>=120&&h.length>=120)?new pr(l&&h):u}h=n[0];var p=-1,v=c[0];n:for(;++p=a?l:l*("desc"==e[r]?-1:1)}return n.index-t.index}(n,t,e)}))}function ci(n,t,e){for(var r=-1,i=t.length,u={};++r-1;)a!==n&&Rt.call(a,l,1),Rt.call(n,l,1);return n}function si(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==u){var u=i;Iu(i)?Rt.call(n,i,1):Si(n,i)}}return n}function hi(n,t){return n+Oe(Ue()*(t-n+1))}function pi(n,t){var e="";if(!n||t<1||t>A)return e;do{t%2&&(e+=n),(t=Oe(t/2))&&(n+=n)}while(t);return e}function vi(n,t){return Ku($u(n,t,wl),n+"")}function di(n){return gr(il(n))}function gi(n,t){var e=il(n);return Qu(e,jr(t,0,e.length))}function _i(n,t,e,r){if(!ya(n))return n;for(var i=-1,o=(t=Di(t,n)).length,a=o-1,l=n;null!=l&&++iu?0:u+t),(e=e>u?u:e)<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=r(u);++i>>1,o=n[u];null!==o&&!ja(o)&&(e?o<=t:o=o){var f=t?null:pu(n);if(f)return be(f);a=!1,i=fe,c=new pr}else c=t?[]:l;n:for(;++r=r?n:wi(n,t,e)}var Wi=Fe||function(n){return Et.clearTimeout(n)};function Ui(n,t){if(t)return n.slice();var e=n.length,r=kt?kt(e):new n.constructor(e);return n.copy(r),r}function Mi(n){var t=new n.constructor(n.byteLength);return new Ct(t).set(new Ct(n)),t}function Gi(n,t){var e=t?Mi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function $i(n,t){if(n!==t){var e=n!==u,r=null===n,i=n==n,o=ja(n),a=t!==u,l=null===t,c=t==t,f=ja(t);if(!l&&!f&&!o&&n>t||o&&a&&c&&!l&&!f||r&&a&&c||!e&&c||!i)return 1;if(!r&&!o&&!f&&n1?e[i-1]:u,a=i>2?e[2]:u;for(o=n.length>3&&"function"==typeof o?(i--,o):u,a&&Du(e[0],e[1],a)&&(o=i<3?u:o,i=1),t=Kn(t);++r-1?i[o?t[a]:a]:u}}function ru(n){return bu((function(t){var e=t.length,r=e,i=lr.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Qn(a);if(i&&!l&&"wrapper"==ku(o))var l=new lr([],!0)}for(r=l?r:e;++r1&&y.reverse(),h&&fl))return!1;var f=o.get(n);if(f&&o.get(t))return f==t;var s=-1,h=!0,d=e&v?new pr:u;for(o.set(n,t),o.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(On,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Bt(T,(function(e){var r="_."+e[0];t&e[1]&&!Gt(n,r)&&n.push(r)})),n.sort()}(function(n){var t=n.match(zn);return t?t[1].split(Nn):[]}(r),e)))}function Yu(n){var t=0,e=0;return function(){var r=Be(),i=j-(r-e);if(e=r,i>0){if(++t>=E)return arguments[0]}else t=0;return n.apply(u,arguments)}}function Qu(n,t){var e=-1,r=n.length,i=r-1;for(t=t===u?r:t;++e1?n[t-1]:u;return Co(n,e="function"==typeof e?(n.pop(),e):u)}));function Ro(n){var t=ur(n);return t.__chain__=!0,t}function Oo(n,t){return t(n)}var zo=bu((function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(t){return Er(t,n)};return!(t>1||this.__actions__.length)&&r instanceof cr&&Iu(e)?((r=r.slice(e,+e+(t?1:0))).__actions__.push({func:Oo,args:[i],thisArg:u}),new lr(r,this.__chain__).thru((function(n){return t&&!n.length&&n.push(u),n}))):this.thru(i)})),No=Ki((function(n,t,e){it.call(n,e)?++n[e]:kr(n,e,1)})),To=eu(oo),Lo=eu(ao);function Io(n,t){return(la(n)?Bt:Or)(n,ju(t,3))}function Do(n,t){return(la(n)?Wt:zr)(n,ju(t,3))}var Po=Ki((function(n,t,e){it.call(n,e)?n[e].push(t):kr(n,e,[t])})),Bo=vi((function(n,t,e){var i=-1,u="function"==typeof t,o=fa(n)?r(n.length):[];return Or(n,(function(n){o[++i]=u?Dt(t,n,e):Kr(n,t,e)})),o})),Wo=Ki((function(n,t,e){kr(n,e,t)}));function Uo(n,t){return(la(n)?Ht:ri)(n,ju(t,3))}var Mo=Ki((function(n,t,e){n[e?0:1].push(t)}),(function(){return[[],[]]})),Go=vi((function(n,t){if(null==n)return[];var e=t.length;return e>1&&Du(n,t[0],t[1])?t=[]:e>2&&Du(t[0],t[1],t[2])&&(t=[t[0]]),li(n,Ir(t,1),[])})),$o=Ae||function(){return Et.Date.now()};function Ho(n,t,e){return t=e?u:t,t=n&&null==t?n.length:t,du(n,x,u,u,u,u,t)}function qo(n,t){var e;if("function"!=typeof t)throw new Qn(a);return n=za(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=u),e}}var Zo=vi((function(n,t,e){var r=d;if(e.length){var i=me(e,Eu(Zo));r|=b}return du(n,r,t,e,i)})),Vo=vi((function(n,t,e){var r=d|g;if(e.length){var i=me(e,Eu(Vo));r|=b}return du(t,r,n,e,i)}));function Ko(n,t,e){var r,i,o,l,c,f,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new Qn(a);function d(t){var e=r,o=i;return r=i=u,s=t,l=n.apply(o,e)}function g(n){var e=n-f;return f===u||e>=t||e<0||p&&n-s>=o}function _(){var n=$o();if(g(n))return y(n);c=Vu(_,function(n){var e=t-(n-f);return p?Pe(e,o-(n-s)):e}(n))}function y(n){return c=u,v&&r?d(n):(r=i=u,l)}function m(){var n=$o(),e=g(n);if(r=arguments,i=this,f=n,e){if(c===u)return function(n){return s=n,c=Vu(_,t),h?d(n):l}(f);if(p)return Wi(c),c=Vu(_,t),d(f)}return c===u&&(c=Vu(_,t)),l}return t=Ta(t)||0,ya(e)&&(h=!!e.leading,o=(p="maxWait"in e)?De(Ta(e.maxWait)||0,t):o,v="trailing"in e?!!e.trailing:v),m.cancel=function(){c!==u&&Wi(c),s=0,r=f=i=c=u},m.flush=function(){return c===u?l:y($o())},m}var Jo=vi((function(n,t){return Sr(n,1,t)})),Yo=vi((function(n,t,e){return Sr(n,Ta(t)||0,e)}));function Qo(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Qn(a);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],u=e.cache;if(u.has(i))return u.get(i);var o=n.apply(this,r);return e.cache=u.set(i,o)||u,o};return e.cache=new(Qo.Cache||hr),e}function Xo(n){if("function"!=typeof n)throw new Qn(a);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Qo.Cache=hr;var na=Pi((function(n,t){var e=(t=1==t.length&&la(t[0])?Ht(t[0],le(ju())):Ht(Ir(t,1),le(ju()))).length;return vi((function(r){for(var i=-1,u=Pe(r.length,e);++i=t})),aa=Jr(function(){return arguments}())?Jr:function(n){return ma(n)&&it.call(n,"callee")&&!St.call(n,"callee")},la=r.isArray,ca=Ot?le(Ot):function(n){return ma(n)&&$r(n)==tn};function fa(n){return null!=n&&_a(n.length)&&!da(n)}function sa(n){return ma(n)&&fa(n)}var ha=Ne||Tl,pa=zt?le(zt):function(n){return ma(n)&&$r(n)==B};function va(n){if(!ma(n))return!1;var t=$r(n);return t==U||t==W||"string"==typeof n.message&&"string"==typeof n.name&&!xa(n)}function da(n){if(!ya(n))return!1;var t=$r(n);return t==M||t==G||t==D||t==V}function ga(n){return"number"==typeof n&&n==za(n)}function _a(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=A}function ya(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function ma(n){return null!=n&&"object"==typeof n}var ba=Nt?le(Nt):function(n){return ma(n)&&zu(n)==$};function wa(n){return"number"==typeof n||ma(n)&&$r(n)==H}function xa(n){if(!ma(n)||$r(n)!=Z)return!1;var t=jt(n);if(null===t)return!0;var e=it.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&rt.call(e)==lt}var Ca=Tt?le(Tt):function(n){return ma(n)&&$r(n)==K},ka=Lt?le(Lt):function(n){return ma(n)&&zu(n)==J};function Ea(n){return"string"==typeof n||!la(n)&&ma(n)&&$r(n)==Y}function ja(n){return"symbol"==typeof n||ma(n)&&$r(n)==Q}var Fa=It?le(It):function(n){return ma(n)&&_a(n.length)&&!!yt[$r(n)]},Aa=fu(ei),Sa=fu((function(n,t){return n<=t}));function Ra(n){if(!n)return[];if(fa(n))return Ea(n)?xe(n):Zi(n);if(ie&&n[ie])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[ie]());var t=zu(n);return(t==$?_e:t==J?be:il)(n)}function Oa(n){return n?(n=Ta(n))===F||n===-F?(n<0?-1:1)*S:n==n?n:0:0===n?n:0}function za(n){var t=Oa(n),e=t%1;return t==t?e?t-e:t:0}function Na(n){return n?jr(za(n),0,O):0}function Ta(n){if("number"==typeof n)return n;if(ja(n))return R;if(ya(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ya(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(An,"");var e=Bn.test(n);return e||Un.test(n)?xt(n.slice(2),e?2:8):Pn.test(n)?R:+n}function La(n){return Vi(n,Ja(n))}function Ia(n){return null==n?"":Fi(n)}var Da=Ji((function(n,t){if(Uu(t)||fa(t))Vi(t,Ka(t),n);else for(var e in t)it.call(t,e)&&br(n,e,t[e])})),Pa=Ji((function(n,t){Vi(t,Ja(t),n)})),Ba=Ji((function(n,t,e,r){Vi(t,Ja(t),n,r)})),Wa=Ji((function(n,t,e,r){Vi(t,Ka(t),n,r)})),Ua=bu(Er),Ma=vi((function(n,t){n=Kn(n);var e=-1,r=t.length,i=r>2?t[2]:u;for(i&&Du(t[0],t[1],i)&&(r=1);++e1),t})),Vi(n,xu(n),e),r&&(e=Fr(e,f|s|h,yu));for(var i=t.length;i--;)Si(e,t[i]);return e})),nl=bu((function(n,t){return null==n?{}:function(n,t){return ci(n,t,(function(t,e){return Ha(n,e)}))}(n,t)}));function tl(n,t){if(null==n)return{};var e=Ht(xu(n),(function(n){return[n]}));return t=ju(t),ci(n,e,(function(n,e){return t(n,e[0])}))}var el=vu(Ka),rl=vu(Ja);function il(n){return null==n?[]:ce(n,Ka(n))}var ul=nu((function(n,t,e){return t=t.toLowerCase(),n+(e?ol(t):t)}));function ol(n){return vl(Ia(n).toLowerCase())}function al(n){return(n=Ia(n))&&n.replace(Gn,pe).replace(st,"")}var ll=nu((function(n,t,e){return n+(e?"-":"")+t.toLowerCase()})),cl=nu((function(n,t,e){return n+(e?" ":"")+t.toLowerCase()})),fl=Xi("toLowerCase"),sl=nu((function(n,t,e){return n+(e?"_":"")+t.toLowerCase()})),hl=nu((function(n,t,e){return n+(e?" ":"")+vl(t)})),pl=nu((function(n,t,e){return n+(e?" ":"")+t.toUpperCase()})),vl=Xi("toUpperCase");function dl(n,t,e){return n=Ia(n),(t=e?u:t)===u?function(n){return dt.test(n)}(n)?function(n){return n.match(pt)||[]}(n):function(n){return n.match(Tn)||[]}(n):n.match(t)||[]}var gl=vi((function(n,t){try{return Dt(n,u,t)}catch(n){return va(n)?n:new qn(n)}})),_l=bu((function(n,t){return Bt(t,(function(t){t=no(t),kr(n,t,Zo(n[t],n))})),n}));function yl(n){return function(){return n}}var ml=ru(),bl=ru(!0);function wl(n){return n}function xl(n){return ni("function"==typeof n?n:Fr(n,f))}var Cl=vi((function(n,t){return function(e){return Kr(e,n,t)}})),kl=vi((function(n,t){return function(e){return Kr(n,e,t)}}));function El(n,t,e){var r=Ka(t),i=Ur(t,r);null!=e||ya(t)&&(i.length||!r.length)||(e=t,t=n,n=this,i=Ur(t,Ka(t)));var u=!(ya(e)&&"chain"in e&&!e.chain),o=da(n);return Bt(i,(function(e){var r=t[e];n[e]=r,o&&(n.prototype[e]=function(){var t=this.__chain__;if(u||t){var e=n(this.__wrapped__);return(e.__actions__=Zi(this.__actions__)).push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,qt([this.value()],arguments))})})),n}function jl(){}var Fl=au(Ht),Al=au(Ut),Sl=au(Kt);function Rl(n){return Pu(n)?re(no(n)):function(n){return function(t){return Mr(t,n)}}(n)}var Ol=cu(),zl=cu(!0);function Nl(){return[]}function Tl(){return!1}var Ll,Il=ou((function(n,t){return n+t}),0),Dl=hu("ceil"),Pl=ou((function(n,t){return n/t}),1),Bl=hu("floor"),Wl=ou((function(n,t){return n*t}),1),Ul=hu("round"),Ml=ou((function(n,t){return n-t}),0);return ur.after=function(n,t){if("function"!=typeof t)throw new Qn(a);return n=za(n),function(){if(--n<1)return t.apply(this,arguments)}},ur.ary=Ho,ur.assign=Da,ur.assignIn=Pa,ur.assignInWith=Ba,ur.assignWith=Wa,ur.at=Ua,ur.before=qo,ur.bind=Zo,ur.bindAll=_l,ur.bindKey=Vo,ur.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return la(n)?n:[n]},ur.chain=Ro,ur.chunk=function(n,t,e){t=(e?Du(n,t,e):t===u)?1:De(za(t),0);var i=null==n?0:n.length;if(!i||t<1)return[];for(var o=0,a=0,l=r(Re(i/t));oi?0:i+e),(r=r===u||r>i?i:za(r))<0&&(r+=i),r=e>r?0:Na(r);e>>0)?(n=Ia(n))&&("string"==typeof t||null!=t&&!Ca(t))&&!(t=Fi(t))&&ge(n)?Bi(xe(n),0,e):n.split(t,e):[]},ur.spread=function(n,t){if("function"!=typeof n)throw new Qn(a);return t=null==t?0:De(za(t),0),vi((function(e){var r=e[t],i=Bi(e,0,t);return r&&qt(i,r),Dt(n,this,i)}))},ur.tail=function(n){var t=null==n?0:n.length;return t?wi(n,1,t):[]},ur.take=function(n,t,e){return n&&n.length?wi(n,0,(t=e||t===u?1:za(t))<0?0:t):[]},ur.takeRight=function(n,t,e){var r=null==n?0:n.length;return r?wi(n,(t=r-(t=e||t===u?1:za(t)))<0?0:t,r):[]},ur.takeRightWhile=function(n,t){return n&&n.length?Oi(n,ju(t,3),!1,!0):[]},ur.takeWhile=function(n,t){return n&&n.length?Oi(n,ju(t,3)):[]},ur.tap=function(n,t){return t(n),n},ur.throttle=function(n,t,e){var r=!0,i=!0;if("function"!=typeof n)throw new Qn(a);return ya(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Ko(n,t,{leading:r,maxWait:t,trailing:i})},ur.thru=Oo,ur.toArray=Ra,ur.toPairs=el,ur.toPairsIn=rl,ur.toPath=function(n){return la(n)?Ht(n,no):ja(n)?[n]:Zi(Xu(Ia(n)))},ur.toPlainObject=La,ur.transform=function(n,t,e){var r=la(n),i=r||ha(n)||Fa(n);if(t=ju(t,4),null==e){var u=n&&n.constructor;e=i?r?new u:[]:ya(n)&&da(u)?or(jt(n)):{}}return(i?Bt:Br)(n,(function(n,r,i){return t(e,n,r,i)})),e},ur.unary=function(n){return Ho(n,1)},ur.union=mo,ur.unionBy=bo,ur.unionWith=wo,ur.uniq=function(n){return n&&n.length?Ai(n):[]},ur.uniqBy=function(n,t){return n&&n.length?Ai(n,ju(t,2)):[]},ur.uniqWith=function(n,t){return t="function"==typeof t?t:u,n&&n.length?Ai(n,u,t):[]},ur.unset=function(n,t){return null==n||Si(n,t)},ur.unzip=xo,ur.unzipWith=Co,ur.update=function(n,t,e){return null==n?n:Ri(n,t,Ii(e))},ur.updateWith=function(n,t,e,r){return r="function"==typeof r?r:u,null==n?n:Ri(n,t,Ii(e),r)},ur.values=il,ur.valuesIn=function(n){return null==n?[]:ce(n,Ja(n))},ur.without=ko,ur.words=dl,ur.wrap=function(n,t){return ta(Ii(t),n)},ur.xor=Eo,ur.xorBy=jo,ur.xorWith=Fo,ur.zip=Ao,ur.zipObject=function(n,t){return Ti(n||[],t||[],br)},ur.zipObjectDeep=function(n,t){return Ti(n||[],t||[],_i)},ur.zipWith=So,ur.entries=el,ur.entriesIn=rl,ur.extend=Pa,ur.extendWith=Ba,El(ur,ur),ur.add=Il,ur.attempt=gl,ur.camelCase=ul,ur.capitalize=ol,ur.ceil=Dl,ur.clamp=function(n,t,e){return e===u&&(e=t,t=u),e!==u&&(e=(e=Ta(e))==e?e:0),t!==u&&(t=(t=Ta(t))==t?t:0),jr(Ta(n),t,e)},ur.clone=function(n){return Fr(n,h)},ur.cloneDeep=function(n){return Fr(n,f|h)},ur.cloneDeepWith=function(n,t){return Fr(n,f|h,t="function"==typeof t?t:u)},ur.cloneWith=function(n,t){return Fr(n,h,t="function"==typeof t?t:u)},ur.conformsTo=function(n,t){return null==t||Ar(n,t,Ka(t))},ur.deburr=al,ur.defaultTo=function(n,t){return null==n||n!=n?t:n},ur.divide=Pl,ur.endsWith=function(n,t,e){n=Ia(n),t=Fi(t);var r=n.length,i=e=e===u?r:jr(za(e),0,r);return(e-=t.length)>=0&&n.slice(e,i)==t},ur.eq=ia,ur.escape=function(n){return(n=Ia(n))&&mn.test(n)?n.replace(_n,ve):n},ur.escapeRegExp=function(n){return(n=Ia(n))&&Fn.test(n)?n.replace(jn,"\\$&"):n},ur.every=function(n,t,e){var r=la(n)?Ut:Nr;return e&&Du(n,t,e)&&(t=u),r(n,ju(t,3))},ur.find=To,ur.findIndex=oo,ur.findKey=function(n,t){return Yt(n,ju(t,3),Br)},ur.findLast=Lo,ur.findLastIndex=ao,ur.findLastKey=function(n,t){return Yt(n,ju(t,3),Wr)},ur.floor=Bl,ur.forEach=Io,ur.forEachRight=Do,ur.forIn=function(n,t){return null==n?n:Dr(n,ju(t,3),Ja)},ur.forInRight=function(n,t){return null==n?n:Pr(n,ju(t,3),Ja)},ur.forOwn=function(n,t){return n&&Br(n,ju(t,3))},ur.forOwnRight=function(n,t){return n&&Wr(n,ju(t,3))},ur.get=$a,ur.gt=ua,ur.gte=oa,ur.has=function(n,t){return null!=n&&Nu(n,t,qr)},ur.hasIn=Ha,ur.head=co,ur.identity=wl,ur.includes=function(n,t,e,r){n=fa(n)?n:il(n),e=e&&!r?za(e):0;var i=n.length;return e<0&&(e=De(i+e,0)),Ea(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&Xt(n,t,e)>-1},ur.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:za(e);return i<0&&(i=De(r+i,0)),Xt(n,t,i)},ur.inRange=function(n,t,e){return t=Oa(t),e===u?(e=t,t=0):e=Oa(e),function(n,t,e){return n>=Pe(t,e)&&n=-A&&n<=A},ur.isSet=ka,ur.isString=Ea,ur.isSymbol=ja,ur.isTypedArray=Fa,ur.isUndefined=function(n){return n===u},ur.isWeakMap=function(n){return ma(n)&&zu(n)==nn},ur.isWeakSet=function(n){return ma(n)&&"[object WeakSet]"==$r(n)},ur.join=function(n,t){return null==n?"":Le.call(n,t)},ur.kebabCase=ll,ur.last=po,ur.lastIndexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=r;return e!==u&&(i=(i=za(e))<0?De(r+i,0):Pe(i,r-1)),t==t?function(n,t,e){for(var r=e+1;r--;)if(n[r]===t)return r;return r}(n,t,i):Qt(n,te,i,!0)},ur.lowerCase=cl,ur.lowerFirst=fl,ur.lt=Aa,ur.lte=Sa,ur.max=function(n){return n&&n.length?Tr(n,wl,Hr):u},ur.maxBy=function(n,t){return n&&n.length?Tr(n,ju(t,2),Hr):u},ur.mean=function(n){return ee(n,wl)},ur.meanBy=function(n,t){return ee(n,ju(t,2))},ur.min=function(n){return n&&n.length?Tr(n,wl,ei):u},ur.minBy=function(n,t){return n&&n.length?Tr(n,ju(t,2),ei):u},ur.stubArray=Nl,ur.stubFalse=Tl,ur.stubObject=function(){return{}},ur.stubString=function(){return""},ur.stubTrue=function(){return!0},ur.multiply=Wl,ur.nth=function(n,t){return n&&n.length?ai(n,za(t)):u},ur.noConflict=function(){return Et._===this&&(Et._=ct),this},ur.noop=jl,ur.now=$o,ur.pad=function(n,t,e){n=Ia(n);var r=(t=za(t))?we(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return lu(Oe(i),e)+n+lu(Re(i),e)},ur.padEnd=function(n,t,e){n=Ia(n);var r=(t=za(t))?we(n):0;return t&&rt){var r=n;n=t,t=r}if(e||n%1||t%1){var i=Ue();return Pe(n+i*(t-n+wt("1e-"+((i+"").length-1))),t)}return hi(n,t)},ur.reduce=function(n,t,e){var r=la(n)?Zt:ue,i=arguments.length<3;return r(n,ju(t,4),e,i,Or)},ur.reduceRight=function(n,t,e){var r=la(n)?Vt:ue,i=arguments.length<3;return r(n,ju(t,4),e,i,zr)},ur.repeat=function(n,t,e){return t=(e?Du(n,t,e):t===u)?1:za(t),pi(Ia(n),t)},ur.replace=function(){var n=arguments,t=Ia(n[0]);return n.length<3?t:t.replace(n[1],n[2])},ur.result=function(n,t,e){var r=-1,i=(t=Di(t,n)).length;for(i||(i=1,n=u);++rA)return[];var e=O,r=Pe(n,O);t=ju(t),n-=O;for(var i=ae(r,t);++e=o)return n;var l=e-we(r);if(l<1)return r;var c=a?Bi(a,0,l).join(""):n.slice(0,l);if(i===u)return c+r;if(a&&(l+=c.length-l),Ca(i)){if(n.slice(l).search(i)){var f,s=c;for(i.global||(i=Jn(i.source,Ia(Dn.exec(i))+"g")),i.lastIndex=0;f=i.exec(s);)var h=f.index;c=c.slice(0,h===u?l:h)}}else if(n.indexOf(Fi(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},ur.unescape=function(n){return(n=Ia(n))&&yn.test(n)?n.replace(gn,Ce):n},ur.uniqueId=function(n){var t=++ut;return Ia(n)+t},ur.upperCase=pl,ur.upperFirst=vl,ur.each=Io,ur.eachRight=Do,ur.first=co,El(ur,(Ll={},Br(ur,(function(n,t){it.call(ur.prototype,t)||(Ll[t]=n)})),Ll),{chain:!1}),ur.VERSION="4.17.15",Bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){ur[n].placeholder=ur})),Bt(["drop","take"],(function(n,t){cr.prototype[n]=function(e){e=e===u?1:De(za(e),0);var r=this.__filtered__&&!t?new cr(this):this.clone();return r.__filtered__?r.__takeCount__=Pe(e,r.__takeCount__):r.__views__.push({size:Pe(e,O),type:n+(r.__dir__<0?"Right":"")}),r},cr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),Bt(["filter","map","takeWhile"],(function(n,t){var e=t+1,r=1==e||3==e;cr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ju(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}})),Bt(["head","last"],(function(n,t){var e="take"+(t?"Right":"");cr.prototype[n]=function(){return this[e](1).value()[0]}})),Bt(["initial","tail"],(function(n,t){var e="drop"+(t?"":"Right");cr.prototype[n]=function(){return this.__filtered__?new cr(this):this[e](1)}})),cr.prototype.compact=function(){return this.filter(wl)},cr.prototype.find=function(n){return this.filter(n).head()},cr.prototype.findLast=function(n){return this.reverse().find(n)},cr.prototype.invokeMap=vi((function(n,t){return"function"==typeof n?new cr(this):this.map((function(e){return Kr(e,n,t)}))})),cr.prototype.reject=function(n){return this.filter(Xo(ju(n)))},cr.prototype.slice=function(n,t){n=za(n);var e=this;return e.__filtered__&&(n>0||t<0)?new cr(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==u&&(e=(t=za(t))<0?e.dropRight(-t):e.take(t-n)),e)},cr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},cr.prototype.toArray=function(){return this.take(O)},Br(cr.prototype,(function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=ur[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(ur.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof cr,c=a[0],f=l||la(t),s=function(n){var t=i.apply(ur,qt([n],a));return r&&h?t[0]:t};f&&e&&"function"==typeof c&&1!=c.length&&(l=f=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,d=l&&!p;if(!o&&f){t=d?t:new cr(this);var g=n.apply(t,a);return g.__actions__.push({func:Oo,args:[s],thisArg:u}),new lr(g,h)}return v&&d?n.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Bt(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Xn[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);ur.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(la(i)?i:[],n)}return this[e]((function(e){return t.apply(la(e)?e:[],n)}))}})),Br(cr.prototype,(function(n,t){var e=ur[t];if(e){var r=e.name+"";it.call(Je,r)||(Je[r]=[]),Je[r].push({name:t,func:e})}})),Je[iu(u,g).name]=[{name:"wrapper",func:u}],cr.prototype.clone=function(){var n=new cr(this.__wrapped__);return n.__actions__=Zi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Zi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Zi(this.__views__),n},cr.prototype.reverse=function(){if(this.__filtered__){var n=new cr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},cr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=la(n),r=t<0,i=e?n.length:0,u=function(n,t,e){for(var r=-1,i=e.length;++r=this.__values__.length;return{done:n,value:n?u:this.__values__[this.__index__++]}},ur.prototype.plant=function(n){for(var t,e=this;e instanceof ar;){var r=eo(e);r.__index__=0,r.__values__=u,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t},ur.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof cr){var t=n;return this.__actions__.length&&(t=new cr(this)),(t=t.reverse()).__actions__.push({func:Oo,args:[yo],thisArg:u}),new lr(t,this.__chain__)}return this.thru(yo)},ur.prototype.toJSON=ur.prototype.valueOf=ur.prototype.value=function(){return zi(this.__wrapped__,this.__actions__)},ur.prototype.first=ur.prototype.head,ie&&(ur.prototype[ie]=function(){return this}),ur}();Et._=ke,(i=function(){return ke}.call(t,e,t,r))===u||(r.exports=i)}).call(this)}).call(this,e(9),e(15)(n))},15:function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},36:function(n,t,e){"use strict";e.r(t);var r={enableConditionalFormatting:{default:!1,label:"Enable Conditional Formatting",order:1,section:"Formatting",type:"boolean"},perColumnRange:{default:!0,hidden:!0,label:"Per column range",order:2,section:"Formatting",type:"boolean"},conditionalFormattingType:{default:"all",display:"select",label:"Formatting Type",order:3,section:"Formatting",type:"string",values:[{All:"all"},{"Subtotals only":"subtotals_only"},{"Non-subtotals only":"non_subtotals_only"}]},includeNullValuesAsZero:{default:!1,label:"Include Null Values as Zero",order:4,section:"Formatting",type:"boolean"},formattingStyle:{default:"low_to_high",display:"select",label:"Format",order:5,section:"Formatting",type:"string",values:[{"From low to high":"low_to_high"},{"From high to low":"high_to_low"}]},formattingPalette:{default:"red_yellow_green",display:"select",label:"Palette",order:6,section:"Formatting",type:"string",values:[{"Red to Yellow to Green":"red_yellow_green"},{"Red to White to Green":"red_white_green"},{"Red to White":"red_white"},{"White to Green":"white_green"},{"Custom...":"custom"}]},lowColor:{display:"color",display_size:"third",label:"Low",order:7,section:"Formatting",type:"string"},midColor:{display:"color",display_size:"third",label:"Middle",order:8,section:"Formatting",type:"string"},highColor:{display:"color",display_size:"third",label:"High",order:9,section:"Formatting",type:"string"},applyTo:{default:"all_numeric_fields",display:"select",label:"Apply to",order:10,section:"Formatting",type:"string",values:[{"All numeric fields":"all_numeric_fields"},{"Select fields...":"select_fields"}]},fontSize:{default:12,display_size:"third",label:"Font size (pt)",order:1,section:"Config",type:"number"},fontFamily:{default:"Open Sans, Helvetica, Arial, sans-serif",display:"select",display_size:"two-thirds",label:"Font Family",order:2,section:"Config",type:"string",values:[{Looker:"Open Sans, Helvetica, Arial, sans-serif"},{Helvetica:'BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif'},{"Times New Roman":'Times, "Times New Roman", serif'}]},rowHeight:{default:25,display_size:"third",label:"Row Height",order:3,section:"Config",type:"number"},truncateColumnNames:{default:!1,label:"Truncate Column Names",order:1,section:"Series",type:"boolean"},showFullFieldName:{default:!1,label:"Show Full Field Name",order:2,section:"Series",type:"boolean"},theme:{default:"ag-theme-looker",display:"select",label:"Table Theme",order:1,section:"Plot",type:"string",values:[{Looker:"ag-theme-looker"},{Balham:"ag-theme-balham"},{Fresh:"ag-theme-fresh"},{Dark:"ag-theme-dark"},{Blue:"ag-theme-blue"},{Bootstrap:"ag-theme-bootstrap"}]},showRowNumbers:{default:!1,label:"Show Row Numbers",order:2,section:"Plot",type:"boolean"},autoSizeEnabled:{default:!0,label:"Enable Auto Sizing",order:3,section:"Plot",type:"boolean"}};function i(n,t){for(var e=0;e1?(e=r.pop().length,n.toFixed(e)):numeral(n.toFixed(0)).format(",")},A=function(n){return!1===Number.isInteger(n)&&n%1!=0},S=function(n,t,e){e&&("min"in e||(e.min=t),"max"in e||(e.max=t),te.max&&(e.max=t),n in e||(e[n]={min:t,max:t}),te[n].max&&(e[n].max=t))},R=function(n,t){var e,r=t["customLabel_".concat(n.name)];return e=void 0!==r&&""!==r?t["customLabel_".concat(n.name)]:t.showFullFieldName?n.label:n.label_short||n.label,t.truncateColumnNames&&e.length>15&&(e="".concat(e.substring(0,12),"...")),e},O=function(n){var t;if(n&&"<"===n[0]){var e=document.createElement("span");e.innerHTML=n,t=e.textContent||e.innerText}else t=n;return numeral(t).value()},z=function(n){var t=Z.config,e={};return function(n,t,e){var r=e.colDef.field,i="align_".concat(r);i in t&&(n["text-align"]=t[i])}(e,t,n),function(n,t,e){var r=e.colDef.field,i="fontFormat_".concat(r);if(i in t&&"none"!==t[i])switch(t[i]){case"bold":n["font-weight"]="800";break;case"italic":n["font-style"]="italic";break;case"underline":n["text-decoration"]="underline";break;case"strikethrough":n["text-decoration"]="line-through"}}(e,t,n),function(n,t){"fontSize"in t&&(n["font-size"]="".concat(t.fontSize,"px"))}(e,t),function(n,t,e){var r=Z.range,i=e.colDef,u=i.field,o=i.measure;if(void 0===t.enableConditionalFormatting||!t.enableConditionalFormatting)return n;if("non_subtotals_only"===t.conditionalFormattingType&&!0===e.node.group)return n;if("subtotals_only"===t.conditionalFormattingType&&!1===e.node.group)return n;if(!r.keys.includes(o)&&!r.keys.includes(u))return n;var a=t.lowColor,l=t.midColor,c=t.highColor,f=[a,l,c];"high_to_low"===t.formattingStyle&&(f=[c,l,a]);var s=chroma.scale(f.filter((function(n){return!!n}))),h=r;t.perColumnRange&&(h=r[u]);var p=O(e.value);if(t.includeNullValuesAsZero||!_.isNull(p)){var v=N(p,h);if(isNaN(v)||_.isNull(v)){if(!t.includeNullValuesAsZero)return;v=0}n["background-color"]=s(v).hex()}}(e,t,n),e},N=function(n,t){return t.max===t.min&&n===t.max?1:(n-t.min)/(t.max-t.min)},T=function(n){var t=Z.config;if(!_.isUndefined(t)&&"includeNullValuesAsZero"in t){var e=numeral(n).value();return _.isNull(e)&&t.includeNullValuesAsZero&&(e=0),e}},L=function(n,t){var e=n[n.length-1],r=_.map(n,(function(r){var i;i=!(n.length<=1||r.name===e.name);var u=n.length>1;return{cellClass:r.category,cellRenderer:y,cellStyle:z,colType:"default",comparator:D,field:r.name,headerClass:r.category,headerName:R(r,t),hide:u,lookup:r.name,resizable:!0,rowGroup:i,sortable:!0,suppressMenu:!0}}));return t.showRowNumbers&&function(n){n.unshift({cellClass:["rowNumber","groupCell"],cellRenderer:m,colType:"row",headerClass:"rowNumberHeader",headerName:"",lockPosition:!0,resizable:!1,rowGroup:!1,sortable:!1,suppressMenu:!0,suppressNavigable:!0,suppressSizeToFit:!0,valueGetter:"node.rowIndex + 1",width:50})}(r),n.length>1&&U.setLastGroup(e.name),r},I=function(n,t){var e;t.forEach((function(t){e={cellClass:"tableCalc",cellStyle:z,cellRenderer:y,colType:"table_calculation",field:t.name,headerClass:"tableCalc",headerName:t.label,lookup:t.name,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0,comparator:D},n.push(e)}))},D=function(n,t){var e=n-t;return _.isNaN(e)&&(e=numeral(n).value()-numeral(t).value()),e},P=function(n,t,e){var r;t.forEach((function(t){var i=t.name;r={cellClass:"measure",cellStyle:z,cellRenderer:y,colType:"measure",comparator:D,field:i,headerClass:"measure",headerName:R(t,e),lookup:i,measure:i,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0},n.push(r)}))},B=function(n,t){var e,r=Z.queryResponse,i=r.fields.measure_like;r.pivots.forEach((function(r){var u=r.key,o=u.split("|FIELD|").join(", "),a={children:[],colType:"pivot",field:u,headerGroupComponent:l,headerName:o,rowGroup:!1,suppressMenu:!0};i.forEach((function(n){var r=n.name,i=n.category;_.isUndefined(i)&&n.is_table_calculation&&(i="tableCalc"),e={cellClass:i,cellStyle:z,cellRenderer:y,colType:"pivotChild",columnGroupShow:"open",comparator:D,field:"".concat(u,"_").concat(r),headerClass:i,headerName:R(n,t),measure:r,pivotKey:u,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0},a.children.push(e)})),n.push(a)})),Z.hasPivot=!0},W=function(n){if(_.isEmpty(n))return null;var t;if(n.links){var e="";_.forEach(n.links,(function(n,t){e+="data-label-".concat(t,"=").concat(JSON.stringify(n.label)," data-url-").concat(t,"=").concat(JSON.stringify(n.url)," data-type-").concat(t,"=").concat(JSON.stringify(n.type)," ")}));var r=_.isUndefined(n.rendered)?n.value:n.rendered;t='").concat(r,"")}else t=n.html?LookerCharts.Utils.htmlForCell(n).replace("\n #ag-grid-vis {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n .drillable-link {\n color: inherit;\n text-decoration: none;\n }\n .drillable-link:hover {\n text-decoration: underline;\n }\n #loading {\n background-color: #FFF;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 1;\n }\n \n ",this.loadingGrid=n.appendChild(document.createElement("div")),this.loadingGrid.id="loading",this.grid=n.appendChild(document.createElement("div")),this.grid.id="ag-grid-vis",this.grid.classList.add("ag-theme-looker"),new agGrid.Grid(this.grid,q)},updateAsync:function(n,t,e,r,i,u){!function(n,t,e){e.theme&&(_.find(document.head.children,(function(n){return n.href&&n.href.includes(e.theme)})).sheet&&n.loadingGrid.parentNode===t&&t.removeChild(n.loadingGrid),q.context.overlay=!1)}(this,t,e),this.clearErrors(),Z.queryResponse=r,Z.vis=this,H(this,e);var o,a,l,c=r.fields,f=c.dimensions,s=c.measures,d=c.pivots,g=c.table_calculations;0!==f.length?!_.isEmpty(d)&&_.isEmpty(s)&&_.isEmpty(g)?this.addError({message:"Add a measure or table calculation to pivot on.",title:"Empty Pivot(s)"}):(o=this.grid.classList,a=e.theme,null!==(l=_.find(o,(function(n){var t=n.match("ag-theme");return null!==t?t.input:null})))&&o.remove(l),o.add(a),Z.range=function(n,t,e){if(!("applyTo"in e))return{};var r=_.map(t.fields.measure_like,(function(n){return n.name}));"select_fields"===e.applyTo&&(r=r.filter((function(n){return Z.selectedFields.includes(n)})));var i={keys:r};return"subtotals_only"===e.conditionalFormattingType?i:(n.forEach((function(n){r.forEach((function(e){_.isEmpty(t.pivots)?function(n,t,e){var r=T(n[t].value);_.isNull(r)||S(t,r,e)}(n,e,i):function(n,t,e){var r=Object.keys(n[t]);_.forEach(r,(function(r){var i=T(n[t][r].value);_.isNull(i)||S("".concat(r,"_").concat(t),i,e)}))}(n,e,i)}))})),i)}(n,r,e),Z.config=e,this.agColumn=new h(e),Z.formattedColumns=this.agColumn.formattedColumns,function(n){if(n.changed){var t=new h(Z.config);q.api.setColumnDefs(t.formattedColumns)}var e=document.getElementsByClassName("ag-cell-value");if(e&&_.some(e,(function(n){return 0===n.childElementCount}))){var r=new h(Z.config);q.api.setColumnDefs(r.formattedColumns)}}(i),this.agData=new p(n,Z.formattedColumns),Z.agData=this.agData,q.api.setRowData(this.agData.formattedData),function(){if(Z.hasPivot){var n=Z.config,t=Z.queryResponse;if("showRowNumbers"in n){var e=_.map(t.fields.pivots,(function(t){return R(t,n)})),r=document.getElementsByClassName("ag-header-group-cell-label"),i=r[r.length-1];_.isUndefined(i)||(i.classList.add("pivotHeaderNameContainer"),_.forEach(e,(function(n){var t=document.createElement("div");t.innerHTML="".concat(n,":"),t.classList.add("pivotHeaderName"),t.style.float="right",i.appendChild(t)})))}}}(),function(){if(Z.config.autoSizeEnabled){q.columnApi.autoSizeAllColumns();var n=q.api.gridPanel;n.eBodyHorizontalScrollContainer.scrollWidth>>1,T=[["ary",x],["bind",d],["bindKey",g],["curry",y],["curryRight",m],["flip",k],["partial",b],["partialRight",w],["rearg",C]],L="[object Arguments]",I="[object Array]",D="[object AsyncFunction]",P="[object Boolean]",B="[object Date]",W="[object DOMException]",U="[object Error]",M="[object Function]",G="[object GeneratorFunction]",$="[object Map]",H="[object Number]",q="[object Null]",Z="[object Object]",V="[object Proxy]",K="[object RegExp]",J="[object Set]",Y="[object String]",Q="[object Symbol]",X="[object Undefined]",nn="[object WeakMap]",tn="[object ArrayBuffer]",en="[object DataView]",rn="[object Float32Array]",un="[object Float64Array]",on="[object Int8Array]",an="[object Int16Array]",ln="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",sn="[object Uint16Array]",hn="[object Uint32Array]",pn=/\b__p \+= '';/g,vn=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gn=/&(?:amp|lt|gt|quot|#39);/g,_n=/[&<>"']/g,yn=RegExp(gn.source),mn=RegExp(_n.source),bn=/<%-([\s\S]+?)%>/g,wn=/<%([\s\S]+?)%>/g,xn=/<%=([\s\S]+?)%>/g,Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kn=/^\w*$/,En=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jn=/[\\^$.*+?()[\]{}|]/g,Fn=RegExp(jn.source),An=/^\s+|\s+$/g,Sn=/^\s+/,Rn=/\s+$/,On=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zn=/\{\n\/\* \[wrapped with (.+)\] \*/,Nn=/,? & /,Tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ln=/\\(\\)?/g,In=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dn=/\w*$/,Pn=/^[-+]0x[0-9a-f]+$/i,Bn=/^0b[01]+$/i,Wn=/^\[object .+?Constructor\]$/,Un=/^0o[0-7]+$/i,Mn=/^(?:0|[1-9]\d*)$/,Gn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$n=/($^)/,Hn=/['\n\r\u2028\u2029\\]/g,qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vn="["+Zn+"]",Kn="["+qn+"]",Jn="\\d+",Yn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Qn="[^\\ud800-\\udfff"+Zn+Jn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Xn="\\ud83c[\\udffb-\\udfff]",nt="[^\\ud800-\\udfff]",tt="(?:\\ud83c[\\udde6-\\uddff]){2}",et="[\\ud800-\\udbff][\\udc00-\\udfff]",rt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",it="(?:"+Yn+"|"+Qn+")",ut="(?:"+rt+"|"+Qn+")",ot="(?:"+Kn+"|"+Xn+")?",at="[\\ufe0e\\ufe0f]?"+ot+"(?:\\u200d(?:"+[nt,tt,et].join("|")+")[\\ufe0e\\ufe0f]?"+ot+")*",lt="(?:"+["[\\u2700-\\u27bf]",tt,et].join("|")+")"+at,ct="(?:"+[nt+Kn+"?",Kn,tt,et,"[\\ud800-\\udfff]"].join("|")+")",ft=RegExp("['’]","g"),st=RegExp(Kn,"g"),ht=RegExp(Xn+"(?="+Xn+")|"+ct+at,"g"),pt=RegExp([rt+"?"+Yn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Vn,rt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Vn,rt+it,"$"].join("|")+")",rt+"?"+it+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jn,lt].join("|"),"g"),vt=RegExp("[\\u200d\\ud800-\\udfff"+qn+"\\ufe0e\\ufe0f]"),dt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_t=-1,yt={};yt[rn]=yt[un]=yt[on]=yt[an]=yt[ln]=yt[cn]=yt[fn]=yt[sn]=yt[hn]=!0,yt[L]=yt[I]=yt[tn]=yt[P]=yt[en]=yt[B]=yt[U]=yt[M]=yt[$]=yt[H]=yt[Z]=yt[K]=yt[J]=yt[Y]=yt[nn]=!1;var mt={};mt[L]=mt[I]=mt[tn]=mt[en]=mt[P]=mt[B]=mt[rn]=mt[un]=mt[on]=mt[an]=mt[ln]=mt[$]=mt[H]=mt[Z]=mt[K]=mt[J]=mt[Y]=mt[Q]=mt[cn]=mt[fn]=mt[sn]=mt[hn]=!0,mt[U]=mt[M]=mt[nn]=!1;var bt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wt=parseFloat,xt=parseInt,Ct="object"==typeof n&&n&&n.Object===Object&&n,kt="object"==typeof self&&self&&self.Object===Object&&self,Et=Ct||kt||Function("return this")(),jt=t&&!t.nodeType&&t,Ft=jt&&"object"==typeof r&&r&&!r.nodeType&&r,At=Ft&&Ft.exports===jt,St=At&&Ct.process,Rt=function(){try{return Ft&&Ft.require&&Ft.require("util").types||St&&St.binding&&St.binding("util")}catch(n){}}(),Ot=Rt&&Rt.isArrayBuffer,zt=Rt&&Rt.isDate,Nt=Rt&&Rt.isMap,Tt=Rt&&Rt.isRegExp,Lt=Rt&&Rt.isSet,It=Rt&&Rt.isTypedArray;function Dt(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function Pt(n,t,e,r){for(var i=-1,u=null==n?0:n.length;++i-1}function $t(n,t,e){for(var r=-1,i=null==n?0:n.length;++r-1;);return e}function he(n,t){for(var e=n.length;e--&&Xt(t,n[e],0)>-1;);return e}var pe=ie({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ve=ie({"&":"&","<":"<",">":">",'"':""","'":"'"});function de(n){return"\\"+bt[n]}function ge(n){return vt.test(n)}function _e(n){var t=-1,e=Array(n.size);return n.forEach((function(n,r){e[++t]=[r,n]})),e}function ye(n,t){return function(e){return n(t(e))}}function me(n,t){for(var e=-1,r=n.length,i=0,u=[];++e",""":'"',"'":"'"}),ke=function n(t){var e,r=(t=null==t?Et:ke.defaults(Et.Object(),t,ke.pick(Et,gt))).Array,i=t.Date,qn=t.Error,Zn=t.Function,Vn=t.Math,Kn=t.Object,Jn=t.RegExp,Yn=t.String,Qn=t.TypeError,Xn=r.prototype,nt=Zn.prototype,tt=Kn.prototype,et=t["__core-js_shared__"],rt=nt.toString,it=tt.hasOwnProperty,ut=0,ot=(e=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",at=tt.toString,lt=rt.call(Kn),ct=Et._,ht=Jn("^"+rt.call(it).replace(jn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=At?t.Buffer:u,bt=t.Symbol,Ct=t.Uint8Array,kt=vt?vt.allocUnsafe:u,jt=ye(Kn.getPrototypeOf,Kn),Ft=Kn.create,St=tt.propertyIsEnumerable,Rt=Xn.splice,Jt=bt?bt.isConcatSpreadable:u,ie=bt?bt.iterator:u,Ee=bt?bt.toStringTag:u,je=function(){try{var n=Su(Kn,"defineProperty");return n({},"",{}),n}catch(n){}}(),Fe=t.clearTimeout!==Et.clearTimeout&&t.clearTimeout,Ae=i&&i.now!==Et.Date.now&&i.now,Se=t.setTimeout!==Et.setTimeout&&t.setTimeout,Re=Vn.ceil,Oe=Vn.floor,ze=Kn.getOwnPropertySymbols,Ne=vt?vt.isBuffer:u,Te=t.isFinite,Le=Xn.join,Ie=ye(Kn.keys,Kn),De=Vn.max,Pe=Vn.min,Be=i.now,We=t.parseInt,Ue=Vn.random,Me=Xn.reverse,Ge=Su(t,"DataView"),$e=Su(t,"Map"),He=Su(t,"Promise"),qe=Su(t,"Set"),Ze=Su(t,"WeakMap"),Ve=Su(Kn,"create"),Ke=Ze&&new Ze,Je={},Ye=to(Ge),Qe=to($e),Xe=to(He),nr=to(qe),tr=to(Ze),er=bt?bt.prototype:u,rr=er?er.valueOf:u,ir=er?er.toString:u;function ur(n){if(ma(n)&&!la(n)&&!(n instanceof cr)){if(n instanceof lr)return n;if(it.call(n,"__wrapped__"))return eo(n)}return new lr(n)}var or=function(){function n(){}return function(t){if(!ya(t))return{};if(Ft)return Ft(t);n.prototype=t;var e=new n;return n.prototype=u,e}}();function ar(){}function lr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=u}function cr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=O,this.__views__=[]}function fr(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Fr(n,t,e,r,i,o){var a,l=t&f,c=t&s,p=t&h;if(e&&(a=i?e(n,r,i,o):e(n)),a!==u)return a;if(!ya(n))return n;var v=la(n);if(v){if(a=function(n){var t=n.length,e=new n.constructor(t);return t&&"string"==typeof n[0]&&it.call(n,"index")&&(e.index=n.index,e.input=n.input),e}(n),!l)return Zi(n,a)}else{var d=zu(n),g=d==M||d==G;if(ha(n))return Ui(n,l);if(d==Z||d==L||g&&!i){if(a=c||g?{}:Tu(n),!l)return c?function(n,t){return Vi(n,Ou(n),t)}(n,function(n,t){return n&&Vi(t,Ja(t),n)}(a,n)):function(n,t){return Vi(n,Ru(n),t)}(n,Cr(a,n))}else{if(!mt[d])return i?n:{};a=function(n,t,e){var r,i,u,o=n.constructor;switch(t){case tn:return Mi(n);case P:case B:return new o(+n);case en:return function(n,t){var e=t?Mi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}(n,e);case rn:case un:case on:case an:case ln:case cn:case fn:case sn:case hn:return Gi(n,e);case $:return new o;case H:case Y:return new o(n);case K:return(u=new(i=n).constructor(i.source,Dn.exec(i))).lastIndex=i.lastIndex,u;case J:return new o;case Q:return r=n,rr?Kn(rr.call(r)):{}}}(n,d,l)}}o||(o=new vr);var _=o.get(n);if(_)return _;o.set(n,a),ka(n)?n.forEach((function(r){a.add(Fr(r,t,e,r,n,o))})):ba(n)&&n.forEach((function(r,i){a.set(i,Fr(r,t,e,i,n,o))}));var y=v?u:(p?c?xu:wu:c?Ja:Ka)(n);return Bt(y||n,(function(r,i){y&&(r=n[i=r]),br(a,i,Fr(r,t,e,i,n,o))})),a}function Ar(n,t,e){var r=e.length;if(null==n)return!r;for(n=Kn(n);r--;){var i=e[r],o=t[i],a=n[i];if(a===u&&!(i in n)||!o(a))return!1}return!0}function Sr(n,t,e){if("function"!=typeof n)throw new Qn(a);return Vu((function(){n.apply(u,e)}),t)}function Rr(n,t,e,r){var i=-1,u=Gt,a=!0,l=n.length,c=[],f=t.length;if(!l)return c;e&&(t=Ht(t,le(e))),r?(u=$t,a=!1):t.length>=o&&(u=fe,a=!1,t=new pr(t));n:for(;++i-1},sr.prototype.set=function(n,t){var e=this.__data__,r=wr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this},hr.prototype.clear=function(){this.size=0,this.__data__={hash:new fr,map:new($e||sr),string:new fr}},hr.prototype.delete=function(n){var t=Fu(this,n).delete(n);return this.size-=t?1:0,t},hr.prototype.get=function(n){return Fu(this,n).get(n)},hr.prototype.has=function(n){return Fu(this,n).has(n)},hr.prototype.set=function(n,t){var e=Fu(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this},pr.prototype.add=pr.prototype.push=function(n){return this.__data__.set(n,l),this},pr.prototype.has=function(n){return this.__data__.has(n)},vr.prototype.clear=function(){this.__data__=new sr,this.size=0},vr.prototype.delete=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},vr.prototype.get=function(n){return this.__data__.get(n)},vr.prototype.has=function(n){return this.__data__.has(n)},vr.prototype.set=function(n,t){var e=this.__data__;if(e instanceof sr){var r=e.__data__;if(!$e||r.length0&&e(a)?t>1?Ir(a,t-1,e,r,i):qt(i,a):r||(i[i.length]=a)}return i}var Dr=Qi(),Pr=Qi(!0);function Br(n,t){return n&&Dr(n,t,Ka)}function Wr(n,t){return n&&Pr(n,t,Ka)}function Ur(n,t){return Mt(t,(function(t){return da(n[t])}))}function Mr(n,t){for(var e=0,r=(t=Di(t,n)).length;null!=n&&et}function qr(n,t){return null!=n&&it.call(n,t)}function Zr(n,t){return null!=n&&t in Kn(n)}function Vr(n,t,e){for(var i=e?$t:Gt,o=n[0].length,a=n.length,l=a,c=r(a),f=1/0,s=[];l--;){var h=n[l];l&&t&&(h=Ht(h,le(t))),f=Pe(h.length,f),c[l]=!e&&(t||o>=120&&h.length>=120)?new pr(l&&h):u}h=n[0];var p=-1,v=c[0];n:for(;++p=a?l:l*("desc"==e[r]?-1:1)}return n.index-t.index}(n,t,e)}))}function ci(n,t,e){for(var r=-1,i=t.length,u={};++r-1;)a!==n&&Rt.call(a,l,1),Rt.call(n,l,1);return n}function si(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==u){var u=i;Iu(i)?Rt.call(n,i,1):Si(n,i)}}return n}function hi(n,t){return n+Oe(Ue()*(t-n+1))}function pi(n,t){var e="";if(!n||t<1||t>A)return e;do{t%2&&(e+=n),(t=Oe(t/2))&&(n+=n)}while(t);return e}function vi(n,t){return Ku($u(n,t,wl),n+"")}function di(n){return gr(il(n))}function gi(n,t){var e=il(n);return Qu(e,jr(t,0,e.length))}function _i(n,t,e,r){if(!ya(n))return n;for(var i=-1,o=(t=Di(t,n)).length,a=o-1,l=n;null!=l&&++iu?0:u+t),(e=e>u?u:e)<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=r(u);++i>>1,o=n[u];null!==o&&!ja(o)&&(e?o<=t:o=o){var f=t?null:pu(n);if(f)return be(f);a=!1,i=fe,c=new pr}else c=t?[]:l;n:for(;++r=r?n:wi(n,t,e)}var Wi=Fe||function(n){return Et.clearTimeout(n)};function Ui(n,t){if(t)return n.slice();var e=n.length,r=kt?kt(e):new n.constructor(e);return n.copy(r),r}function Mi(n){var t=new n.constructor(n.byteLength);return new Ct(t).set(new Ct(n)),t}function Gi(n,t){var e=t?Mi(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function $i(n,t){if(n!==t){var e=n!==u,r=null===n,i=n==n,o=ja(n),a=t!==u,l=null===t,c=t==t,f=ja(t);if(!l&&!f&&!o&&n>t||o&&a&&c&&!l&&!f||r&&a&&c||!e&&c||!i)return 1;if(!r&&!o&&!f&&n1?e[i-1]:u,a=i>2?e[2]:u;for(o=n.length>3&&"function"==typeof o?(i--,o):u,a&&Du(e[0],e[1],a)&&(o=i<3?u:o,i=1),t=Kn(t);++r-1?i[o?t[a]:a]:u}}function ru(n){return bu((function(t){var e=t.length,r=e,i=lr.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new Qn(a);if(i&&!l&&"wrapper"==ku(o))var l=new lr([],!0)}for(r=l?r:e;++r1&&y.reverse(),h&&fl))return!1;var f=o.get(n);if(f&&o.get(t))return f==t;var s=-1,h=!0,d=e&v?new pr:u;for(o.set(n,t),o.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(On,"{\n/* [wrapped with "+t+"] */\n")}(r,function(n,t){return Bt(T,(function(e){var r="_."+e[0];t&e[1]&&!Gt(n,r)&&n.push(r)})),n.sort()}(function(n){var t=n.match(zn);return t?t[1].split(Nn):[]}(r),e)))}function Yu(n){var t=0,e=0;return function(){var r=Be(),i=j-(r-e);if(e=r,i>0){if(++t>=E)return arguments[0]}else t=0;return n.apply(u,arguments)}}function Qu(n,t){var e=-1,r=n.length,i=r-1;for(t=t===u?r:t;++e1?n[t-1]:u;return Co(n,e="function"==typeof e?(n.pop(),e):u)}));function Ro(n){var t=ur(n);return t.__chain__=!0,t}function Oo(n,t){return t(n)}var zo=bu((function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(t){return Er(t,n)};return!(t>1||this.__actions__.length)&&r instanceof cr&&Iu(e)?((r=r.slice(e,+e+(t?1:0))).__actions__.push({func:Oo,args:[i],thisArg:u}),new lr(r,this.__chain__).thru((function(n){return t&&!n.length&&n.push(u),n}))):this.thru(i)})),No=Ki((function(n,t,e){it.call(n,e)?++n[e]:kr(n,e,1)})),To=eu(oo),Lo=eu(ao);function Io(n,t){return(la(n)?Bt:Or)(n,ju(t,3))}function Do(n,t){return(la(n)?Wt:zr)(n,ju(t,3))}var Po=Ki((function(n,t,e){it.call(n,e)?n[e].push(t):kr(n,e,[t])})),Bo=vi((function(n,t,e){var i=-1,u="function"==typeof t,o=fa(n)?r(n.length):[];return Or(n,(function(n){o[++i]=u?Dt(t,n,e):Kr(n,t,e)})),o})),Wo=Ki((function(n,t,e){kr(n,e,t)}));function Uo(n,t){return(la(n)?Ht:ri)(n,ju(t,3))}var Mo=Ki((function(n,t,e){n[e?0:1].push(t)}),(function(){return[[],[]]})),Go=vi((function(n,t){if(null==n)return[];var e=t.length;return e>1&&Du(n,t[0],t[1])?t=[]:e>2&&Du(t[0],t[1],t[2])&&(t=[t[0]]),li(n,Ir(t,1),[])})),$o=Ae||function(){return Et.Date.now()};function Ho(n,t,e){return t=e?u:t,t=n&&null==t?n.length:t,du(n,x,u,u,u,u,t)}function qo(n,t){var e;if("function"!=typeof t)throw new Qn(a);return n=za(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=u),e}}var Zo=vi((function(n,t,e){var r=d;if(e.length){var i=me(e,Eu(Zo));r|=b}return du(n,r,t,e,i)})),Vo=vi((function(n,t,e){var r=d|g;if(e.length){var i=me(e,Eu(Vo));r|=b}return du(t,r,n,e,i)}));function Ko(n,t,e){var r,i,o,l,c,f,s=0,h=!1,p=!1,v=!0;if("function"!=typeof n)throw new Qn(a);function d(t){var e=r,o=i;return r=i=u,s=t,l=n.apply(o,e)}function g(n){var e=n-f;return f===u||e>=t||e<0||p&&n-s>=o}function _(){var n=$o();if(g(n))return y(n);c=Vu(_,function(n){var e=t-(n-f);return p?Pe(e,o-(n-s)):e}(n))}function y(n){return c=u,v&&r?d(n):(r=i=u,l)}function m(){var n=$o(),e=g(n);if(r=arguments,i=this,f=n,e){if(c===u)return function(n){return s=n,c=Vu(_,t),h?d(n):l}(f);if(p)return Wi(c),c=Vu(_,t),d(f)}return c===u&&(c=Vu(_,t)),l}return t=Ta(t)||0,ya(e)&&(h=!!e.leading,o=(p="maxWait"in e)?De(Ta(e.maxWait)||0,t):o,v="trailing"in e?!!e.trailing:v),m.cancel=function(){c!==u&&Wi(c),s=0,r=f=i=c=u},m.flush=function(){return c===u?l:y($o())},m}var Jo=vi((function(n,t){return Sr(n,1,t)})),Yo=vi((function(n,t,e){return Sr(n,Ta(t)||0,e)}));function Qo(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new Qn(a);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],u=e.cache;if(u.has(i))return u.get(i);var o=n.apply(this,r);return e.cache=u.set(i,o)||u,o};return e.cache=new(Qo.Cache||hr),e}function Xo(n){if("function"!=typeof n)throw new Qn(a);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Qo.Cache=hr;var na=Pi((function(n,t){var e=(t=1==t.length&&la(t[0])?Ht(t[0],le(ju())):Ht(Ir(t,1),le(ju()))).length;return vi((function(r){for(var i=-1,u=Pe(r.length,e);++i=t})),aa=Jr(function(){return arguments}())?Jr:function(n){return ma(n)&&it.call(n,"callee")&&!St.call(n,"callee")},la=r.isArray,ca=Ot?le(Ot):function(n){return ma(n)&&$r(n)==tn};function fa(n){return null!=n&&_a(n.length)&&!da(n)}function sa(n){return ma(n)&&fa(n)}var ha=Ne||Tl,pa=zt?le(zt):function(n){return ma(n)&&$r(n)==B};function va(n){if(!ma(n))return!1;var t=$r(n);return t==U||t==W||"string"==typeof n.message&&"string"==typeof n.name&&!xa(n)}function da(n){if(!ya(n))return!1;var t=$r(n);return t==M||t==G||t==D||t==V}function ga(n){return"number"==typeof n&&n==za(n)}function _a(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=A}function ya(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function ma(n){return null!=n&&"object"==typeof n}var ba=Nt?le(Nt):function(n){return ma(n)&&zu(n)==$};function wa(n){return"number"==typeof n||ma(n)&&$r(n)==H}function xa(n){if(!ma(n)||$r(n)!=Z)return!1;var t=jt(n);if(null===t)return!0;var e=it.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&rt.call(e)==lt}var Ca=Tt?le(Tt):function(n){return ma(n)&&$r(n)==K},ka=Lt?le(Lt):function(n){return ma(n)&&zu(n)==J};function Ea(n){return"string"==typeof n||!la(n)&&ma(n)&&$r(n)==Y}function ja(n){return"symbol"==typeof n||ma(n)&&$r(n)==Q}var Fa=It?le(It):function(n){return ma(n)&&_a(n.length)&&!!yt[$r(n)]},Aa=fu(ei),Sa=fu((function(n,t){return n<=t}));function Ra(n){if(!n)return[];if(fa(n))return Ea(n)?xe(n):Zi(n);if(ie&&n[ie])return function(n){for(var t,e=[];!(t=n.next()).done;)e.push(t.value);return e}(n[ie]());var t=zu(n);return(t==$?_e:t==J?be:il)(n)}function Oa(n){return n?(n=Ta(n))===F||n===-F?(n<0?-1:1)*S:n==n?n:0:0===n?n:0}function za(n){var t=Oa(n),e=t%1;return t==t?e?t-e:t:0}function Na(n){return n?jr(za(n),0,O):0}function Ta(n){if("number"==typeof n)return n;if(ja(n))return R;if(ya(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ya(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(An,"");var e=Bn.test(n);return e||Un.test(n)?xt(n.slice(2),e?2:8):Pn.test(n)?R:+n}function La(n){return Vi(n,Ja(n))}function Ia(n){return null==n?"":Fi(n)}var Da=Ji((function(n,t){if(Uu(t)||fa(t))Vi(t,Ka(t),n);else for(var e in t)it.call(t,e)&&br(n,e,t[e])})),Pa=Ji((function(n,t){Vi(t,Ja(t),n)})),Ba=Ji((function(n,t,e,r){Vi(t,Ja(t),n,r)})),Wa=Ji((function(n,t,e,r){Vi(t,Ka(t),n,r)})),Ua=bu(Er),Ma=vi((function(n,t){n=Kn(n);var e=-1,r=t.length,i=r>2?t[2]:u;for(i&&Du(t[0],t[1],i)&&(r=1);++e1),t})),Vi(n,xu(n),e),r&&(e=Fr(e,f|s|h,yu));for(var i=t.length;i--;)Si(e,t[i]);return e})),nl=bu((function(n,t){return null==n?{}:function(n,t){return ci(n,t,(function(t,e){return Ha(n,e)}))}(n,t)}));function tl(n,t){if(null==n)return{};var e=Ht(xu(n),(function(n){return[n]}));return t=ju(t),ci(n,e,(function(n,e){return t(n,e[0])}))}var el=vu(Ka),rl=vu(Ja);function il(n){return null==n?[]:ce(n,Ka(n))}var ul=nu((function(n,t,e){return t=t.toLowerCase(),n+(e?ol(t):t)}));function ol(n){return vl(Ia(n).toLowerCase())}function al(n){return(n=Ia(n))&&n.replace(Gn,pe).replace(st,"")}var ll=nu((function(n,t,e){return n+(e?"-":"")+t.toLowerCase()})),cl=nu((function(n,t,e){return n+(e?" ":"")+t.toLowerCase()})),fl=Xi("toLowerCase"),sl=nu((function(n,t,e){return n+(e?"_":"")+t.toLowerCase()})),hl=nu((function(n,t,e){return n+(e?" ":"")+vl(t)})),pl=nu((function(n,t,e){return n+(e?" ":"")+t.toUpperCase()})),vl=Xi("toUpperCase");function dl(n,t,e){return n=Ia(n),(t=e?u:t)===u?function(n){return dt.test(n)}(n)?function(n){return n.match(pt)||[]}(n):function(n){return n.match(Tn)||[]}(n):n.match(t)||[]}var gl=vi((function(n,t){try{return Dt(n,u,t)}catch(n){return va(n)?n:new qn(n)}})),_l=bu((function(n,t){return Bt(t,(function(t){t=no(t),kr(n,t,Zo(n[t],n))})),n}));function yl(n){return function(){return n}}var ml=ru(),bl=ru(!0);function wl(n){return n}function xl(n){return ni("function"==typeof n?n:Fr(n,f))}var Cl=vi((function(n,t){return function(e){return Kr(e,n,t)}})),kl=vi((function(n,t){return function(e){return Kr(n,e,t)}}));function El(n,t,e){var r=Ka(t),i=Ur(t,r);null!=e||ya(t)&&(i.length||!r.length)||(e=t,t=n,n=this,i=Ur(t,Ka(t)));var u=!(ya(e)&&"chain"in e&&!e.chain),o=da(n);return Bt(i,(function(e){var r=t[e];n[e]=r,o&&(n.prototype[e]=function(){var t=this.__chain__;if(u||t){var e=n(this.__wrapped__);return(e.__actions__=Zi(this.__actions__)).push({func:r,args:arguments,thisArg:n}),e.__chain__=t,e}return r.apply(n,qt([this.value()],arguments))})})),n}function jl(){}var Fl=au(Ht),Al=au(Ut),Sl=au(Kt);function Rl(n){return Pu(n)?re(no(n)):function(n){return function(t){return Mr(t,n)}}(n)}var Ol=cu(),zl=cu(!0);function Nl(){return[]}function Tl(){return!1}var Ll,Il=ou((function(n,t){return n+t}),0),Dl=hu("ceil"),Pl=ou((function(n,t){return n/t}),1),Bl=hu("floor"),Wl=ou((function(n,t){return n*t}),1),Ul=hu("round"),Ml=ou((function(n,t){return n-t}),0);return ur.after=function(n,t){if("function"!=typeof t)throw new Qn(a);return n=za(n),function(){if(--n<1)return t.apply(this,arguments)}},ur.ary=Ho,ur.assign=Da,ur.assignIn=Pa,ur.assignInWith=Ba,ur.assignWith=Wa,ur.at=Ua,ur.before=qo,ur.bind=Zo,ur.bindAll=_l,ur.bindKey=Vo,ur.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return la(n)?n:[n]},ur.chain=Ro,ur.chunk=function(n,t,e){t=(e?Du(n,t,e):t===u)?1:De(za(t),0);var i=null==n?0:n.length;if(!i||t<1)return[];for(var o=0,a=0,l=r(Re(i/t));oi?0:i+e),(r=r===u||r>i?i:za(r))<0&&(r+=i),r=e>r?0:Na(r);e>>0)?(n=Ia(n))&&("string"==typeof t||null!=t&&!Ca(t))&&!(t=Fi(t))&&ge(n)?Bi(xe(n),0,e):n.split(t,e):[]},ur.spread=function(n,t){if("function"!=typeof n)throw new Qn(a);return t=null==t?0:De(za(t),0),vi((function(e){var r=e[t],i=Bi(e,0,t);return r&&qt(i,r),Dt(n,this,i)}))},ur.tail=function(n){var t=null==n?0:n.length;return t?wi(n,1,t):[]},ur.take=function(n,t,e){return n&&n.length?wi(n,0,(t=e||t===u?1:za(t))<0?0:t):[]},ur.takeRight=function(n,t,e){var r=null==n?0:n.length;return r?wi(n,(t=r-(t=e||t===u?1:za(t)))<0?0:t,r):[]},ur.takeRightWhile=function(n,t){return n&&n.length?Oi(n,ju(t,3),!1,!0):[]},ur.takeWhile=function(n,t){return n&&n.length?Oi(n,ju(t,3)):[]},ur.tap=function(n,t){return t(n),n},ur.throttle=function(n,t,e){var r=!0,i=!0;if("function"!=typeof n)throw new Qn(a);return ya(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Ko(n,t,{leading:r,maxWait:t,trailing:i})},ur.thru=Oo,ur.toArray=Ra,ur.toPairs=el,ur.toPairsIn=rl,ur.toPath=function(n){return la(n)?Ht(n,no):ja(n)?[n]:Zi(Xu(Ia(n)))},ur.toPlainObject=La,ur.transform=function(n,t,e){var r=la(n),i=r||ha(n)||Fa(n);if(t=ju(t,4),null==e){var u=n&&n.constructor;e=i?r?new u:[]:ya(n)&&da(u)?or(jt(n)):{}}return(i?Bt:Br)(n,(function(n,r,i){return t(e,n,r,i)})),e},ur.unary=function(n){return Ho(n,1)},ur.union=mo,ur.unionBy=bo,ur.unionWith=wo,ur.uniq=function(n){return n&&n.length?Ai(n):[]},ur.uniqBy=function(n,t){return n&&n.length?Ai(n,ju(t,2)):[]},ur.uniqWith=function(n,t){return t="function"==typeof t?t:u,n&&n.length?Ai(n,u,t):[]},ur.unset=function(n,t){return null==n||Si(n,t)},ur.unzip=xo,ur.unzipWith=Co,ur.update=function(n,t,e){return null==n?n:Ri(n,t,Ii(e))},ur.updateWith=function(n,t,e,r){return r="function"==typeof r?r:u,null==n?n:Ri(n,t,Ii(e),r)},ur.values=il,ur.valuesIn=function(n){return null==n?[]:ce(n,Ja(n))},ur.without=ko,ur.words=dl,ur.wrap=function(n,t){return ta(Ii(t),n)},ur.xor=Eo,ur.xorBy=jo,ur.xorWith=Fo,ur.zip=Ao,ur.zipObject=function(n,t){return Ti(n||[],t||[],br)},ur.zipObjectDeep=function(n,t){return Ti(n||[],t||[],_i)},ur.zipWith=So,ur.entries=el,ur.entriesIn=rl,ur.extend=Pa,ur.extendWith=Ba,El(ur,ur),ur.add=Il,ur.attempt=gl,ur.camelCase=ul,ur.capitalize=ol,ur.ceil=Dl,ur.clamp=function(n,t,e){return e===u&&(e=t,t=u),e!==u&&(e=(e=Ta(e))==e?e:0),t!==u&&(t=(t=Ta(t))==t?t:0),jr(Ta(n),t,e)},ur.clone=function(n){return Fr(n,h)},ur.cloneDeep=function(n){return Fr(n,f|h)},ur.cloneDeepWith=function(n,t){return Fr(n,f|h,t="function"==typeof t?t:u)},ur.cloneWith=function(n,t){return Fr(n,h,t="function"==typeof t?t:u)},ur.conformsTo=function(n,t){return null==t||Ar(n,t,Ka(t))},ur.deburr=al,ur.defaultTo=function(n,t){return null==n||n!=n?t:n},ur.divide=Pl,ur.endsWith=function(n,t,e){n=Ia(n),t=Fi(t);var r=n.length,i=e=e===u?r:jr(za(e),0,r);return(e-=t.length)>=0&&n.slice(e,i)==t},ur.eq=ia,ur.escape=function(n){return(n=Ia(n))&&mn.test(n)?n.replace(_n,ve):n},ur.escapeRegExp=function(n){return(n=Ia(n))&&Fn.test(n)?n.replace(jn,"\\$&"):n},ur.every=function(n,t,e){var r=la(n)?Ut:Nr;return e&&Du(n,t,e)&&(t=u),r(n,ju(t,3))},ur.find=To,ur.findIndex=oo,ur.findKey=function(n,t){return Yt(n,ju(t,3),Br)},ur.findLast=Lo,ur.findLastIndex=ao,ur.findLastKey=function(n,t){return Yt(n,ju(t,3),Wr)},ur.floor=Bl,ur.forEach=Io,ur.forEachRight=Do,ur.forIn=function(n,t){return null==n?n:Dr(n,ju(t,3),Ja)},ur.forInRight=function(n,t){return null==n?n:Pr(n,ju(t,3),Ja)},ur.forOwn=function(n,t){return n&&Br(n,ju(t,3))},ur.forOwnRight=function(n,t){return n&&Wr(n,ju(t,3))},ur.get=$a,ur.gt=ua,ur.gte=oa,ur.has=function(n,t){return null!=n&&Nu(n,t,qr)},ur.hasIn=Ha,ur.head=co,ur.identity=wl,ur.includes=function(n,t,e,r){n=fa(n)?n:il(n),e=e&&!r?za(e):0;var i=n.length;return e<0&&(e=De(i+e,0)),Ea(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&Xt(n,t,e)>-1},ur.indexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=null==e?0:za(e);return i<0&&(i=De(r+i,0)),Xt(n,t,i)},ur.inRange=function(n,t,e){return t=Oa(t),e===u?(e=t,t=0):e=Oa(e),function(n,t,e){return n>=Pe(t,e)&&n=-A&&n<=A},ur.isSet=ka,ur.isString=Ea,ur.isSymbol=ja,ur.isTypedArray=Fa,ur.isUndefined=function(n){return n===u},ur.isWeakMap=function(n){return ma(n)&&zu(n)==nn},ur.isWeakSet=function(n){return ma(n)&&"[object WeakSet]"==$r(n)},ur.join=function(n,t){return null==n?"":Le.call(n,t)},ur.kebabCase=ll,ur.last=po,ur.lastIndexOf=function(n,t,e){var r=null==n?0:n.length;if(!r)return-1;var i=r;return e!==u&&(i=(i=za(e))<0?De(r+i,0):Pe(i,r-1)),t==t?function(n,t,e){for(var r=e+1;r--;)if(n[r]===t)return r;return r}(n,t,i):Qt(n,te,i,!0)},ur.lowerCase=cl,ur.lowerFirst=fl,ur.lt=Aa,ur.lte=Sa,ur.max=function(n){return n&&n.length?Tr(n,wl,Hr):u},ur.maxBy=function(n,t){return n&&n.length?Tr(n,ju(t,2),Hr):u},ur.mean=function(n){return ee(n,wl)},ur.meanBy=function(n,t){return ee(n,ju(t,2))},ur.min=function(n){return n&&n.length?Tr(n,wl,ei):u},ur.minBy=function(n,t){return n&&n.length?Tr(n,ju(t,2),ei):u},ur.stubArray=Nl,ur.stubFalse=Tl,ur.stubObject=function(){return{}},ur.stubString=function(){return""},ur.stubTrue=function(){return!0},ur.multiply=Wl,ur.nth=function(n,t){return n&&n.length?ai(n,za(t)):u},ur.noConflict=function(){return Et._===this&&(Et._=ct),this},ur.noop=jl,ur.now=$o,ur.pad=function(n,t,e){n=Ia(n);var r=(t=za(t))?we(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return lu(Oe(i),e)+n+lu(Re(i),e)},ur.padEnd=function(n,t,e){n=Ia(n);var r=(t=za(t))?we(n):0;return t&&rt){var r=n;n=t,t=r}if(e||n%1||t%1){var i=Ue();return Pe(n+i*(t-n+wt("1e-"+((i+"").length-1))),t)}return hi(n,t)},ur.reduce=function(n,t,e){var r=la(n)?Zt:ue,i=arguments.length<3;return r(n,ju(t,4),e,i,Or)},ur.reduceRight=function(n,t,e){var r=la(n)?Vt:ue,i=arguments.length<3;return r(n,ju(t,4),e,i,zr)},ur.repeat=function(n,t,e){return t=(e?Du(n,t,e):t===u)?1:za(t),pi(Ia(n),t)},ur.replace=function(){var n=arguments,t=Ia(n[0]);return n.length<3?t:t.replace(n[1],n[2])},ur.result=function(n,t,e){var r=-1,i=(t=Di(t,n)).length;for(i||(i=1,n=u);++rA)return[];var e=O,r=Pe(n,O);t=ju(t),n-=O;for(var i=ae(r,t);++e=o)return n;var l=e-we(r);if(l<1)return r;var c=a?Bi(a,0,l).join(""):n.slice(0,l);if(i===u)return c+r;if(a&&(l+=c.length-l),Ca(i)){if(n.slice(l).search(i)){var f,s=c;for(i.global||(i=Jn(i.source,Ia(Dn.exec(i))+"g")),i.lastIndex=0;f=i.exec(s);)var h=f.index;c=c.slice(0,h===u?l:h)}}else if(n.indexOf(Fi(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},ur.unescape=function(n){return(n=Ia(n))&&yn.test(n)?n.replace(gn,Ce):n},ur.uniqueId=function(n){var t=++ut;return Ia(n)+t},ur.upperCase=pl,ur.upperFirst=vl,ur.each=Io,ur.eachRight=Do,ur.first=co,El(ur,(Ll={},Br(ur,(function(n,t){it.call(ur.prototype,t)||(Ll[t]=n)})),Ll),{chain:!1}),ur.VERSION="4.17.15",Bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){ur[n].placeholder=ur})),Bt(["drop","take"],(function(n,t){cr.prototype[n]=function(e){e=e===u?1:De(za(e),0);var r=this.__filtered__&&!t?new cr(this):this.clone();return r.__filtered__?r.__takeCount__=Pe(e,r.__takeCount__):r.__views__.push({size:Pe(e,O),type:n+(r.__dir__<0?"Right":"")}),r},cr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),Bt(["filter","map","takeWhile"],(function(n,t){var e=t+1,r=1==e||3==e;cr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ju(n,3),type:e}),t.__filtered__=t.__filtered__||r,t}})),Bt(["head","last"],(function(n,t){var e="take"+(t?"Right":"");cr.prototype[n]=function(){return this[e](1).value()[0]}})),Bt(["initial","tail"],(function(n,t){var e="drop"+(t?"":"Right");cr.prototype[n]=function(){return this.__filtered__?new cr(this):this[e](1)}})),cr.prototype.compact=function(){return this.filter(wl)},cr.prototype.find=function(n){return this.filter(n).head()},cr.prototype.findLast=function(n){return this.reverse().find(n)},cr.prototype.invokeMap=vi((function(n,t){return"function"==typeof n?new cr(this):this.map((function(e){return Kr(e,n,t)}))})),cr.prototype.reject=function(n){return this.filter(Xo(ju(n)))},cr.prototype.slice=function(n,t){n=za(n);var e=this;return e.__filtered__&&(n>0||t<0)?new cr(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==u&&(e=(t=za(t))<0?e.dropRight(-t):e.take(t-n)),e)},cr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},cr.prototype.toArray=function(){return this.take(O)},Br(cr.prototype,(function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=ur[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(ur.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof cr,c=a[0],f=l||la(t),s=function(n){var t=i.apply(ur,qt([n],a));return r&&h?t[0]:t};f&&e&&"function"==typeof c&&1!=c.length&&(l=f=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,d=l&&!p;if(!o&&f){t=d?t:new cr(this);var g=n.apply(t,a);return g.__actions__.push({func:Oo,args:[s],thisArg:u}),new lr(g,h)}return v&&d?n.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Bt(["pop","push","shift","sort","splice","unshift"],(function(n){var t=Xn[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);ur.prototype[n]=function(){var n=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(la(i)?i:[],n)}return this[e]((function(e){return t.apply(la(e)?e:[],n)}))}})),Br(cr.prototype,(function(n,t){var e=ur[t];if(e){var r=e.name+"";it.call(Je,r)||(Je[r]=[]),Je[r].push({name:t,func:e})}})),Je[iu(u,g).name]=[{name:"wrapper",func:u}],cr.prototype.clone=function(){var n=new cr(this.__wrapped__);return n.__actions__=Zi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Zi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Zi(this.__views__),n},cr.prototype.reverse=function(){if(this.__filtered__){var n=new cr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},cr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,e=la(n),r=t<0,i=e?n.length:0,u=function(n,t,e){for(var r=-1,i=e.length;++r=this.__values__.length;return{done:n,value:n?u:this.__values__[this.__index__++]}},ur.prototype.plant=function(n){for(var t,e=this;e instanceof ar;){var r=eo(e);r.__index__=0,r.__values__=u,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t},ur.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof cr){var t=n;return this.__actions__.length&&(t=new cr(this)),(t=t.reverse()).__actions__.push({func:Oo,args:[yo],thisArg:u}),new lr(t,this.__chain__)}return this.thru(yo)},ur.prototype.toJSON=ur.prototype.valueOf=ur.prototype.value=function(){return zi(this.__wrapped__,this.__actions__)},ur.prototype.first=ur.prototype.head,ie&&(ur.prototype[ie]=function(){return this}),ur}();Et._=ke,(i=function(){return ke}.call(t,e,t,r))===u||(r.exports=i)}).call(this)}).call(this,e(9),e(25)(n))},25:function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},52:function(n,t,e){"use strict";e.r(t);var r={enableConditionalFormatting:{default:!1,label:"Enable Conditional Formatting",order:1,section:"Formatting",type:"boolean"},perColumnRange:{default:!0,hidden:!0,label:"Per column range",order:2,section:"Formatting",type:"boolean"},conditionalFormattingType:{default:"all",display:"select",label:"Formatting Type",order:3,section:"Formatting",type:"string",values:[{All:"all"},{"Subtotals only":"subtotals_only"},{"Non-subtotals only":"non_subtotals_only"}]},includeNullValuesAsZero:{default:!1,label:"Include Null Values as Zero",order:4,section:"Formatting",type:"boolean"},formattingStyle:{default:"low_to_high",display:"select",label:"Format",order:5,section:"Formatting",type:"string",values:[{"From low to high":"low_to_high"},{"From high to low":"high_to_low"}]},formattingPalette:{default:"red_yellow_green",display:"select",label:"Palette",order:6,section:"Formatting",type:"string",values:[{"Red to Yellow to Green":"red_yellow_green"},{"Red to White to Green":"red_white_green"},{"Red to White":"red_white"},{"White to Green":"white_green"},{"Custom...":"custom"}]},lowColor:{display:"color",display_size:"third",label:"Low",order:7,section:"Formatting",type:"string"},midColor:{display:"color",display_size:"third",label:"Middle",order:8,section:"Formatting",type:"string"},highColor:{display:"color",display_size:"third",label:"High",order:9,section:"Formatting",type:"string"},applyTo:{default:"all_numeric_fields",display:"select",label:"Apply to",order:10,section:"Formatting",type:"string",values:[{"All numeric fields":"all_numeric_fields"},{"Select fields...":"select_fields"}]},fontSize:{default:12,display_size:"third",label:"Font size (pt)",order:1,section:"Config",type:"number"},fontFamily:{default:"Open Sans, Helvetica, Arial, sans-serif",display:"select",display_size:"two-thirds",label:"Font Family",order:2,section:"Config",type:"string",values:[{Looker:"Open Sans, Helvetica, Arial, sans-serif"},{Helvetica:'BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif'},{"Times New Roman":'Times, "Times New Roman", serif'}]},rowHeight:{default:25,display_size:"third",label:"Row Height",order:3,section:"Config",type:"number"},truncateColumnNames:{default:!1,label:"Truncate Column Names",order:1,section:"Series",type:"boolean"},showFullFieldName:{default:!1,label:"Show Full Field Name",order:2,section:"Series",type:"boolean"},theme:{default:"ag-theme-looker",display:"select",label:"Table Theme",order:1,section:"Plot",type:"string",values:[{Looker:"ag-theme-looker"},{Balham:"ag-theme-balham"},{Fresh:"ag-theme-fresh"},{Dark:"ag-theme-dark"},{Blue:"ag-theme-blue"},{Bootstrap:"ag-theme-bootstrap"}]},showRowNumbers:{default:!1,label:"Show Row Numbers",order:2,section:"Plot",type:"boolean"},autoSizeEnabled:{default:!0,label:"Enable Auto Sizing",order:3,section:"Plot",type:"boolean"}};function i(n,t){for(var e=0;e1?(e=r.pop().length,n.toFixed(e)):numeral(n.toFixed(0)).format(",")},A=function(n){return!1===Number.isInteger(n)&&n%1!=0},S=function(n,t,e){e&&("min"in e||(e.min=t),"max"in e||(e.max=t),te.max&&(e.max=t),n in e||(e[n]={min:t,max:t}),te[n].max&&(e[n].max=t))},R=function(n,t){var e,r=t["customLabel_".concat(n.name)];return e=void 0!==r&&""!==r?t["customLabel_".concat(n.name)]:t.showFullFieldName?n.label:n.label_short||n.label,t.truncateColumnNames&&e.length>15&&(e="".concat(e.substring(0,12),"...")),e},O=function(n){var t;if(n&&"<"===n[0]){var e=document.createElement("span");e.innerHTML=n,t=e.textContent||e.innerText}else t=n;return numeral(t).value()},z=function(n){var t=Z.config,e={};return function(n,t,e){var r=e.colDef.field,i="align_".concat(r);i in t&&(n["text-align"]=t[i])}(e,t,n),function(n,t,e){var r=e.colDef.field,i="fontFormat_".concat(r);if(i in t&&"none"!==t[i])switch(t[i]){case"bold":n["font-weight"]="800";break;case"italic":n["font-style"]="italic";break;case"underline":n["text-decoration"]="underline";break;case"strikethrough":n["text-decoration"]="line-through"}}(e,t,n),function(n,t){"fontSize"in t&&(n["font-size"]="".concat(t.fontSize,"px"))}(e,t),function(n,t,e){var r=Z.range,i=e.colDef,u=i.field,o=i.measure;if(void 0===t.enableConditionalFormatting||!t.enableConditionalFormatting)return n;if("non_subtotals_only"===t.conditionalFormattingType&&!0===e.node.group)return n;if("subtotals_only"===t.conditionalFormattingType&&!1===e.node.group)return n;if(!r.keys.includes(o)&&!r.keys.includes(u))return n;var a=t.lowColor,l=t.midColor,c=t.highColor,f=[a,l,c];"high_to_low"===t.formattingStyle&&(f=[c,l,a]);var s=chroma.scale(f.filter((function(n){return!!n}))),h=r;t.perColumnRange&&(h=r[u]);var p=O(e.value);if(t.includeNullValuesAsZero||!_.isNull(p)){var v=N(p,h);if(isNaN(v)||_.isNull(v)){if(!t.includeNullValuesAsZero)return;v=0}n["background-color"]=s(v).hex()}}(e,t,n),e},N=function(n,t){return t.max===t.min&&n===t.max?1:(n-t.min)/(t.max-t.min)},T=function(n){var t=Z.config;if(!_.isUndefined(t)&&"includeNullValuesAsZero"in t){var e=numeral(n).value();return _.isNull(e)&&t.includeNullValuesAsZero&&(e=0),e}},L=function(n,t){var e=n[n.length-1],r=_.map(n,(function(r){var i;i=!(n.length<=1||r.name===e.name);var u=n.length>1;return{cellClass:r.category,cellRenderer:y,cellStyle:z,colType:"default",comparator:D,field:r.name,headerClass:r.category,headerName:R(r,t),hide:u,lookup:r.name,resizable:!0,rowGroup:i,sortable:!0,suppressMenu:!0}}));return t.showRowNumbers&&function(n){n.unshift({cellClass:["rowNumber","groupCell"],cellRenderer:m,colType:"row",headerClass:"rowNumberHeader",headerName:"",lockPosition:!0,resizable:!1,rowGroup:!1,sortable:!1,suppressMenu:!0,suppressNavigable:!0,suppressSizeToFit:!0,valueGetter:"node.rowIndex + 1",width:50})}(r),n.length>1&&U.setLastGroup(e.name),r},I=function(n,t){var e;t.forEach((function(t){e={cellClass:"tableCalc",cellStyle:z,cellRenderer:y,colType:"table_calculation",field:t.name,headerClass:"tableCalc",headerName:t.label,lookup:t.name,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0,comparator:D},n.push(e)}))},D=function(n,t){var e=n-t;return _.isNaN(e)&&(e=numeral(n).value()-numeral(t).value()),e},P=function(n,t,e){var r;t.forEach((function(t){var i=t.name;r={cellClass:"measure",cellStyle:z,cellRenderer:y,colType:"measure",comparator:D,field:i,headerClass:"measure",headerName:R(t,e),lookup:i,measure:i,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0},n.push(r)}))},B=function(n,t){var e,r=Z.queryResponse,i=r.fields.measure_like;r.pivots.forEach((function(r){var u=r.key,o=u.split("|FIELD|").join(", "),a={children:[],colType:"pivot",field:u,headerGroupComponent:l,headerName:o,rowGroup:!1,suppressMenu:!0};i.forEach((function(n){var r=n.name,i=n.category;_.isUndefined(i)&&n.is_table_calculation&&(i="tableCalc"),e={cellClass:i,cellStyle:z,cellRenderer:y,colType:"pivotChild",columnGroupShow:"open",comparator:D,field:"".concat(u,"_").concat(r),headerClass:i,headerName:R(n,t),measure:r,pivotKey:u,resizable:!0,rowGroup:!1,sortable:!0,suppressMenu:!0},a.children.push(e)})),n.push(a)})),Z.hasPivot=!0},W=function(n){if(_.isEmpty(n))return null;var t;if(n.links){var e="";_.forEach(n.links,(function(n,t){e+="data-label-".concat(t,"=").concat(JSON.stringify(n.label)," data-url-").concat(t,"=").concat(JSON.stringify(n.url)," data-type-").concat(t,"=").concat(JSON.stringify(n.type)," ")}));var r=_.isUndefined(n.rendered)?n.value:n.rendered;t='").concat(r,"")}else t=n.html?LookerCharts.Utils.htmlForCell(n).replace("\n #ag-grid-vis {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n .drillable-link {\n color: inherit;\n text-decoration: none;\n }\n .drillable-link:hover {\n text-decoration: underline;\n }\n #loading {\n background-color: #FFF;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 1;\n }\n \n ",this.loadingGrid=n.appendChild(document.createElement("div")),this.loadingGrid.id="loading",this.grid=n.appendChild(document.createElement("div")),this.grid.id="ag-grid-vis",this.grid.classList.add("ag-theme-looker"),new agGrid.Grid(this.grid,q)},updateAsync:function(n,t,e,r,i,u){!function(n,t,e){e.theme&&(_.find(document.head.children,(function(n){return n.href&&n.href.includes(e.theme)})).sheet&&n.loadingGrid.parentNode===t&&t.removeChild(n.loadingGrid),q.context.overlay=!1)}(this,t,e),this.clearErrors(),Z.queryResponse=r,Z.vis=this,H(this,e);var o,a,l,c=r.fields,f=c.dimensions,s=c.measures,d=c.pivots,g=c.table_calculations;0!==f.length?!_.isEmpty(d)&&_.isEmpty(s)&&_.isEmpty(g)?this.addError({message:"Add a measure or table calculation to pivot on.",title:"Empty Pivot(s)"}):(o=this.grid.classList,a=e.theme,null!==(l=_.find(o,(function(n){var t=n.match("ag-theme");return null!==t?t.input:null})))&&o.remove(l),o.add(a),Z.range=function(n,t,e){if(!("applyTo"in e))return{};var r=_.map(t.fields.measure_like,(function(n){return n.name}));"select_fields"===e.applyTo&&(r=r.filter((function(n){return Z.selectedFields.includes(n)})));var i={keys:r};return"subtotals_only"===e.conditionalFormattingType?i:(n.forEach((function(n){r.forEach((function(e){_.isEmpty(t.pivots)?function(n,t,e){var r=T(n[t].value);_.isNull(r)||S(t,r,e)}(n,e,i):function(n,t,e){var r=Object.keys(n[t]);_.forEach(r,(function(r){var i=T(n[t][r].value);_.isNull(i)||S("".concat(r,"_").concat(t),i,e)}))}(n,e,i)}))})),i)}(n,r,e),Z.config=e,this.agColumn=new h(e),Z.formattedColumns=this.agColumn.formattedColumns,function(n){if(n.changed){var t=new h(Z.config);q.api.setColumnDefs(t.formattedColumns)}var e=document.getElementsByClassName("ag-cell-value");if(e&&_.some(e,(function(n){return 0===n.childElementCount}))){var r=new h(Z.config);q.api.setColumnDefs(r.formattedColumns)}}(i),this.agData=new p(n,Z.formattedColumns),Z.agData=this.agData,q.api.setRowData(this.agData.formattedData),function(){if(Z.hasPivot){var n=Z.config,t=Z.queryResponse;if("showRowNumbers"in n){var e=_.map(t.fields.pivots,(function(t){return R(t,n)})),r=document.getElementsByClassName("ag-header-group-cell-label"),i=r[r.length-1];_.isUndefined(i)||(i.classList.add("pivotHeaderNameContainer"),_.forEach(e,(function(n){var t=document.createElement("div");t.innerHTML="".concat(n,":"),t.classList.add("pivotHeaderName"),t.style.float="right",i.appendChild(t)})))}}}(),function(){if(Z.config.autoSizeEnabled){q.columnApi.autoSizeAllColumns();var n=q.api.gridPanel;n.eBodyHorizontalScrollContainer.scrollWidthn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=T?5:u>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=k?2:1)}function E(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=k&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},P=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},R=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},L=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},j=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},I=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,g=d*d+p*p,y=Math.sqrt(v),_=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-g)/(2*y*_)))/2),x=m/_,b=m/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),g=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r"+i+" → "+o+": "+u+"

\n

"+o+" → "+i+": "+r(e.value)+"

\n "}};looker.plugins.visualizations.add(o)},3:function(t,n,e){"use strict";e.r(n);var r=e(0),i=Array.prototype.slice,u=function(t){return t},o=1,a=2,c=3,f=4,s=1e-6;function l(t){return"translate("+(t+.5)+",0)"}function h(t){return"translate(0,"+(t+.5)+")"}function d(){return!this.__axis}function p(t,n){var e=[],r=null,p=null,v=6,g=6,y=3,_=t===o||t===f?-1:1,m=t===f||t===a?"x":"y",x=t===o||t===c?l:h;function b(i){var l=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,h=null==p?n.tickFormat?n.tickFormat.apply(n,e):u:p,b=Math.max(v,0)+y,w=n.range(),M=+w[0]+.5,T=+w[w.length-1]+.5,k=(n.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}:function(t){return function(n){return+t(n)}})(n.copy()),S=i.selection?i.selection():i,N=S.selectAll(".domain").data([null]),E=S.selectAll(".tick").data(l,n).order(),A=E.exit(),C=E.enter().append("g").attr("class","tick"),z=E.select("line"),P=E.select("text");N=N.merge(N.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),E=E.merge(C),z=z.merge(C.append("line").attr("stroke","#000").attr(m+"2",_*v)),P=P.merge(C.append("text").attr("fill","#000").attr(m,_*b).attr("dy",t===o?"0em":t===c?"0.71em":"0.32em")),i!==S&&(N=N.transition(i),E=E.transition(i),z=z.transition(i),P=P.transition(i),A=A.transition(i).attr("opacity",s).attr("transform",(function(t){return isFinite(t=k(t))?x(t):this.getAttribute("transform")})),C.attr("opacity",s).attr("transform",(function(t){var n=this.parentNode.__axis;return x(n&&isFinite(n=n(t))?n:k(t))}))),A.remove(),N.attr("d",t===f||t==a?"M"+_*g+","+M+"H0.5V"+T+"H"+_*g:"M"+M+","+_*g+"V0.5H"+T+"V"+_*g),E.attr("opacity",1).attr("transform",(function(t){return x(k(t))})),z.attr(m+"2",_*v),P.attr(m,_*b).text(h),S.filter(d).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===f?"end":"middle"),S.each((function(){this.__axis=k}))}return b.scale=function(t){return arguments.length?(n=t,b):n},b.ticks=function(){return e=i.call(arguments),b},b.tickArguments=function(t){return arguments.length?(e=null==t?[]:i.call(t),b):e.slice()},b.tickValues=function(t){return arguments.length?(r=null==t?null:i.call(t),b):r&&r.slice()},b.tickFormat=function(t){return arguments.length?(p=t,b):p},b.tickSize=function(t){return arguments.length?(v=g=+t,b):v},b.tickSizeInner=function(t){return arguments.length?(v=+t,b):v},b.tickSizeOuter=function(t){return arguments.length?(g=+t,b):g},b.tickPadding=function(t){return arguments.length?(y=+t,b):y},b}function v(t){return p(o,t)}function g(t){return p(a,t)}function y(t){return p(c,t)}function _(t){return p(f,t)}var m={value:function(){}};function x(){for(var t,n=0,e=arguments.length,r={};n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),S.hasOwnProperty(n)?{space:S[n],local:t}:t},E=function(t){var n=N(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===k&&n.documentElement.namespaceURI===k?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var P=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var R=document.documentElement;if(!R.matches){var L=R.webkitMatchesSelector||R.msMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector;O=function(t){return function(){return L.call(this,t)}}}}var q=O,D=function(t){return new Array(t.length)};function U(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}U.prototype={constructor:U,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var j="$";function I(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=y[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){gt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),Et(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Zt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof It||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof It||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ut(It,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ut(un,rn,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Ut(cn,an,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,_n=gn*gn*gn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Nn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=kn(t.r),r=kn(t.g),i=kn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>_n?Math.pow(t,1/3):t/yn+vn}function Mn(t){return t>gn?t*t*t:yn*(t-vn)}function Tn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Nn)return new Nn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Nn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Nn(t,n,e,null==r?1:r)}function Nn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ut(bn,xn,jt(It,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=dn*Mn(t),new un(Tn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),Tn(-.969266*n+1.8760108*t+.041556*e),Tn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ut(Nn,Sn,jt(It,{brighter:function(t){return new Nn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Nn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var En=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Pn=1.78277*Cn,On=1.78277*En- -.14861*An;function Rn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Ln)return new Ln(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Pn*e)/(On+zn-Pn),u=r-i,o=(Cn*(e-i)-En*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Ln(c<0?c+360:c,a,i,t.opacity)}(t):new Ln(t,n,e,null==r?1:r)}function Ln(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Ut(Ln,Rn,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(En*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var Dn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):jn(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?In(t,e):jn(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):jn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Ee}function Ye(){Oe=(Pe=Le.now())+Re,Ee=Ae=0;try{Fe()}finally{Ee=0,function(){for(var t,n,e=Me,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Me=n);Te=t,He(r)}(),Oe=0}}function Be(){var t=Le.now(),n=t-Pe;n>ze&&(Re-=n,Pe=t)}function He(t){Ee||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Le.now()-Re)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Pe=Le.now(),Ce=setInterval(Be,ze)),Ee=1,qe(Ye)))}je.prototype=Ie.prototype={constructor:je,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?De():+e)+(null==n?0:+n),this._next||Te===this||(Te?Te._next=this:Me=this,Te=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new je;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new je,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?De():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=T("start","end","interrupt"),We=[],Ze=0,Ge=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ge)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fZe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=N(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=N(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uGe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={name:"x",handles:["e","w"].map(wi),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vi={name:"y",handles:["n","s"].map(wi),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},_i={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},xi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function wi(t){return{type:t}}function Mi(){return!ut.button}function Ti(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ni(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ei(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(gi)};function zi(t){var n,e=Ti,r=Mi,i=T(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=ki(this).extent;gt(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=gt(this),n=ki(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n){return t.__brush.emitter||new f(t,n)}function f(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,L.attr("cursor",yi.selection),U());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(g=y=C=!1,U());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,U());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),L.attr("cursor",yi[m]),U());break;default:return}fi()}),!0).on("mousemove.brush",D,!0).on("mouseup.brush",j,!0);At(ut.view)}ci(),or(_),a.call(_),O.start()}function D(){var t=Mt(_);!C||g||y||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?y=!0:g=!0),P=t,v=!0,fi(),U()}function U(){var t;switch(d=P[0]-z[0],p=P[1]-z[1],x){case li:case si:b&&(d=Math.max(S-e,Math.min(E-f,d)),i=e+d,s=f+d),w&&(p=Math.max(N-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(S-e,Math.min(E-e,d)),i=e+d,s=f):b>0&&(d=Math.max(S-f,Math.min(E-f,d)),i=e,s=f+d),w<0?(p=Math.max(N-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(N-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(S,Math.min(E,e-d*b)),s=Math.max(S,Math.min(E,f+d*b))),w&&(o=Math.max(N,Math.min(A,u-p*w)),h=Math.max(N,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var gu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function yu(t){return t[0]}function _u(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?yu:n,null==e?_u:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function Tu(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=bu(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new gu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=_*_+m*m;if(x=(a=(p+g)/2))?p=a:g=a,(s=o>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Lu=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Iu=function(t){return(t=ju(Math.abs(t)))?t[1]:NaN},Fu=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Fu(100*t,n)},r:Fu,s:function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+ju(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Vu,$u,Wu,Zu=function(t){return t},Gu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Zu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Zu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===f?i[1]:/[%p]/.test(p)?a:"",y=Yu[p],_=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=g;if("c"===p)x=y(t)+x,t="";else{var b=(t=+t)<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Gu[8+zu/3]:"")+x+(b&&"("===c?")":""),_)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3))),i=Math.pow(10,-r),u=Gu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Iu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3)))-Iu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Iu(n)-Iu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,go=Math.atan2,yo=Math.cos,_o=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},To=Math.sqrt,ko=Math.tan;function So(t){return t>1?0:t<-1?ao:Math.acos(t)}function No(t){return t>1?co:t<-1?-co:Math.asin(t)}function Eo(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Po.hasOwnProperty(t.type)&&Po[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=yo(n=(n*=ho)/2+fo),o=wo(n),a=jo*o,c=Uo*u+a*yo(i),f=a*r*wo(i);Fo.add(go(f,c)),Do=t,Uo=u,jo=o}var Wo=function(t){return Yo.reset(),Io(t,Bo),2*Yo};function Zo(t){return[go(t[1],t[0]),No(t[2])]}function Go(t){var n=t[0],e=t[1],r=yo(e);return[r*yo(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=To(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=_a,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,Fo<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Go([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Zo(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ga(){da.point=va}function ya(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function _a(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){_a(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Fa={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Fa.lineStart=Wa,Fa.lineEnd=Za},polygonEnd:function(){Fa.lineStart=Ha,Fa.lineEnd=$a}};function Ya(t,n){t*=ho;var e=yo(n*=ho);Ba(e*yo(t),e*wo(t),wo(n))}function Ba(t,n,e){Sa+=(t-Sa)/++Ta,Na+=(n-Na)/Ta,Ea+=(e-Ea)/Ta}function Ha(){Fa.point=Xa}function Xa(t,n){t*=ho;var e=yo(n*=ho);Da=e*yo(t),Ua=e*wo(t),ja=wo(n),Fa.point=Va,Ba(Da,Ua,ja)}function Va(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=go(To((o=Ua*u-ja*i)*o+(o=ja*r-Da*u)*o+(o=Da*i-Ua*r)*o),Da*r+Ua*i+ja*u);ka+=o,Aa+=o*(Da+(Da=r)),Ca+=o*(Ua+(Ua=i)),za+=o*(ja+(ja=u)),Ba(Da,Ua,ja)}function $a(){Fa.point=Ya}function Wa(){Fa.point=Ga}function Za(){Qa(La,qa),Fa.point=Ya}function Ga(t,n){La=t,qa=n,t*=ho,n*=ho,Fa.point=Qa;var e=yo(n);Da=e*yo(t),Ua=e*wo(t),ja=wo(n),Ba(Da,Ua,ja)}function Qa(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=Ua*u-ja*i,a=ja*r-Da*u,c=Da*i-Ua*r,f=To(o*o+a*a+c*c),s=No(f),l=f&&-s/f;Pa+=l*o,Oa+=l*a,Ra+=l*c,ka+=s,Aa+=s*(Da+(Da=r)),Ca+=s*(Ua+(Ua=i)),za+=s*(ja+(ja=u)),Ba(Da,Ua,ja)}var Ja=function(t){Ta=ka=Sa=Na=Ea=Aa=Ca=za=Pa=Oa=Ra=0,Io(t,Fa);var n=Pa,e=Oa,r=Ra,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,kaao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=yo(t),r=wo(t),i=yo(n),u=wo(n);function o(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[go(c*i-s*u,a*e-f*r),No(s*i+c*u)]}return o.invert=function(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[go(c*i+f*u,a*e+s*r),No(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=yo(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=M*w,k=T>ao,S=p*x;if(vc.add(go(S*M*wo(T),v*b+S*yo(T))),u+=k?w+M*so:w,k^h>=e^_>=e){var N=Jo(Go(l),Go(y));na(N);var E=Jo(i,N);na(E);var A=(k^w>=0?-1:1)*No(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=k^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(_c))}return d}};function _c(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=yc((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=yo(r))*wo(e)-wo(r)*(i=yo(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return yo(t)*yo(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Go(t),Go(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),g=p*p-v*(Qo(h,h)-1);if(!(g<0)){var y=To(g),_=ta(d,(-p-y)/v);if(Ko(_,h),_=Zo(_),!r)return _;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^_[1]<(po(_[0]-x)ao^(x<=_[0]&&_[0]<=b)){var S=ta(d,(-p+y)/v);return Ko(S,h),[_,Zo(S)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return yc(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),g=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,Tc=-Mc;function kc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,g,y,_,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=T,s&&s.push(l=[]),_=!0,y=!1,v=g=NaN},lineEnd:function(){f&&(T(h,d),p&&y&&b.rejoin(),f.push(b.result())),w.point=M,y&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function T(r,o){var a=u(r,o);if(s&&l.push([r,o]),_)h=r,d=o,p=a,_=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&y)x.point(r,o);else{var c=[v=Math.max(Tc,Math.min(Mc,v)),g=Math.max(Tc,Math.min(Mc,g))],f=[r=Math.max(Tc,Math.min(Mc,r)),o=Math.max(Tc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(y||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,g=o,y=a}return w}}var Sc,Nc,Ec,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=kc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Pc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Pc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Sc=t*=ho,Nc=wo(n*=ho),Ec=yo(n),zc.point=Rc}function Rc(t,n){t*=ho;var e=wo(n*=ho),r=yo(n),i=po(t-Sc),u=yo(i),o=r*wo(i),a=Ec*e-Nc*r*u,c=Nc*e+Ec*r*u;Cc.add(go(To(o*o+a*a),c)),Sc=t,Nc=e,Ec=r}var Lc=function(t){return Cc.reset(),Io(t,zc),+Cc},qc=[null,null],Dc={type:"LineString",coordinates:qc},Uc=function(t,n){return qc[0]=t,qc[1]=n,Lc(Dc)},jc={Feature:function(t,n){return Fc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(_o(o/p)*p,u,p).filter((function(t){return po(t%g)>oo})).map(s))}return _.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),_.precision(y)):[[i,c],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),_.precision(y)):[[n,o],[t,u]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],_):[v,g]},_.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.precision=function(r){return arguments.length?(y=+r,f=Wc(o,u,90),s=Zc(n,t,y),l=Wc(c,a,90),h=Zc(i,e,y),_):y},_.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Gc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=yo(r),a=wo(r),c=yo(u),f=wo(u),s=o*yo(e),l=o*wo(e),h=c*yo(i),d=c*wo(i),p=2*No(To(Eo(u-r)+o*c*Eo(i-e))),v=wo(p),g=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[go(i,r)*lo,go(u,To(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return g.distance=p,g},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,gf=af,yf=1/0,_f=yf,mf=-yf,xf=mf,bf={point:function(t,n){tmf&&(mf=t),n<_f&&(_f=n),n>xf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[yf,_f],[mf,xf]];return mf=xf=-(_f=yf=1/0),t}},wf=0,Mf=0,Tf=0,kf=0,Sf=0,Nf=0,Ef=0,Af=0,Cf=0,zf={point:Pf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=Df,zf.lineEnd=Uf},polygonEnd:function(){zf.point=Pf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Ef/Cf,Af/Cf]:Nf?[kf/Nf,Sf/Nf]:Tf?[wf/Tf,Mf/Tf]:[NaN,NaN];return wf=Mf=Tf=kf=Sf=Nf=Ef=Af=Cf=0,t}};function Pf(t,n){wf+=t,Mf+=n,++Tf}function Of(){zf.point=Rf}function Rf(t,n){zf.point=Lf,Pf(pf=t,vf=n)}function Lf(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Sf+=i*(vf+n)/2,Nf+=i,Pf(pf=t,vf=n)}function qf(){zf.point=Pf}function Df(){zf.point=jf}function Uf(){If(hf,df)}function jf(t,n){zf.point=If,Pf(hf=pf=t,df=vf=n)}function If(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Sf+=i*(vf+n)/2,Nf+=i,Ef+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Pf(pf=t,vf=n)}var Ff=zf;function Yf(t){this._context=t}Yf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Zf={point:Ao,lineStart:function(){Zf.point=Gf},lineEnd:function(){Bf&&Qf(Hf,Xf),Zf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Gf(t,n){Zf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(To(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Zf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ts(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Io(t,e(r))),r.result()}return u.area=function(t){return Io(t,e(gf)),gf.result()},u.measure=function(t){return Io(t,e(Jf)),Jf.result()},u.bounds=function(t){return Io(t,e(bf)),bf.result()},u.centroid=function(t){return Io(t,e(Ff)),Ff.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Io(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,point:function(t,n){this.stream.point(t,n)},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()}};var ss=16,ls=yo(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,m=y*y+_*_;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=To(x*x+b*b+w*w),T=No(w/=M),k=po(po(w)-1)n||po((y*A+_*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,E()):[g*lo,y*lo,_*lo]},k.precision=function(t){return arguments.length?(T=hs(N,M=t*t),A()):To(M)},k.fitExtent=function(t,n){return os(k,t,n)},k.fitSize=function(t,n){return as(k,t,n)},k.fitWidth=function(t,n){return cs(k,t,n)},k.fitHeight=function(t,n){return fs(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&S,E()}}function gs(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function ys(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*yo(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*To(t*t+e*e);return[go(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ps=function(){return gs(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Rs=function(){return ps(Os).scale(152.63)};function Ls(t,n){var e=yo(t),r=t===n?wo(t):(e-yo(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Fs).scale(175.295)};function Bs(t,n){return[yo(n)*wo(t),wo(n)]}Bs.invert=ws(No);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=yo(n),r=1+yo(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(ko((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function Zs(t,n){return t.parent===n.parent?1:2}function Gs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Zs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Gs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function Ks(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function gl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function yl(t){this._=t,this.next=null,this.previous=null}function _l(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;pl(e,n,r=t[2]),n=new yl(n),e=new yl(e),r=new yl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function Dl(t,n){return t.parent===n.parent?1:2}function Ul(t){var n=t.children;return n?n[0]:t.t}function jl(t){var n=t.children;return n?n[n.length-1]:t.t}function Il(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Fl(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=Dl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=jl(a),u=Ul(u),a&&u;)c=Ul(c),(o=jl(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Il(Fl(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!jl(o)&&(o.t=a,o.m+=l-s),u&&!Ul(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=a;break}p=d}y.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(El),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var _=(i*y+o*g)/r;t(n,d,g,i,u,_,c),t(d,e,y,_,u,o,c)}else{var m=(u*y+c*g)/r;t(n,d,g,i,u,o,m),t(d,e,y,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Gl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},hh(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,hh(this),this}};var ph=function(){return Math.random()},vh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(ph),gh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),_h=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=h:c.onreadystatechange=function(t){c.readyState>3&&h(t)},c.onprogress=function(t){o.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,h){return c.open(n,t,!0,f,s),null==r||a.has("accept")||a.set("accept",r+",*/*"),c.setRequestHeader&&a.each((function(t,n){c.setRequestHeader(n,t)})),null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),l>0&&(c.timeout=l),null==h&&"function"==typeof i&&(h=i,i=null),null!=h&&1===h.length&&(h=function(t){return function(n,e){t(null==n?e:null)}}(h)),null!=h&&e.on("error",h).on("load",(function(t){h(null,t)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Th=wh("application/json",(function(t){return JSON.parse(t.responseText)})),kh=wh("text/plain",(function(t){return t.responseText})),Sh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Nh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Eh=Nh("text/csv",ru),Ah=Nh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Ph=Ch.slice,Oh={name:"implicit"};function Rh(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Ph.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Fh,r=i=null,s}function s(n){return(r||(r=e(u,o,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,a)))(+n)}return s.invert=function(t){return(i||(i=e(o,u,Ih,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},s.domain=function(t){return arguments.length?(u=zh.call(t,Uh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Ph.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Ph.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Ih,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Uh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Zh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;g.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Ph.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Ph.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),_d=yd,md=yd.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Td=Md,kd=Md.range,Sd=ld((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/864e5}),(function(t){return t.getDate()-1})),Nd=Sd,Ed=Sd.range;function Ad(t){return ld((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/gd}))}var Cd=Ad(0),zd=Ad(1),Pd=Ad(2),Od=Ad(3),Rd=Ad(4),Ld=Ad(5),qd=Ad(6),Dd=Cd.range,Ud=zd.range,jd=Pd.range,Id=Od.range,Fd=Rd.range,Yd=Ld.range,Bd=qd.range,Hd=ld((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Xd=Hd,Vd=Hd.range,$d=ld((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Wd=$d,Zd=$d.range,Gd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/gd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,gp=fp.range,yp=sp.range,_p=lp.range,mp=hp.range,xp=ld((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),bp=xp,wp=xp.range,Mp=ld((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Tp=Mp,kp=Mp.range;function Sp(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Np(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ep(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Fp(i),s=Yp(i),l=Fp(u),h=Yp(u),d=Fp(o),p=Yp(o),v=Fp(a),g=Yp(a),y=Fp(c),_=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:gv,u:yv,U:_v,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:Tv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:kv,e:kv,f:Cv,H:Sv,I:Nv,j:Ev,L:Av,m:zv,M:Pv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Rv,U:Lv,V:qv,w:Dv,W:Uv,x:null,X:null,y:jv,Y:Iv,Z:Fv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Zp,Y:Wp,Z:Gp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Np(Ep(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Ep(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Nd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Np(Ep(u.y)).getUTCDay():n(Ep(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Np(u)):n(u)}}function T(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Lp?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Sp);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Np);return n.toString=function(){return t},n}}}var Cp,zp,Pp,Op,Rp,Lp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Dp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function jp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Gp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=Dp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return jp(t.getDate(),n,2)}function fv(t,n){return jp(t.getHours(),n,2)}function sv(t,n){return jp(t.getHours()%12||12,n,2)}function lv(t,n){return jp(1+Nd.count(Wd(t),t),n,3)}function hv(t,n){return jp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return jp(t.getMonth()+1,n,2)}function vv(t,n){return jp(t.getMinutes(),n,2)}function gv(t,n){return jp(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function _v(t,n){return jp(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Rd(t):Rd.ceil(t),jp(Rd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return jp(zd.count(Wd(t),t),n,2)}function wv(t,n){return jp(t.getFullYear()%100,n,2)}function Mv(t,n){return jp(t.getFullYear()%1e4,n,4)}function Tv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+jp(n/60|0,"0",2)+jp(n%60,"0",2)}function kv(t,n){return jp(t.getUTCDate(),n,2)}function Sv(t,n){return jp(t.getUTCHours(),n,2)}function Nv(t,n){return jp(t.getUTCHours()%12||12,n,2)}function Ev(t,n){return jp(1+rp.count(Tp(t),t),n,3)}function Av(t,n){return jp(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return jp(t.getUTCMonth()+1,n,2)}function Pv(t,n){return jp(t.getUTCMinutes(),n,2)}function Ov(t,n){return jp(t.getUTCSeconds(),n,2)}function Rv(t){var n=t.getUTCDay();return 0===n?7:n}function Lv(t,n){return jp(op.count(Tp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),jp(sp.count(Tp(t),t)+(4===Tp(t).getUTCDay()),n,2)}function Dv(t){return t.getUTCDay()}function Uv(t,n){return jp(ap.count(Tp(t),t),n,2)}function jv(t,n){return jp(t.getUTCFullYear()%100,n,2)}function Iv(t,n){return jp(t.getUTCFullYear()%1e4,n,4)}function Fv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Pp=Cp.parse,Op=Cp.utcFormat,Rp=Cp.utcParse,Cp}Xv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Rp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Zv=60*Wv,Gv=60*Zv,Qv=24*Gv,Jv=7*Qv,Kv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,u,o,a,c,f){var s=Hh(Ih,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Zv],[o,5,5*Zv],[o,15,15*Zv],[o,30,30*Zv],[u,1,Gv],[u,3,3*Gv],[u,6,6*Gv],[u,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(og("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),_g=gg(og("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mg=gg(og("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(og("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function bg(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return bg(t).domain([n,e]).clamp(r)},Vh(i)}var wg=e(5),Mg=function(t){return function(){return t}};function Tg(t){return t[0]}function kg(t){return t[1]}function Sg(){this._=null}function Ng(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Eg(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Ag(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Cg(t){for(;t.L;)t=t.L;return t}Sg.prototype={constructor:Sg,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Cg(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Eg(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Eg(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,u=t.L,o=t.R;if(e=u?o?Cg(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Eg(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Ag(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Eg(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ag(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Eg(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ag(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zg=Sg;function Pg(t,n,e,r){var i=[null,null],u=ty.push(i)-1;return i.left=t,i.right=n,e&&Rg(i,t,n,e),r&&Rg(i,n,t,r),Jg[t.index].halfedges.push(u),Jg[n.index].halfedges.push(u),i}function Og(t,n,e){var r=[n,e];return r.left=t,r}function Rg(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Lg(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qg(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-ey)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Fg.pop()||new function(){Ng(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+o,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,m=Kg._;m;)if(y.yny)a=a.L;else{if(!((i=u-Gg(a,o))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var c=Xg(t);if(Qg.insert(n,c),n||e){if(n===e)return Bg(n),e=Xg(n.site),Qg.insert(c,e),c.edge=e.edge=Pg(n.site,c.site),Yg(n),void Yg(e);if(e){Bg(n),Bg(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,m=v*v+g*g,x=[(g*_-d*m)/y+s,(h*m-v*_)/y+l];Rg(e.edge,f,p,x),c.edge=Pg(f,t,null,x),e.edge=Pg(t,p,null,x),Yg(n),Yg(e)}else c.edge=Pg(n.site,c.site)}}function Zg(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Gg(t,n){var e=t.N;if(e)return Zg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Kg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,u=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new zg,Kg=new zg;;)if(i=Ig,u&&(!i||u[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(c.splice(a,0,ty.push(Og(o,d,Math.abs(p-t)ny?[t,Math.abs(l-t)ny?[Math.abs(h-r)ny?[e,Math.abs(l-e)ny?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var _y=function(){var t,n,e=hy,r=dy,i=yy,u=vy,o=gy,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=T("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",M).on("mousedown.zoom",k).on("dblclick.zoom",S).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ay(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new ay(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),ly(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),sy(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function S(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(_(y(t,o),n,u),r.apply(this,arguments),c);ly(),f>0?gt(this).transition().duration(f).call(x,a,n):gt(this).call(g.transform,a)}}function N(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(sy(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function _(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,g=e+h,y=r+d,_=(p+g)/2,m=(v+y)/2,x=g-p,b=y-v,w=x*x+b*b,M=i-u,T=p*y-g*v,k=(b<0?-1:1)*l(c(0,M*M*w-T*T)),S=(T*b-x*k)/w,N=(-T*x-b*k)/w,E=(T*b+x*k)/w,A=(-T*x+b*k)/w,C=S-_,z=N-m,P=E-_,O=A-m;return C*C+z*z>P*P+O*O&&(S=E,N=A),{cx:S,cy:N,x01:-h,y01:-d,x11:S*(i/M-1),y11:N*(i/M-1)}}var M=function(){var t=y,n=_,e=i(0),c=null,M=m,T=x,k=b,S=null;function N(){var i,y,_,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,N=T.apply(this,arguments)-p,E=u(N-b),A=N>b;if(S||(S=i=Object(r.a)()),xh)if(E>v-h)S.moveTo(x*a(b),x*s(b)),S.arc(0,0,x,b,N,!A),m>h&&(S.moveTo(m*a(N),m*s(N)),S.arc(0,0,m,N,b,A));else{var C,z,P=b,O=N,R=b,L=N,q=E,D=E,U=k.apply(this,arguments)/2,j=U>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),I=f(u(x-m)/2,+e.apply(this,arguments)),F=I,Y=I;if(j>h){var B=g(j/m*s(U)),H=g(j/x*s(U));(q-=2*B)>h?(R+=B*=A?1:-1,L-=B):(q=0,R=L=(b+N)/2),(D-=2*H)>h?(P+=H*=A?1:-1,O-=H):(D=0,P=O=(b+N)/2)}var X=x*a(P),V=x*s(P),$=m*a(L),W=m*s(L);if(I>h){var Z=x*a(O),G=x*s(O),Q=m*a(R),J=m*s(R);if(Eh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,Z,G,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=Z-K[0],rt=G-K[1],it=1/s(((_=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:_<-1?d:Math.acos(_))/2),ut=l(K[0]*K[0]+K[1]*K[1]);F=f(I,(m-ut)/(it-1)),Y=f(I,(x-ut)/(it+1))}}D>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(Z,G,$,W,x,Y,A),S.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?F>h?(C=w($,W,Z,G,m,-F,A),z=w(X,V,Q,J,m,-F,A),S.lineTo(C.cx+C.x01,C.cy+C.y01),F=l;--h)f.point(y[h],_[h]);f.lineEnd(),f.areaEnd()}g&&(y[s]=+t(d,s,i),_[s]=+e(d,s,i),f.point(n?+n(d,s,i):y[s],u?+u(d,s,i):_[s]))}if(p)return f=null,p+""||null}function l(){return E().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},P=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(v,Math.max(-v,u.apply(this,arguments)-y)),m=Math.min(Math.abs(_)/h,o.apply(this,arguments)),x=m*(_<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(_-h*x)/d:0;a0?l*f:0)+x,g[c]={data:i[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:m};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=L(k);function R(t){this._curve=t}function L(t){function n(n){return new R(t(n))}return n._curve=t,n}function q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var D=function(){return q(E().curve(O))},U=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t},j=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},I=Array.prototype.slice;function F(t){return t.source}function Y(t){return t.target}function B(t){var n=F,e=Y,u=S,o=N,a=null;function c(){var i,c=I.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=j(n,e),o=j(n,e=(e+i)/2),a=j(r,e),c=j(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function Z(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[G,Q,tt,ut,it,at,lt],dt=function(){var t=i(G),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function gt(t){this._context=t}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function _t(t){this._context=t}_t.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new _t(t)};function xt(t){this._context=t}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Tt(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var St=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ot=function t(n){function e(t){return n?new Pt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rt(t,n){this._context=t,this._alpha=n}Rt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return n?new Rt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Dt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ut(t){this._context=t}Ut.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var jt=function(t){return new Ut(t)};function It(t){return t<0?-1:1}function Ft(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(It(u)+It(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Zt(t){this._context=t}function Gt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;on?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=T?5:u>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=k?2:1)}function E(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=k&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},P=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},R=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},L=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},j=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},I=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,g=d*d+p*p,y=Math.sqrt(v),_=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-g)/(2*y*_)))/2),x=m/_,b=m/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),g=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),S.hasOwnProperty(n)?{space:S[n],local:t}:t},E=function(t){var n=N(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===k&&n.documentElement.namespaceURI===k?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var P=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var R=document.documentElement;if(!R.matches){var L=R.webkitMatchesSelector||R.msMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector;O=function(t){return function(){return L.call(this,t)}}}}var q=O,D=function(t){return new Array(t.length)};function U(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}U.prototype={constructor:U,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var j="$";function I(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=y[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){gt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),Et(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Zt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof It||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof It||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ut(It,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ut(un,rn,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Ut(cn,an,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,_n=gn*gn*gn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Nn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=kn(t.r),r=kn(t.g),i=kn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>_n?Math.pow(t,1/3):t/yn+vn}function Mn(t){return t>gn?t*t*t:yn*(t-vn)}function Tn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Nn)return new Nn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Nn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Nn(t,n,e,null==r?1:r)}function Nn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ut(bn,xn,jt(It,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=dn*Mn(t),new un(Tn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),Tn(-.969266*n+1.8760108*t+.041556*e),Tn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ut(Nn,Sn,jt(It,{brighter:function(t){return new Nn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Nn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var En=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Pn=1.78277*Cn,On=1.78277*En- -.14861*An;function Rn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Ln)return new Ln(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Pn*e)/(On+zn-Pn),u=r-i,o=(Cn*(e-i)-En*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Ln(c<0?c+360:c,a,i,t.opacity)}(t):new Ln(t,n,e,null==r?1:r)}function Ln(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Ut(Ln,Rn,jt(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(En*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var Dn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):jn(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?In(t,e):jn(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):jn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Ee}function Ye(){Oe=(Pe=Le.now())+Re,Ee=Ae=0;try{Fe()}finally{Ee=0,function(){for(var t,n,e=Me,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Me=n);Te=t,He(r)}(),Oe=0}}function Be(){var t=Le.now(),n=t-Pe;n>ze&&(Re-=n,Pe=t)}function He(t){Ee||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Le.now()-Re)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Pe=Le.now(),Ce=setInterval(Be,ze)),Ee=1,qe(Ye)))}je.prototype=Ie.prototype={constructor:je,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?De():+e)+(null==n?0:+n),this._next||Te===this||(Te?Te._next=this:Me=this,Te=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new je;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new je,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?De():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=T("start","end","interrupt"),We=[],Ze=0,Ge=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ge)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fZe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=N(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=N(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uGe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={name:"x",handles:["e","w"].map(wi),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vi={name:"y",handles:["n","s"].map(wi),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},_i={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},xi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function wi(t){return{type:t}}function Mi(){return!ut.button}function Ti(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ni(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ei(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(gi)};function zi(t){var n,e=Ti,r=Mi,i=T(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=ki(this).extent;gt(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=gt(this),n=ki(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n){return t.__brush.emitter||new f(t,n)}function f(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,L.attr("cursor",yi.selection),U());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(g=y=C=!1,U());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,U());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),L.attr("cursor",yi[m]),U());break;default:return}fi()}),!0).on("mousemove.brush",D,!0).on("mouseup.brush",j,!0);At(ut.view)}ci(),or(_),a.call(_),O.start()}function D(){var t=Mt(_);!C||g||y||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?y=!0:g=!0),P=t,v=!0,fi(),U()}function U(){var t;switch(d=P[0]-z[0],p=P[1]-z[1],x){case li:case si:b&&(d=Math.max(S-e,Math.min(E-f,d)),i=e+d,s=f+d),w&&(p=Math.max(N-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(S-e,Math.min(E-e,d)),i=e+d,s=f):b>0&&(d=Math.max(S-f,Math.min(E-f,d)),i=e,s=f+d),w<0?(p=Math.max(N-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(N-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(S,Math.min(E,e-d*b)),s=Math.max(S,Math.min(E,f+d*b))),w&&(o=Math.max(N,Math.min(A,u-p*w)),h=Math.max(N,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var gu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function yu(t){return t[0]}function _u(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?yu:n,null==e?_u:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function Tu(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=bu(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new gu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=_*_+m*m;if(x=(a=(p+g)/2))?p=a:g=a,(s=o>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Lu=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Iu=function(t){return(t=ju(Math.abs(t)))?t[1]:NaN},Fu=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Fu(100*t,n)},r:Fu,s:function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+ju(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Vu,$u,Wu,Zu=function(t){return t},Gu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Zu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Zu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===f?i[1]:/[%p]/.test(p)?a:"",y=Yu[p],_=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=g;if("c"===p)x=y(t)+x,t="";else{var b=(t=+t)<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Gu[8+zu/3]:"")+x+(b&&"("===c?")":""),_)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3))),i=Math.pow(10,-r),u=Gu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Iu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3)))-Iu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Iu(n)-Iu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,go=Math.atan2,yo=Math.cos,_o=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},To=Math.sqrt,ko=Math.tan;function So(t){return t>1?0:t<-1?ao:Math.acos(t)}function No(t){return t>1?co:t<-1?-co:Math.asin(t)}function Eo(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Po.hasOwnProperty(t.type)&&Po[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=yo(n=(n*=ho)/2+fo),o=wo(n),a=jo*o,c=Uo*u+a*yo(i),f=a*r*wo(i);Fo.add(go(f,c)),Do=t,Uo=u,jo=o}var Wo=function(t){return Yo.reset(),Io(t,Bo),2*Yo};function Zo(t){return[go(t[1],t[0]),No(t[2])]}function Go(t){var n=t[0],e=t[1],r=yo(e);return[r*yo(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=To(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=_a,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,Fo<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Go([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Zo(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ga(){da.point=va}function ya(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function _a(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){_a(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Fa={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Fa.lineStart=Wa,Fa.lineEnd=Za},polygonEnd:function(){Fa.lineStart=Ha,Fa.lineEnd=$a}};function Ya(t,n){t*=ho;var e=yo(n*=ho);Ba(e*yo(t),e*wo(t),wo(n))}function Ba(t,n,e){Sa+=(t-Sa)/++Ta,Na+=(n-Na)/Ta,Ea+=(e-Ea)/Ta}function Ha(){Fa.point=Xa}function Xa(t,n){t*=ho;var e=yo(n*=ho);Da=e*yo(t),Ua=e*wo(t),ja=wo(n),Fa.point=Va,Ba(Da,Ua,ja)}function Va(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=go(To((o=Ua*u-ja*i)*o+(o=ja*r-Da*u)*o+(o=Da*i-Ua*r)*o),Da*r+Ua*i+ja*u);ka+=o,Aa+=o*(Da+(Da=r)),Ca+=o*(Ua+(Ua=i)),za+=o*(ja+(ja=u)),Ba(Da,Ua,ja)}function $a(){Fa.point=Ya}function Wa(){Fa.point=Ga}function Za(){Qa(La,qa),Fa.point=Ya}function Ga(t,n){La=t,qa=n,t*=ho,n*=ho,Fa.point=Qa;var e=yo(n);Da=e*yo(t),Ua=e*wo(t),ja=wo(n),Ba(Da,Ua,ja)}function Qa(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=Ua*u-ja*i,a=ja*r-Da*u,c=Da*i-Ua*r,f=To(o*o+a*a+c*c),s=No(f),l=f&&-s/f;Pa+=l*o,Oa+=l*a,Ra+=l*c,ka+=s,Aa+=s*(Da+(Da=r)),Ca+=s*(Ua+(Ua=i)),za+=s*(ja+(ja=u)),Ba(Da,Ua,ja)}var Ja=function(t){Ta=ka=Sa=Na=Ea=Aa=Ca=za=Pa=Oa=Ra=0,Io(t,Fa);var n=Pa,e=Oa,r=Ra,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,kaao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=yo(t),r=wo(t),i=yo(n),u=wo(n);function o(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[go(c*i-s*u,a*e-f*r),No(s*i+c*u)]}return o.invert=function(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[go(c*i+f*u,a*e+s*r),No(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=yo(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=M*w,k=T>ao,S=p*x;if(vc.add(go(S*M*wo(T),v*b+S*yo(T))),u+=k?w+M*so:w,k^h>=e^_>=e){var N=Jo(Go(l),Go(y));na(N);var E=Jo(i,N);na(E);var A=(k^w>=0?-1:1)*No(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=k^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(_c))}return d}};function _c(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=yc((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=yo(r))*wo(e)-wo(r)*(i=yo(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return yo(t)*yo(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Go(t),Go(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),g=p*p-v*(Qo(h,h)-1);if(!(g<0)){var y=To(g),_=ta(d,(-p-y)/v);if(Ko(_,h),_=Zo(_),!r)return _;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^_[1]<(po(_[0]-x)ao^(x<=_[0]&&_[0]<=b)){var S=ta(d,(-p+y)/v);return Ko(S,h),[_,Zo(S)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return yc(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),g=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,Tc=-Mc;function kc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,g,y,_,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=T,s&&s.push(l=[]),_=!0,y=!1,v=g=NaN},lineEnd:function(){f&&(T(h,d),p&&y&&b.rejoin(),f.push(b.result())),w.point=M,y&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function T(r,o){var a=u(r,o);if(s&&l.push([r,o]),_)h=r,d=o,p=a,_=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&y)x.point(r,o);else{var c=[v=Math.max(Tc,Math.min(Mc,v)),g=Math.max(Tc,Math.min(Mc,g))],f=[r=Math.max(Tc,Math.min(Mc,r)),o=Math.max(Tc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(y||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,g=o,y=a}return w}}var Sc,Nc,Ec,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=kc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Pc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Pc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Sc=t*=ho,Nc=wo(n*=ho),Ec=yo(n),zc.point=Rc}function Rc(t,n){t*=ho;var e=wo(n*=ho),r=yo(n),i=po(t-Sc),u=yo(i),o=r*wo(i),a=Ec*e-Nc*r*u,c=Nc*e+Ec*r*u;Cc.add(go(To(o*o+a*a),c)),Sc=t,Nc=e,Ec=r}var Lc=function(t){return Cc.reset(),Io(t,zc),+Cc},qc=[null,null],Dc={type:"LineString",coordinates:qc},Uc=function(t,n){return qc[0]=t,qc[1]=n,Lc(Dc)},jc={Feature:function(t,n){return Fc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(_o(o/p)*p,u,p).filter((function(t){return po(t%g)>oo})).map(s))}return _.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),_.precision(y)):[[i,c],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),_.precision(y)):[[n,o],[t,u]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],_):[v,g]},_.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.precision=function(r){return arguments.length?(y=+r,f=Wc(o,u,90),s=Zc(n,t,y),l=Wc(c,a,90),h=Zc(i,e,y),_):y},_.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Gc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=yo(r),a=wo(r),c=yo(u),f=wo(u),s=o*yo(e),l=o*wo(e),h=c*yo(i),d=c*wo(i),p=2*No(To(Eo(u-r)+o*c*Eo(i-e))),v=wo(p),g=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[go(i,r)*lo,go(u,To(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return g.distance=p,g},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,gf=af,yf=1/0,_f=yf,mf=-yf,xf=mf,bf={point:function(t,n){tmf&&(mf=t),n<_f&&(_f=n),n>xf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[yf,_f],[mf,xf]];return mf=xf=-(_f=yf=1/0),t}},wf=0,Mf=0,Tf=0,kf=0,Sf=0,Nf=0,Ef=0,Af=0,Cf=0,zf={point:Pf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=Df,zf.lineEnd=Uf},polygonEnd:function(){zf.point=Pf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Ef/Cf,Af/Cf]:Nf?[kf/Nf,Sf/Nf]:Tf?[wf/Tf,Mf/Tf]:[NaN,NaN];return wf=Mf=Tf=kf=Sf=Nf=Ef=Af=Cf=0,t}};function Pf(t,n){wf+=t,Mf+=n,++Tf}function Of(){zf.point=Rf}function Rf(t,n){zf.point=Lf,Pf(pf=t,vf=n)}function Lf(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Sf+=i*(vf+n)/2,Nf+=i,Pf(pf=t,vf=n)}function qf(){zf.point=Pf}function Df(){zf.point=jf}function Uf(){If(hf,df)}function jf(t,n){zf.point=If,Pf(hf=pf=t,df=vf=n)}function If(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Sf+=i*(vf+n)/2,Nf+=i,Ef+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Pf(pf=t,vf=n)}var Ff=zf;function Yf(t){this._context=t}Yf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Zf={point:Ao,lineStart:function(){Zf.point=Gf},lineEnd:function(){Bf&&Qf(Hf,Xf),Zf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Gf(t,n){Zf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(To(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Zf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ts(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Io(t,e(r))),r.result()}return u.area=function(t){return Io(t,e(gf)),gf.result()},u.measure=function(t){return Io(t,e(Jf)),Jf.result()},u.bounds=function(t){return Io(t,e(bf)),bf.result()},u.centroid=function(t){return Io(t,e(Ff)),Ff.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Io(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,point:function(t,n){this.stream.point(t,n)},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()}};var ss=16,ls=yo(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,m=y*y+_*_;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=To(x*x+b*b+w*w),T=No(w/=M),k=po(po(w)-1)n||po((y*A+_*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,E()):[g*lo,y*lo,_*lo]},k.precision=function(t){return arguments.length?(T=hs(N,M=t*t),A()):To(M)},k.fitExtent=function(t,n){return os(k,t,n)},k.fitSize=function(t,n){return as(k,t,n)},k.fitWidth=function(t,n){return cs(k,t,n)},k.fitHeight=function(t,n){return fs(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&S,E()}}function gs(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function ys(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*yo(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*To(t*t+e*e);return[go(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ps=function(){return gs(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Rs=function(){return ps(Os).scale(152.63)};function Ls(t,n){var e=yo(t),r=t===n?wo(t):(e-yo(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Fs).scale(175.295)};function Bs(t,n){return[yo(n)*wo(t),wo(n)]}Bs.invert=ws(No);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=yo(n),r=1+yo(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(ko((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function Zs(t,n){return t.parent===n.parent?1:2}function Gs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Zs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Gs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function Ks(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function gl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function yl(t){this._=t,this.next=null,this.previous=null}function _l(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;pl(e,n,r=t[2]),n=new yl(n),e=new yl(e),r=new yl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function Dl(t,n){return t.parent===n.parent?1:2}function Ul(t){var n=t.children;return n?n[0]:t.t}function jl(t){var n=t.children;return n?n[n.length-1]:t.t}function Il(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Fl(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=Dl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=jl(a),u=Ul(u),a&&u;)c=Ul(c),(o=jl(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Il(Fl(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!jl(o)&&(o.t=a,o.m+=l-s),u&&!Ul(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=a;break}p=d}y.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(El),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var _=(i*y+o*g)/r;t(n,d,g,i,u,_,c),t(d,e,y,_,u,o,c)}else{var m=(u*y+c*g)/r;t(n,d,g,i,u,o,m),t(d,e,y,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Gl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},hh(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,hh(this),this}};var ph=function(){return Math.random()},vh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(ph),gh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),_h=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=h:c.onreadystatechange=function(t){c.readyState>3&&h(t)},c.onprogress=function(t){o.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,h){return c.open(n,t,!0,f,s),null==r||a.has("accept")||a.set("accept",r+",*/*"),c.setRequestHeader&&a.each((function(t,n){c.setRequestHeader(n,t)})),null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),l>0&&(c.timeout=l),null==h&&"function"==typeof i&&(h=i,i=null),null!=h&&1===h.length&&(h=function(t){return function(n,e){t(null==n?e:null)}}(h)),null!=h&&e.on("error",h).on("load",(function(t){h(null,t)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Th=wh("application/json",(function(t){return JSON.parse(t.responseText)})),kh=wh("text/plain",(function(t){return t.responseText})),Sh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Nh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Eh=Nh("text/csv",ru),Ah=Nh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Ph=Ch.slice,Oh={name:"implicit"};function Rh(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Ph.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Fh,r=i=null,s}function s(n){return(r||(r=e(u,o,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,a)))(+n)}return s.invert=function(t){return(i||(i=e(o,u,Ih,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},s.domain=function(t){return arguments.length?(u=zh.call(t,Uh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Ph.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Ph.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Ih,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Uh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Zh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;g.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Ph.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Ph.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),_d=yd,md=yd.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Td=Md,kd=Md.range,Sd=ld((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/864e5}),(function(t){return t.getDate()-1})),Nd=Sd,Ed=Sd.range;function Ad(t){return ld((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/gd}))}var Cd=Ad(0),zd=Ad(1),Pd=Ad(2),Od=Ad(3),Rd=Ad(4),Ld=Ad(5),qd=Ad(6),Dd=Cd.range,Ud=zd.range,jd=Pd.range,Id=Od.range,Fd=Rd.range,Yd=Ld.range,Bd=qd.range,Hd=ld((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Xd=Hd,Vd=Hd.range,$d=ld((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Wd=$d,Zd=$d.range,Gd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/gd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,gp=fp.range,yp=sp.range,_p=lp.range,mp=hp.range,xp=ld((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),bp=xp,wp=xp.range,Mp=ld((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Tp=Mp,kp=Mp.range;function Sp(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Np(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ep(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Fp(i),s=Yp(i),l=Fp(u),h=Yp(u),d=Fp(o),p=Yp(o),v=Fp(a),g=Yp(a),y=Fp(c),_=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:gv,u:yv,U:_v,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:Tv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:kv,e:kv,f:Cv,H:Sv,I:Nv,j:Ev,L:Av,m:zv,M:Pv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Rv,U:Lv,V:qv,w:Dv,W:Uv,x:null,X:null,y:jv,Y:Iv,Z:Fv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Zp,Y:Wp,Z:Gp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Np(Ep(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Ep(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Nd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Np(Ep(u.y)).getUTCDay():n(Ep(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Np(u)):n(u)}}function T(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Lp?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Sp);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Np);return n.toString=function(){return t},n}}}var Cp,zp,Pp,Op,Rp,Lp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Dp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function jp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Gp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=Dp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return jp(t.getDate(),n,2)}function fv(t,n){return jp(t.getHours(),n,2)}function sv(t,n){return jp(t.getHours()%12||12,n,2)}function lv(t,n){return jp(1+Nd.count(Wd(t),t),n,3)}function hv(t,n){return jp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return jp(t.getMonth()+1,n,2)}function vv(t,n){return jp(t.getMinutes(),n,2)}function gv(t,n){return jp(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function _v(t,n){return jp(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Rd(t):Rd.ceil(t),jp(Rd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return jp(zd.count(Wd(t),t),n,2)}function wv(t,n){return jp(t.getFullYear()%100,n,2)}function Mv(t,n){return jp(t.getFullYear()%1e4,n,4)}function Tv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+jp(n/60|0,"0",2)+jp(n%60,"0",2)}function kv(t,n){return jp(t.getUTCDate(),n,2)}function Sv(t,n){return jp(t.getUTCHours(),n,2)}function Nv(t,n){return jp(t.getUTCHours()%12||12,n,2)}function Ev(t,n){return jp(1+rp.count(Tp(t),t),n,3)}function Av(t,n){return jp(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return jp(t.getUTCMonth()+1,n,2)}function Pv(t,n){return jp(t.getUTCMinutes(),n,2)}function Ov(t,n){return jp(t.getUTCSeconds(),n,2)}function Rv(t){var n=t.getUTCDay();return 0===n?7:n}function Lv(t,n){return jp(op.count(Tp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),jp(sp.count(Tp(t),t)+(4===Tp(t).getUTCDay()),n,2)}function Dv(t){return t.getUTCDay()}function Uv(t,n){return jp(ap.count(Tp(t),t),n,2)}function jv(t,n){return jp(t.getUTCFullYear()%100,n,2)}function Iv(t,n){return jp(t.getUTCFullYear()%1e4,n,4)}function Fv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Pp=Cp.parse,Op=Cp.utcFormat,Rp=Cp.utcParse,Cp}Xv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Rp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Zv=60*Wv,Gv=60*Zv,Qv=24*Gv,Jv=7*Qv,Kv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,u,o,a,c,f){var s=Hh(Ih,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Zv],[o,5,5*Zv],[o,15,15*Zv],[o,30,30*Zv],[u,1,Gv],[u,3,3*Gv],[u,6,6*Gv],[u,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(og("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),_g=gg(og("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mg=gg(og("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(og("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function bg(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return bg(t).domain([n,e]).clamp(r)},Vh(i)}var wg=e(5),Mg=function(t){return function(){return t}};function Tg(t){return t[0]}function kg(t){return t[1]}function Sg(){this._=null}function Ng(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Eg(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Ag(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Cg(t){for(;t.L;)t=t.L;return t}Sg.prototype={constructor:Sg,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Cg(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Eg(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Eg(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,u=t.L,o=t.R;if(e=u?o?Cg(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Eg(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Ag(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Eg(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ag(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Eg(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ag(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zg=Sg;function Pg(t,n,e,r){var i=[null,null],u=ty.push(i)-1;return i.left=t,i.right=n,e&&Rg(i,t,n,e),r&&Rg(i,n,t,r),Jg[t.index].halfedges.push(u),Jg[n.index].halfedges.push(u),i}function Og(t,n,e){var r=[n,e];return r.left=t,r}function Rg(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Lg(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qg(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-ey)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Fg.pop()||new function(){Ng(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+o,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,m=Kg._;m;)if(y.yny)a=a.L;else{if(!((i=u-Gg(a,o))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var c=Xg(t);if(Qg.insert(n,c),n||e){if(n===e)return Bg(n),e=Xg(n.site),Qg.insert(c,e),c.edge=e.edge=Pg(n.site,c.site),Yg(n),void Yg(e);if(e){Bg(n),Bg(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,m=v*v+g*g,x=[(g*_-d*m)/y+s,(h*m-v*_)/y+l];Rg(e.edge,f,p,x),c.edge=Pg(f,t,null,x),e.edge=Pg(t,p,null,x),Yg(n),Yg(e)}else c.edge=Pg(n.site,c.site)}}function Zg(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Gg(t,n){var e=t.N;if(e)return Zg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Kg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,u=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new zg,Kg=new zg;;)if(i=Ig,u&&(!i||u[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(c.splice(a,0,ty.push(Og(o,d,Math.abs(p-t)ny?[t,Math.abs(l-t)ny?[Math.abs(h-r)ny?[e,Math.abs(l-e)ny?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var _y=function(){var t,n,e=hy,r=dy,i=yy,u=vy,o=gy,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=T("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",M).on("mousedown.zoom",k).on("dblclick.zoom",S).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ay(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new ay(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),ly(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),sy(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function S(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(_(y(t,o),n,u),r.apply(this,arguments),c);ly(),f>0?gt(this).transition().duration(f).call(x,a,n):gt(this).call(g.transform,a)}}function N(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(sy(),r=0;r"+i+" → "+o+": "+u+"

\n

"+o+" → "+i+": "+r(e.value)+"

\n "}};looker.plugins.visualizations.add(o)},4:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"b",(function(){return u}));var r=e(3),i=function(t){if(t){var n="";switch(t.charAt(0)){case"$":n+="$";break;case"£":n+="£";break;case"€":n+="€"}t.indexOf(",")>-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function _(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,g=e+h,y=r+d,_=(p+g)/2,m=(v+y)/2,x=g-p,b=y-v,w=x*x+b*b,M=i-u,T=p*y-g*v,k=(b<0?-1:1)*l(c(0,M*M*w-T*T)),S=(T*b-x*k)/w,N=(-T*x-b*k)/w,E=(T*b+x*k)/w,A=(-T*x+b*k)/w,C=S-_,z=N-m,P=E-_,O=A-m;return C*C+z*z>P*P+O*O&&(S=E,N=A),{cx:S,cy:N,x01:-h,y01:-d,x11:S*(i/M-1),y11:N*(i/M-1)}}var M=function(){var t=y,n=_,e=i(0),c=null,M=m,T=x,k=b,S=null;function N(){var i,y,_,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,N=T.apply(this,arguments)-p,E=u(N-b),A=N>b;if(S||(S=i=Object(r.a)()),xh)if(E>v-h)S.moveTo(x*a(b),x*s(b)),S.arc(0,0,x,b,N,!A),m>h&&(S.moveTo(m*a(N),m*s(N)),S.arc(0,0,m,N,b,A));else{var C,z,P=b,O=N,R=b,L=N,q=E,D=E,U=k.apply(this,arguments)/2,j=U>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),I=f(u(x-m)/2,+e.apply(this,arguments)),F=I,Y=I;if(j>h){var B=g(j/m*s(U)),H=g(j/x*s(U));(q-=2*B)>h?(R+=B*=A?1:-1,L-=B):(q=0,R=L=(b+N)/2),(D-=2*H)>h?(P+=H*=A?1:-1,O-=H):(D=0,P=O=(b+N)/2)}var X=x*a(P),V=x*s(P),$=m*a(L),W=m*s(L);if(I>h){var Z=x*a(O),G=x*s(O),Q=m*a(R),J=m*s(R);if(Eh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,Z,G,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=Z-K[0],rt=G-K[1],it=1/s(((_=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:_<-1?d:Math.acos(_))/2),ut=l(K[0]*K[0]+K[1]*K[1]);F=f(I,(m-ut)/(it-1)),Y=f(I,(x-ut)/(it+1))}}D>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(Z,G,$,W,x,Y,A),S.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?F>h?(C=w($,W,Z,G,m,-F,A),z=w(X,V,Q,J,m,-F,A),S.lineTo(C.cx+C.x01,C.cy+C.y01),F=l;--h)f.point(y[h],_[h]);f.lineEnd(),f.areaEnd()}g&&(y[s]=+t(d,s,i),_[s]=+e(d,s,i),f.point(n?+n(d,s,i):y[s],u?+u(d,s,i):_[s]))}if(p)return f=null,p+""||null}function l(){return E().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},P=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(v,Math.max(-v,u.apply(this,arguments)-y)),m=Math.min(Math.abs(_)/h,o.apply(this,arguments)),x=m*(_<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(_-h*x)/d:0;a0?l*f:0)+x,g[c]={data:i[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:m};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=L(k);function R(t){this._curve=t}function L(t){function n(n){return new R(t(n))}return n._curve=t,n}function q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var D=function(){return q(E().curve(O))},U=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t},j=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},I=Array.prototype.slice;function F(t){return t.source}function Y(t){return t.target}function B(t){var n=F,e=Y,u=S,o=N,a=null;function c(){var i,c=I.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=j(n,e),o=j(n,e=(e+i)/2),a=j(r,e),c=j(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function Z(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[G,Q,tt,ut,it,at,lt],dt=function(){var t=i(G),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function gt(t){this._context=t}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function _t(t){this._context=t}_t.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new _t(t)};function xt(t){this._context=t}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Tt(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var St=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ot=function t(n){function e(t){return n?new Pt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rt(t,n){this._context=t,this._alpha=n}Rt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return n?new Rt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Dt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ut(t){this._context=t}Ut.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var jt=function(t){return new Ut(t)};function It(t){return t<0?-1:1}function Ft(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(It(u)+It(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Zt(t){this._context=t}function Gt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;on?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},y=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=T?5:u>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=k?2:1)}function E(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=k&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},P=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},R=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},L=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},j=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},F=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,y=d*d+p*p,_=Math.sqrt(v),g=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-y)/(2*_*g)))/2),x=m/g,b=m/_;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),y=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),N.hasOwnProperty(n)?{space:N[n],local:t}:t},E=function(t){var n=S(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===k&&n.documentElement.namespaceURI===k?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var P=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var R=document.documentElement;if(!R.matches){var L=R.webkitMatchesSelector||R.msMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector;O=function(t){return function(){return L.call(this,t)}}}}var q=O,D=function(t){return new Array(t.length)};function U(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}U.prototype={constructor:U,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var j="$";function F(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=_[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){yt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),Et(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Zt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof Ft||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof Ft||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ut(Ft,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ut(un,rn,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Ut(cn,an,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,yn=6/29,_n=3*yn*yn,gn=yn*yn*yn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Sn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=kn(t.r),r=kn(t.g),i=kn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>gn?Math.pow(t,1/3):t/_n+vn}function Mn(t){return t>yn?t*t*t:_n*(t-vn)}function Tn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Nn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Sn)return new Sn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Sn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Sn(t,n,e,null==r?1:r)}function Sn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ut(bn,xn,jt(Ft,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=dn*Mn(t),new un(Tn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),Tn(-.969266*n+1.8760108*t+.041556*e),Tn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ut(Sn,Nn,jt(Ft,{brighter:function(t){return new Sn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Sn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var En=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Pn=1.78277*Cn,On=1.78277*En- -.14861*An;function Rn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Ln)return new Ln(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Pn*e)/(On+zn-Pn),u=r-i,o=(Cn*(e-i)-En*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Ln(c<0?c+360:c,a,i,t.opacity)}(t):new Ln(t,n,e,null==r?1:r)}function Ln(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Ut(Ln,Rn,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(En*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var Dn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):jn(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?Fn(t,e):jn(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):jn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Ee}function Ye(){Oe=(Pe=Le.now())+Re,Ee=Ae=0;try{Ie()}finally{Ee=0,function(){for(var t,n,e=Me,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Me=n);Te=t,He(r)}(),Oe=0}}function Be(){var t=Le.now(),n=t-Pe;n>ze&&(Re-=n,Pe=t)}function He(t){Ee||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Le.now()-Re)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Pe=Le.now(),Ce=setInterval(Be,ze)),Ee=1,qe(Ye)))}je.prototype=Fe.prototype={constructor:je,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?De():+e)+(null==n?0:+n),this._next||Te===this||(Te?Te._next=this:Me=this,Te=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new je;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new je,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?De():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=T("start","end","interrupt"),We=[],Ze=0,Ge=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ge)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fZe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=S(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=S(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uGe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={name:"x",handles:["e","w"].map(wi),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vi={name:"y",handles:["n","s"].map(wi),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},yi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},_i={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},xi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function wi(t){return{type:t}}function Mi(){return!ut.button}function Ti(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ni(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Si(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ei(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(yi)};function zi(t){var n,e=Ti,r=Mi,i=T(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_i.overlay).merge(e).each((function(){var t=ki(this).extent;yt(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_i.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return _i[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=yt(this),n=ki(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n){return t.__brush.emitter||new f(t,n)}function f(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,L.attr("cursor",_i.selection),U());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(y=_=C=!1,U());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,U());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),L.attr("cursor",_i[m]),U());break;default:return}fi()}),!0).on("mousemove.brush",D,!0).on("mouseup.brush",j,!0);At(ut.view)}ci(),or(g),a.call(g),O.start()}function D(){var t=Mt(g);!C||y||_||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?_=!0:y=!0),P=t,v=!0,fi(),U()}function U(){var t;switch(d=P[0]-z[0],p=P[1]-z[1],x){case li:case si:b&&(d=Math.max(N-e,Math.min(E-f,d)),i=e+d,s=f+d),w&&(p=Math.max(S-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(N-e,Math.min(E-e,d)),i=e+d,s=f):b>0&&(d=Math.max(N-f,Math.min(E-f,d)),i=e,s=f+d),w<0?(p=Math.max(S-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(S-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(N,Math.min(E,e-d*b)),s=Math.max(N,Math.min(E,f+d*b))),w&&(o=Math.max(S,Math.min(A,u-p*w)),h=Math.max(S,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+_)/2))?v=u:_=u,(s=e>=(o=(y+g)/2))?y=o:g=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+_)/2))?v=u:_=u,(s=e>=(o=(y+g)/2))?y=o:g=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var yu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function _u(t){return t[0]}function gu(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?_u:n,null==e?gu:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function Tu(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=bu(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new yu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=_)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var g=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=g*g+m*m;if(x=(a=(p+y)/2))?p=a:y=a,(s=o>=(c=(v+_)/2))?v=c:_=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,y=p*p+v*v;yt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Lu=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Fu=function(t){return(t=ju(Math.abs(t)))?t[1]:NaN},Iu=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Iu(100*t,n)},r:Iu,s:function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+ju(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Vu,$u,Wu,Zu=function(t){return t},Gu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Zu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Zu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",y="$"===f?i[1]:/[%p]/.test(p)?a:"",_=Yu[p],g=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=y;if("c"===p)x=_(t)+x,t="";else{var b=(t=+t)<0;if(t=_(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Gu[8+zu/3]:"")+x+(b&&"("===c?")":""),g)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3))),i=Math.pow(10,-r),u=Gu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Fu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3)))-Fu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Fu(n)-Fu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,yo=Math.atan2,_o=Math.cos,go=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},To=Math.sqrt,ko=Math.tan;function No(t){return t>1?0:t<-1?ao:Math.acos(t)}function So(t){return t>1?co:t<-1?-co:Math.asin(t)}function Eo(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Po.hasOwnProperty(t.type)&&Po[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=_o(n=(n*=ho)/2+fo),o=wo(n),a=jo*o,c=Uo*u+a*_o(i),f=a*r*wo(i);Io.add(yo(f,c)),Do=t,Uo=u,jo=o}var Wo=function(t){return Yo.reset(),Fo(t,Bo),2*Yo};function Zo(t){return[yo(t[1],t[0]),So(t[2])]}function Go(t){var n=t[0],e=t[1],r=_o(e);return[r*_o(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=To(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ya,lineEnd:_a,polygonStart:function(){da.point=ga,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ya,da.lineEnd=_a,Io<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Go([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Zo(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ya(){da.point=va}function _a(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function ga(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){ga(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Ia={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Ia.lineStart=Wa,Ia.lineEnd=Za},polygonEnd:function(){Ia.lineStart=Ha,Ia.lineEnd=$a}};function Ya(t,n){t*=ho;var e=_o(n*=ho);Ba(e*_o(t),e*wo(t),wo(n))}function Ba(t,n,e){Na+=(t-Na)/++Ta,Sa+=(n-Sa)/Ta,Ea+=(e-Ea)/Ta}function Ha(){Ia.point=Xa}function Xa(t,n){t*=ho;var e=_o(n*=ho);Da=e*_o(t),Ua=e*wo(t),ja=wo(n),Ia.point=Va,Ba(Da,Ua,ja)}function Va(t,n){t*=ho;var e=_o(n*=ho),r=e*_o(t),i=e*wo(t),u=wo(n),o=yo(To((o=Ua*u-ja*i)*o+(o=ja*r-Da*u)*o+(o=Da*i-Ua*r)*o),Da*r+Ua*i+ja*u);ka+=o,Aa+=o*(Da+(Da=r)),Ca+=o*(Ua+(Ua=i)),za+=o*(ja+(ja=u)),Ba(Da,Ua,ja)}function $a(){Ia.point=Ya}function Wa(){Ia.point=Ga}function Za(){Qa(La,qa),Ia.point=Ya}function Ga(t,n){La=t,qa=n,t*=ho,n*=ho,Ia.point=Qa;var e=_o(n);Da=e*_o(t),Ua=e*wo(t),ja=wo(n),Ba(Da,Ua,ja)}function Qa(t,n){t*=ho;var e=_o(n*=ho),r=e*_o(t),i=e*wo(t),u=wo(n),o=Ua*u-ja*i,a=ja*r-Da*u,c=Da*i-Ua*r,f=To(o*o+a*a+c*c),s=So(f),l=f&&-s/f;Pa+=l*o,Oa+=l*a,Ra+=l*c,ka+=s,Aa+=s*(Da+(Da=r)),Ca+=s*(Ua+(Ua=i)),za+=s*(ja+(ja=u)),Ba(Da,Ua,ja)}var Ja=function(t){Ta=ka=Na=Sa=Ea=Aa=Ca=za=Pa=Oa=Ra=0,Fo(t,Ia);var n=Pa,e=Oa,r=Ra,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,kaao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=_o(t),r=wo(t),i=_o(n),u=wo(n);function o(t,n){var o=_o(n),a=_o(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[yo(c*i-s*u,a*e-f*r),So(s*i+c*u)]}return o.invert=function(t,n){var o=_o(n),a=_o(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[yo(c*i+f*u,a*e+s*r),So(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=_o(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=M*w,k=T>ao,N=p*x;if(vc.add(yo(N*M*wo(T),v*b+N*_o(T))),u+=k?w+M*so:w,k^h>=e^g>=e){var S=Jo(Go(l),Go(_));na(S);var E=Jo(i,S);na(E);var A=(k^w>=0?-1:1)*So(E[2]);(r>A||r===A&&(S[0]||S[1]))&&(o+=k^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(gc))}return d}};function gc(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=_c((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=_o(r))*wo(e)-wo(r)*(i=_o(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return _o(t)*_o(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Go(t),Go(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),y=p*p-v*(Qo(h,h)-1);if(!(y<0)){var _=To(y),g=ta(d,(-p-_)/v);if(Ko(g,h),g=Zo(g),!r)return g;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^g[1]<(po(g[0]-x)ao^(x<=g[0]&&g[0]<=b)){var N=ta(d,(-p+_)/v);return Ko(N,h),[g,Zo(N)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return _c(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),y=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var _;y&e||!(_=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,Tc=-Mc;function kc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,y,_,g,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=T,s&&s.push(l=[]),g=!0,_=!1,v=y=NaN},lineEnd:function(){f&&(T(h,d),p&&_&&b.rejoin(),f.push(b.result())),w.point=M,_&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function T(r,o){var a=u(r,o);if(s&&l.push([r,o]),g)h=r,d=o,p=a,g=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&_)x.point(r,o);else{var c=[v=Math.max(Tc,Math.min(Mc,v)),y=Math.max(Tc,Math.min(Mc,y))],f=[r=Math.max(Tc,Math.min(Mc,r)),o=Math.max(Tc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(_||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,y=o,_=a}return w}}var Nc,Sc,Ec,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=kc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Pc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Pc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Nc=t*=ho,Sc=wo(n*=ho),Ec=_o(n),zc.point=Rc}function Rc(t,n){t*=ho;var e=wo(n*=ho),r=_o(n),i=po(t-Nc),u=_o(i),o=r*wo(i),a=Ec*e-Sc*r*u,c=Sc*e+Ec*r*u;Cc.add(yo(To(o*o+a*a),c)),Nc=t,Sc=e,Ec=r}var Lc=function(t){return Cc.reset(),Fo(t,zc),+Cc},qc=[null,null],Dc={type:"LineString",coordinates:qc},Uc=function(t,n){return qc[0]=t,qc[1]=n,Lc(Dc)},jc={Feature:function(t,n){return Ic(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(go(o/p)*p,u,p).filter((function(t){return po(t%y)>oo})).map(s))}return g.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),g.precision(_)):[[i,c],[e,a]]},g.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),g.precision(_)):[[n,o],[t,u]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(v=+t[0],y=+t[1],g):[v,y]},g.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],g):[d,p]},g.precision=function(r){return arguments.length?(_=+r,f=Wc(o,u,90),s=Zc(n,t,_),l=Wc(c,a,90),h=Zc(i,e,_),g):_},g.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Gc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=_o(r),a=wo(r),c=_o(u),f=wo(u),s=o*_o(e),l=o*wo(e),h=c*_o(i),d=c*wo(i),p=2*So(To(Eo(u-r)+o*c*Eo(i-e))),v=wo(p),y=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[yo(i,r)*lo,yo(u,To(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return y.distance=p,y},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,yf=af,_f=1/0,gf=_f,mf=-_f,xf=mf,bf={point:function(t,n){t<_f&&(_f=t),t>mf&&(mf=t),nxf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[_f,gf],[mf,xf]];return mf=xf=-(gf=_f=1/0),t}},wf=0,Mf=0,Tf=0,kf=0,Nf=0,Sf=0,Ef=0,Af=0,Cf=0,zf={point:Pf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=Df,zf.lineEnd=Uf},polygonEnd:function(){zf.point=Pf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Ef/Cf,Af/Cf]:Sf?[kf/Sf,Nf/Sf]:Tf?[wf/Tf,Mf/Tf]:[NaN,NaN];return wf=Mf=Tf=kf=Nf=Sf=Ef=Af=Cf=0,t}};function Pf(t,n){wf+=t,Mf+=n,++Tf}function Of(){zf.point=Rf}function Rf(t,n){zf.point=Lf,Pf(pf=t,vf=n)}function Lf(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Nf+=i*(vf+n)/2,Sf+=i,Pf(pf=t,vf=n)}function qf(){zf.point=Pf}function Df(){zf.point=jf}function Uf(){Ff(hf,df)}function jf(t,n){zf.point=Ff,Pf(hf=pf=t,df=vf=n)}function Ff(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Nf+=i*(vf+n)/2,Sf+=i,Ef+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Pf(pf=t,vf=n)}var If=zf;function Yf(t){this._context=t}Yf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Zf={point:Ao,lineStart:function(){Zf.point=Gf},lineEnd:function(){Bf&&Qf(Hf,Xf),Zf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Gf(t,n){Zf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(To(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Zf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ts(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Fo(t,e(r))),r.result()}return u.area=function(t){return Fo(t,e(yf)),yf.result()},u.measure=function(t){return Fo(t,e(Jf)),Jf.result()},u.bounds=function(t){return Fo(t,e(bf)),bf.result()},u.centroid=function(t){return Fo(t,e(If)),If.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Fo(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,point:function(t,n){this.stream.point(t,n)},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()}};var ss=16,ls=_o(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,y){var _=f-r,g=s-i,m=_*_+g*g;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=To(x*x+b*b+w*w),T=So(w/=M),k=po(po(w)-1)n||po((_*A+g*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,E()):[y*lo,_*lo,g*lo]},k.precision=function(t){return arguments.length?(T=hs(S,M=t*t),A()):To(M)},k.fitExtent=function(t,n){return os(k,t,n)},k.fitSize=function(t,n){return as(k,t,n)},k.fitWidth=function(t,n){return cs(k,t,n)},k.fitHeight=function(t,n){return fs(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&N,E()}}function ys(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function _s(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*_o(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*To(t*t+e*e);return[yo(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ps=function(){return ys(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Rs=function(){return ps(Os).scale(152.63)};function Ls(t,n){var e=_o(t),r=t===n?wo(t):(e-_o(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Is).scale(175.295)};function Bs(t,n){return[_o(n)*wo(t),wo(n)]}Bs.invert=ws(So);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=_o(n),r=1+_o(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(ko((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function Zs(t,n){return t.parent===n.parent?1:2}function Gs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Zs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Gs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function Ks(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function yl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function _l(t){this._=t,this.next=null,this.previous=null}function gl(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;pl(e,n,r=t[2]),n=new _l(n),e=new _l(e),r=new _l(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function Dl(t,n){return t.parent===n.parent?1:2}function Ul(t){var n=t.children;return n?n[0]:t.t}function jl(t){var n=t.children;return n?n[n.length-1]:t.t}function Fl(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Il(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=Dl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=jl(a),u=Ul(u),a&&u;)c=Ul(c),(o=jl(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Fl(Il(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!jl(o)&&(o.t=a,o.m+=l-s),u&&!Ul(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=a;break}p=d}_.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(El),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var g=(i*_+o*y)/r;t(n,d,y,i,u,g,c),t(d,e,_,g,u,o,c)}else{var m=(u*_+c*y)/r;t(n,d,y,i,u,o,m),t(d,e,_,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Gl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},hh(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,hh(this),this}};var ph=function(){return Math.random()},vh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(ph),yh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),_h=function t(n){function e(){var t=yh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),gh=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=h:c.onreadystatechange=function(t){c.readyState>3&&h(t)},c.onprogress=function(t){o.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,h){return c.open(n,t,!0,f,s),null==r||a.has("accept")||a.set("accept",r+",*/*"),c.setRequestHeader&&a.each((function(t,n){c.setRequestHeader(n,t)})),null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),l>0&&(c.timeout=l),null==h&&"function"==typeof i&&(h=i,i=null),null!=h&&1===h.length&&(h=function(t){return function(n,e){t(null==n?e:null)}}(h)),null!=h&&e.on("error",h).on("load",(function(t){h(null,t)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Th=wh("application/json",(function(t){return JSON.parse(t.responseText)})),kh=wh("text/plain",(function(t){return t.responseText})),Nh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Sh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Eh=Sh("text/csv",ru),Ah=Sh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Ph=Ch.slice,Oh={name:"implicit"};function Rh(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Ph.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Ih,r=i=null,s}function s(n){return(r||(r=e(u,o,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,a)))(+n)}return s.invert=function(t){return(i||(i=e(o,u,Fh,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},s.domain=function(t){return arguments.length?(u=zh.call(t,Uh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Ph.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Ph.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Fh,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Uh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Zh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;y.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;y.push(h)}}else y=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?y.reverse():y},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Ph.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Ph.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,yd=6048e5,_d=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),gd=_d,md=_d.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Td=Md,kd=Md.range,Nd=ld((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/864e5}),(function(t){return t.getDate()-1})),Sd=Nd,Ed=Nd.range;function Ad(t){return ld((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/yd}))}var Cd=Ad(0),zd=Ad(1),Pd=Ad(2),Od=Ad(3),Rd=Ad(4),Ld=Ad(5),qd=Ad(6),Dd=Cd.range,Ud=zd.range,jd=Pd.range,Fd=Od.range,Id=Rd.range,Yd=Ld.range,Bd=qd.range,Hd=ld((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Xd=Hd,Vd=Hd.range,$d=ld((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Wd=$d,Zd=$d.range,Gd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/yd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,yp=fp.range,_p=sp.range,gp=lp.range,mp=hp.range,xp=ld((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),bp=xp,wp=xp.range,Mp=ld((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Tp=Mp,kp=Mp.range;function Np(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Sp(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ep(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Ip(i),s=Yp(i),l=Ip(u),h=Yp(u),d=Ip(o),p=Yp(o),v=Ip(a),y=Yp(a),_=Ip(c),g=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:yv,u:_v,U:gv,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:Tv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:kv,e:kv,f:Cv,H:Nv,I:Sv,j:Ev,L:Av,m:zv,M:Pv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Rv,U:Lv,V:qv,w:Dv,W:Uv,x:null,X:null,y:jv,Y:Fv,Z:Iv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=_.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Zp,Y:Wp,Z:Gp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Sp(Ep(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Ep(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Sd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Sp(Ep(u.y)).getUTCDay():n(Ep(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Sp(u)):n(u)}}function T(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Lp?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Np);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Sp);return n.toString=function(){return t},n}}}var Cp,zp,Pp,Op,Rp,Lp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Dp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function jp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Gp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=Dp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return jp(t.getDate(),n,2)}function fv(t,n){return jp(t.getHours(),n,2)}function sv(t,n){return jp(t.getHours()%12||12,n,2)}function lv(t,n){return jp(1+Sd.count(Wd(t),t),n,3)}function hv(t,n){return jp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return jp(t.getMonth()+1,n,2)}function vv(t,n){return jp(t.getMinutes(),n,2)}function yv(t,n){return jp(t.getSeconds(),n,2)}function _v(t){var n=t.getDay();return 0===n?7:n}function gv(t,n){return jp(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Rd(t):Rd.ceil(t),jp(Rd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return jp(zd.count(Wd(t),t),n,2)}function wv(t,n){return jp(t.getFullYear()%100,n,2)}function Mv(t,n){return jp(t.getFullYear()%1e4,n,4)}function Tv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+jp(n/60|0,"0",2)+jp(n%60,"0",2)}function kv(t,n){return jp(t.getUTCDate(),n,2)}function Nv(t,n){return jp(t.getUTCHours(),n,2)}function Sv(t,n){return jp(t.getUTCHours()%12||12,n,2)}function Ev(t,n){return jp(1+rp.count(Tp(t),t),n,3)}function Av(t,n){return jp(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return jp(t.getUTCMonth()+1,n,2)}function Pv(t,n){return jp(t.getUTCMinutes(),n,2)}function Ov(t,n){return jp(t.getUTCSeconds(),n,2)}function Rv(t){var n=t.getUTCDay();return 0===n?7:n}function Lv(t,n){return jp(op.count(Tp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),jp(sp.count(Tp(t),t)+(4===Tp(t).getUTCDay()),n,2)}function Dv(t){return t.getUTCDay()}function Uv(t,n){return jp(ap.count(Tp(t),t),n,2)}function jv(t,n){return jp(t.getUTCFullYear()%100,n,2)}function Fv(t,n){return jp(t.getUTCFullYear()%1e4,n,4)}function Iv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Pp=Cp.parse,Op=Cp.utcFormat,Rp=Cp.utcParse,Cp}Xv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Rp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Zv=60*Wv,Gv=60*Zv,Qv=24*Gv,Jv=7*Qv,Kv=30*Qv,ty=365*Qv;function ny(t){return new Date(t)}function ey(t){return t instanceof Date?+t:+new Date(+t)}function ry(t,n,e,i,u,o,a,c,f){var s=Hh(Fh,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),y=f("%I %p"),_=f("%a %d"),g=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Zv],[o,5,5*Zv],[o,15,15*Zv],[o,30,30*Zv],[u,1,Gv],[u,3,3*Gv],[u,6,6*Gv],[u,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,ty]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return py.h=360*t-100,py.s=1.5-1.5*n,py.l=.8-.9*n,py+""};function yy(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var _y=yy(oy("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),gy=yy(oy("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),my=yy(oy("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xy=yy(oy("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function by(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return by(t).domain([n,e]).clamp(r)},Vh(i)}var wy=e(5),My=function(t){return function(){return t}};function Ty(t){return t[0]}function ky(t){return t[1]}function Ny(){this._=null}function Sy(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ey(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Ay(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Cy(t){for(;t.L;)t=t.L;return t}Ny.prototype={constructor:Ny,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Cy(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Ey(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ay(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ay(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ey(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,u=t.L,o=t.R;if(e=u?o?Cy(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Ey(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Ay(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Ey(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ay(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Ey(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ay(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zy=Ny;function Py(t,n,e,r){var i=[null,null],u=t_.push(i)-1;return i.left=t,i.right=n,e&&Ry(i,t,n,e),r&&Ry(i,n,t,r),Jy[t.index].halfedges.push(u),Jy[n.index].halfedges.push(u),i}function Oy(t,n,e){var r=[n,e];return r.left=t,r}function Ry(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Ly(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qy(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-e_)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,_=Iy.pop()||new function(){Sy(this),this.x=this.y=this.arc=this.site=this.cy=null};_.arc=t,_.site=i,_.x=v+o,_.y=(_.cy=y+a)+Math.sqrt(v*v+y*y),t.circle=_;for(var g=null,m=Ky._;m;)if(_.yn_)a=a.L;else{if(!((i=u-Gy(a,o))>n_)){r>-n_?(n=a.P,e=a):i>-n_?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jy[t.index]={site:t,halfedges:[]}}(t);var c=Xy(t);if(Qy.insert(n,c),n||e){if(n===e)return By(n),e=Xy(n.site),Qy.insert(c,e),c.edge=e.edge=Py(n.site,c.site),Yy(n),void Yy(e);if(e){By(n),By(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,y=p[1]-l,_=2*(h*y-d*v),g=h*h+d*d,m=v*v+y*y,x=[(y*g-d*m)/_+s,(h*m-v*g)/_+l];Ry(e.edge,f,p,x),c.edge=Py(f,t,null,x),e.edge=Py(t,p,null,x),Yy(n),Yy(e)}else c.edge=Py(n.site,c.site)}}function Zy(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Gy(t,n){var e=t.N;if(e)return Zy(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qy,Jy,Ky,t_,n_=1e-6,e_=1e-12;function r_(t,n){return n[1]-t[1]||n[0]-t[0]}function i_(t,n){var e,r,i,u=t.sort(r_).pop();for(t_=[],Jy=new Array(t.length),Qy=new zy,Ky=new zy;;)if(i=Fy,u&&(!i||u[1]n_||Math.abs(i[0][1]-i[1][1])>n_)||delete t_[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,y=Jy.length,_=!0;for(i=0;in_||Math.abs(v-h)>n_)&&(c.splice(a,0,t_.push(Oy(o,d,Math.abs(p-t)n_?[t,Math.abs(l-t)n_?[Math.abs(h-r)n_?[e,Math.abs(l-e)n_?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var g_=function(){var t,n,e=h_,r=d_,i=__,u=v_,o=y_,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=T("start","zoom","end"),d=500,p=150,v=0;function y(t){t.property("__zoom",p_).on("wheel.zoom",M).on("mousedown.zoom",k).on("dblclick.zoom",N).filter(o).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new a_(n,t.x,t.y)}function g(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new a_(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new a_(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),l_(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),s_(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function N(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(g(_(t,o),n,u),r.apply(this,arguments),c);l_(),f>0?yt(this).transition().duration(f).call(x,a,n):yt(this).call(y.transform,a)}}function S(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(s_(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function y(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function _(t){return t.innerRadius}function g(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,y=e+h,_=r+d,g=(p+y)/2,m=(v+_)/2,x=y-p,b=_-v,w=x*x+b*b,M=i-u,T=p*_-y*v,k=(b<0?-1:1)*l(c(0,M*M*w-T*T)),N=(T*b-x*k)/w,S=(-T*x-b*k)/w,E=(T*b+x*k)/w,A=(-T*x+b*k)/w,C=N-g,z=S-m,P=E-g,O=A-m;return C*C+z*z>P*P+O*O&&(N=E,S=A),{cx:N,cy:S,x01:-h,y01:-d,x11:N*(i/M-1),y11:S*(i/M-1)}}var M=function(){var t=_,n=g,e=i(0),c=null,M=m,T=x,k=b,N=null;function S(){var i,_,g,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,S=T.apply(this,arguments)-p,E=u(S-b),A=S>b;if(N||(N=i=Object(r.a)()),xh)if(E>v-h)N.moveTo(x*a(b),x*s(b)),N.arc(0,0,x,b,S,!A),m>h&&(N.moveTo(m*a(S),m*s(S)),N.arc(0,0,m,S,b,A));else{var C,z,P=b,O=S,R=b,L=S,q=E,D=E,U=k.apply(this,arguments)/2,j=U>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),F=f(u(x-m)/2,+e.apply(this,arguments)),I=F,Y=F;if(j>h){var B=y(j/m*s(U)),H=y(j/x*s(U));(q-=2*B)>h?(R+=B*=A?1:-1,L-=B):(q=0,R=L=(b+S)/2),(D-=2*H)>h?(P+=H*=A?1:-1,O-=H):(D=0,P=O=(b+S)/2)}var X=x*a(P),V=x*s(P),$=m*a(L),W=m*s(L);if(F>h){var Z=x*a(O),G=x*s(O),Q=m*a(R),J=m*s(R);if(Eh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,Z,G,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=Z-K[0],rt=G-K[1],it=1/s(((g=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:g<-1?d:Math.acos(g))/2),ut=l(K[0]*K[0]+K[1]*K[1]);I=f(F,(m-ut)/(it-1)),Y=f(F,(x-ut)/(it+1))}}D>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(Z,G,$,W,x,Y,A),N.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?I>h?(C=w($,W,Z,G,m,-I,A),z=w(X,V,Q,J,m,-I,A),N.lineTo(C.cx+C.x01,C.cy+C.y01),I=l;--h)f.point(_[h],g[h]);f.lineEnd(),f.areaEnd()}y&&(_[s]=+t(d,s,i),g[s]=+e(d,s,i),f.point(n?+n(d,s,i):_[s],u?+u(d,s,i):g[s]))}if(p)return f=null,p+""||null}function l(){return E().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},P=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),y=new Array(h),_=+r.apply(this,arguments),g=Math.min(v,Math.max(-v,u.apply(this,arguments)-_)),m=Math.min(Math.abs(g)/h,o.apply(this,arguments)),x=m*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(y[t],y[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(g-h*x)/d:0;a0?l*f:0)+x,y[c]={data:i[c],index:a,value:l,startAngle:_,endAngle:s,padAngle:m};return y}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=L(k);function R(t){this._curve=t}function L(t){function n(n){return new R(t(n))}return n._curve=t,n}function q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var D=function(){return q(E().curve(O))},U=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t},j=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},F=Array.prototype.slice;function I(t){return t.source}function Y(t){return t.target}function B(t){var n=I,e=Y,u=N,o=S,a=null;function c(){var i,c=F.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=j(n,e),o=j(n,e=(e+i)/2),a=j(r,e),c=j(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function Z(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[G,Q,tt,ut,it,at,lt],dt=function(){var t=i(G),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function yt(t){this._context=t}yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var _t=function(t){return new yt(t)};function gt(t){this._context=t}gt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new gt(t)};function xt(t){this._context=t}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new yt(t),this._beta=n}wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new yt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Tt(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Nt=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function St(t,n){this._context=t,this._k=(1-n)/6}St.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new St(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ot=function t(n){function e(t){return n?new Pt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rt(t,n){this._context=t,this._alpha=n}Rt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return n?new Rt(t,n):new St(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Dt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ut(t){this._context=t}Ut.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var jt=function(t){return new Ut(t)};function Ft(t){return t<0?-1:1}function It(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(Ft(u)+Ft(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Zt(t){this._context=t}function Gt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;on?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},y=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=T?5:u>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=k?2:1)}function E(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=k&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},P=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},R=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},L=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},j=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},F=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,y=d*d+p*p,_=Math.sqrt(v),g=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-y)/(2*_*g)))/2),x=m/g,b=m/_;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),y=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),N.hasOwnProperty(n)?{space:N[n],local:t}:t},E=function(t){var n=S(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===k&&n.documentElement.namespaceURI===k?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var P=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var R=document.documentElement;if(!R.matches){var L=R.webkitMatchesSelector||R.msMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector;O=function(t){return function(){return L.call(this,t)}}}}var q=O,D=function(t){return new Array(t.length)};function U(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}U.prototype={constructor:U,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var j="$";function F(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=_[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){yt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),Et(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Zt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof Ft||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof Ft||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ut(Ft,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ut(un,rn,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Ut(cn,an,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,yn=6/29,_n=3*yn*yn,gn=yn*yn*yn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Sn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=kn(t.r),r=kn(t.g),i=kn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>gn?Math.pow(t,1/3):t/_n+vn}function Mn(t){return t>yn?t*t*t:_n*(t-vn)}function Tn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Nn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Sn)return new Sn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Sn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Sn(t,n,e,null==r?1:r)}function Sn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ut(bn,xn,jt(Ft,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=dn*Mn(t),new un(Tn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),Tn(-.969266*n+1.8760108*t+.041556*e),Tn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ut(Sn,Nn,jt(Ft,{brighter:function(t){return new Sn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Sn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var En=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Pn=1.78277*Cn,On=1.78277*En- -.14861*An;function Rn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Ln)return new Ln(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Pn*e)/(On+zn-Pn),u=r-i,o=(Cn*(e-i)-En*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Ln(c<0?c+360:c,a,i,t.opacity)}(t):new Ln(t,n,e,null==r?1:r)}function Ln(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Ut(Ln,Rn,jt(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(En*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var Dn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):jn(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?Fn(t,e):jn(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):jn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Ee}function Ye(){Oe=(Pe=Le.now())+Re,Ee=Ae=0;try{Ie()}finally{Ee=0,function(){for(var t,n,e=Me,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Me=n);Te=t,He(r)}(),Oe=0}}function Be(){var t=Le.now(),n=t-Pe;n>ze&&(Re-=n,Pe=t)}function He(t){Ee||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Le.now()-Re)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Pe=Le.now(),Ce=setInterval(Be,ze)),Ee=1,qe(Ye)))}je.prototype=Fe.prototype={constructor:je,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?De():+e)+(null==n?0:+n),this._next||Te===this||(Te?Te._next=this:Me=this,Te=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new je;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new je,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?De():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=T("start","end","interrupt"),We=[],Ze=0,Ge=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ge)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fZe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=S(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=S(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uGe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={name:"x",handles:["e","w"].map(wi),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vi={name:"y",handles:["n","s"].map(wi),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},yi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},_i={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},xi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function wi(t){return{type:t}}function Mi(){return!ut.button}function Ti(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ni(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Si(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ei(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(yi)};function zi(t){var n,e=Ti,r=Mi,i=T(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_i.overlay).merge(e).each((function(){var t=ki(this).extent;yt(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_i.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return _i[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=yt(this),n=ki(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,n){return t.__brush.emitter||new f(t,n)}function f(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,L.attr("cursor",_i.selection),U());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(y=_=C=!1,U());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,U());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),L.attr("cursor",_i[m]),U());break;default:return}fi()}),!0).on("mousemove.brush",D,!0).on("mouseup.brush",j,!0);At(ut.view)}ci(),or(g),a.call(g),O.start()}function D(){var t=Mt(g);!C||y||_||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?_=!0:y=!0),P=t,v=!0,fi(),U()}function U(){var t;switch(d=P[0]-z[0],p=P[1]-z[1],x){case li:case si:b&&(d=Math.max(N-e,Math.min(E-f,d)),i=e+d,s=f+d),w&&(p=Math.max(S-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(N-e,Math.min(E-e,d)),i=e+d,s=f):b>0&&(d=Math.max(N-f,Math.min(E-f,d)),i=e,s=f+d),w<0?(p=Math.max(S-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(S-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(N,Math.min(E,e-d*b)),s=Math.max(N,Math.min(E,f+d*b))),w&&(o=Math.max(S,Math.min(A,u-p*w)),h=Math.max(S,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+_)/2))?v=u:_=u,(s=e>=(o=(y+g)/2))?y=o:g=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+_)/2))?v=u:_=u,(s=e>=(o=(y+g)/2))?y=o:g=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var yu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function _u(t){return t[0]}function gu(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?_u:n,null==e?gu:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function Tu(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=bu(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new yu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=_)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var g=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=g*g+m*m;if(x=(a=(p+y)/2))?p=a:y=a,(s=o>=(c=(v+_)/2))?v=c:_=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,y=p*p+v*v;yt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Lu=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Fu=function(t){return(t=ju(Math.abs(t)))?t[1]:NaN},Iu=function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Iu(100*t,n)},r:Iu,s:function(t,n){var e=ju(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+ju(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Vu,$u,Wu,Zu=function(t){return t},Gu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Zu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Zu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",y="$"===f?i[1]:/[%p]/.test(p)?a:"",_=Yu[p],g=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=y;if("c"===p)x=_(t)+x,t="";else{var b=(t=+t)<0;if(t=_(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Gu[8+zu/3]:"")+x+(b&&"("===c?")":""),g)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3))),i=Math.pow(10,-r),u=Gu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Fu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3)))-Fu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Fu(n)-Fu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,yo=Math.atan2,_o=Math.cos,go=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},To=Math.sqrt,ko=Math.tan;function No(t){return t>1?0:t<-1?ao:Math.acos(t)}function So(t){return t>1?co:t<-1?-co:Math.asin(t)}function Eo(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Po.hasOwnProperty(t.type)&&Po[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=_o(n=(n*=ho)/2+fo),o=wo(n),a=jo*o,c=Uo*u+a*_o(i),f=a*r*wo(i);Io.add(yo(f,c)),Do=t,Uo=u,jo=o}var Wo=function(t){return Yo.reset(),Fo(t,Bo),2*Yo};function Zo(t){return[yo(t[1],t[0]),So(t[2])]}function Go(t){var n=t[0],e=t[1],r=_o(e);return[r*_o(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=To(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ya,lineEnd:_a,polygonStart:function(){da.point=ga,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ya,da.lineEnd=_a,Io<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Go([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Zo(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ya(){da.point=va}function _a(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function ga(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){ga(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Ia={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Ia.lineStart=Wa,Ia.lineEnd=Za},polygonEnd:function(){Ia.lineStart=Ha,Ia.lineEnd=$a}};function Ya(t,n){t*=ho;var e=_o(n*=ho);Ba(e*_o(t),e*wo(t),wo(n))}function Ba(t,n,e){Na+=(t-Na)/++Ta,Sa+=(n-Sa)/Ta,Ea+=(e-Ea)/Ta}function Ha(){Ia.point=Xa}function Xa(t,n){t*=ho;var e=_o(n*=ho);Da=e*_o(t),Ua=e*wo(t),ja=wo(n),Ia.point=Va,Ba(Da,Ua,ja)}function Va(t,n){t*=ho;var e=_o(n*=ho),r=e*_o(t),i=e*wo(t),u=wo(n),o=yo(To((o=Ua*u-ja*i)*o+(o=ja*r-Da*u)*o+(o=Da*i-Ua*r)*o),Da*r+Ua*i+ja*u);ka+=o,Aa+=o*(Da+(Da=r)),Ca+=o*(Ua+(Ua=i)),za+=o*(ja+(ja=u)),Ba(Da,Ua,ja)}function $a(){Ia.point=Ya}function Wa(){Ia.point=Ga}function Za(){Qa(La,qa),Ia.point=Ya}function Ga(t,n){La=t,qa=n,t*=ho,n*=ho,Ia.point=Qa;var e=_o(n);Da=e*_o(t),Ua=e*wo(t),ja=wo(n),Ba(Da,Ua,ja)}function Qa(t,n){t*=ho;var e=_o(n*=ho),r=e*_o(t),i=e*wo(t),u=wo(n),o=Ua*u-ja*i,a=ja*r-Da*u,c=Da*i-Ua*r,f=To(o*o+a*a+c*c),s=So(f),l=f&&-s/f;Pa+=l*o,Oa+=l*a,Ra+=l*c,ka+=s,Aa+=s*(Da+(Da=r)),Ca+=s*(Ua+(Ua=i)),za+=s*(ja+(ja=u)),Ba(Da,Ua,ja)}var Ja=function(t){Ta=ka=Na=Sa=Ea=Aa=Ca=za=Pa=Oa=Ra=0,Fo(t,Ia);var n=Pa,e=Oa,r=Ra,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,kaao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=_o(t),r=wo(t),i=_o(n),u=wo(n);function o(t,n){var o=_o(n),a=_o(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[yo(c*i-s*u,a*e-f*r),So(s*i+c*u)]}return o.invert=function(t,n){var o=_o(n),a=_o(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[yo(c*i+f*u,a*e+s*r),So(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=_o(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=M*w,k=T>ao,N=p*x;if(vc.add(yo(N*M*wo(T),v*b+N*_o(T))),u+=k?w+M*so:w,k^h>=e^g>=e){var S=Jo(Go(l),Go(_));na(S);var E=Jo(i,S);na(E);var A=(k^w>=0?-1:1)*So(E[2]);(r>A||r===A&&(S[0]||S[1]))&&(o+=k^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(gc))}return d}};function gc(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=_c((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=_o(r))*wo(e)-wo(r)*(i=_o(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return _o(t)*_o(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Go(t),Go(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),y=p*p-v*(Qo(h,h)-1);if(!(y<0)){var _=To(y),g=ta(d,(-p-_)/v);if(Ko(g,h),g=Zo(g),!r)return g;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^g[1]<(po(g[0]-x)ao^(x<=g[0]&&g[0]<=b)){var N=ta(d,(-p+_)/v);return Ko(N,h),[g,Zo(N)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return _c(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),y=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var _;y&e||!(_=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,Tc=-Mc;function kc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,y,_,g,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=T,s&&s.push(l=[]),g=!0,_=!1,v=y=NaN},lineEnd:function(){f&&(T(h,d),p&&_&&b.rejoin(),f.push(b.result())),w.point=M,_&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function T(r,o){var a=u(r,o);if(s&&l.push([r,o]),g)h=r,d=o,p=a,g=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&_)x.point(r,o);else{var c=[v=Math.max(Tc,Math.min(Mc,v)),y=Math.max(Tc,Math.min(Mc,y))],f=[r=Math.max(Tc,Math.min(Mc,r)),o=Math.max(Tc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(_||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,y=o,_=a}return w}}var Nc,Sc,Ec,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=kc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Pc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Pc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Nc=t*=ho,Sc=wo(n*=ho),Ec=_o(n),zc.point=Rc}function Rc(t,n){t*=ho;var e=wo(n*=ho),r=_o(n),i=po(t-Nc),u=_o(i),o=r*wo(i),a=Ec*e-Sc*r*u,c=Sc*e+Ec*r*u;Cc.add(yo(To(o*o+a*a),c)),Nc=t,Sc=e,Ec=r}var Lc=function(t){return Cc.reset(),Fo(t,zc),+Cc},qc=[null,null],Dc={type:"LineString",coordinates:qc},Uc=function(t,n){return qc[0]=t,qc[1]=n,Lc(Dc)},jc={Feature:function(t,n){return Ic(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(go(o/p)*p,u,p).filter((function(t){return po(t%y)>oo})).map(s))}return g.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),g.precision(_)):[[i,c],[e,a]]},g.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),g.precision(_)):[[n,o],[t,u]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(v=+t[0],y=+t[1],g):[v,y]},g.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],g):[d,p]},g.precision=function(r){return arguments.length?(_=+r,f=Wc(o,u,90),s=Zc(n,t,_),l=Wc(c,a,90),h=Zc(i,e,_),g):_},g.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Gc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=_o(r),a=wo(r),c=_o(u),f=wo(u),s=o*_o(e),l=o*wo(e),h=c*_o(i),d=c*wo(i),p=2*So(To(Eo(u-r)+o*c*Eo(i-e))),v=wo(p),y=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[yo(i,r)*lo,yo(u,To(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return y.distance=p,y},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,yf=af,_f=1/0,gf=_f,mf=-_f,xf=mf,bf={point:function(t,n){t<_f&&(_f=t),t>mf&&(mf=t),nxf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[_f,gf],[mf,xf]];return mf=xf=-(gf=_f=1/0),t}},wf=0,Mf=0,Tf=0,kf=0,Nf=0,Sf=0,Ef=0,Af=0,Cf=0,zf={point:Pf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=Df,zf.lineEnd=Uf},polygonEnd:function(){zf.point=Pf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Ef/Cf,Af/Cf]:Sf?[kf/Sf,Nf/Sf]:Tf?[wf/Tf,Mf/Tf]:[NaN,NaN];return wf=Mf=Tf=kf=Nf=Sf=Ef=Af=Cf=0,t}};function Pf(t,n){wf+=t,Mf+=n,++Tf}function Of(){zf.point=Rf}function Rf(t,n){zf.point=Lf,Pf(pf=t,vf=n)}function Lf(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Nf+=i*(vf+n)/2,Sf+=i,Pf(pf=t,vf=n)}function qf(){zf.point=Pf}function Df(){zf.point=jf}function Uf(){Ff(hf,df)}function jf(t,n){zf.point=Ff,Pf(hf=pf=t,df=vf=n)}function Ff(t,n){var e=t-pf,r=n-vf,i=To(e*e+r*r);kf+=i*(pf+t)/2,Nf+=i*(vf+n)/2,Sf+=i,Ef+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Pf(pf=t,vf=n)}var If=zf;function Yf(t){this._context=t}Yf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Zf={point:Ao,lineStart:function(){Zf.point=Gf},lineEnd:function(){Bf&&Qf(Hf,Xf),Zf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Gf(t,n){Zf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(To(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Zf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ts(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Fo(t,e(r))),r.result()}return u.area=function(t){return Fo(t,e(yf)),yf.result()},u.measure=function(t){return Fo(t,e(Jf)),Jf.result()},u.bounds=function(t){return Fo(t,e(bf)),bf.result()},u.centroid=function(t){return Fo(t,e(If)),If.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Fo(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,point:function(t,n){this.stream.point(t,n)},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()}};var ss=16,ls=_o(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,y){var _=f-r,g=s-i,m=_*_+g*g;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=To(x*x+b*b+w*w),T=So(w/=M),k=po(po(w)-1)n||po((_*A+g*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,E()):[y*lo,_*lo,g*lo]},k.precision=function(t){return arguments.length?(T=hs(S,M=t*t),A()):To(M)},k.fitExtent=function(t,n){return os(k,t,n)},k.fitSize=function(t,n){return as(k,t,n)},k.fitWidth=function(t,n){return cs(k,t,n)},k.fitHeight=function(t,n){return fs(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&N,E()}}function ys(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function _s(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*_o(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*To(t*t+e*e);return[yo(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ps=function(){return ys(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Rs=function(){return ps(Os).scale(152.63)};function Ls(t,n){var e=_o(t),r=t===n?wo(t):(e-_o(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Is).scale(175.295)};function Bs(t,n){return[_o(n)*wo(t),wo(n)]}Bs.invert=ws(So);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=_o(n),r=1+_o(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(ko((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function Zs(t,n){return t.parent===n.parent?1:2}function Gs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Zs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Gs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function Ks(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function yl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function _l(t){this._=t,this.next=null,this.previous=null}function gl(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;pl(e,n,r=t[2]),n=new _l(n),e=new _l(e),r=new _l(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function Dl(t,n){return t.parent===n.parent?1:2}function Ul(t){var n=t.children;return n?n[0]:t.t}function jl(t){var n=t.children;return n?n[n.length-1]:t.t}function Fl(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Il(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=Dl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=jl(a),u=Ul(u),a&&u;)c=Ul(c),(o=jl(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Fl(Il(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!jl(o)&&(o.t=a,o.m+=l-s),u&&!Ul(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=a;break}p=d}_.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(El),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var g=(i*_+o*y)/r;t(n,d,y,i,u,g,c),t(d,e,_,g,u,o,c)}else{var m=(u*_+c*y)/r;t(n,d,y,i,u,o,m),t(d,e,_,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Gl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},hh(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,hh(this),this}};var ph=function(){return Math.random()},vh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(ph),yh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),_h=function t(n){function e(){var t=yh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),gh=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=h:c.onreadystatechange=function(t){c.readyState>3&&h(t)},c.onprogress=function(t){o.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,h){return c.open(n,t,!0,f,s),null==r||a.has("accept")||a.set("accept",r+",*/*"),c.setRequestHeader&&a.each((function(t,n){c.setRequestHeader(n,t)})),null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),l>0&&(c.timeout=l),null==h&&"function"==typeof i&&(h=i,i=null),null!=h&&1===h.length&&(h=function(t){return function(n,e){t(null==n?e:null)}}(h)),null!=h&&e.on("error",h).on("load",(function(t){h(null,t)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Th=wh("application/json",(function(t){return JSON.parse(t.responseText)})),kh=wh("text/plain",(function(t){return t.responseText})),Nh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Sh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Eh=Sh("text/csv",ru),Ah=Sh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Ph=Ch.slice,Oh={name:"implicit"};function Rh(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Ph.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Ih,r=i=null,s}function s(n){return(r||(r=e(u,o,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,a)))(+n)}return s.invert=function(t){return(i||(i=e(o,u,Fh,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},s.domain=function(t){return arguments.length?(u=zh.call(t,Uh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Ph.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Ph.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Fh,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Uh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Zh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;y.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;y.push(h)}}else y=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?y.reverse():y},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Ph.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Ph.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,yd=6048e5,_d=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),gd=_d,md=_d.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Td=Md,kd=Md.range,Nd=ld((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/864e5}),(function(t){return t.getDate()-1})),Sd=Nd,Ed=Nd.range;function Ad(t){return ld((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vd)/yd}))}var Cd=Ad(0),zd=Ad(1),Pd=Ad(2),Od=Ad(3),Rd=Ad(4),Ld=Ad(5),qd=Ad(6),Dd=Cd.range,Ud=zd.range,jd=Pd.range,Fd=Od.range,Id=Rd.range,Yd=Ld.range,Bd=qd.range,Hd=ld((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Xd=Hd,Vd=Hd.range,$d=ld((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Wd=$d,Zd=$d.range,Gd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/yd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,yp=fp.range,_p=sp.range,gp=lp.range,mp=hp.range,xp=ld((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),bp=xp,wp=xp.range,Mp=ld((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Tp=Mp,kp=Mp.range;function Np(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Sp(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ep(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Ip(i),s=Yp(i),l=Ip(u),h=Yp(u),d=Ip(o),p=Yp(o),v=Ip(a),y=Yp(a),_=Ip(c),g=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:yv,u:_v,U:gv,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:Tv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:kv,e:kv,f:Cv,H:Nv,I:Sv,j:Ev,L:Av,m:zv,M:Pv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Rv,U:Lv,V:qv,w:Dv,W:Uv,x:null,X:null,y:jv,Y:Fv,Z:Iv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=_.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Zp,Y:Wp,Z:Gp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Sp(Ep(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Ep(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Sd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Sp(Ep(u.y)).getUTCDay():n(Ep(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Sp(u)):n(u)}}function T(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Lp?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Np);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Sp);return n.toString=function(){return t},n}}}var Cp,zp,Pp,Op,Rp,Lp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Dp=/^%/,Up=/[\\^$*+?|[\]().{}]/g;function jp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Gp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=Dp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return jp(t.getDate(),n,2)}function fv(t,n){return jp(t.getHours(),n,2)}function sv(t,n){return jp(t.getHours()%12||12,n,2)}function lv(t,n){return jp(1+Sd.count(Wd(t),t),n,3)}function hv(t,n){return jp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return jp(t.getMonth()+1,n,2)}function vv(t,n){return jp(t.getMinutes(),n,2)}function yv(t,n){return jp(t.getSeconds(),n,2)}function _v(t){var n=t.getDay();return 0===n?7:n}function gv(t,n){return jp(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Rd(t):Rd.ceil(t),jp(Rd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return jp(zd.count(Wd(t),t),n,2)}function wv(t,n){return jp(t.getFullYear()%100,n,2)}function Mv(t,n){return jp(t.getFullYear()%1e4,n,4)}function Tv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+jp(n/60|0,"0",2)+jp(n%60,"0",2)}function kv(t,n){return jp(t.getUTCDate(),n,2)}function Nv(t,n){return jp(t.getUTCHours(),n,2)}function Sv(t,n){return jp(t.getUTCHours()%12||12,n,2)}function Ev(t,n){return jp(1+rp.count(Tp(t),t),n,3)}function Av(t,n){return jp(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return jp(t.getUTCMonth()+1,n,2)}function Pv(t,n){return jp(t.getUTCMinutes(),n,2)}function Ov(t,n){return jp(t.getUTCSeconds(),n,2)}function Rv(t){var n=t.getUTCDay();return 0===n?7:n}function Lv(t,n){return jp(op.count(Tp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),jp(sp.count(Tp(t),t)+(4===Tp(t).getUTCDay()),n,2)}function Dv(t){return t.getUTCDay()}function Uv(t,n){return jp(ap.count(Tp(t),t),n,2)}function jv(t,n){return jp(t.getUTCFullYear()%100,n,2)}function Fv(t,n){return jp(t.getUTCFullYear()%1e4,n,4)}function Iv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Pp=Cp.parse,Op=Cp.utcFormat,Rp=Cp.utcParse,Cp}Xv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Rp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Zv=60*Wv,Gv=60*Zv,Qv=24*Gv,Jv=7*Qv,Kv=30*Qv,ty=365*Qv;function ny(t){return new Date(t)}function ey(t){return t instanceof Date?+t:+new Date(+t)}function ry(t,n,e,i,u,o,a,c,f){var s=Hh(Fh,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),y=f("%I %p"),_=f("%a %d"),g=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Zv],[o,5,5*Zv],[o,15,15*Zv],[o,30,30*Zv],[u,1,Gv],[u,3,3*Gv],[u,6,6*Gv],[u,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,ty]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return py.h=360*t-100,py.s=1.5-1.5*n,py.l=.8-.9*n,py+""};function yy(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var _y=yy(oy("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),gy=yy(oy("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),my=yy(oy("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xy=yy(oy("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function by(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return by(t).domain([n,e]).clamp(r)},Vh(i)}var wy=e(5),My=function(t){return function(){return t}};function Ty(t){return t[0]}function ky(t){return t[1]}function Ny(){this._=null}function Sy(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ey(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Ay(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Cy(t){for(;t.L;)t=t.L;return t}Ny.prototype={constructor:Ny,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Cy(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Ey(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ay(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ay(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ey(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,u=t.L,o=t.R;if(e=u?o?Cy(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Ey(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Ay(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Ey(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ay(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Ey(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ay(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zy=Ny;function Py(t,n,e,r){var i=[null,null],u=t_.push(i)-1;return i.left=t,i.right=n,e&&Ry(i,t,n,e),r&&Ry(i,n,t,r),Jy[t.index].halfedges.push(u),Jy[n.index].halfedges.push(u),i}function Oy(t,n,e){var r=[n,e];return r.left=t,r}function Ry(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Ly(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qy(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-e_)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,_=Iy.pop()||new function(){Sy(this),this.x=this.y=this.arc=this.site=this.cy=null};_.arc=t,_.site=i,_.x=v+o,_.y=(_.cy=y+a)+Math.sqrt(v*v+y*y),t.circle=_;for(var g=null,m=Ky._;m;)if(_.yn_)a=a.L;else{if(!((i=u-Gy(a,o))>n_)){r>-n_?(n=a.P,e=a):i>-n_?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jy[t.index]={site:t,halfedges:[]}}(t);var c=Xy(t);if(Qy.insert(n,c),n||e){if(n===e)return By(n),e=Xy(n.site),Qy.insert(c,e),c.edge=e.edge=Py(n.site,c.site),Yy(n),void Yy(e);if(e){By(n),By(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,y=p[1]-l,_=2*(h*y-d*v),g=h*h+d*d,m=v*v+y*y,x=[(y*g-d*m)/_+s,(h*m-v*g)/_+l];Ry(e.edge,f,p,x),c.edge=Py(f,t,null,x),e.edge=Py(t,p,null,x),Yy(n),Yy(e)}else c.edge=Py(n.site,c.site)}}function Zy(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Gy(t,n){var e=t.N;if(e)return Zy(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qy,Jy,Ky,t_,n_=1e-6,e_=1e-12;function r_(t,n){return n[1]-t[1]||n[0]-t[0]}function i_(t,n){var e,r,i,u=t.sort(r_).pop();for(t_=[],Jy=new Array(t.length),Qy=new zy,Ky=new zy;;)if(i=Fy,u&&(!i||u[1]n_||Math.abs(i[0][1]-i[1][1])>n_)||delete t_[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,y=Jy.length,_=!0;for(i=0;in_||Math.abs(v-h)>n_)&&(c.splice(a,0,t_.push(Oy(o,d,Math.abs(p-t)n_?[t,Math.abs(l-t)n_?[Math.abs(h-r)n_?[e,Math.abs(l-e)n_?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var g_=function(){var t,n,e=h_,r=d_,i=__,u=v_,o=y_,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=T("start","zoom","end"),d=500,p=150,v=0;function y(t){t.property("__zoom",p_).on("wheel.zoom",M).on("mousedown.zoom",k).on("dblclick.zoom",N).filter(o).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new a_(n,t.x,t.y)}function g(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new a_(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new a_(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),l_(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),s_(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function N(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(g(_(t,o),n,u),r.apply(this,arguments),c);l_(),f>0?yt(this).transition().duration(f).call(x,a,n):yt(this).call(y.transform,a)}}function S(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(s_(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function y(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function _(t){return t.innerRadius}function g(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,y=e+h,_=r+d,g=(p+y)/2,m=(v+_)/2,x=y-p,b=_-v,w=x*x+b*b,M=i-u,T=p*_-y*v,k=(b<0?-1:1)*l(c(0,M*M*w-T*T)),N=(T*b-x*k)/w,S=(-T*x-b*k)/w,E=(T*b+x*k)/w,A=(-T*x+b*k)/w,C=N-g,z=S-m,P=E-g,O=A-m;return C*C+z*z>P*P+O*O&&(N=E,S=A),{cx:N,cy:S,x01:-h,y01:-d,x11:N*(i/M-1),y11:S*(i/M-1)}}var M=function(){var t=_,n=g,e=i(0),c=null,M=m,T=x,k=b,N=null;function S(){var i,_,g,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,S=T.apply(this,arguments)-p,E=u(S-b),A=S>b;if(N||(N=i=Object(r.a)()),xh)if(E>v-h)N.moveTo(x*a(b),x*s(b)),N.arc(0,0,x,b,S,!A),m>h&&(N.moveTo(m*a(S),m*s(S)),N.arc(0,0,m,S,b,A));else{var C,z,P=b,O=S,R=b,L=S,q=E,D=E,U=k.apply(this,arguments)/2,j=U>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),F=f(u(x-m)/2,+e.apply(this,arguments)),I=F,Y=F;if(j>h){var B=y(j/m*s(U)),H=y(j/x*s(U));(q-=2*B)>h?(R+=B*=A?1:-1,L-=B):(q=0,R=L=(b+S)/2),(D-=2*H)>h?(P+=H*=A?1:-1,O-=H):(D=0,P=O=(b+S)/2)}var X=x*a(P),V=x*s(P),$=m*a(L),W=m*s(L);if(F>h){var Z=x*a(O),G=x*s(O),Q=m*a(R),J=m*s(R);if(Eh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,Z,G,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=Z-K[0],rt=G-K[1],it=1/s(((g=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:g<-1?d:Math.acos(g))/2),ut=l(K[0]*K[0]+K[1]*K[1]);I=f(F,(m-ut)/(it-1)),Y=f(F,(x-ut)/(it+1))}}D>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(Z,G,$,W,x,Y,A),N.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?I>h?(C=w($,W,Z,G,m,-I,A),z=w(X,V,Q,J,m,-I,A),N.lineTo(C.cx+C.x01,C.cy+C.y01),I=l;--h)f.point(_[h],g[h]);f.lineEnd(),f.areaEnd()}y&&(_[s]=+t(d,s,i),g[s]=+e(d,s,i),f.point(n?+n(d,s,i):_[s],u?+u(d,s,i):g[s]))}if(p)return f=null,p+""||null}function l(){return E().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},P=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),y=new Array(h),_=+r.apply(this,arguments),g=Math.min(v,Math.max(-v,u.apply(this,arguments)-_)),m=Math.min(Math.abs(g)/h,o.apply(this,arguments)),x=m*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(y[t],y[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(g-h*x)/d:0;a0?l*f:0)+x,y[c]={data:i[c],index:a,value:l,startAngle:_,endAngle:s,padAngle:m};return y}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=L(k);function R(t){this._curve=t}function L(t){function n(n){return new R(t(n))}return n._curve=t,n}function q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var D=function(){return q(E().curve(O))},U=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(L(t)):n()._curve},t},j=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},F=Array.prototype.slice;function I(t){return t.source}function Y(t){return t.target}function B(t){var n=I,e=Y,u=N,o=S,a=null;function c(){var i,c=F.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=j(n,e),o=j(n,e=(e+i)/2),a=j(r,e),c=j(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function Z(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[G,Q,tt,ut,it,at,lt],dt=function(){var t=i(G),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function yt(t){this._context=t}yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var _t=function(t){return new yt(t)};function gt(t){this._context=t}gt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new gt(t)};function xt(t){this._context=t}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new yt(t),this._beta=n}wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new yt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Tt(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Nt=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function St(t,n){this._context=t,this._k=(1-n)/6}St.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new St(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ot=function t(n){function e(t){return n?new Pt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rt(t,n){this._context=t,this._alpha=n}Rt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return n?new Rt(t,n):new St(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Dt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ut(t){this._context=t}Ut.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var jt=function(t){return new Ut(t)};function Ft(t){return t<0?-1:1}function It(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(Ft(u)+Ft(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Zt(t){this._context=t}function Gt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;oD.length&&D.push(e)}function U(e,t,n){return null==e?0:function e(t,n,r,l){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(l,t,""===n?"."+R(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cD.length&&D.push(e)}function U(e,t,n){return null==e?0:function e(t,n,r,l){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(l,t,""===n?"."+R(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ce,e.release=se}l(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ie)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ie)},persist:function(){this.isPersistent=ie},isPersistent:ae,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ae,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return l(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var de=ue.extend({data:null}),pe=ue.extend({data:null}),me=[9,13,27,32],he=H&&"CompositionEvent"in window,ye=null;H&&"documentMode"in document&&(ye=document.documentMode);var ve=H&&"TextEvent"in window&&!ye,ge=H&&(!he||ye&&8=ye),be=String.fromCharCode(32),ke={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},we=!1;function xe(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var _e=!1,Ee={eventTypes:ke,extractEvents:function(e,t,n,r){var l=void 0,o=void 0;if(he)e:{switch(e){case"compositionstart":l=ke.compositionStart;break e;case"compositionend":l=ke.compositionEnd;break e;case"compositionupdate":l=ke.compositionUpdate;break e}l=void 0}else _e?xe(e,n)&&(l=ke.compositionEnd):"keydown"===e&&229===n.keyCode&&(l=ke.compositionStart);return l?(ge&&"ko"!==n.locale&&(_e||l!==ke.compositionStart?l===ke.compositionEnd&&_e&&(o=oe()):(re="value"in(ne=r)?ne.value:ne.textContent,_e=!0)),l=de.getPooled(l,t,n,r),o?l.data=o:null!==(o=Te(n))&&(l.data=o),$(l),o=l):o=null,(e=ve?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(we=!0,be);case"textInput":return(e=t.data)===be&&we?null:e;default:return null}}(e,n):function(e,t){if(_e)return"compositionend"===e||!he&&xe(e,t)?(e=oe(),le=re=ne=null,_e=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1
",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+q+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+q+"*(?:value|"+R+")"),t.querySelectorAll("[id~="+x+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]")})),st((function(t){t.innerHTML="";var n=d.createElement("input");n.setAttribute("type","hidden"),t.appendChild(n).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+q+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(e.matchesSelector=G.test(m=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&st((function(t){e.disconnectedMatch=m.call(t,"*"),m.call(t,"[s!='']:x"),y.push("!=",F)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),n=G.test(p.compareDocumentPosition),b=n||G.test(p.contains)?function(t,n){var e=9===t.nodeType?t.documentElement:t,r=n&&n.parentNode;return t===r||!(!r||1!==r.nodeType||!(e.contains?e.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,n){if(n)for(;n=n.parentNode;)if(n===t)return!0;return!1},k=n?function(t,n){if(t===n)return f=!0,0;var r=!t.compareDocumentPosition-!n.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(n.ownerDocument||n)?t.compareDocumentPosition(n):1)||!e.sortDetached&&n.compareDocumentPosition(t)===r?t===d||t.ownerDocument===_&&b(_,t)?-1:n===d||n.ownerDocument===_&&b(_,n)?1:l?j(l,t)-j(l,n):0:4&r?-1:1)}:function(t,n){if(t===n)return f=!0,0;var e,r=0,i=t.parentNode,o=n.parentNode,u=[t],a=[n];if(!i||!o)return t===d?-1:n===d?1:i?-1:o?1:l?j(l,t)-j(l,n):0;if(i===o)return lt(t,n);for(e=t;e=e.parentNode;)u.unshift(e);for(e=n;e=e.parentNode;)a.unshift(e);for(;u[r]===a[r];)r++;return r?lt(u[r],a[r]):u[r]===_?-1:a[r]===_?1:0},d):d},ot.matches=function(t,n){return ot(t,null,null,n)},ot.matchesSelector=function(t,n){if((t.ownerDocument||t)!==d&&h(t),n=n.replace(B,"='$1']"),e.matchesSelector&&v&&!S[n+" "]&&(!y||!y.test(n))&&(!g||!g.test(n)))try{var r=m.call(t,n);if(r||e.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return ot(n,d,null,[t]).length>0},ot.contains=function(t,n){return(t.ownerDocument||t)!==d&&h(t),b(t,n)},ot.attr=function(t,n){(t.ownerDocument||t)!==d&&h(t);var i=r.attrHandle[n.toLowerCase()],o=i&&A.call(r.attrHandle,n.toLowerCase())?i(t,n,!v):void 0;return void 0!==o?o:e.attributes||!v?t.getAttribute(n):(o=t.getAttributeNode(n))&&o.specified?o.value:null},ot.escape=function(t){return(t+"").replace(nt,et)},ot.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ot.uniqueSort=function(t){var n,r=[],i=0,o=0;if(f=!e.detectDuplicates,l=!e.sortStable&&t.slice(0),t.sort(k),f){for(;n=t[o++];)n===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=ot.getText=function(t){var n,e="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)e+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;n=t[r++];)e+=i(n);return e},(r=ot.selectors={cacheLength:50,createPseudo:at,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ot.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ot.error(t[0]),t},PSEUDO:function(t){var n,e=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":e&&W.test(e)&&(n=u(e,!0))&&(n=e.indexOf(")",e.length-n)-e.length)&&(t[0]=t[0].slice(0,n),t[2]=e.slice(0,n)),t.slice(0,3))}},filter:{TAG:function(t){var n=t.replace(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===n}},CLASS:function(t){var n=C[t+" "];return n||(n=new RegExp("(^|"+q+")"+t+"("+q+"|$)"))&&C(t,(function(t){return n.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,n,e){return function(r){var i=ot.attr(r,t);return null==i?"!="===n:!n||(i+="","="===n?i===e:"!="===n?i!==e:"^="===n?e&&0===i.indexOf(e):"*="===n?e&&i.indexOf(e)>-1:"$="===n?e&&i.slice(-e.length)===e:"~="===n?(" "+i.replace(z," ")+" ").indexOf(e)>-1:"|="===n&&(i===e||i.slice(0,e.length+1)===e+"-"))}},CHILD:function(t,n,e,r,i){var o="nth"!==t.slice(0,3),u="last"!==t.slice(-4),a="of-type"===n;return 1===r&&0===i?function(t){return!!t.parentNode}:function(n,e,s){var c,l,f,h,d,p,v=o!==u?"nextSibling":"previousSibling",g=n.parentNode,y=a&&n.nodeName.toLowerCase(),m=!s&&!a,b=!1;if(g){if(o){for(;v;){for(h=n;h=h[v];)if(a?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;p=v="only"===t&&!p&&"nextSibling"}return!0}if(p=[u?g.firstChild:g.lastChild],u&&m){for(b=(d=(c=(l=(f=(h=g)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&c[1])&&c[2],h=d&&g.childNodes[d];h=++d&&h&&h[v]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===n){l[t]=[w,d,b];break}}else if(m&&(b=d=(c=(l=(f=(h=n)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&c[1]),!1===b)for(;(h=++d&&h&&h[v]||(b=d=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++b||(m&&((l=(f=h[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[w,b]),h!==n)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,n){var e,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||ot.error("unsupported pseudo: "+t);return i[x]?i(n):i.length>1?(e=[t,t,"",n],r.setFilters.hasOwnProperty(t.toLowerCase())?at((function(t,e){for(var r,o=i(t,n),u=o.length;u--;)t[r=j(t,o[u])]=!(e[r]=o[u])})):function(t){return i(t,0,e)}):i}},pseudos:{not:at((function(t){var n=[],e=[],r=a(t.replace($,"$1"));return r[x]?at((function(t,n,e,i){for(var o,u=r(t,null,i,[]),a=t.length;a--;)(o=u[a])&&(t[a]=!(n[a]=o))})):function(t,i,o){return n[0]=t,r(n,null,o,e),n[0]=null,!e.pop()}})),has:at((function(t){return function(n){return ot(t,n).length>0}})),contains:at((function(t){return t=t.replace(Z,tt),function(n){return(n.textContent||n.innerText||i(n)).indexOf(t)>-1}})),lang:at((function(t){return Y.test(t||"")||ot.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(n){var e;do{if(e=v?n.lang:n.getAttribute("xml:lang")||n.getAttribute("lang"))return(e=e.toLowerCase())===t||0===e.indexOf(t+"-")}while((n=n.parentNode)&&1===n.nodeType);return!1}})),target:function(n){var e=t.location&&t.location.hash;return e&&e.slice(1)===n.id},root:function(t){return t===p},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var n=t.nodeName.toLowerCase();return"input"===n&&!!t.checked||"option"===n&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var n=t.nodeName.toLowerCase();return"input"===n&&"button"===t.type||"button"===n},text:function(t){var n;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(n=t.getAttribute("type"))||"text"===n.toLowerCase())},first:pt((function(){return[0]})),last:pt((function(t,n){return[n-1]})),eq:pt((function(t,n,e){return[e<0?e+n:e]})),even:pt((function(t,n){for(var e=0;e=0;)t.push(r);return t})),gt:pt((function(t,n,e){for(var r=e<0?e+n:e;++r1?function(n,e,r){for(var i=t.length;i--;)if(!t[i](n,e,r))return!1;return!0}:t[0]}function xt(t,n,e,r,i){for(var o,u=[],a=0,s=t.length,c=null!=n;a-1&&(o[c]=!(u[c]=f))}}else y=xt(y===u?y.splice(p,y.length):y),i?i(null,u,y,s):O.apply(u,y)}))}function wt(t){for(var n,e,i,o=t.length,u=r.relative[t[0].type],a=u||r.relative[" "],s=u?1:0,l=mt((function(t){return t===n}),a,!0),f=mt((function(t){return j(n,t)>-1}),a,!0),h=[function(t,e,r){var i=!u&&(r||e!==c)||((n=e).nodeType?l(t,e,r):f(t,e,r));return n=null,i}];s1&&bt(h),s>1&&yt(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace($,"$1"),e,s0,i=t.length>0,o=function(o,u,a,s,l){var f,p,g,y=0,m="0",b=o&&[],x=[],_=c,T=o||i&&r.find.TAG("*",l),C=w+=null==_?1:Math.random()||.1,M=T.length;for(l&&(c=u===d||u||l);m!==M&&null!=(f=T[m]);m++){if(i&&f){for(p=0,u||f.ownerDocument===d||(h(f),a=!v);g=t[p++];)if(g(f,u||d,a)){s.push(f);break}l&&(w=C)}e&&((f=!g&&f)&&y--,o&&b.push(f))}if(y+=m,e&&m!==y){for(p=0;g=n[p++];)g(b,x,u,a);if(o){if(y>0)for(;m--;)b[m]||x[m]||(x[m]=E.call(s));x=xt(x)}O.apply(s,x),l&&!o&&x.length>0&&y+n.length>1&&ot.uniqueSort(s)}return l&&(w=C,c=_),b};return e?at(o):o}(o,i))).selector=t}return a},s=ot.select=function(t,n,e,i){var o,s,c,l,f,h="function"==typeof t&&t,d=!i&&u(t=h.selector||t);if(e=e||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===n.nodeType&&v&&r.relative[s[1].type]){if(!(n=(r.find.ID(c.matches[0].replace(Z,tt),n)||[])[0]))return e;h&&(n=n.parentNode),t=t.slice(s.shift().value.length)}for(o=V.needsContext.test(t)?0:s.length;o--&&(c=s[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(Z,tt),J.test(s[0].type)&&vt(n.parentNode)||n))){if(s.splice(o,1),!(t=i.length&&yt(s)))return O.apply(e,i),e;break}}return(h||a(t,d))(i,n,!v,e,!n||J.test(t)&&vt(n.parentNode)||n),e},e.sortStable=x.split("").sort(k).join("")===x,e.detectDuplicates=!!f,h(),e.sortDetached=st((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),st((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||ct("type|href|height|width",(function(t,n,e){if(!e)return t.getAttribute(n,"type"===n.toLowerCase()?1:2)})),e.attributes&&st((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ct("value",(function(t,n,e){if(!e&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),st((function(t){return null==t.getAttribute("disabled")}))||ct(R,(function(t,n,e){var r;if(!e)return!0===t[n]?n.toLowerCase():(r=t.getAttributeNode(n))&&r.specified?r.value:null})),ot}(e);T.find=S,T.expr=S.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=S.uniqueSort,T.text=S.getText,T.isXMLDoc=S.isXML,T.contains=S.contains,T.escapeSelector=S.escape;var k=function(t,n,e){for(var r=[],i=void 0!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&T(t).is(e))break;r.push(t)}return r},A=function(t,n){for(var e=[];t;t=t.nextSibling)1===t.nodeType&&t!==n&&e.push(t);return e},N=T.expr.match.needsContext;function E(t,n){return t.nodeName&&t.nodeName.toLowerCase()===n.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,n,e){return m(n)?T.grep(t,(function(t,r){return!!n.call(t,r,t)!==e})):n.nodeType?T.grep(t,(function(t){return t===n!==e})):"string"!=typeof n?T.grep(t,(function(t){return f.call(n,t)>-1!==e})):T.filter(n,t,e)}T.filter=function(t,n,e){var r=n[0];return e&&(t=":not("+t+")"),1===n.length&&1===r.nodeType?T.find.matchesSelector(r,t)?[r]:[]:T.find.matches(t,T.grep(n,(function(t){return 1===t.nodeType})))},T.fn.extend({find:function(t){var n,e,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(T(t).filter((function(){for(n=0;n1?T.uniqueSort(e):e},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?T(t):t||[],!1).length}});var L,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,n,e){var r,i;if(!t)return this;if(e=e||L,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:j.exec(t))||!r[1]&&n)return!n||n.jquery?(n||e).find(t):this.constructor(n).find(t);if(r[1]){if(n=n instanceof T?n[0]:n,T.merge(this,T.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:u,!0)),D.test(r[1])&&T.isPlainObject(n))for(r in n)m(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}return(i=u.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):m(t)?void 0!==e.ready?e.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,L=T(u);var R=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function P(t,n){for(;(t=t[n])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var n=T(t,this),e=n.length;return this.filter((function(){for(var t=0;t-1:1===e.nodeType&&T.find.matchesSelector(e,t))){o.push(e);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(T(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,n){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,n))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var n=t.parentNode;return n&&11!==n.nodeType?n:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,n,e){return k(t,"parentNode",e)},next:function(t){return P(t,"nextSibling")},prev:function(t){return P(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,n,e){return k(t,"nextSibling",e)},prevUntil:function(t,n,e){return k(t,"previousSibling",e)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return E(t,"iframe")?t.contentDocument:(E(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},(function(t,n){T.fn[t]=function(e,r){var i=T.map(this,n,e);return"Until"!==t.slice(-5)&&(r=e),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(q[t]||T.uniqueSort(i),R.test(t)&&i.reverse()),this.pushStack(i)}}));var H=/[^\x20\t\r\n\f]+/g;function F(t){return t}function z(t){throw t}function $(t,n,e,r){var i;try{t&&m(i=t.promise)?i.call(t).done(n).fail(e):t&&m(i=t.then)?i.call(t,n,e):n.apply(void 0,[t].slice(r))}catch(t){e.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var n={};return T.each(t.match(H)||[],(function(t,e){n[e]=!0})),n}(t):T.extend({},t);var n,e,r,i,o=[],u=[],a=-1,s=function(){for(i=i||t.once,r=n=!0;u.length;a=-1)for(e=u.shift();++a-1;)o.splice(e,1),e<=a&&a--})),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=u=[],o=e="",this},disabled:function(){return!o},lock:function(){return i=u=[],e||n||(o=e=""),this},locked:function(){return!!i},fireWith:function(t,e){return i||(e=[t,(e=e||[]).slice?e.slice():e],u.push(e),n||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},T.extend({Deferred:function(t){var n=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return T.Deferred((function(e){T.each(n,(function(n,r){var i=m(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&m(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,i){var o=0;function u(t,n,r,i){return function(){var a=this,s=arguments,c=function(){var e,c;if(!(t=o&&(r!==z&&(a=void 0,s=[e]),n.rejectWith(a,s))}};t?l():(T.Deferred.getStackHook&&(l.stackTrace=T.Deferred.getStackHook()),e.setTimeout(l))}}return T.Deferred((function(e){n[0][3].add(u(0,e,m(i)?i:F,e.notifyWith)),n[1][3].add(u(0,e,m(t)?t:F)),n[2][3].add(u(0,e,m(r)?r:z))})).promise()},promise:function(t){return null!=t?T.extend(t,i):i}},o={};return T.each(n,(function(t,e){var u=e[2],a=e[5];i[e[1]]=u.add,a&&u.add((function(){r=a}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),u.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=u.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var n=arguments.length,e=n,r=Array(e),i=s.call(arguments),o=T.Deferred(),u=function(t){return function(e){r[t]=this,i[t]=arguments.length>1?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&($(t,o.done(u(e)).resolve,o.reject,!n),"pending"===o.state()||m(i[e]&&i[e].then)))return o.then();for(;e--;)$(i[e],u(e),o.reject);return o.promise()}});var I=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&I.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},T.readyException=function(t){e.setTimeout((function(){throw t}))};var U=T.Deferred();function B(){u.removeEventListener("DOMContentLoaded",B),e.removeEventListener("load",B),T.ready()}T.fn.ready=function(t){return U.then(t).catch((function(t){T.readyException(t)})),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||U.resolveWith(u,[T]))}}),T.ready.then=U.then,"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?e.setTimeout(T.ready):(u.addEventListener("DOMContentLoaded",B),e.addEventListener("load",B));var W=function(t,n,e,r,i,o,u){var a=0,s=t.length,c=null==e;if("object"===w(e))for(a in i=!0,e)W(t,n,a,e[a],!0,o,u);else if(void 0!==r&&(i=!0,m(r)||(u=!0),c&&(u?(n.call(t,r),n=null):(c=n,n=function(t,n,e){return c.call(T(t),e)})),n))for(;a1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),T.extend({queue:function(t,n,e){var r;if(t)return n=(n||"fx")+"queue",r=J.get(t,n),e&&(!r||Array.isArray(e)?r=J.access(t,n,T.makeArray(e)):r.push(e)),r||[]},dequeue:function(t,n){n=n||"fx";var e=T.queue(t,n),r=e.length,i=e.shift(),o=T._queueHooks(t,n);"inprogress"===i&&(i=e.shift(),r--),i&&("fx"===n&&e.unshift("inprogress"),delete o.stop,i.call(t,(function(){T.dequeue(t,n)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,n){var e=n+"queueHooks";return J.get(t,e)||J.access(t,e,{empty:T.Callbacks("once memory").add((function(){J.remove(t,[n+"queue",e])}))})}}),T.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length\x20\t\r\n\f]+)/i,pt=/^$|^module$|\/(?:java|ecma)script/i,vt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function gt(t,n){var e;return e=void 0!==t.getElementsByTagName?t.getElementsByTagName(n||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(n||"*"):[],void 0===n||n&&E(t,n)?T.merge([t],e):e}function yt(t,n){for(var e=0,r=t.length;e-1)i&&i.push(o);else if(c=T.contains(o.ownerDocument,o),u=gt(f.appendChild(o),"script"),c&&yt(u),e)for(l=0;o=u[l++];)pt.test(o.type||"")&&e.push(o);return f}mt=u.createDocumentFragment().appendChild(u.createElement("div")),(bt=u.createElement("input")).setAttribute("type","radio"),bt.setAttribute("checked","checked"),bt.setAttribute("name","t"),mt.appendChild(bt),y.checkClone=mt.cloneNode(!0).cloneNode(!0).lastChild.checked,mt.innerHTML="",y.noCloneChecked=!!mt.cloneNode(!0).lastChild.defaultValue;var wt=u.documentElement,Tt=/^key/,Ct=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Mt=/^([^.]*)(?:\.(.+)|)/;function St(){return!0}function kt(){return!1}function At(){try{return u.activeElement}catch(t){}}function Nt(t,n,e,r,i,o){var u,a;if("object"==typeof n){for(a in"string"!=typeof e&&(r=r||e,e=void 0),n)Nt(t,a,e,r,n[a],o);return t}if(null==r&&null==i?(i=e,r=e=void 0):null==i&&("string"==typeof e?(i=r,r=void 0):(i=r,r=e,e=void 0)),!1===i)i=kt;else if(!i)return t;return 1===o&&(u=i,(i=function(t){return T().off(t),u.apply(this,arguments)}).guid=u.guid||(u.guid=T.guid++)),t.each((function(){T.event.add(this,n,i,r,e)}))}T.event={global:{},add:function(t,n,e,r,i){var o,u,a,s,c,l,f,h,d,p,v,g=J.get(t);if(g)for(e.handler&&(e=(o=e).handler,i=o.selector),i&&T.find.matchesSelector(wt,i),e.guid||(e.guid=T.guid++),(s=g.events)||(s=g.events={}),(u=g.handle)||(u=g.handle=function(n){return void 0!==T&&T.event.triggered!==n.type?T.event.dispatch.apply(t,arguments):void 0}),c=(n=(n||"").match(H)||[""]).length;c--;)d=v=(a=Mt.exec(n[c])||[])[1],p=(a[2]||"").split(".").sort(),d&&(f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},l=T.extend({type:d,origType:v,data:r,handler:e,guid:e.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=s[d])||((h=s[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,u)||t.addEventListener&&t.addEventListener(d,u)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=e.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),T.event.global[d]=!0)},remove:function(t,n,e,r,i){var o,u,a,s,c,l,f,h,d,p,v,g=J.hasData(t)&&J.get(t);if(g&&(s=g.events)){for(c=(n=(n||"").match(H)||[""]).length;c--;)if(d=v=(a=Mt.exec(n[c])||[])[1],p=(a[2]||"").split(".").sort(),d){for(f=T.event.special[d]||{},h=s[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=h.length;o--;)l=h[o],!i&&v!==l.origType||e&&e.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(t,l));u&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,p,g.handle)||T.removeEvent(t,d,g.handle),delete s[d])}else for(d in s)T.event.remove(t,d+n[c],e,r,!0);T.isEmptyObject(s)&&J.remove(t,"handle events")}},dispatch:function(t){var n,e,r,i,o,u,a=T.event.fix(t),s=new Array(arguments.length),c=(J.get(this,"events")||{})[a.type]||[],l=T.event.special[a.type]||{};for(s[0]=a,n=1;n=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],u={},e=0;e-1:T.find(i,this,null,[c]).length),u[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Dt=/\s*$/g;function jt(t,n){return E(t,"table")&&E(11!==n.nodeType?n:n.firstChild,"tr")&&T(t).children("tbody")[0]||t}function Rt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function qt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Pt(t,n){var e,r,i,o,u,a,s,c;if(1===n.nodeType){if(J.hasData(t)&&(o=J.access(t),u=J.set(n,o),c=o.events))for(i in delete u.handle,u.events={},c)for(e=0,r=c[i].length;e1&&"string"==typeof p&&!y.checkClone&&Ot.test(p))return t.each((function(i){var o=t.eq(i);v&&(n[0]=p.call(this,i,o.html())),Ht(o,n,e,r)}));if(h&&(o=(i=_t(n,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(u=T.map(gt(i,"script"),Rt)).length;f")},clone:function(t,n,e){var r,i,o,u,a,s,c,l=t.cloneNode(!0),f=T.contains(t.ownerDocument,t);if(!(y.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||T.isXMLDoc(t)))for(u=gt(l),r=0,i=(o=gt(t)).length;r0&&yt(u,!f&>(t,"script")),l},cleanData:function(t){for(var n,e,r,i=T.event.special,o=0;void 0!==(e=t[o]);o++)if(G(e)){if(n=e[J.expando]){if(n.events)for(r in n.events)i[r]?T.event.remove(e,r):T.removeEvent(e,r,n.handle);e[J.expando]=void 0}e[Z.expando]&&(e[Z.expando]=void 0)}}}),T.fn.extend({detach:function(t){return Ft(this,t,!0)},remove:function(t){return Ft(this,t)},text:function(t){return W(this,(function(t){return void 0===t?T.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||jt(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var n=jt(this,t);n.insertBefore(t,n.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,n=0;null!=(t=this[n]);n++)1===t.nodeType&&(T.cleanData(gt(t,!1)),t.textContent="");return this},clone:function(t,n){return t=null!=t&&t,n=null==n?t:n,this.map((function(){return T.clone(this,t,n)}))},html:function(t){return W(this,(function(t){var n=this[0]||{},e=0,r=this.length;if(void 0===t&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!Dt.test(t)&&!vt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;e=0&&(s+=Math.max(0,Math.ceil(t["offset"+n[0].toUpperCase()+n.slice(1)]-o-s-a-.5))),s}function tn(t,n,e){var r=$t(t),i=Ut(t,n,r),o="border-box"===T.css(t,"boxSizing",!1,r),u=o;if(zt.test(i)){if(!e)return i;i="auto"}return u=u&&(y.boxSizingReliable()||i===t.style[n]),("auto"===i||!parseFloat(i)&&"inline"===T.css(t,"display",!1,r))&&(i=t["offset"+n[0].toUpperCase()+n.slice(1)],u=!0),(i=parseFloat(i)||0)+Zt(t,n,e||(o?"border":"content"),u,r,i)+"px"}function nn(t,n,e,r,i){return new nn.prototype.init(t,n,e,r,i)}T.extend({cssHooks:{opacity:{get:function(t,n){if(n){var e=Ut(t,"opacity");return""===e?"1":e}}}},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:{},style:function(t,n,e,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,u,a=K(n),s=Yt.test(n),c=t.style;if(s||(n=Qt(a)),u=T.cssHooks[n]||T.cssHooks[a],void 0===e)return u&&"get"in u&&void 0!==(i=u.get(t,!1,r))?i:c[n];"string"==(o=typeof e)&&(i=it.exec(e))&&i[1]&&(e=st(t,n,i),o="number"),null!=e&&e==e&&("number"===o&&(e+=i&&i[3]||(T.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==e||0!==n.indexOf("background")||(c[n]="inherit"),u&&"set"in u&&void 0===(e=u.set(t,e,r))||(s?c.setProperty(n,e):c[n]=e))}},css:function(t,n,e,r){var i,o,u,a=K(n);return Yt.test(n)||(n=Qt(a)),(u=T.cssHooks[n]||T.cssHooks[a])&&"get"in u&&(i=u.get(t,!0,e)),void 0===i&&(i=Ut(t,n,r)),"normal"===i&&n in Xt&&(i=Xt[n]),""===e||e?(o=parseFloat(i),!0===e||isFinite(o)?o||0:i):i}}),T.each(["height","width"],(function(t,n){T.cssHooks[n]={get:function(t,e,r){if(e)return!Wt.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?tn(t,n,r):at(t,Vt,(function(){return tn(t,n,r)}))},set:function(t,e,r){var i,o=$t(t),u="border-box"===T.css(t,"boxSizing",!1,o),a=r&&Zt(t,n,r,u,o);return u&&y.scrollboxSize()===o.position&&(a-=Math.ceil(t["offset"+n[0].toUpperCase()+n.slice(1)]-parseFloat(o[n])-Zt(t,n,"border",!1,o)-.5)),a&&(i=it.exec(e))&&"px"!==(i[3]||"px")&&(t.style[n]=e,e=T.css(t,n)),Jt(0,e,a)}}})),T.cssHooks.marginLeft=Bt(y.reliableMarginLeft,(function(t,n){if(n)return(parseFloat(Ut(t,"marginLeft"))||t.getBoundingClientRect().left-at(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(t,n){T.cssHooks[t+n]={expand:function(e){for(var r=0,i={},o="string"==typeof e?e.split(" "):[e];r<4;r++)i[t+ot[r]+n]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(T.cssHooks[t+n].set=Jt)})),T.fn.extend({css:function(t,n){return W(this,(function(t,n,e){var r,i,o={},u=0;if(Array.isArray(n)){for(r=$t(t),i=n.length;u1)}}),T.Tween=nn,nn.prototype={constructor:nn,init:function(t,n,e,r,i,o){this.elem=t,this.prop=e,this.easing=i||T.easing._default,this.options=n,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[e]?"":"px")},cur:function(){var t=nn.propHooks[this.prop];return t&&t.get?t.get(this):nn.propHooks._default.get(this)},run:function(t){var n,e=nn.propHooks[this.prop];return this.options.duration?this.pos=n=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=n=t,this.now=(this.end-this.start)*n+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),e&&e.set?e.set(this):nn.propHooks._default.set(this),this}},nn.prototype.init.prototype=nn.prototype,nn.propHooks={_default:{get:function(t){var n;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(n=T.css(t.elem,t.prop,""))&&"auto"!==n?n:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[T.cssProps[t.prop]]&&!T.cssHooks[t.prop]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},nn.propHooks.scrollTop=nn.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},T.fx=nn.prototype.init,T.fx.step={};var en,rn,on=/^(?:toggle|show|hide)$/,un=/queueHooks$/;function an(){rn&&(!1===u.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(an):e.setTimeout(an,T.fx.interval),T.fx.tick())}function sn(){return e.setTimeout((function(){en=void 0})),en=Date.now()}function cn(t,n){var e,r=0,i={height:t};for(n=n?1:0;r<4;r+=2-n)i["margin"+(e=ot[r])]=i["padding"+e]=t;return n&&(i.opacity=i.width=t),i}function ln(t,n,e){for(var r,i=(fn.tweeners[n]||[]).concat(fn.tweeners["*"]),o=0,u=i.length;o1)},removeAttr:function(t){return this.each((function(){T.removeAttr(this,t)}))}}),T.extend({attr:function(t,n,e){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,n,e):(1===o&&T.isXMLDoc(t)||(i=T.attrHooks[n.toLowerCase()]||(T.expr.match.bool.test(n)?hn:void 0)),void 0!==e?null===e?void T.removeAttr(t,n):i&&"set"in i&&void 0!==(r=i.set(t,e,n))?r:(t.setAttribute(n,e+""),e):i&&"get"in i&&null!==(r=i.get(t,n))?r:null==(r=T.find.attr(t,n))?void 0:r)},attrHooks:{type:{set:function(t,n){if(!y.radioValue&&"radio"===n&&E(t,"input")){var e=t.value;return t.setAttribute("type",n),e&&(t.value=e),n}}}},removeAttr:function(t,n){var e,r=0,i=n&&n.match(H);if(i&&1===t.nodeType)for(;e=i[r++];)t.removeAttribute(e)}}),hn={set:function(t,n,e){return!1===n?T.removeAttr(t,e):t.setAttribute(e,e),e}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(t,n){var e=dn[n]||T.find.attr;dn[n]=function(t,n,r){var i,o,u=n.toLowerCase();return r||(o=dn[u],dn[u]=i,i=null!=e(t,n,r)?u:null,dn[u]=o),i}}));var pn=/^(?:input|select|textarea|button)$/i,vn=/^(?:a|area)$/i;function gn(t){return(t.match(H)||[]).join(" ")}function yn(t){return t.getAttribute&&t.getAttribute("class")||""}function mn(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(H)||[]}T.fn.extend({prop:function(t,n){return W(this,T.prop,t,n,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[T.propFix[t]||t]}))}}),T.extend({prop:function(t,n,e){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(n=T.propFix[n]||n,i=T.propHooks[n]),void 0!==e?i&&"set"in i&&void 0!==(r=i.set(t,e,n))?r:t[n]=e:i&&"get"in i&&null!==(r=i.get(t,n))?r:t[n]},propHooks:{tabIndex:{get:function(t){var n=T.find.attr(t,"tabindex");return n?parseInt(n,10):pn.test(t.nodeName)||vn.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(T.propHooks.selected={get:function(t){var n=t.parentNode;return n&&n.parentNode&&n.parentNode.selectedIndex,null},set:function(t){var n=t.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(t){var n,e,r,i,o,u,a,s=0;if(m(t))return this.each((function(n){T(this).addClass(t.call(this,n,yn(this)))}));if((n=mn(t)).length)for(;e=this[s++];)if(i=yn(e),r=1===e.nodeType&&" "+gn(i)+" "){for(u=0;o=n[u++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=gn(r))&&e.setAttribute("class",a)}return this},removeClass:function(t){var n,e,r,i,o,u,a,s=0;if(m(t))return this.each((function(n){T(this).removeClass(t.call(this,n,yn(this)))}));if(!arguments.length)return this.attr("class","");if((n=mn(t)).length)for(;e=this[s++];)if(i=yn(e),r=1===e.nodeType&&" "+gn(i)+" "){for(u=0;o=n[u++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=gn(r))&&e.setAttribute("class",a)}return this},toggleClass:function(t,n){var e=typeof t,r="string"===e||Array.isArray(t);return"boolean"==typeof n&&r?n?this.addClass(t):this.removeClass(t):m(t)?this.each((function(e){T(this).toggleClass(t.call(this,e,yn(this),n),n)})):this.each((function(){var n,i,o,u;if(r)for(i=0,o=T(this),u=mn(t);n=u[i++];)o.hasClass(n)?o.removeClass(n):o.addClass(n);else void 0!==t&&"boolean"!==e||((n=yn(this))&&J.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var n,e,r=0;for(n=" "+t+" ";e=this[r++];)if(1===e.nodeType&&(" "+gn(yn(e))+" ").indexOf(n)>-1)return!0;return!1}});var bn=/\r/g;T.fn.extend({val:function(t){var n,e,r,i=this[0];return arguments.length?(r=m(t),this.each((function(e){var i;1===this.nodeType&&(null==(i=r?t.call(this,e,T(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,(function(t){return null==t?"":t+""}))),(n=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,i,"value")||(this.value=i))}))):i?(n=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&void 0!==(e=n.get(i,"value"))?e:"string"==typeof(e=i.value)?e.replace(bn,""):null==e?"":e:void 0}}),T.extend({valHooks:{option:{get:function(t){var n=T.find.attr(t,"value");return null!=n?n:gn(T.text(t))}},select:{get:function(t){var n,e,r,i=t.options,o=t.selectedIndex,u="select-one"===t.type,a=u?null:[],s=u?o+1:i.length;for(r=o<0?s:u?o:0;r-1)&&(e=!0);return e||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(t,n){if(Array.isArray(n))return t.checked=T.inArray(T(t).val(),n)>-1}},y.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),y.focusin="onfocusin"in e;var xn=/^(?:focusinfocus|focusoutblur)$/,_n=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,n,r,i){var o,a,s,c,l,f,h,d,v=[r||u],g=p.call(t,"type")?t.type:t,y=p.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||u,3!==r.nodeType&&8!==r.nodeType&&!xn.test(g+T.event.triggered)&&(g.indexOf(".")>-1&&(g=(y=g.split(".")).shift(),y.sort()),l=g.indexOf(":")<0&&"on"+g,(t=t[T.expando]?t:new T.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:T.makeArray(n,[t]),h=T.event.special[g]||{},i||!h.trigger||!1!==h.trigger.apply(r,n))){if(!i&&!h.noBubble&&!b(r)){for(c=h.delegateType||g,xn.test(c+g)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(r.ownerDocument||u)&&v.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=v[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?c:h.bindType||g,(f=(J.get(a,"events")||{})[t.type]&&J.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&G(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!G(r)||l&&m(r[g])&&!b(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=g,t.isPropagationStopped()&&d.addEventListener(g,_n),r[g](),t.isPropagationStopped()&&d.removeEventListener(g,_n),T.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,n,e){var r=T.extend(new T.Event,e,{type:t,isSimulated:!0});T.event.trigger(r,null,n)}}),T.fn.extend({trigger:function(t,n){return this.each((function(){T.event.trigger(t,n,this)}))},triggerHandler:function(t,n){var e=this[0];if(e)return T.event.trigger(t,n,e,!0)}}),y.focusin||T.each({focus:"focusin",blur:"focusout"},(function(t,n){var e=function(t){T.event.simulate(n,t.target,T.event.fix(t))};T.event.special[n]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,n);i||r.addEventListener(t,e,!0),J.access(r,n,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,n)-1;i?J.access(r,n,i):(r.removeEventListener(t,e,!0),J.remove(r,n))}}}));var wn=e.location,Tn=Date.now(),Cn=/\?/;T.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+t),n};var Mn=/\[\]$/,Sn=/\r?\n/g,kn=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;function Nn(t,n,e,r){var i;if(Array.isArray(n))T.each(n,(function(n,i){e||Mn.test(t)?r(t,i):Nn(t+"["+("object"==typeof i&&null!=i?n:"")+"]",i,e,r)}));else if(e||"object"!==w(n))r(t,n);else for(i in n)Nn(t+"["+i+"]",n[i],e,r)}T.param=function(t,n){var e,r=[],i=function(t,n){var e=m(n)?n():n;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==e?"":e)};if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,(function(){i(this.name,this.value)}));else for(e in t)Nn(e,t[e],n,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&An.test(this.nodeName)&&!kn.test(t)&&(this.checked||!ht.test(t))})).map((function(t,n){var e=T(this).val();return null==e?null:Array.isArray(e)?T.map(e,(function(t){return{name:n.name,value:t.replace(Sn,"\r\n")}})):{name:n.name,value:e.replace(Sn,"\r\n")}})).get()}});var En=/%20/g,Dn=/#.*$/,On=/([?&])_=[^&]*/,Ln=/^(.*?):[ \t]*([^\r\n]*)$/gm,jn=/^(?:GET|HEAD)$/,Rn=/^\/\//,qn={},Pn={},Hn="*/".concat("*"),Fn=u.createElement("a");function zn(t){return function(n,e){"string"!=typeof n&&(e=n,n="*");var r,i=0,o=n.toLowerCase().match(H)||[];if(m(e))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(e)):(t[r]=t[r]||[]).push(e)}}function $n(t,n,e,r){var i={},o=t===Pn;function u(a){var s;return i[a]=!0,T.each(t[a]||[],(function(t,a){var c=a(n,e,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(n.dataTypes.unshift(c),u(c),!1)})),s}return u(n.dataTypes[0])||!i["*"]&&u("*")}function In(t,n){var e,r,i=T.ajaxSettings.flatOptions||{};for(e in n)void 0!==n[e]&&((i[e]?t:r||(r={}))[e]=n[e]);return r&&T.extend(!0,t,r),t}Fn.href=wn.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hn,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":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,n){return n?In(In(t,T.ajaxSettings),n):In(T.ajaxSettings,t)},ajaxPrefilter:zn(qn),ajaxTransport:zn(Pn),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,c,l,f,h,d,p=T.ajaxSetup({},n),v=p.context||p,g=p.context&&(v.nodeType||v.jquery)?T(v):T.event,y=T.Deferred(),m=T.Callbacks("once memory"),b=p.statusCode||{},x={},_={},w="canceled",C={readyState:0,getResponseHeader:function(t){var n;if(l){if(!a)for(a={};n=Ln.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[t.toLowerCase()]}return null==n?null:n},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,n){return null==l&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,x[t]=n),this},overrideMimeType:function(t){return null==l&&(p.mimeType=t),this},statusCode:function(t){var n;if(t)if(l)C.always(t[C.status]);else for(n in t)b[n]=[b[n],t[n]];return this},abort:function(t){var n=t||w;return r&&r.abort(n),M(0,n),this}};if(y.promise(C),p.url=((t||p.url||wn.href)+"").replace(Rn,wn.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(H)||[""],null==p.crossDomain){c=u.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Fn.protocol+"//"+Fn.host!=c.protocol+"//"+c.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=T.param(p.data,p.traditional)),$n(qn,p,n,C),l)return C;for(h in(f=T.event&&p.global)&&0==T.active++&&T.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!jn.test(p.type),i=p.url.replace(Dn,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(En,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Cn.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(On,"$1"),d=(Cn.test(i)?"&":"?")+"_="+Tn+++d),p.url=i+d),p.ifModified&&(T.lastModified[i]&&C.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&C.setRequestHeader("If-None-Match",T.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Hn+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(v,C,p)||l))return C.abort();if(w="abort",m.add(p.complete),C.done(p.success),C.fail(p.error),r=$n(Pn,p,n,C)){if(C.readyState=1,f&&g.trigger("ajaxSend",[C,p]),l)return C;p.async&&p.timeout>0&&(s=e.setTimeout((function(){C.abort("timeout")}),p.timeout));try{l=!1,r.send(x,M)}catch(t){if(l)throw t;M(-1,t)}}else M(-1,"No Transport");function M(t,n,u,a){var c,h,d,x,_,w=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,u&&(x=function(t,n,e){for(var r,i,o,u,a=t.contents,s=t.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=t.mimeType||n.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){s.unshift(i);break}if(s[0]in e)o=s[0];else{for(i in e){if(!s[0]||t.converters[i+" "+s[0]]){o=i;break}u||(u=i)}o=o||u}if(o)return o!==s[0]&&s.unshift(o),e[o]}(p,C,u)),x=function(t,n,e,r){var i,o,u,a,s,c={},l=t.dataTypes.slice();if(l[1])for(u in t.converters)c[u.toLowerCase()]=t.converters[u];for(o=l.shift();o;)if(t.responseFields[o]&&(e[t.responseFields[o]]=n),!s&&r&&t.dataFilter&&(n=t.dataFilter(n,t.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(u=c[s+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(u=c[s+" "+a[0]]||c["* "+a[0]])){!0===u?u=c[i]:!0!==c[i]&&(o=a[0],l.unshift(a[1]));break}if(!0!==u)if(u&&t.throws)n=u(n);else try{n=u(n)}catch(t){return{state:"parsererror",error:u?t:"No conversion from "+s+" to "+o}}}return{state:"success",data:n}}(p,x,C,c),c?(p.ifModified&&((_=C.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=_),(_=C.getResponseHeader("etag"))&&(T.etag[i]=_)),204===t||"HEAD"===p.type?w="nocontent":304===t?w="notmodified":(w=x.state,h=x.data,c=!(d=x.error))):(d=w,!t&&w||(w="error",t<0&&(t=0))),C.status=t,C.statusText=(n||w)+"",c?y.resolveWith(v,[h,w,C]):y.rejectWith(v,[C,w,d]),C.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?h:d]),m.fireWith(v,[C,w]),f&&(g.trigger("ajaxComplete",[C,p]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(t,n,e){return T.get(t,n,e,"json")},getScript:function(t,n){return T.get(t,void 0,n,"script")}}),T.each(["get","post"],(function(t,n){T[n]=function(t,e,r,i){return m(e)&&(i=i||r,r=e,e=void 0),T.ajax(T.extend({url:t,type:n,dataType:i,data:e,success:r},T.isPlainObject(t)&&t))}})),T._evalUrl=function(t){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(t){var n;return this[0]&&(m(t)&&(t=t.call(this[0])),n=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&n.insertBefore(this[0]),n.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return m(t)?this.each((function(n){T(this).wrapInner(t.call(this,n))})):this.each((function(){var n=T(this),e=n.contents();e.length?e.wrapAll(t):n.append(t)}))},wrap:function(t){var n=m(t);return this.each((function(e){T(this).wrapAll(n?t.call(this,e):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Un={0:200,1223:204},Bn=T.ajaxSettings.xhr();y.cors=!!Bn&&"withCredentials"in Bn,y.ajax=Bn=!!Bn,T.ajaxTransport((function(t){var n,r;if(y.cors||Bn&&!t.crossDomain)return{send:function(i,o){var u,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(u in t.xhrFields)a[u]=t.xhrFields[u];for(u in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(u,i[u]);n=function(t){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Un[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}})),T.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return T.globalEval(t),t}}}),T.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),T.ajaxTransport("script",(function(t){var n,e;if(t.crossDomain)return{send:function(r,i){n=T("