/*! For license information please see main.bundle.js.LICENSE.txt */ (()=>{var e={543:function(e,t,r){var n;e=r.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="__lodash_placeholder__",s=32,u=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",x="[object Error]",b="[object Function]",_="[object GeneratorFunction]",w="[object Map]",T="[object Number]",M="[object Object]",k="[object Promise]",A="[object RegExp]",L="[object Set]",S="[object String]",O="[object Symbol]",C="[object WeakMap]",D="[object ArrayBuffer]",P="[object DataView]",I="[object Float32Array]",E="[object Float64Array]",R="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",N="[object Uint8Array]",j="[object Uint8ClampedArray]",B="[object Uint16Array]",H="[object Uint32Array]",Y=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,W=RegExp(q.source),Z=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ae=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,be=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Te="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Le="\\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",Se="["+_e+"]",Oe="["+Le+"]",Ce="["+we+"]",De="\\d+",Pe="["+Te+"]",Ie="["+Me+"]",Ee="[^"+_e+Le+De+Te+Me+ke+"]",Re="\\ud83c[\\udffb-\\udfff]",ze="[^"+_e+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+ke+"]",Be="\\u200d",He="(?:"+Ie+"|"+Ee+")",Ye="(?:"+je+"|"+Ee+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ce+"|"+Re+")?",Ge="["+Ae+"]?",We=Ge+qe+"(?:"+Be+"(?:"+[ze,Fe,Ne].join("|")+")"+Ge+qe+")*",Ze="(?:"+[Pe,Fe,Ne].join("|")+")"+We,Je="(?:"+[ze+Ce+"?",Ce,Fe,Ne,Se].join("|")+")",Xe=RegExp("['’]","g"),Ke=RegExp(Ce,"g"),$e=RegExp(Re+"(?="+Re+")|"+Je+We,"g"),Qe=RegExp([je+"?"+Ie+"+"+Ue+"(?="+[Oe,je,"$"].join("|")+")",Ye+"+"+Ve+"(?="+[Oe,je+He,"$"].join("|")+")",je+"?"+He+"+"+Ue,je+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ze].join("|"),"g"),et=RegExp("["+Be+_e+we+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],nt=-1,at={};at[I]=at[E]=at[R]=at[z]=at[F]=at[N]=at[j]=at[B]=at[H]=!0,at[v]=at[g]=at[D]=at[y]=at[P]=at[m]=at[x]=at[b]=at[w]=at[T]=at[M]=at[A]=at[L]=at[S]=at[C]=!1;var it={};it[v]=it[g]=it[D]=it[P]=it[y]=it[m]=it[I]=it[E]=it[R]=it[z]=it[F]=it[w]=it[T]=it[M]=it[A]=it[L]=it[S]=it[O]=it[N]=it[j]=it[B]=it[H]=!0,it[x]=it[b]=it[C]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,st=parseInt,ut="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=ut||ct||Function("return this")(),dt=t&&!t.nodeType&&t,ht=dt&&e&&!e.nodeType&&e,pt=ht&&ht.exports===dt,vt=pt&&ut.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,mt=gt&>.isDate,xt=gt&>.isMap,bt=gt&>.isRegExp,_t=gt&>.isSet,wt=gt&>.isTypedArray;function Tt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Mt(e,t,r,n){for(var a=-1,i=null==e?0:e.length;++a-1}function Ct(e,t,r){for(var n=-1,a=null==e?0:e.length;++n-1;);return r}function Qt(e,t){for(var r=e.length;r--&&jt(t,e[r],0)>-1;);return r}var er=Vt({À:"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"}),tr=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+ot[e]}function nr(e){return et.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ir(e,t){return function(r){return e(t(r))}}function or(e,t){for(var r=-1,n=e.length,a=0,i=[];++r",""":'"',"'":"'"}),hr=function e(t){var r,n=(t=null==t?ft:hr.defaults(ft.Object(),t,hr.pick(ft,rt))).Array,ae=t.Date,_e=t.Error,we=t.Function,Te=t.Math,Me=t.Object,ke=t.RegExp,Ae=t.String,Le=t.TypeError,Se=n.prototype,Oe=we.prototype,Ce=Me.prototype,De=t["__core-js_shared__"],Pe=Oe.toString,Ie=Ce.hasOwnProperty,Ee=0,Re=(r=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ze=Ce.toString,Fe=Pe.call(Me),Ne=ft._,je=ke("^"+Pe.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=pt?t.Buffer:a,He=t.Symbol,Ye=t.Uint8Array,Ue=Be?Be.allocUnsafe:a,Ve=ir(Me.getPrototypeOf,Me),qe=Me.create,Ge=Ce.propertyIsEnumerable,We=Se.splice,Ze=He?He.isConcatSpreadable:a,Je=He?He.iterator:a,$e=He?He.toStringTag:a,et=function(){try{var e=si(Me,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ut=ae&&ae.now!==ft.Date.now&&ae.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=Te.ceil,ht=Te.floor,vt=Me.getOwnPropertySymbols,gt=Be?Be.isBuffer:a,zt=t.isFinite,Vt=Se.join,pr=ir(Me.keys,Me),vr=Te.max,gr=Te.min,yr=ae.now,mr=t.parseInt,xr=Te.random,br=Se.reverse,_r=si(t,"DataView"),wr=si(t,"Map"),Tr=si(t,"Promise"),Mr=si(t,"Set"),kr=si(t,"WeakMap"),Ar=si(Me,"create"),Lr=kr&&new kr,Sr={},Or=zi(_r),Cr=zi(wr),Dr=zi(Tr),Pr=zi(Mr),Ir=zi(kr),Er=He?He.prototype:a,Rr=Er?Er.valueOf:a,zr=Er?Er.toString:a;function Fr(e){if(el(e)&&!Uo(e)&&!(e instanceof Hr)){if(e instanceof Br)return e;if(Ie.call(e,"__wrapped__"))return Fi(e)}return new Br(e)}var Nr=function(){function e(){}return function(t){if(!Qo(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=a,r}}();function jr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function Hr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function on(e,t,r,n,i,o){var l,s=1&t,u=2&t,c=4&t;if(r&&(l=i?r(e,n,i,o):r(e)),l!==a)return l;if(!Qo(e))return e;var f=Uo(e);if(f){if(l=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!s)return Aa(e,l)}else{var d=fi(e),h=d==b||d==_;if(Wo(e))return ba(e,s);if(d==M||d==v||h&&!i){if(l=u||h?{}:hi(e),!s)return u?function(e,t){return La(e,ci(e),t)}(e,function(e,t){return e&&La(t,Dl(t),e)}(l,e)):function(e,t){return La(e,ui(e),t)}(e,tn(l,e))}else{if(!it[d])return i?e:{};l=function(e,t,r){var n,a=e.constructor;switch(t){case D:return _a(e);case y:case m:return new a(+e);case P:return function(e,t){var r=t?_a(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case I:case E:case R:case z:case F:case N:case j:case B:case H:return wa(e,r);case w:return new a;case T:case S:return new a(e);case A:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case L:return new a;case O:return n=e,Rr?Me(Rr.call(n)):{}}}(e,d,s)}}o||(o=new Gr);var p=o.get(e);if(p)return p;o.set(e,l),il(e)?e.forEach((function(n){l.add(on(n,t,r,n,e,o))})):tl(e)&&e.forEach((function(n,a){l.set(a,on(n,t,r,a,e,o))}));var g=f?a:(c?u?ti:ei:u?Dl:Cl)(e);return kt(g||e,(function(n,a){g&&(n=e[a=n]),$r(l,a,on(n,t,r,a,e,o))})),l}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=Me(e);n--;){var i=r[n],o=t[i],l=e[i];if(l===a&&!(i in e)||!o(l))return!1}return!0}function sn(e,t,r){if("function"!=typeof e)throw new Le(i);return Li((function(){e.apply(a,r)}),t)}function un(e,t,r,n){var a=-1,i=Ot,o=!0,l=e.length,s=[],u=t.length;if(!l)return s;r&&(t=Dt(t,Jt(r))),n?(i=Ct,o=!1):t.length>=200&&(i=Kt,o=!1,t=new qr(t));e:for(;++a-1},Ur.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Vr.prototype.clear=function(){this.size=0,this.__data__={hash:new Yr,map:new(wr||Ur),string:new Yr}},Vr.prototype.delete=function(e){var t=oi(this,e).delete(e);return this.size-=t?1:0,t},Vr.prototype.get=function(e){return oi(this,e).get(e)},Vr.prototype.has=function(e){return oi(this,e).has(e)},Vr.prototype.set=function(e,t){var r=oi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},qr.prototype.add=qr.prototype.push=function(e){return this.__data__.set(e,o),this},qr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Ur,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ur){var n=r.__data__;if(!wr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Vr(n)}return r.set(e,t),this.size=r.size,this};var cn=Ca(mn),fn=Ca(xn,!0);function dn(e,t){var r=!0;return cn(e,(function(e,n,a){return r=!!t(e,n,a)})),r}function hn(e,t,r){for(var n=-1,i=e.length;++n0&&r(l)?t>1?vn(l,t-1,r,n,a):Pt(a,l):n||(a[a.length]=l)}return a}var gn=Da(),yn=Da(!0);function mn(e,t){return e&&gn(e,t,Cl)}function xn(e,t){return e&&yn(e,t,Cl)}function bn(e,t){return St(t,(function(t){return Xo(e[t])}))}function _n(e,t){for(var r=0,n=(t=ga(t,e)).length;null!=e&&rt}function kn(e,t){return null!=e&&Ie.call(e,t)}function An(e,t){return null!=e&&t in Me(e)}function Ln(e,t,r){for(var i=r?Ct:Ot,o=e[0].length,l=e.length,s=l,u=n(l),c=1/0,f=[];s--;){var d=e[s];s&&t&&(d=Dt(d,Jt(t))),c=gr(d.length,c),u[s]=!r&&(t||o>=120&&d.length>=120)?new qr(s&&d):a}d=e[0];var h=-1,p=u[0];e:for(;++h=l?s:s*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(a)}function Yn(e,t,r){for(var n=-1,a=t.length,i={};++n-1;)l!==e&&We.call(l,s,1),We.call(e,s,1);return e}function Vn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var a=t[r];if(r==n||a!==i){var i=a;vi(a)?We.call(e,a,1):sa(e,a)}}return e}function qn(e,t){return e+ht(xr()*(t-e+1))}function Gn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=ht(t/2))&&(e+=e)}while(t);return r}function Wn(e,t){return Si(Ti(e,t,rs),e+"")}function Zn(e){return Zr(jl(e))}function Jn(e,t){var r=jl(e);return Di(r,an(t,0,r.length))}function Xn(e,t,r,n){if(!Qo(e))return e;for(var i=-1,o=(t=ga(t,e)).length,l=o-1,s=e;null!=s&&++ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=n(i);++a>>1,o=e[i];null!==o&&!ll(o)&&(r?o<=t:o=200){var u=t?null:Ga(e);if(u)return lr(u);o=!1,a=Kt,s=new qr}else s=t?[]:l;e:for(;++n=n?e:ea(e,t,r)}var xa=ot||function(e){return ft.clearTimeout(e)};function ba(e,t){if(t)return e.slice();var r=e.length,n=Ue?Ue(r):new e.constructor(r);return e.copy(n),n}function _a(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function wa(e,t){var r=t?_a(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ta(e,t){if(e!==t){var r=e!==a,n=null===e,i=e==e,o=ll(e),l=t!==a,s=null===t,u=t==t,c=ll(t);if(!s&&!c&&!o&&e>t||o&&l&&u&&!s&&!c||n&&l&&u||!r&&u||!i)return 1;if(!n&&!o&&!c&&e1?r[i-1]:a,l=i>2?r[2]:a;for(o=e.length>3&&"function"==typeof o?(i--,o):a,l&&gi(r[0],r[1],l)&&(o=i<3?a:o,i=1),t=Me(t);++n-1?i[o?t[l]:l]:a}}function za(e){return Qa((function(t){var r=t.length,n=r,o=Br.prototype.thru;for(e&&t.reverse();n--;){var l=t[n];if("function"!=typeof l)throw new Le(i);if(o&&!s&&"wrapper"==ni(l))var s=new Br([],!0)}for(n=s?n:r;++n1&&b.reverse(),h&&fs))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&r?new qr:a;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return kt(p,(function(r){var n="_."+r[0];t&r[1]&&!Ot(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(le):[]}(n),r)))}function Ci(e){var t=0,r=0;return function(){var n=yr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}}function Di(e,t){var r=-1,n=e.length,i=n-1;for(t=t===a?n:t;++r1?e[t-1]:a;return r="function"==typeof r?(e.pop(),r):a,no(e,r)}));function co(e){var t=Fr(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var ho=Qa((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Hr&&vi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:fo,args:[i],thisArg:a}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)})),po=Sa((function(e,t,r){Ie.call(e,r)?++e[r]:rn(e,r,1)})),vo=Ra(Hi),go=Ra(Yi);function yo(e,t){return(Uo(e)?kt:cn)(e,ii(t,3))}function mo(e,t){return(Uo(e)?At:fn)(e,ii(t,3))}var xo=Sa((function(e,t,r){Ie.call(e,r)?e[r].push(t):rn(e,r,[t])})),bo=Wn((function(e,t,r){var a=-1,i="function"==typeof t,o=qo(e)?n(e.length):[];return cn(e,(function(e){o[++a]=i?Tt(t,e,r):Sn(e,t,r)})),o})),_o=Sa((function(e,t,r){rn(e,r,t)}));function wo(e,t){return(Uo(e)?Dt:zn)(e,ii(t,3))}var To=Sa((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Mo=Wn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&gi(e,t[0],t[1])?t=[]:r>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,vn(t,1),[])})),ko=ut||function(){return ft.Date.now()};function Ao(e,t,r){return t=r?a:t,t=e&&null==t?e.length:t,Za(e,u,a,a,a,a,t)}function Lo(e,t){var r;if("function"!=typeof t)throw new Le(i);return e=hl(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=a),r}}var So=Wn((function(e,t,r){var n=1;if(r.length){var a=or(r,ai(So));n|=s}return Za(e,n,t,r,a)})),Oo=Wn((function(e,t,r){var n=3;if(r.length){var a=or(r,ai(Oo));n|=s}return Za(t,n,e,r,a)}));function Co(e,t,r){var n,o,l,s,u,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Le(i);function v(t){var r=n,i=o;return n=o=a,f=t,s=e.apply(i,r)}function g(e){var r=e-c;return c===a||r>=t||r<0||h&&e-f>=l}function y(){var e=ko();if(g(e))return m(e);u=Li(y,function(e){var r=t-(e-c);return h?gr(r,l-(e-f)):r}(e))}function m(e){return u=a,p&&n?v(e):(n=o=a,s)}function x(){var e=ko(),r=g(e);if(n=arguments,o=this,c=e,r){if(u===a)return function(e){return f=e,u=Li(y,t),d?v(e):s}(c);if(h)return xa(u),u=Li(y,t),v(c)}return u===a&&(u=Li(y,t)),s}return t=vl(t)||0,Qo(r)&&(d=!!r.leading,l=(h="maxWait"in r)?vr(vl(r.maxWait)||0,t):l,p="trailing"in r?!!r.trailing:p),x.cancel=function(){u!==a&&xa(u),f=0,n=c=o=u=a},x.flush=function(){return u===a?s:m(ko())},x}var Do=Wn((function(e,t){return sn(e,1,t)})),Po=Wn((function(e,t,r){return sn(e,vl(t)||0,r)}));function Io(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(i);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Io.Cache||Vr),r}function Eo(e){if("function"!=typeof e)throw new Le(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Io.Cache=Vr;var Ro=ya((function(e,t){var r=(t=1==t.length&&Uo(t[0])?Dt(t[0],Jt(ii())):Dt(vn(t,1),Jt(ii()))).length;return Wn((function(n){for(var a=-1,i=gr(n.length,r);++a=t})),Yo=On(function(){return arguments}())?On:function(e){return el(e)&&Ie.call(e,"callee")&&!Ge.call(e,"callee")},Uo=n.isArray,Vo=yt?Jt(yt):function(e){return el(e)&&Tn(e)==D};function qo(e){return null!=e&&$o(e.length)&&!Xo(e)}function Go(e){return el(e)&&qo(e)}var Wo=gt||vs,Zo=mt?Jt(mt):function(e){return el(e)&&Tn(e)==m};function Jo(e){if(!el(e))return!1;var t=Tn(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!nl(e)}function Xo(e){if(!Qo(e))return!1;var t=Tn(e);return t==b||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ko(e){return"number"==typeof e&&e==hl(e)}function $o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function el(e){return null!=e&&"object"==typeof e}var tl=xt?Jt(xt):function(e){return el(e)&&fi(e)==w};function rl(e){return"number"==typeof e||el(e)&&Tn(e)==T}function nl(e){if(!el(e)||Tn(e)!=M)return!1;var t=Ve(e);if(null===t)return!0;var r=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pe.call(r)==Fe}var al=bt?Jt(bt):function(e){return el(e)&&Tn(e)==A},il=_t?Jt(_t):function(e){return el(e)&&fi(e)==L};function ol(e){return"string"==typeof e||!Uo(e)&&el(e)&&Tn(e)==S}function ll(e){return"symbol"==typeof e||el(e)&&Tn(e)==O}var sl=wt?Jt(wt):function(e){return el(e)&&$o(e.length)&&!!at[Tn(e)]},ul=Ua(Rn),cl=Ua((function(e,t){return e<=t}));function fl(e){if(!e)return[];if(qo(e))return ol(e)?cr(e):Aa(e);if(Je&&e[Je])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Je]());var t=fi(e);return(t==w?ar:t==L?lr:jl)(e)}function dl(e){return e?(e=vl(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hl(e){var t=dl(e),r=t%1;return t==t?r?t-r:t:0}function pl(e){return e?an(hl(e),0,h):0}function vl(e){if("number"==typeof e)return e;if(ll(e))return d;if(Qo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=pe.test(e);return r||ge.test(e)?st(e.slice(2),r?2:8):he.test(e)?d:+e}function gl(e){return La(e,Dl(e))}function yl(e){return null==e?"":oa(e)}var ml=Oa((function(e,t){if(bi(t)||qo(t))La(t,Cl(t),e);else for(var r in t)Ie.call(t,r)&&$r(e,r,t[r])})),xl=Oa((function(e,t){La(t,Dl(t),e)})),bl=Oa((function(e,t,r,n){La(t,Dl(t),e,n)})),_l=Oa((function(e,t,r,n){La(t,Cl(t),e,n)})),wl=Qa(nn),Tl=Wn((function(e,t){e=Me(e);var r=-1,n=t.length,i=n>2?t[2]:a;for(i&&gi(t[0],t[1],i)&&(n=1);++r1),t})),La(e,ti(e),r),n&&(r=on(r,7,Ka));for(var a=t.length;a--;)sa(r,t[a]);return r})),Rl=Qa((function(e,t){return null==e?{}:function(e,t){return Yn(e,t,(function(t,r){return Al(e,r)}))}(e,t)}));function zl(e,t){if(null==e)return{};var r=Dt(ti(e),(function(e){return[e]}));return t=ii(t),Yn(e,r,(function(e,r){return t(e,r[0])}))}var Fl=Wa(Cl),Nl=Wa(Dl);function jl(e){return null==e?[]:Xt(e,Cl(e))}var Bl=Ia((function(e,t,r){return t=t.toLowerCase(),e+(r?Hl(t):t)}));function Hl(e){return Jl(yl(e).toLowerCase())}function Yl(e){return(e=yl(e))&&e.replace(me,er).replace(Ke,"")}var Ul=Ia((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Vl=Ia((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),ql=Pa("toLowerCase"),Gl=Ia((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wl=Ia((function(e,t,r){return e+(r?" ":"")+Jl(t)})),Zl=Ia((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Jl=Pa("toUpperCase");function Xl(e,t,r){return e=yl(e),(t=r?a:t)===a?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Kl=Wn((function(e,t){try{return Tt(e,a,t)}catch(e){return Jo(e)?e:new _e(e)}})),$l=Qa((function(e,t){return kt(t,(function(t){t=Ri(t),rn(e,t,So(e[t],e))})),e}));function Ql(e){return function(){return e}}var es=za(),ts=za(!0);function rs(e){return e}function ns(e){return In("function"==typeof e?e:on(e,1))}var as=Wn((function(e,t){return function(r){return Sn(r,e,t)}})),is=Wn((function(e,t){return function(r){return Sn(e,r,t)}}));function os(e,t,r){var n=Cl(t),a=bn(t,n);null!=r||Qo(t)&&(a.length||!n.length)||(r=t,t=e,e=this,a=bn(t,Cl(t)));var i=!(Qo(r)&&"chain"in r&&!r.chain),o=Xo(e);return kt(a,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Aa(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Pt([this.value()],arguments))})})),e}function ls(){}var ss=Ba(Dt),us=Ba(Lt),cs=Ba(Rt);function fs(e){return yi(e)?Ut(Ri(e)):function(e){return function(t){return _n(t,e)}}(e)}var ds=Ya(),hs=Ya(!0);function ps(){return[]}function vs(){return!1}var gs,ys=ja((function(e,t){return e+t}),0),ms=qa("ceil"),xs=ja((function(e,t){return e/t}),1),bs=qa("floor"),_s=ja((function(e,t){return e*t}),1),ws=qa("round"),Ts=ja((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Le(i);return e=hl(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Ao,Fr.assign=ml,Fr.assignIn=xl,Fr.assignInWith=bl,Fr.assignWith=_l,Fr.at=wl,Fr.before=Lo,Fr.bind=So,Fr.bindAll=$l,Fr.bindKey=Oo,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Uo(e)?e:[e]},Fr.chain=co,Fr.chunk=function(e,t,r){t=(r?gi(e,t,r):t===a)?1:vr(hl(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,l=0,s=n(dt(i/t));oi?0:i+r),(n=n===a||n>i?i:hl(n))<0&&(n+=i),n=r>n?0:pl(n);r>>0)?(e=yl(e))&&("string"==typeof t||null!=t&&!al(t))&&!(t=oa(t))&&nr(e)?ma(cr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Le(i);return t=null==t?0:vr(hl(t),0),Wn((function(r){var n=r[t],a=ma(r,0,t);return n&&Pt(a,n),Tt(e,this,a)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ea(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ea(e,0,(t=r||t===a?1:hl(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ea(e,(t=n-(t=r||t===a?1:hl(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?ca(e,ii(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?ca(e,ii(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new Le(i);return Qo(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Co(e,t,{leading:n,maxWait:t,trailing:a})},Fr.thru=fo,Fr.toArray=fl,Fr.toPairs=Fl,Fr.toPairsIn=Nl,Fr.toPath=function(e){return Uo(e)?Dt(e,Ri):ll(e)?[e]:Aa(Ei(yl(e)))},Fr.toPlainObject=gl,Fr.transform=function(e,t,r){var n=Uo(e),a=n||Wo(e)||sl(e);if(t=ii(t,4),null==r){var i=e&&e.constructor;r=a?n?new i:[]:Qo(e)&&Xo(i)?Nr(Ve(e)):{}}return(a?kt:mn)(e,(function(e,n,a){return t(r,e,n,a)})),r},Fr.unary=function(e){return Ao(e,1)},Fr.union=Qi,Fr.unionBy=eo,Fr.unionWith=to,Fr.uniq=function(e){return e&&e.length?la(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?la(e,ii(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?la(e,a,t):[]},Fr.unset=function(e,t){return null==e||sa(e,t)},Fr.unzip=ro,Fr.unzipWith=no,Fr.update=function(e,t,r){return null==e?e:ua(e,t,va(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:a,null==e?e:ua(e,t,va(r),n)},Fr.values=jl,Fr.valuesIn=function(e){return null==e?[]:Xt(e,Dl(e))},Fr.without=ao,Fr.words=Xl,Fr.wrap=function(e,t){return zo(va(t),e)},Fr.xor=io,Fr.xorBy=oo,Fr.xorWith=lo,Fr.zip=so,Fr.zipObject=function(e,t){return ha(e||[],t||[],$r)},Fr.zipObjectDeep=function(e,t){return ha(e||[],t||[],Xn)},Fr.zipWith=uo,Fr.entries=Fl,Fr.entriesIn=Nl,Fr.extend=xl,Fr.extendWith=bl,os(Fr,Fr),Fr.add=ys,Fr.attempt=Kl,Fr.camelCase=Bl,Fr.capitalize=Hl,Fr.ceil=ms,Fr.clamp=function(e,t,r){return r===a&&(r=t,t=a),r!==a&&(r=(r=vl(r))==r?r:0),t!==a&&(t=(t=vl(t))==t?t:0),an(vl(e),t,r)},Fr.clone=function(e){return on(e,4)},Fr.cloneDeep=function(e){return on(e,5)},Fr.cloneDeepWith=function(e,t){return on(e,5,t="function"==typeof t?t:a)},Fr.cloneWith=function(e,t){return on(e,4,t="function"==typeof t?t:a)},Fr.conformsTo=function(e,t){return null==t||ln(e,t,Cl(t))},Fr.deburr=Yl,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=xs,Fr.endsWith=function(e,t,r){e=yl(e),t=oa(t);var n=e.length,i=r=r===a?n:an(hl(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Fr.eq=jo,Fr.escape=function(e){return(e=yl(e))&&Z.test(e)?e.replace(G,tr):e},Fr.escapeRegExp=function(e){return(e=yl(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Uo(e)?Lt:dn;return r&&gi(e,t,r)&&(t=a),n(e,ii(t,3))},Fr.find=vo,Fr.findIndex=Hi,Fr.findKey=function(e,t){return Ft(e,ii(t,3),mn)},Fr.findLast=go,Fr.findLastIndex=Yi,Fr.findLastKey=function(e,t){return Ft(e,ii(t,3),xn)},Fr.floor=bs,Fr.forEach=yo,Fr.forEachRight=mo,Fr.forIn=function(e,t){return null==e?e:gn(e,ii(t,3),Dl)},Fr.forInRight=function(e,t){return null==e?e:yn(e,ii(t,3),Dl)},Fr.forOwn=function(e,t){return e&&mn(e,ii(t,3))},Fr.forOwnRight=function(e,t){return e&&xn(e,ii(t,3))},Fr.get=kl,Fr.gt=Bo,Fr.gte=Ho,Fr.has=function(e,t){return null!=e&&di(e,t,kn)},Fr.hasIn=Al,Fr.head=Vi,Fr.identity=rs,Fr.includes=function(e,t,r,n){e=qo(e)?e:jl(e),r=r&&!n?hl(r):0;var a=e.length;return r<0&&(r=vr(a+r,0)),ol(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&jt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:hl(r);return a<0&&(a=vr(n+a,0)),jt(e,t,a)},Fr.inRange=function(e,t,r){return t=dl(t),r===a?(r=t,t=0):r=dl(r),function(e,t,r){return e>=gr(t,r)&&e=-9007199254740991&&e<=f},Fr.isSet=il,Fr.isString=ol,Fr.isSymbol=ll,Fr.isTypedArray=sl,Fr.isUndefined=function(e){return e===a},Fr.isWeakMap=function(e){return el(e)&&fi(e)==C},Fr.isWeakSet=function(e){return el(e)&&"[object WeakSet]"==Tn(e)},Fr.join=function(e,t){return null==e?"":Vt.call(e,t)},Fr.kebabCase=Ul,Fr.last=Zi,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==a&&(i=(i=hl(r))<0?vr(n+i,0):gr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Nt(e,Ht,i,!0)},Fr.lowerCase=Vl,Fr.lowerFirst=ql,Fr.lt=ul,Fr.lte=cl,Fr.max=function(e){return e&&e.length?hn(e,rs,Mn):a},Fr.maxBy=function(e,t){return e&&e.length?hn(e,ii(t,2),Mn):a},Fr.mean=function(e){return Yt(e,rs)},Fr.meanBy=function(e,t){return Yt(e,ii(t,2))},Fr.min=function(e){return e&&e.length?hn(e,rs,Rn):a},Fr.minBy=function(e,t){return e&&e.length?hn(e,ii(t,2),Rn):a},Fr.stubArray=ps,Fr.stubFalse=vs,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=_s,Fr.nth=function(e,t){return e&&e.length?Bn(e,hl(t)):a},Fr.noConflict=function(){return ft._===this&&(ft._=Ne),this},Fr.noop=ls,Fr.now=ko,Fr.pad=function(e,t,r){e=yl(e);var n=(t=hl(t))?ur(e):0;if(!t||n>=t)return e;var a=(t-n)/2;return Ha(ht(a),r)+e+Ha(dt(a),r)},Fr.padEnd=function(e,t,r){e=yl(e);var n=(t=hl(t))?ur(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=xr();return gr(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return qn(e,t)},Fr.reduce=function(e,t,r){var n=Uo(e)?It:qt,a=arguments.length<3;return n(e,ii(t,4),r,a,cn)},Fr.reduceRight=function(e,t,r){var n=Uo(e)?Et:qt,a=arguments.length<3;return n(e,ii(t,4),r,a,fn)},Fr.repeat=function(e,t,r){return t=(r?gi(e,t,r):t===a)?1:hl(t),Gn(yl(e),t)},Fr.replace=function(){var e=arguments,t=yl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,i=(t=ga(t,e)).length;for(i||(i=1,e=a);++nf)return[];var r=h,n=gr(e,h);t=ii(t),e-=h;for(var a=Wt(n,t);++r=o)return e;var s=r-ur(n);if(s<1)return n;var u=l?ma(l,0,s).join(""):e.slice(0,s);if(i===a)return u+n;if(l&&(s+=u.length-s),al(i)){if(e.slice(s).search(i)){var c,f=u;for(i.global||(i=ke(i.source,yl(de.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;u=u.slice(0,d===a?s:d)}}else if(e.indexOf(oa(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+n},Fr.unescape=function(e){return(e=yl(e))&&W.test(e)?e.replace(q,dr):e},Fr.uniqueId=function(e){var t=++Ee;return yl(e)+t},Fr.upperCase=Zl,Fr.upperFirst=Jl,Fr.each=yo,Fr.eachRight=mo,Fr.first=Vi,os(Fr,(gs={},mn(Fr,(function(e,t){Ie.call(Fr.prototype,t)||(gs[t]=e)})),gs),{chain:!1}),Fr.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),kt(["drop","take"],(function(e,t){Hr.prototype[e]=function(r){r=r===a?1:vr(hl(r),0);var n=this.__filtered__&&!t?new Hr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,h),type:e+(n.__dir__<0?"Right":"")}),n},Hr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),kt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Hr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),kt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Hr.prototype[e]=function(){return this[r](1).value()[0]}})),kt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Hr.prototype[e]=function(){return this.__filtered__?new Hr(this):this[r](1)}})),Hr.prototype.compact=function(){return this.filter(rs)},Hr.prototype.find=function(e){return this.filter(e).head()},Hr.prototype.findLast=function(e){return this.reverse().find(e)},Hr.prototype.invokeMap=Wn((function(e,t){return"function"==typeof e?new Hr(this):this.map((function(r){return Sn(r,e,t)}))})),Hr.prototype.reject=function(e){return this.filter(Eo(ii(e)))},Hr.prototype.slice=function(e,t){e=hl(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==a&&(r=(t=hl(t))<0?r.dropRight(-t):r.take(t-e)),r)},Hr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hr.prototype.toArray=function(){return this.take(h)},mn(Hr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Fr[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(Fr.prototype[t]=function(){var t=this.__wrapped__,l=n?[1]:arguments,s=t instanceof Hr,u=l[0],c=s||Uo(t),f=function(e){var t=i.apply(Fr,Pt([e],l));return n&&d?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(s=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=o&&!d,v=s&&!h;if(!o&&c){t=v?t:new Hr(this);var g=e.apply(t,l);return g.__actions__.push({func:fo,args:[f],thisArg:a}),new Br(g,d)}return p&&v?e.apply(this,l):(g=this.thru(f),p?n?g.value()[0]:g.value():g)})})),kt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Se[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return t.apply(Uo(a)?a:[],e)}return this[r]((function(r){return t.apply(Uo(r)?r:[],e)}))}})),mn(Hr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Ie.call(Sr,n)||(Sr[n]=[]),Sr[n].push({name:t,func:r})}})),Sr[Fa(a,2).name]=[{name:"wrapper",func:a}],Hr.prototype.clone=function(){var e=new Hr(this.__wrapped__);return e.__actions__=Aa(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Aa(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Aa(this.__views__),e},Hr.prototype.reverse=function(){if(this.__filtered__){var e=new Hr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Uo(e),n=t<0,a=r?e.length:0,i=function(e,t,r){for(var n=-1,a=r.length;++n=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof jr;){var n=Fi(r);n.__index__=0,n.__values__=a,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hr){var t=e;return this.__actions__.length&&(t=new Hr(this)),(t=t.reverse()).__actions__.push({func:fo,args:[$i],thisArg:a}),new Br(t,this.__chain__)}return this.thru($i)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return fa(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Je&&(Fr.prototype[Je]=function(){return this}),Fr}();ft._=hr,(n=function(){return hr}.call(t,r,t,e))===a||(e.exports=n)}.call(this)},809:function(e,t){var r,n;r=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=!t.document&&!!t.postMessage,n=t.IS_PAPA_WORKER||!1,a={},i=0,o={parse:function(r,n){var l=(n=n||{}).dynamicTyping||!1;if(_(l)&&(n.dynamicTypingFunction=l,l={}),n.dynamicTyping=l,n.transform=!!_(n.transform)&&n.transform,n.worker&&o.WORKERS_SUPPORTED){var s=function(){if(!o.WORKERS_SUPPORTED)return!1;var r,n,l=(r=t.URL||t.webkitURL||null,n=e.toString(),o.BLOB_URL||(o.BLOB_URL=r.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",n,")();"],{type:"text/javascript"})))),s=new t.Worker(l);return s.onmessage=g,s.id=i++,a[s.id]=s}();return s.userStep=n.step,s.userChunk=n.chunk,s.userComplete=n.complete,s.userError=n.error,n.step=_(n.step),n.chunk=_(n.chunk),n.complete=_(n.complete),n.error=_(n.error),delete n.worker,void s.postMessage({input:r,config:n,workerId:s.id})}var h=null;return o.NODE_STREAM_INPUT,"string"==typeof r?(r=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(r),h=n.download?new u(n):new f(n)):!0===r.readable&&_(r.read)&&_(r.on)?h=new d(n):(t.File&&r instanceof File||r instanceof Object)&&(h=new c(n)),h.stream(r)},unparse:function(e,t){var r=!1,n=!0,a=",",i="\r\n",l='"',s=l+l,u=!1,c=null,f=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(a=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(l=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(s=t.escapeChar+l),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(f=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(p(l),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,u);if("object"==typeof e[0])return h(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(e,t,r){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var l=Array.isArray(e)&&0=this._config.preview;if(n)t.postMessage({results:l,workerId:o.WORKER_ID,finished:u});else if(_(this._config.chunk)&&!r){if(this._config.chunk(l,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);l=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(l.data),this._completeResults.errors=this._completeResults.errors.concat(l.errors),this._completeResults.meta=l.meta),this._completed||!u||!_(this._config.complete)||l&&l.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||l&&l.meta.paused||this._nextChunk(),l}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),s.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var a=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+a)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var r=t.statusText||e;this._sendError(new Error(r))}}function c(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),s.call(this,e);var n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;s.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,r=this._config.chunkSize;return r?(e=t.substring(0,r),t=t.substring(r)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){s.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){s.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){s.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=b((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(e){var t,r,n,a=Math.pow(2,53),i=-a,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,s=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,c=0,f=0,d=!1,h=!1,g=[],y={data:[],errors:[],meta:{}};if(_(e.step)){var m=e.step;e.step=function(t){if(y=t,T())w();else{if(w(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?r.abort():(y.data=y.data[0],m(y,u))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&n&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!b(e)}))),T()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;T()&&t=g.length?"__parsed_extra":g[n]),e.transform&&(o=e.transform(o,i)),o=M(i,o),"__parsed_extra"===i?(a[i]=a[i]||[],a[i].push(o)):a[i]=o}return e.header&&(n>g.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+n,f+r):n=n.length/2?"\r\n":"\r"}(a,s)),n=!1,e.delimiter)_(e.delimiter)&&(e.delimiter=e.delimiter(a),y.meta.delimiter=e.delimiter);else{var u=function(t,r,n,a,i){var l,s,u,c;i=i||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f=l)return G(!0)}else for(j=c,c++;;){if(-1===(j=o.indexOf(t,j+1)))return h||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:c}),V();if(j===v-1)return V(o.substring(c,j).replace(N,t));if(t!==u||o[j+1]!==u){if(t===u||0===j||o[j-1]!==u){-1!==z&&z=l)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:c}),j++}}else j++}return V();function Y(e){b.push(e),M=c}function U(e){var t=0;if(-1!==e){var r=o.substring(j+1,e);r&&""===r.trim()&&(t=r.length)}return t}function V(e){return h||(void 0===e&&(e=o.substring(c)),T.push(e),c=v,Y(T),x&&W()),G()}function q(e){c=e,Y(T),T=[],F=o.indexOf(n,c)}function G(e){return{data:b,errors:w,meta:{delimiter:r,linebreak:n,aborted:f,truncated:!!e,cursor:M+(d||0)}}}function W(){i(G()),b=[],w=[]}},this.abort=function(){f=!0},this.getCharIndex=function(){return c}}function g(e){var t=e.data,r=a[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){n=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:m,resume:m};if(_(r.userStep)){for(var o=0;o{var t;self,t=function(){return function(){var e={9288:function(e,t,r){"use strict";var n=r(3400),a={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},6712:function(e,t,r){"use strict";e.exports=r(1843)},7240:function(e,t,r){"use strict";e.exports=r(1132)},6144:function(e,t,r){"use strict";e.exports=r(7776)},2016:function(e,t,r){"use strict";e.exports=r(4884)},5556:function(e,t,r){"use strict";e.exports=r(6744)},6489:function(e,t,r){"use strict";e.exports=r(2028)},3472:function(e,t,r){"use strict";var n=r(2016);n.register([r(7240),r(260),r(6712),r(5556),r(6489),r(7312),r(6144)]),e.exports=n},260:function(e,t,r){"use strict";e.exports=r(5792)},7312:function(e,t,r){"use strict";e.exports=r(6272)},2196:function(e){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},3916:function(e,t,r){"use strict";var n=r(2196),a=r(5376),i=r(3816),o=r(1780).templatedArray;r(6208),e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},272:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(6196).draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,r),"range"===o&&l(t,n)}))}function l(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],u=e["a"+i+"ref"],c=e["_"+i+"padplus"],f=e["_"+i+"padminus"],d={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+d,v=h-d,g=3*e.startarrowsize*e.arrowwidth||0,y=g+d,m=g-d;if(u===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:v}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(c,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=l?y+l:y,m=l?m-l:m,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(c,p,y),ppadminus:Math.max(f,v,m)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},2300:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(1780).arrayEditor;function o(e,t){var r,n,a,i,o,s,u,c=e._fullLayout.annotations,f=[],d=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),u=s.on,c=s.off.concat(s.explicitOff),f={},d=e._fullLayout.annotations;if(u.length||c.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var W=!1,Z=["x","y"],J=0;J1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(W=!0):W=!0),X=ae._offset+ae.r2p(t[te]),Q=.5}else{var pe="domain"===de;"x"===te?($=t[te],X=pe?ae._offset+ae._length*$:X=T.l+T.w*$):($=1-t[te],X=pe?ae._offset+ae._length*$:X=T.t+T.h*$),Q=t.showarrow?.5:$}if(t.showarrow){fe.head=X;var ve=t["a"+te];if(ee=oe*V(.5,t.xanchor)-le*V(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(ve=1-ve),fe.tail=ae._offset+ae._length*ve):"paper"===ge?"y"===te?(ve=1-ve,fe.tail=T.t+T.h*ve):fe.tail=T.l+T.w*ve:fe.tail=ae._offset+ae.r2p(ve),K=ee}else fe.tail=X+ve,K=ee+ve;fe.text=fe.tail+ee;var ye=w["x"===te?"width":"height"];if("paper"===re&&(fe.head=o.constrain(fe.head,1,ye-1)),"pixel"===ne){var me=-Math.max(fe.tail-3,fe.text),xe=Math.min(fe.tail+3,fe.text)-ye;me>0?(fe.tail+=me,fe.text+=me):xe>0&&(fe.tail-=xe,fe.text-=xe)}fe.tail+=ce,fe.head+=ce}else K=ee=se*V(Q,ue),fe.text=X+ee;fe.text+=ce,ee+=ce,K+=ce,t["_"+te+"padplus"]=se/2+K,t["_"+te+"padminus"]=se/2-K,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(W)z.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(R-_)*("middle"===t.valign?.5:1)),f)n.select("svg").attr({x:j+be-1,y:j+_e}).call(c.setClipUrl,H?O:null,e);else{var we=j+_e-v.top,Te=j+be-v.left;q.call(d.positionText,Te,we).call(c.setClipUrl,H?O:null,e)}Y.select("rect").call(c.setRect,j,j,k,R),B.call(c.setRect,F/2,F/2,N-F,U-F),z.call(c.setTranslate,Math.round(C.x.text-N/2),Math.round(C.y.text-U/2)),I.attr({transform:"rotate("+D+","+C.x.text+","+C.y.text+")"});var Me,ke=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=C.x.head,f=C.y.head,d=C.x.tail+r,h=C.y.tail+n,v=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(D,v,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),O=+B.attr("width"),E=+B.attr("height"),R=v-.5*O,F=R+O,N=b-.5*E,j=N+E,H=[[R,N,R,j],[R,j,F,j],[F,j,F,N],[F,N,R,N]].map(k);if(!H.reduce((function(e,t){return e^!!o.segmentsIntersect(s,f,s+1e6,f+1e6,t[0],t[1],t[2],t[3])}),!1)){H.forEach((function(e){var t=o.segmentsIntersect(d,h,s,f,e[0],e[1],e[2],e[3]);t&&(d=t.x,h=t.y)}));var Y=t.arrowwidth,U=t.arrowcolor,V=t.arrowside,q=P.append("g").style({opacity:u.opacity(U)}).classed("annotation-arrow-g",!0),G=q.append("path").attr("d","M"+d+","+h+"L"+s+","+f).style("stroke-width",Y+"px").call(u.stroke,u.rgb(U));if(g(G,V,t),M.annotationPosition&&G.node().parentNode&&!i){var W=s,Z=f;if(t.standoff){var J=Math.sqrt(Math.pow(s-d,2)+Math.pow(f-h,2));W+=t.standoff*(d-s)/J,Z+=t.standoff*(h-f)/J}var X,K,$=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-W)+","+(h-Z),transform:l(W,Z)}).style("stroke-width",Y+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");p.init({element:$.node(),gd:e,prepFn:function(){var e=c.getTranslate(z);X=e.x,K=e.y,y&&y.autorange&&A(y._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(X,K),a=n[0]+e,i=n[1]+r;z.call(c.setTranslate,a,i),L("x",m(y,e,"x",T,t)),L("y",m(x,r,"y",T,t)),t.axref===t.xref&&L("ax",m(y,e,"ax",T,t)),t.ayref===t.yref&&L("ay",m(x,r,"ay",T,t)),q.attr("transform",l(e,r)),I.attr({transform:"rotate("+D+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ke(0,0),E&&p.init({element:z.node(),gd:e,prepFn:function(){Me=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?L("ax",m(y,e,"ax",T,t)):L("ax",t.ax+e),t.ayref===t.yref?L("ay",m(x,r,"ay",T.w,t)):L("ay",t.ay+r),ke(e,r);else{if(i)return;var a,o;if(y)a=m(y,e,"x",T,t);else{var s=t._xsize/T.w,u=t.x+(t._xshift-t.xshift)/T.w-s/2;a=p.align(u+e/T.w,s,0,1,t.xanchor)}if(x)o=m(x,r,"y",T,t);else{var c=t._ysize/T.h,f=t.y-(t._yshift+t.yshift)/T.h-c/2;o=p.align(f-r/T.h,c,0,1,t.yanchor)}L("x",a),L("y",o),y&&x||(n=p.getCursor(y?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Me}),h(z,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){h(z),a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+r.standoff,_=v.backoff*y+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},c={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-c.x,T=o.y-c.y;if(d=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void E();if(b){if(b*b>w*w+T*T)return void E();var M=b*Math.cos(f),k=b*Math.sin(f);c.x+=M,c.y+=k,e.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+T*T)return void E();var A=_*Math.cos(f),L=_*Math.sin(f);o.x-=A,o.y-=L,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var S=h.getTotalLength(),O="";if(S1){u=!0;break}}u?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},6864:function(e,t,r){"use strict";var n=r(4040),a=r(3400);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(5899)}}},layoutAttributes:r(5899),handleDefaults:r(2808),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),l=0;l=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||u).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var a=n(e).toRgb(),i=n(t).toRgb(),o={r:r*a.r+(1-r)*i.r,g:r*a.g+(1-r)*i.g,b:r*a.b+(1-r)*i.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,u))),(a.isDark()?t?a.lighten(t):u:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t0?n>=s:n<=s));a++)n>c&&n0?n>=s:n<=s));a++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(de)/Math.LN10));ce*=he*u.roundUp(de/he,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ce}se.domain=o?[oe+P/N.h,oe+Q-P/N.h]:[oe+D/N.w,oe+Q-D/N.w],se.setScale(),e.attr("transform",c(Math.round(N.l),Math.round(N.t)));var pe,ve=e.select("."+k.cbtitleunshift).attr("transform",c(-Math.round(N.l),-Math.round(N.t))),ge=se.ticklabelposition,ye=se.title.font.size,me=e.select("."+k.cbaxis),xe=0,be=0;function _e(n,a){var i={propContainer:se,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(i,a||{}))}return u.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ue||!o&&!ue)&&("top"===Y&&(e=D+N.l+ee*I,t=P+N.t+te*(1-oe-Q)+3+.75*ye),"bottom"===Y&&(e=D+N.l+ee*I,t=P+N.t+te*(1-oe)-3-.25*ye),"right"===Y&&(t=P+N.t+te*E+3+.75*ye,e=D+N.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ue||o&&ue){var i,s=e.select("."+k.cbtitle),f=s.select("text"),d=[-A/2,A/2],p=s.select(".h"+se._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),p?(i=h.bBox(p),be=i.width,(xe=i.height)>v&&(d[1]-=(xe-v)/2)):f.node()&&!f.classed(k.jsPlaceholder)&&(i=h.bBox(f.node()),be=i.width,xe=i.height),o){if(xe){if(xe+=5,"top"===Y)se.domain[1]-=xe/N.h,d[1]*=-1;else{se.domain[0]+=xe/N.h;var y=g.lineCount(f);d[1]+=(1-y)*v}s.attr("transform",c(d[0],d[1])),se.setScale()}}else be&&("right"===Y&&(se.domain[0]+=(be+ye/2)/N.w),s.attr("transform",c(d[0],d[1])),se.setScale())}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?c(0,Math.round(N.h*(1-se.domain[1]))):c(Math.round(N.w*se.domain[0]),0)),me.attr("transform",o?c(0,Math.round(-N.t)):c(Math.round(-N.l),0));var m=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Z);m.enter().append("rect").classed(k.cbfill,!0).attr("style",""),m.exit().remove();var x=U.map(se.c2p).map(Math.round).sort((function(e,t){return e-t}));m.each((function(e,i){var l=[0===i?U[0]:(Z[i]+Z[i-1])/2,i===Z.length-1?U[1]:(Z[i]+Z[i+1])/2].map(se.c2p).map(Math.round);o&&(l[1]=u.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",re).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(X,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)h.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=q(e).replace("e-","");s.attr("fill",a(c).toHexString())}}));var b=e.select("."+k.cblines).selectAll("path."+k.cbline).data(B.color&&B.width?J:[]);b.enter().append("path").classed(k.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(se.c2p(e))+B.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+X).call(h.lineGroupStyle,B.width,V(e),B.dash)})),me.selectAll("g."+se._id+"tick,path").remove();var _=re+X+(A||0)/2-("outside"===t.ticks?1:0),T=l.calcTicks(se),M=l.getTickSigns(se)[2];return l.drawTicks(r,se,{vals:"inside"===se.ticks?l.clipEnds(se,T):T,layer:me,path:l.makeTickPath(se,_,M),transFn:l.makeTransTickFn(se)}),l.drawLabels(r,se,{vals:T,layer:me,transFn:l.makeTransTickLabelFn(se),labelFns:l.makeLabelFns(se,_)})},function(){if(o&&!ue||!o&&ue){var e,a,i=se.position||0,l=se._offset+se._length/2;if("right"===Y)a=l,e=N.l+ee*i+10+ye*(se.showticklabels?1:.5);else if(e=l,"bottom"===Y&&(a=N.t+te*i+10+(-1===ge.indexOf("inside")?se.tickfont.size:0)+("intside"!==se.ticks&&t.ticklen||0)),"top"===Y){var s=H.text.split("
").length;a=N.t+te*i+10-X-w*ye*s}_e((o?"h":"v")+se._id+"title",{avoid:{selection:n.select(r).selectAll("g."+se._id+"tick"),side:Y,offsetTop:o?0:N.t,offsetLeft:o?N.l:0,maxShift:o?F.width:F.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=X+A/2;-1===ge.indexOf("inside")&&(n=h.bBox(me.node()),l+=o?n.width:n.height),pe=ve.select("text");var u=0,f=o&&"top"===Y,v=!o&&"right"===Y,g=0;if(pe.node()&&!pe.classed(k.jsPlaceholder)){var m,x=ve.select(".h"+se._id+"title-math-group").node();x&&(o&&ue||!o&&!ue)?(u=(n=h.bBox(x)).width,m=n.height):(u=(n=h.bBox(ve.node())).right-N.l-(o?re:le),m=n.bottom-N.t-(o?le:re),o||"top"!==Y||(l+=n.height,g=n.height)),v&&(pe.attr("transform",c(u/2+ye/2,0)),u*=2),l=Math.max(l,o?u:m)}var b=2*(o?D:P)+l+L+A/2,w=0;!o&&H.text&&"bottom"===C&&E<=0&&(b+=w=b/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var j=L+A,B=(o?re:le)-j/2-(o?D:0),U=(o?le:re)-(o?$:P+g-w);e.select("."+k.cbbg).attr("x",B).attr("y",U).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max($+j,2)).call(p.fill,S).call(p.stroke,t.bordercolor).style("stroke-width",L);var V=v?Math.max(u-10,0):0;e.selectAll("."+k.cboutline).attr("x",(o?re:le+D)+V).attr("y",(o?le+P-$:re)+(f?xe:0)).attr(o?"width":"height",Math.max(X,2)).attr(o?"height":"width",Math.max($-(o?2*P+xe:2*D+V),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":A});var q=o?ne*b:0,G=o?0:(1-ae)*b-g;if(q=z?N.l-q:-q,G=R?N.t-G:-G,e.attr("transform",c(q,G)),!o&&(L||a(S).getAlpha()&&!a.equals(F.paper_bgcolor,S))){var W=me.selectAll("text"),Z=W[0].length,J=e.select("."+k.cbbg).node(),K=h.bBox(J),Q=h.getTranslate(e);W.each((function(e,t){var r=Z-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=K.right+Q.x+le-L-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=K.left+Q.x+le+L+2-l)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[O],ie=M[O],oe=T[C],ce=M[C],fe=b-X;o?("pixels"===d?(ee.y=E,ee.t=$*oe,ee.b=$*ce):(ee.t=ee.b=0,ee.yt=E+s*oe,ee.yb=E-s*ce),"pixels"===_?(ee.x=I,ee.l=b*te,ee.r=b*ie):(ee.l=fe*te,ee.r=fe*ie,ee.xl=I-y*te,ee.xr=I+y*ie)):("pixels"===d?(ee.x=I,ee.l=$*te,ee.r=$*ie):(ee.l=ee.r=0,ee.xl=I+s*te,ee.xr=I-s*ie),"pixels"===_?(ee.y=1-E,ee.t=b*oe,ee.b=b*ce):(ee.t=fe*oe,ee.b=fe*ce,ee.yt=E-y*oe,ee.yb=E+y*ce));var de=t.y<.5?"b":"t",he=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var be={r:F.width-B-q,l:B+ee.r,b:F.height-U-G,t:U+ee.b};z&&R?i.autoMargin(r,t._id,ee):z?r._fullLayout._reservedMargin[t._id][de]=be[de]:R||o?r._fullLayout._reservedMargin[t._id][he]=be[he]:r._fullLayout._reservedMargin[t._id][de]=be[de]}],r)}(r,t,e);y&&y.then&&(e._promises||[]).push(y),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,u=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+c(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/u.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/u.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(a,i,t.xanchor,t.yanchor);d(e,f)},doneFn:function(){if(d(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},553:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e){return n.isPlainObject(e.colorbar)}},5080:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(616),supplyDefaults:r(4013),draw:r(7848).draw,hasColorbar:r(553)}},9084:function(e,t,r){"use strict";var n=r(616),a=r(3756).counter,i=r(2996),o=r(8304).scales;function l(e){return"`"+e+"`"}i(o),e.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),u="showScaleDflt"in t?t.showScaleDflt:"z"===i,c="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,f=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(d+(r={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",v=i+"max",g=i+"mid",y=(l(d+h),l(d+p),l(d+v),{});y[p]=y[v]=void 0;var m={};m[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},7128:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(4288).extractOpts;e.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,u=r.containerStr,c=u?a.nestedProperty(t,u).get():t,f=i(c),d=!1!==f.auto,h=f.min,p=f.max,v=f.mid,g=function(){return a.aggNums(Math.min,null,s)},y=function(){return a.aggNums(Math.max,null,s)};void 0===h?h=g():d&&(h=c._colorAx&&n(h)?Math.min(h,g()):g()),void 0===p?p=y():d&&(p=c._colorAx&&n(p)?Math.max(p,y()):y()),d&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v=0?l.colorscale.sequential:l.colorscale.sequentialminus,f._sync("colorscale",o))}},5504:function(e,t,r){"use strict";var n=r(3400),a=r(4288).hasColorscale,i=r(4288).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,u=new Array(s),c=0;c4/3-l?o:l}},7416:function(e,t,r){"use strict";var n=r(3400),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},2760:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},6476:function(e,t,r){"use strict";var n=r(9128),a=r(2264),i=r(9184),o=r(3400).removeElement,l=r(3816),s=e.exports={};s.align=r(8316),s.getCursor=r(7416);var u=r(2616);function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function f(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=u.wrapped,s.unhoverRaw=u.raw,s.init=function(e){var t,r,n,u,d,h,p,v,g=e.gd,y=1,m=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)m&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(y,h),!v){var r;try{r=new MouseEvent("click",t)}catch(e){var n=f(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},s.coverSlip=c},2616:function(e,t,r){"use strict";var n=r(5924),a=r(1200),i=r(2200).getGraphDiv,o=r(2456),l=e.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},8192:function(e,t){"use strict";t.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},3616:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.numberFormat,o=r(8248),l=r(9760),s=r(4040),u=r(6308),c=r(8932),f=a.strTranslate,d=r(2736),h=r(9616),p=r(4284).LINE_SPACING,v=r(3448).DESELECTDIM,g=r(3028),y=r(7152),m=r(624).appendArrayPointValue,x=e.exports={};function b(e){return"none"===e?void 0:e}x.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,l=t.family,s=t.shadow,c=t.lineposition,f=t.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(u.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",b(function(e){return _[e]}(f))),s&&e.style("text-shadow","auto"===s?d.makeTextShadow(u.contrast(i)):b(s)),c&&e.style("text-decoration-line",b(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(c)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=a&&x.getPatternAttr(a.shape,0,"");if(o){var l=x.getPatternAttr(a.bgcolor,0,null),s=x.getPatternAttr(a.fgcolor,0,null),c=a.fgopacity,f=x.getPatternAttr(a.size,0,8),d=x.getPatternAttr(a.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,f,d,void 0,a.fillmode,l,s,c)}else if(i&&"none"!==i.type){var p,v,g=i.type,y="scatterfill-"+t.uid;n&&(y="legendfill-"+t.uid),n||void 0===i.start&&void 0===i.stop?("horizontal"===g&&(g+="reversed"),e.call(x.gradient,r,y,g,i.colorscale,"fill")):("horizontal"===g?(p={x:i.start,y:0},v={x:i.stop,y:0}):"vertical"===g&&(p={x:0,y:i.start},v={x:0,y:i.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),v.x=t._xA.c2p(void 0===v.x?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(void 0===v.y?t._extremes.y.max[0].val:v.y,!0),e.call(S,r,y,"linear",i.colorscale,"fill",p,v,!0,!1))}else t.fillcolor&&e.call(u.fill,t.fillcolor)}x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",f(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,u=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";u.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(u.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());w(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var a=n.select(this);e[0].trace&&w(a,e[0].trace,t,r)}))};var T=r(1984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(T).forEach((function(e){var t=T[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var M=x.symbolNames.length;function k(e,t,r,n){var a=e%100;return x.symbolFuncs[a](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=M||e>=400?0:Math.floor(Math.max(e,0))};var A=i("~f"),L={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function S(e,t,r,i,o,s,c,f,d,h){var p,v=o.length;"linear"===i?p={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:f.x,y2:f.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var g=new Array(v),y=0;y=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),n.ms2mrc){var c;c="various"===e.ms||"various"===l.size?3:n.ms2mrc(e.ms),e.mrc=c,n.selectedSizeFn&&(c=e.mrc=n.selectedSizeFn(e));var f=x.symbolNumber(e.mx||l.symbol)||0;e.om=f%200>=100;var d=ne(e,r),h=G(e,r);t.attr("d",k(f,c,d,h))}var p,v,g,y=!1;if(e.so)g=s.outlierwidth,v=s.outliercolor,p=l.outliercolor;else{var m=(s||{}).width;g=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(s.color)?u.defaultLine:s.color,a.isArrayOrTypedArray(l.color)&&(p=u.defaultLine,y=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(u.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=l.gradient,_=e.mgt;_?y=!0:_=b&&b.type,a.isArrayOrTypedArray(_)&&(_=_[0],L[_]||(_=0));var w=l.pattern,T=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var M=e.mgc;M?y=!0:M=b.color;var A=r.uid;y&&(A+="-"+e.i),x.gradient(t,i,A,_,[[0,M],[1,p]],"fill")}else if(T){var S=!1,O=w.fgcolor;!O&&o&&o.color&&(O=o.color,S=!0);var C=x.getPatternAttr(O,e.i,o&&o.color||null),D=x.getPatternAttr(w.bgcolor,e.i,null),P=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),E=x.getPatternAttr(w.solidity,e.i,.3);S=S||e.mcc||a.isArrayOrTypedArray(w.shape)||a.isArrayOrTypedArray(w.bgcolor)||a.isArrayOrTypedArray(w.fgcolor)||a.isArrayOrTypedArray(w.size)||a.isArrayOrTypedArray(w.solidity);var R=r.uid;S&&(R+="-"+e.i),x.pattern(t,"point",i,R,T,I,E,e.mcc,w.fillmode,D,C,P)}else a.isArrayOrTypedArray(p)?u.fill(t,p[e.i]):u.fill(t,p);g&&u.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?y(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},u=i.opacity,c=o.opacity,f=l.opacity,d=void 0!==c,h=void 0!==f;(a.isArrayOrTypedArray(u)||d||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?d?c:t:h?f:v*t});var p=i.color,g=o.color,y=l.color;(g||y)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:y||t});var m=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||m/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:c||(s?t:u.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){u.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,n){var i=n.mx||a.symbol||0,o=r.selectedSizeFn(n);e.attr("d",k(x.symbolNumber(i),o,ne(n,t),G(n,t))),n.mrc2=o})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}function E(e,t,r){return r&&(e=B(e)),t?z(e[1]):R(e[0])}function R(e){var t=n.round(e,2);return O=t,t}function z(e){var t=n.round(e,2);return C=t,t}function F(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,.25),u=Math.pow(o*o+l*l,.25),c=(u*u*a-s*s*o)*n,f=(u*u*i-s*s*l)*n,d=3*u*(s+u),h=3*s*(s+u);return[[R(t[0]+(d&&c/d)),z(t[1]+(d&&f/d))],[R(t[0]-(h&&c/h)),z(t[1]-(h&&f/h))]]}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),u=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(u||0===u){if(l){var c=t._module.formatLabels,f=c?c(e,t,s):{},h={};m(h,t,e.i);var p=t._meta||{};u=a.texttemplateString(u,f,s._d3locale,h,e,p)}var v=e.tp||t.textposition,g=I(e,t),y=i?i(e):e.tc||t.textfont.color;o.call(x.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:g,color:y}).text(u).call(d.convertToTspans,r).call(P,v,g,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=I(e,t);u.fill(a,i);var c=s.traceIs(t,"bar-like");P(a,o,l,e.mrc2||e.mrc,c)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=u||w>=f&&w<=u)&&(T<=d&&T>=c||T>=d&&T<=c)&&(e=[w,T])}return e}x.steps=function(e){var t=N[e]||j;return function(e){for(var r="M"+R(e[0][0])+","+z(e[0][1]),n=e.length,a=1;a=1e4&&(x.savedBBoxes={},H=0),r&&(x.savedBBoxes[r]=g),H++,a.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",U(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=f(t,r)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var V=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(V,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var q=/translate\([^)]*\)\s*$/;function G(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(q);e=1===t&&1===r?[]:[f(o,l),"scale("+t+","+r+")",f(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))},x.getMarkerStandoff=G;var W,Z,J,X,K,$,Q=Math.atan2,ee=Math.cos,te=Math.sin;function re(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*te(e),r*te(e)+n*ee(e)]}function ne(e,t){var r,n,i=e.ma;void 0===i&&((i=t.marker.angle)&&!a.isArrayOrTypedArray(i)||(i=0));var l=t.marker.angleref;if("previous"===l||"north"===l){if(t._geo){var s=t._geo.project(e.lonlat);r=s[0],n=s[1]}else{var u=t._xA,c=t._yA;if(!u||!c)return 90;r=u.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var f,d=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([d,h+1e-5]),v=t._geo.project([d+1e-5,h]),g=Q(v[1]-n,v[0]-r),y=Q(p[1]-n,p[0]-r);if("north"===l)f=i/180*Math.PI;else if("previous"===l){var m=d/180*Math.PI,x=h/180*Math.PI,b=W/180*Math.PI,_=Z/180*Math.PI,w=b-m,T=ee(_)*te(w),M=te(_)*ee(x)-ee(_)*te(x)*ee(w);f=-Q(T,M)-Math.PI,W=d,Z=h}var k=re(g,[ee(f),0]),A=re(y,[te(f),0]);i=Q(k[1]+A[1],k[0]+A[0])/Math.PI*180,"previous"!==l||$===t.uid&&e.i===K+1||(i=null)}if("previous"===l&&!t._geo)if($===t.uid&&e.i===K+1&&o(r)&&o(n)){var L=r-J,S=n-X,O=t.line&&t.line.shape||"",C=O.slice(O.length-1);"h"===C&&(S=0),"v"===C&&(L=0),i+=Q(S,L)/Math.PI*180+90}else i=null}return J=r,X=n,K=e.i,$=t.uid,i}x.getMarkerAngle=ne},1984:function(e,t,r){"use strict";var n,a,i,o,l=r(9604),s=r(3428).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),d=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function g(e,t,r){if(!(e&&e%360!=0||t))return r;if(i===e&&o===t&&n===r)return a;function s(e,r){var n=h(e),a=p(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}i=e,o=t,n=r;for(var u=e/180*d,c=0,f=0,v=l(r),g="",y=0;y0,f=e._context.staticPlot;t.each((function(t){var d,h=t[0].trace,p=h.error_x||{},v=h.error_y||{};h.ids&&(d=function(e){return e.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;v.visible||p.visible||(t=[]);var y=n.select(this).selectAll("g.errorbar").data(t,d);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),v.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var m=y.enter().append("g").classed("errorbar",!0);c&&m.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(y,r.layerClipId,e),y.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,s,u);if(!g||e.vis){var i,o=t.select("path.yerror");if(v.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=v.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),o.size()?c&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var y=(p.copy_ystyle?v:p).width;i="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(i+="m0,-"+y+"v"+2*y),h.size()?c&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}}))}}))}},2036:function(e,t,r){"use strict";var n=r(3428),a=r(6308);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},5756:function(e,t,r){"use strict";var n=r(5376),a=r(5460).hoverlabel,i=r(2880).extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},5056:function(e,t,r){"use strict";var n=r(3400),a=r(4040);function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l=0&&r.indexJ[0]._length||be<0||be>X[0]._length)return v.unhoverRaw(e,t)}else xe="xpx"in t?t.xpx:J[0]._length/2,be="ypx"in t?t.ypx:X[0]._length/2;if(t.pointerX=xe+J[0]._offset,t.pointerY=be+X[0]._offset,re="xval"in t?m.flat(x,t.xval):m.p2c(J,xe),ne="yval"in t?m.flat(x,t.yval):m.p2c(X,be),!a(re[0])||!a(ne[0]))return o.warn("Fx.hover failed",t,e),v.unhoverRaw(e,t)}var Me=1/0;function ke(r,n){for(ie=0;iepe&&(ve.splice(0,pe),Me=ve[0].distance),k&&0!==te&&0===ve.length){he.distance=te,he.index=!1;var c=le._module.hoverPoints(he,fe,de,"closest",{hoverLayer:b._hoverlayer});if(c&&(c=c.filter((function(e){return e.spikeDistance<=te}))),c&&c.length){var f,d=c.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(d.length){var h=d[0];a(h.x0)&&a(h.y0)&&(f=Le(h),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>f.spikeDistance)&&(ye.vLinePoint=f))}var v=c.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(v.length){var g=v[0];a(g.x0)&&a(g.y0)&&(f=Le(g),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>f.spikeDistance)&&(ye.hLinePoint=f))}}}}}function Ae(e,t,r){for(var n,a=null,i=1/0,o=0;o0&&Math.abs(e.distance)Ne-1;je--)Ue(ve[je]);ve=Be,De()}var Ve=e._hoverdata,qe=[],Ge=U(e),We=V(e);for(ae=0;ae1||ve.length>1)||"closest"===A&&me&&ve.length>1,ot=p.combine(b.plot_bgcolor||p.background,b.paper_bgcolor),lt=E(ve,{gd:e,hovermode:A,rotateLabels:it,bgColor:ot,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),st=lt.hoverLabels;if(m.isUnifiedHover(A)||(function(e,t,r,n){var a,i,o,l,s,u,c,f=t?"xa":"ya",d=t?"ya":"xa",h=0,p=1,v=e.size(),g=new Array(v),y=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;a=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;a=!1}if(a){var n=0;for(l=0;lt.pmax&&n++;for(l=e.length-1;l>=0&&!(n<=0);l--)(u=e[l]).pos>t.pmax-1&&(u.del=!0,n--);for(l=0;l=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(n<=0);l--)(u=e[l]).pos+u.dp+u.size>t.pmax&&(u.del=!0,n--)}}}for(e.each((function(e){var n=e[f],a=e[d],i="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,h=z(e,t),v=e.anchor,k="end"===v?-1:1;if("middle"===v)c=(u=e.crossPos+(i?T(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(i?T(e.by):w(e.bx));else if(i)c=(u=e.crossPos+T(L+h.y)-T(e.by/2-L))+T(e.by);else{var A=w(k*L+h.x),S=A+w(k*e.bx);u=e.crossPos+Math.min(A,S),c=e.crossPos+Math.max(A,S)}i?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=r.width):s=a._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(c,x)-Math.max(u,m)>1&&("top"===a.side?(l=a._mainLinePosition,s=r.height):s=a._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?M:1)/2,pmin:l,pmax:s}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));!a&&h<=v;){for(h++,a=!0,l=0;l.01&&O.pmin===C.pmin&&O.pmax===C.pmax){for(s=S.length-1;s>=0;s--)S[s].dp+=i;for(A.push.apply(A,S),g.splice(l+1,1),c=0,s=A.length-1;s>=0;s--)c+=A[s].dp;for(o=c/A.length,s=A.length-1;s>=0;s--)A[s].dp-=o;a=!1}else l++}g.forEach(k)}for(l=g.length-1;l>=0;l--){var D=g[l];for(s=D.length-1;s>=0;s--){var P=D[s],I=P.datum;I.offset=P.dp,I.del=P.del}}}(st,it,b,lt.commonLabelBoundingBox),F(st,it,b._invScaleX,b._invScaleY)),s&&s.tagName){var ut=y.getComponentMethod("annotations","hasClickToShow")(e,qe);d(n.select(s),ut?"pointer":"")}s&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,Ve)&&(Ve&&e.emit("plotly_unhover",{event:t,points:Ve}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:J,yaxes:X,xvals:re,yvals:ne}))}(e,t,r,i,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=U(a),o=V(a),l=!1,s=E(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,u=e.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),d=Math.min(l,s),h=Math.max(l,s),v=e.trace;if(y.traceIs(v,"gl3d")){var g=a._fullLayout[v.scene]._scene.container,m=g.offsetLeft,x=g.offsetTop;c+=m,f+=m,d+=x,h+=x}u.bbox={x0:c+o,x1:f+o,y0:d+i,y1:h+i},t.inOut_bbox&&t.inOut_bbox.push(u.bbox)}else u=!1;return{color:e.color||p.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:u}})),{gd:a,hovermode:"closest",rotateLabels:l,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,u=0,c=0;return s.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function E(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,l=t.rotateLabels,c=t.bgColor,d=t.container,v=t.outerContainer,g=t.commonLabelOpts||{};if(0===e.length)return[[]];var T=t.fontFamily||x.HOVERFONT,M=t.fontSize||x.HOVERFONTSIZE,k=t.fontWeight||a.font.weight,A=t.fontStyle||a.font.style,O=t.fontVariant||a.font.variant,C=t.fontTextcase||a.font.textcase,D=t.fontLineposition||a.font.lineposition,I=t.fontShadow||a.font.shadow,E=e[0],z=E.xa,F=E.ya,N=i.charAt(0),j=N+"Label",B=E[j];if(void 0===B&&"multicategory"===z.type)for(var H=0;Ha.width-w&&(P=a.width-w),t.attr("d","M"+(m-P)+",0L"+(m-P+L)+","+_+L+"H"+w+"v"+_+(2*S+b.height)+"H"+-w+"V"+_+L+"H"+(m-P-L)+"Z"),m=P,Q.minX=m-w,Q.maxX=m+w,"top"===z.side?(Q.minY=x-(2*S+b.height),Q.maxY=x-S):(Q.minY=x+S,Q.maxY=x+(2*S+b.height))}else{var R,N,j;"right"===F.side?(R="start",N=1,j="",m=z._offset+z._length):(R="end",N=-1,j="-",m=z._offset),x=F._offset+(E.y0+E.y1)/2,l.attr("text-anchor",R),t.attr("d","M0,0L"+j+L+","+L+"V"+(S+b.height/2)+"h"+j+(2*S+b.width)+"V-"+(S+b.height/2)+"H"+j+L+"V-"+L+"Z"),Q.minY=x-(S+b.height/2),Q.maxY=x+(S+b.height/2),"right"===F.side?(Q.minX=m+L,Q.maxX=m+L+(2*S+b.width)):(Q.minX=m-L-(2*S+b.width),Q.maxX=m-L);var H,Y=b.height/2,V=U-b.top-Y,G="clip"+a._uid+"commonlabel"+F._id;if(m=0?pe:ve+me=0?ve:Ae+me=0?de:he+xe=0?he:Le+xe=0,"top"!==e.idealAlign&&K||!$?K?(j+=Y/2,e.anchor="start"):e.anchor="middle":(j-=Y/2,e.anchor="end"),e.crossPos=j;else{if(e.pos=j,K=N+H/2+Q<=V,$=N-H/2-Q>=0,"left"!==e.idealAlign&&K||!$)if(K)N+=H/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=N+ee-V,re=N-ee;te>0&&(N-=te),re<0&&(N+=-re)}else N-=H/2,e.anchor="end";e.crossPos=N}_.attr("text-anchor",e.anchor),E&&P.attr("text-anchor",e.anchor),t.attr("transform",s(N,j)+(l?u(w):""))})),{hoverLabels:Se,commonLabelBoundingBox:Q}}function R(e,t,r,n,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=H(e.name,e.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[u+"Label"]===a?s=e[c+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"
":"")+e.text),void 0!==e.extraText&&(s+=(s?"
":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[u+"Label"]!==a&&(d[u+"other"]=d[u+"Val"],d[u+"otherLabel"]=d[u+"Label"]),s=(s=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(I,(function(t,r){return l=H(r,e.nameLength),""}))}return[s,l]}function z(e,t){var r=0,n=e.offset;return t&&(n*=-A,r=e.offset*k),{x:r,y:n}}function F(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a,l,s,u,c=r.select("text.nums"),d=e.anchor,p="end"===d?-1:1,v=(u=(s=(l={start:1,end:-1,middle:0}[(a=e).anchor])*(L+S))+l*(a.txwidth+S),"middle"===a.anchor&&(s-=a.tx2width/2,u+=a.txwidth/2+S),{alignShift:l,textShiftX:s,text2ShiftX:u}),g=z(e,t),y=g.x,m=g.y,x="middle"===d;r.select("path").attr("d",x?"M-"+i(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(p*L+y)+","+o(L+m)+"v"+o(e.by/2-L)+"h"+i(p*e.bx)+"v-"+o(e.by)+"H"+i(p*L+y)+"V"+o(m-L)+"Z");var b=y+v.textShiftX,_=m+e.ty0-e.by/2+S,w=e.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==d?(c.attr("text-anchor","start"),b=x?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===w&&"end"!==d&&(c.attr("text-anchor","end"),b=x?e.bx/2-e.tx2width/2-S:e.bx+S)),c.call(f.positionText,i(b),o(_)),e.tx2width&&(r.select("text.name").call(f.positionText,i(v.text2ShiftX+v.alignShift*S+y),o(m+e.ty0-e.by/2+S)),r.select("rect").call(h.setRect,i(v.text2ShiftX+(v.alignShift-1)*e.tx2width/2+y),o(m-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function N(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var u=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function c(t,r,n){var a=u(r,n);s(a)&&(e[t]=a)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("fontWeight","htw","hoverlabel.font.weight"),c("fontStyle","hty","hoverlabel.font.style"),c("fontVariant","htv","hoverlabel.font.variant"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:g.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:g.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var f=g.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+g.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+f,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var d=g.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+g.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+d,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function j(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,u=r.event,c=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var d=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(c){var v,y,m=t.hLinePoint;n=m&&m.xa,"cursor"===(a=m&&m.ya).spikesnap?(v=u.pointerX,y=u.pointerY):(v=n._offset+m.x,y=a._offset+m.y);var x,b,_=i.readability(m.color,d)<1.5?p.contrast(d):m.color,w=a.spikemode,T=a.spikethickness,M=a.spikecolor||_,k=g.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=v),-1!==w.indexOf("across")){var A=a._counterDomainMin,L=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),L=Math.max(L,a.position)),x=s.l+A*s.w,b=s.l+L*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T,stroke:M,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?T:-T),cy:y,r:T,fill:M}).classed("spikeline",!0)}if(f){var S,O,C=t.vLinePoint;n=C&&C.xa,a=C&&C.ya,"cursor"===n.spikesnap?(S=u.pointerX,O=u.pointerY):(S=n._offset+C.x,O=a._offset+C.y);var D,P,I=i.readability(C.color,d)<1.5?p.contrast(d):C.color,E=n.spikemode,R=n.spikethickness,z=n.spikecolor||I,F=g.getPxPosition(e,n);if(-1!==E.indexOf("toaxis")||-1!==E.indexOf("across")){if(-1!==E.indexOf("toaxis")&&(D=F,P=O),-1!==E.indexOf("across")){var N=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),j=Math.max(j,n.position)),D=s.t+(1-j)*s.h,P=s.t+(1-N)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:D,y2:P,"stroke-width":R,stroke:z,"stroke-dasharray":h.dashStyle(n.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:D,y2:P,"stroke-width":R+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==E.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?R:-R),r:R,fill:z}).classed("spikeline",!0)}}}function B(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function H(e,t){return f.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function Y(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type||"multicategory"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var u=l[e+"End"];void 0===u&&(u=l[e]);var c=u-s;"end"===o?a+=c:"middle"===o&&(a+=c/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function U(e){return e.offsetTop+e.clientTop}function V(e){return e.offsetLeft+e.clientLeft}function q(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,l=a+n.width,s=i+n.height,u=o.apply3DTransform(r._invTransform)(a,i),c=o.apply3DTransform(r._invTransform)(l,s),f=u[0],d=u[1],h=c[0],p=c[1];return{x:f,y:d,width:h-f,height:p-d,top:Math.min(d,p),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(d,p)}}},6132:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(624).isUnifiedHover;e.exports=function(e,t,r,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),l?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},1008:function(e,t,r){"use strict";var n=r(3400),a=r(5460);e.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},3024:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=r(6476),o=r(624),l=r(5460),s=r(3292);e.exports={moduleType:"component",name:"fx",constants:r(2456),schema:{layout:l},attributes:r(5756),layoutAttributes:l,supplyLayoutGlobalDefaults:r(1976),supplyDefaults:r(5448),supplyLayoutDefaults:r(8336),calc:r(5056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(2376)}},5460:function(e,t,r){"use strict";var n=r(2456),a=r(5376),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},8336:function(e,t,r){"use strict";var n=r(3400),a=r(5460),i=r(1008),o=r(6132);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===u||l&&s&&2===u)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},1976:function(e,t,r){"use strict";var n=r(3400),a=r(6132),i=r(5460);e.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},2704:function(e,t,r){"use strict";var n=r(3400),a=r(3756).counter,i=r(6968).u,o=r(3816).idRegex,l=r(1780),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function u(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function c(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),u=l[0],c=(l[1]-u)/(a-o),f=c*(1-o),d=0;d1){d||h||p||"independent"===M("pattern")&&(d=!0),g._hasSubplotGrid=d;var x,b,_="top to bottom"===M("roworder"),w=d?.2:.1,T=d?.3:.1;v&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",M,w,x,m),y:c("y",M,T,b,y,_)}}else delete t.grid}function M(e,t){return n.coerce(r,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,c,d=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,v=r.rows,g=r.columns,y="independent"===r.pattern,m=r._axisMap={};if(p){var x=d.subplots||[];s=r.subplots=new Array(v);var b=1;for(n=0;n("legend"===e?1:0));if(!1===A&&(r[e]=void 0),(!1!==A||f.uirevision)&&(h("uirevision",r.uirevision),!1!==A)){h("borderwidth");var L,S,O,C="h"===h("orientation"),D="paper"===h("yref"),P="paper"===h("xref"),I="left";if(C?(L=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?D?(S=1.1,O="bottom"):(S=1,O="top"):D?(S=-.1,O="top"):(S=0,O="bottom")):(S=1,O="auto",P?L=1.02:(L=1,I="right")),a.coerce(f,d,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:L}},"x"),a.coerce(f,d,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:S}},"y"),h("traceorder",_),u.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",O),h("valign"),a.noneOrAll(f,d,["x","y"]),h("title.text")){h("title.side",C?"left":"top");var E=a.extendFlat({},p,{size:a.bigFont(p.size)});a.coerceFont(h,"title.font",E)}}}}e.exports=function(e,t,r){var n,i=r.slice(),o=t.shapes;if(o)for(n=0;n1)}var N=p.hiddenlabels||[];if(!(T||p.showlegend&&L.length))return l.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),i.autoMargin(e,w);var j=a.ensureSingle(l,"g",w,(function(e){T||e.attr("pointer-events","all")})),B=a.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),H=a.ensureSingle(j,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));H.call(c.stroke,d.bordercolor).call(c.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var Y,U=a.ensureSingle(j,"g","scrollbox"),V=d.title;d._titleWidth=0,d._titleHeight=0,V.text?((Y=a.ensureSingle(U,"text",w+"titletext")).attr("text-anchor","start").call(u.font,V.font).text(V.text),O(Y,U,e,d,_)):U.selectAll("."+w+"titletext").remove();var q=a.ensureSingle(j,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(c.fill,h.scrollBarColor)})),G=U.selectAll("g.groups").data(L);G.enter().append("g").attr("class","groups"),G.exit().remove();var W=G.selectAll("g.traces").data(a.identity);W.enter().append("g").attr("class","traces"),W.exit().remove(),W.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==N.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(A,e,d)})).call(x,e,d).each((function(){T||n.select(this).call(S,e,w)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout,o=P(a);a||(a=i[o]);var l=i._size,s=b.isVertical(a),c=b.isGrouped(a),f="fraction"===a.entrywidthmode,d=a.borderwidth,p=2*d,v=h.itemGap,g=a.indentation+a.itemwidth+2*v,y=2*(d+v),m=D(a),x=a.y<0||0===a.y&&"top"===m,_=a.y>1||1===a.y&&"bottom"===m,w=a.tracegroupgap,T={};a._maxHeight=Math.max(x||_?i.height/2:l.h,30);var k=0;a._width=0,a._height=0;var A=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(a);if(s)r.each((function(e){var t=e[0].height;u.setTranslate(this,d+A[0],d+A[1]+a._height+t/2+v),a._height+=t,a._width=Math.max(a._width,e[0].width)})),k=g+a._width,a._width+=v+g+p,a._height+=y,c&&(t.each((function(e,t){u.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var L=C(a),S=a.x<0||0===a.x&&"right"===L,O=a.x>1||1===a.x&&"left"===L,I=_||x,E=i.width/2;a._maxWidth=Math.max(S?I&&"left"===L?l.l+l.w:E:O?I&&"right"===L?l.r+l.w:E:l.w,2*g);var R=0,z=0;r.each((function(e){var t=M(e,a,g);R=Math.max(R,t),z+=t})),k=null;var F=0;if(c){var N=0,j=0,B=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=M(r,a,g),i=r[0].height;u.setTranslate(this,A[0],A[1]+d+v+i/2+t),t+=i,e=Math.max(e,n),T[r[0].trace.legendgroup]=e}));var r=e+v;j>0&&r+d+j>a._maxWidth?(F=Math.max(F,j),j=0,B+=N+w,N=t):N=Math.max(N,t),u.setTranslate(this,j,B),j+=r})),a._width=Math.max(F,j)+d,a._height=B+N+y}else{var H=r.size(),Y=z+p+(H-1)*v=a._maxWidth&&(F=Math.max(F,G),V=0,q+=U,a._height+=U,U=0),u.setTranslate(this,A[0]+d+V,A[1]+d+q+t/2+v),G=V+r+v,V+=n,U=Math.max(U,t)})),Y?(a._width=V+p,a._height=U+y):(a._width=Math.max(F,G)+p,a._height+=U+y)}}a._width=Math.ceil(Math.max(a._width+A[0],a._titleWidth+2*(d+h.titlePad))),a._height=Math.ceil(Math.max(a._height+A[1],a._titleHeight+2*(d+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var W=e._context.edits,Z=W.legendText||W.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,i=e[0].trace.legendgroup,l=M(e,a,g);c&&""!==i&&(l=T[i]);var d=Z?g:k||l;s||f||(d+=v/2),u.setRect(t,0,-r/2,d,r)}))}(e,G,W,d)},function(){var t,c,m,x,b=p._size,_=d.borderwidth,M="paper"===d.xref,A="paper"===d.yref;if(V.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*v,a=0,i=e.node(),o=u.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(a=t._width-2*r-2*h.titlePad-o),f.positionText(e,r+h.titlePad+a,r+n)}}(Y,d,_),!T){var L,S;L=M?b.l+b.w*d.x-g[C(d)]*d._width:p.width*d.x-g[C(d)]*d._width,S=A?b.t+b.h*(1-d.y)-g[D(d)]*d._effHeight:p.height*(1-d.y)-g[D(d)]*d._effHeight;var O=function(e,t,r,n){var a=e._fullLayout,o=a[t],l=C(o),s=D(o),u="paper"===o.xref,c="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var f=o.y<.5?"b":"t",d=o.x<.5?"l":"r",h={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(u&&c)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[l],r:o._width*y[l],b:o._effHeight*y[s],t:o._effHeight*g[s]});u?e._fullLayout._reservedMargin[t][f]=h[f]:c||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=h[d]:e._fullLayout._reservedMargin[t][f]=h[f]}(e,w,L,S);if(O)return;if(p.margin.autoexpand){var P=L,I=S;L=M?a.constrain(L,0,p.width-d._width):P,S=A?a.constrain(S,0,p.height-d._effHeight):I,L!==P&&a.log("Constrain "+w+".x to make legend fit inside graph"),S!==I&&a.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(j,L,S)}if(q.on(".drag",null),j.on("wheel",null),T||d._height<=d._maxHeight||e._context.staticPlot){var E=d._effHeight;T&&(E=d._height),H.attr({width:d._width-_,height:E-_,x:_/2,y:_/2}),u.setTranslate(U,0,0),B.select("rect").attr({width:d._width-2*_,height:E-2*_,x:_,y:_}),u.setClipUrl(U,r,e),u.setRect(q,0,0,0,0),delete d._scrollY}else{var R,z,F,N=Math.max(h.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),G=d._effHeight-N-2*h.scrollBarMargin,W=d._height-d._effHeight,Z=G/W,J=Math.min(d._scrollY||0,W);H.attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),B.select("rect").attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+J}),u.setClipUrl(U,r,e),$(J,N,Z),j.on("wheel",(function(){$(J=a.constrain(d._scrollY+n.event.deltaY/G*W,0,W),N,Z),0!==J&&J!==W&&n.event.preventDefault()}));var X=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=J})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,J=function(e,t,r){var n=(r-t)/Z+e;return a.constrain(n,0,W)}(F,R,z),$(J,N,Z))}));q.call(X);var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,F=J)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,J=function(e,t,r){var n=(t-r)/Z+e;return a.constrain(n,0,W)}(F,R,z),$(J,N,Z))}));U.call(K)}function $(t,r,n){d._scrollY=e._fullLayout[w]._scrollY=t,u.setTranslate(U,0,-t),u.setRect(q,d._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),B.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(j.classed("cursor-move",!0),s.init({element:j.node(),gd:e,prepFn:function(e){if(e.target!==q.node()){var t=u.getTranslate(j);m=t.x,x=t.y}},moveFn:function(e,r){if(void 0!==m&&void 0!==x){var n=m+e,a=x+r;u.setTranslate(j,n,a),t=s.align(n,d._width,b.l,b.l+b.w,d.xanchor),c=s.align(a+d._height,-d._height,b.t+b.h,b.t,d.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==c){var r={};r[w+".x"]=t,r[w+".y"]=c,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=l.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&k(e,j,n,t,r)}}))}],e)}}function M(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function k(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=r.datum()[0].label);var u=l.triggerHandler(e,"plotly_legendclick",s);if(1===n){if(!1===u)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&d(r,e,n)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&!1!==u&&d(r,e,n))}function A(e,t,r){var n,i,l=P(r),s=e.data()[0][0],c=s.trace,d=o.traceIs(c,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,v=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,i=s.groupTitle.font):(i=r.font,r.entries?n=s.text:(n=d?s.label:c.name,c._meta&&(n=a.templateString(n,c._meta))));var g=a.ensureSingle(e,"text",l+"text");g.attr("text-anchor","start").call(u.font,i).text(p?L(n,v):n);var y=r.indentation+r.itemwidth+2*h.itemGap;f.positionText(g,y,0),p?g.call(f.makeEditable,{gd:t,text:n}).call(O,e,t,r).on("edit",(function(n){this.text(L(n,v)).call(O,e,t,r);var i=s.trace._fullInput||{},l={};if(o.hasTransform(i,"groupby")){var u=o.getTransformIndices(i,"groupby"),f=u[u.length-1],d=a.keyedContainer(i,"transforms["+f+"].styles","target","value.name");d.set(s.trace._group,n),l=d.constructUpdate()}else l.name=n;return i._isShape?o.call("_guiRelayout",t,"shapes["+c.index+"].name",l.name):o.call("_guiRestyle",t,l,c.index)})):O(g,e,t,r)}function L(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function S(e,t,r){var i,o=t._context.doubleClickDelay,l=1,s=a.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(i=(new Date).getTime())-t._legendMouseDownTimeo&&(l=Math.max(l-1,1)),k(t,a,e,l,n.event)}})))}function O(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),f.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(r._inHover||!a||a.trace.showlegend){var i=e.select("g[class*=math-group]"),o=i.node(),l=P(r);r||(r=t._fullLayout[l]);var s,c,d=r.borderwidth,p=(n===_?r.title.font:a.groupTitle?a.groupTitle.font:r.font).size*v;if(o){var g=u.bBox(o);s=g.height,c=g.width,n===_?u.setTranslate(i,d,d+.75*s):u.setTranslate(i,0,.25*s)}else{var y="."+l+(n===_?"title":"")+"text",m=e.select(y),x=f.lineCount(m),b=m.node();if(s=p*x,c=b?u.bBox(b).width:0,n===_)"left"===r.title.side&&(c+=2*h.itemGap),f.positionText(m,d+h.titlePad,d+p);else{var w=2*h.itemGap+r.indentation+r.itemwidth;a.groupTitle&&(w=h.itemGap,c-=r.indentation+r.itemwidth),f.positionText(m,w,-p*((x-1)/2-.3))}}n===_?(r._titleWidth=c,r._titleHeight=s):(a.lineHeight=p,a.height=Math.max(s,16)+3,a.width=c)}else e.remove()}(t,r,n,a)}))}function C(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function D(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}function P(e){return e._id||"legend"}e.exports=function(e,t){if(t)T(e,t);else{var r=e._fullLayout,a=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===a.indexOf(t)&&e.remove()}));for(var i=0;iL&&(A=L)}M[i][0]._groupMinRank=A,M[i][0]._preGroupSort=i}var S=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(M.forEach((function(e,t){e[0]._preGroupSort=t})),M.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),i=0;ir?r:e}e.exports=function(e,t,r){var y=t._fullLayout;r||(r=y.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return m?n:Math.min(a,r)};function T(e,i,o){var c=e[0].trace,f=c.marker||{},d=f.line||{},h=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?c.visible&&c.type===o:a.traceIs(c,"bar"),v=n.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),v.exit().remove(),v.each((function(e){var a=n.select(this),i=e[0],o=w(i.mlw,f.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!r._inHover&&"mc"in i){var p=u(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=l.tryColorscale(f,"")(v)}var y=h||i.mc||f.color,m=f.pattern,x=m&&l.getPatternAttr(m.shape,0,"");if(x){var b=l.getPatternAttr(m.bgcolor,0,null),_=l.getPatternAttr(m.fgcolor,0,null),T=m.fgopacity,M=g(m.size,8,10),k=g(m.solidity,.5,1),A="legend-"+c.uid;a.call(l.pattern,"legend",t,A,x,M,k,h,m.fillmode,b,_,T)}else a.call(s.fill,y);o&&s.stroke(a,i.mlc||d.color)}))}function M(e,r,o){var l=e[0],s=l.trace,u=o?s.visible&&s.type===o:a.traceIs(s,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[e]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var h=s.marker||{},p=w(d(h.line.width,l.pts),h.line,5,2),v="pieLike",g=i.minExtend(s,{marker:{line:{width:p}}},v),y=i.minExtend(l,{trace:g},v);f(c,y,g,t)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.indentation,s=r.valign,u=e[0].lineHeight,c=e[0].height;if("middle"===s&&0===l||!u||!c)a.attr("transform",null);else{var f={top:1,bottom:-1}[s]*(.5*(u-c+3))||0,d=r.indentation;a.attr("transform",o(d,f))}a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=a.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(e,o){var c,f=n.select(this),d=u(a),h=d.colorscale,v=d.reversescale;if(h){if(!r){var g=h.length;c=0===o?h[v?g-1:0][1]:1===o?h[v?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;c=i.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",e[0]),c?f.call(s.fill,c):f.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,p(v,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,T(e,this,"waterfall")}var i=[];t.visible&&r&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var u=i.minExtend(r,{marker:{size:m?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,u,t)}}))})).each((function(e){M(e,this,"funnelarea")})).each((function(e){M(e,this,"pie")})).each((function(e){var r,a,o=v(e),s=o.showFill,f=o.showLine,d=o.showGradientLine,h=o.showGradientFill,g=o.anyFill,y=o.anyLine,m=e[0],b=m.trace,_=u(b),T=_.colorscale,M=_.reversescale,k=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",A=n.select(this),L=A.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",k+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(s)l.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;l.gradient(e,t,r,p(M),T,"fill")}})),f||d){var S=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:S}}),r=[i.minExtend(m,{trace:a})]}var O=A.select(".legendlines").selectAll("path").data(f||d?[r]:[]);O.enter().append("path").classed("js-line",!0),O.exit().remove(),O.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(f?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,p(M),T,"stroke")}})})).each((function(e){var r,a,o=v(e),s=o.anyFill,u=o.anyLine,f=o.showLine,d=o.showMarker,h=e[0],p=h.trace,g=!d&&!u&&!s&&c.hasText(p);function y(e,t,r,n){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(d||g||f){var b={},w={};if(d){b.mc=y("marker.color",x),b.mx=y("marker.symbol",x),b.mo=y("marker.opacity",i.mean,[.2,1]),b.mlc=y("marker.line.color",x),b.mlw=y("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",i.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=y("textposition",x),b.ts=10,b.tc=y("textfont.color",x),b.tf=y("textfont.family",x),b.tw=y("textfont.weight",x),b.ty=y("textfont.style",x),b.tv=y("textfont.variant",x),b.tC=y("textfont.textcase",x),b.tE=y("textfont.lineposition",x),b.tS=y("textfont.shadow",x)),r=[i.minExtend(h,b)],(a=i.minExtend(p,w)).selectedpoints=null,a.texttemplate=null}var M=n.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),d&&(r[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},6540:function(e,t,r){"use strict";r(6052),e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},1868:function(e,t,r){"use strict";var n=r(4040),a=r(7316),i=r(9811),o=r(9224),l=r(4016).eraseActiveShape,s=r(3400),u=s._,c=e.exports={};function f(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,u=e._fullLayout,c={},f=i.list(e,null,!0),d=u._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,v=(1+p)/2,g=(1-p)/2;for(a=0;a1?(P=["toggleHover"],I=["resetViews"]):y?(D=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(D=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:m?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],v&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(e){for(var t=0;t0)){var v=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i0?e.touches[0].clientX:0}function y(e,t,r,n){var a=o.ensureSingle(e,"rect",v.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,f=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function m(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(e,t,r,a){var l,u=t.calcdata,c=e.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(e){return v.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),c.order(),c.exit().remove(),c.each((function(e,o){var s=n.select(this),c=0===o,h=d.getFromId(t,e,"y"),p=h._name,v=a[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),i.supplyDefaults(g);var y=g._fullLayout.xaxis,m=g._fullLayout[p];y.clearCalc(),y.setScale(),m.clearCalc(),m.setScale();var x={id:e,plotgroup:s,xaxis:y,yaxis:m,isRangePlot:!0};c?l=x:(x.mainplot="xy",x.mainplotinfo=l),f.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=N[r+1];else if(e=n.pmax)t=N[r+1];else if(er._length||m+_<0)return;c=y+_,h=m+_;break;case s:if(b="col-resize",y+_>r._length)return;c=y+_,h=m;break;case u:if(b="col-resize",m+_<0)return;c=y,h=m+_;break;default:b="ew-resize",c=v,h=v+_}if(h=0;M--){var k=r.append("path").attr(g).style("opacity",M?.1:y).call(o.stroke,x).call(o.fill,m).call(l.dashLine,M?"solid":_,M?4+b:b);if(p(k,e,i),w){var A=s(e.layout,"selections",i);k.style({cursor:"move"});var L={element:k.node(),plotinfo:h,gd:e,editHelpers:A,isActiveSelection:!0},S=n(u,e);a(S,k,L)}else k.style("pointer-events",M?"all":"none");T[M]=k}var O=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(d(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=v,f(e)}}}(e,O)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function v(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,f(e))}e.exports={draw:f,drawOne:h,activateLastSelection:function(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,f(e)}}}},4200:function(e,t,r){"use strict";var n=r(8192).u,a=r(2880).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:a({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},1004:function(e){"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(e,t,r){"use strict";var n=r(2760).selectMode,a=r(1936).clearOutline,i=r(9856),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var i=r.getAttribute("d"),u=t.gd,c=u._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,h=f.yaxis,p=t.isActiveSelection,v=t.dragmode,g=(u.layout||{}).selections||[];if(!n(v)&&void 0!==p){var y=u._fullLayout._activeSelectionIndex;if(y-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){G(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(l)&&(d=K(_))){for(o&&o.remove(),g=0;g=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,l=h(r),s=v(r);if(l||s){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&a._fullLayout._outlining&&(l&&(u=T(f,e)),u&&i.call("_guiRelayout",a,{shapes:u}),s&&!H(e)&&(c=M(f,e)),c&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:c}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Z(e){return e._id}function J(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(Z),u=r.map(Z);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function $(e,t,r){var n,a;for(n=0;n-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ue(te);ce([C(e,ne,"x"),C(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,Q),d._reselect=!1}if(!i&&d._deselect){var ve=d._deselect;(function(e,t,r){for(var n=0;n=0)M._fullLayout._deactivateShape(M);else if(!x){var r=k.clickmode;O.done(Ae).then((function(){if(O.clear(Ae),2===e){for(be.remove(),K=0;K-1&&Y(t,M,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(M,void 0);s.click(M,t,D.id)})).catch(A.error)}},n.doneFn=function(){Me.remove(),O.done(Ae).then((function(){O.clear(Ae),!L&&X&&n.selectionDefs&&(X.subtract=xe,n.selectionDefs.push(X),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(L||x)&&W(n,L),n.doneFnCompleted&&n.doneFnCompleted(Le),b&&fe(M,ie)})).catch(A.error)}},clearOutline:x,clearSelectionsCache:W,selectOnClick:Y}},6056:function(e,t,r){"use strict";var n=r(3916),a=r(5376),i=r(2904).line,o=r(8192).u,l=r(2880).extendFlat,s=r(1780).templatedArray,u=(r(6208),r(5464)),c=r(1776).ye,f=r(7728);e.exports=s("shape",{visible:l({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},u.legend,{editType:"calc+arraydraw"}),legendgroup:l({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},u.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:l({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:l({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:l({},i.color,{editType:"arraydraw"}),width:l({},i.width,{editType:"calc+arraydraw"}),dash:l({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:c({},{keys:Object.keys(f)}),font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},6084:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(3068),o=r(5152);function l(e){return u(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return u(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function u(e,t,r,a,l,s){var u=e/2,c=s;if("pixel"===t){var f=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],d=n.aggNums(Math.max,null,f),h=n.aggNums(Math.min,null,f),p=h<0?Math.abs(h)+u:u,v=d>0?d+u:u;return{ppad:u,ppadplus:c?p:v,ppadminus:c?v:p}}return{ppad:u}}function c(e,t,r,n,a){var l="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[l(t),l(r)];if(n){var s,u,c,f,d=1/0,h=-1/0,p=n.match(i.segmentRE);for("date"===e.type&&(l=o.decodeDate(l)),s=0;sh&&(h=f)));return h>=d?[d,h]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o=e?t-n:n-t,-180/Math.PI*Math.atan2(a,i)}(x,_,b,w):0),k.call((function(t){return t.call(o.font,M).attr({}),i.convertToTspans(t,e),t}));var H=function(e,t,r,n,a,i,o){var l,s,u,c,d=a.label.textposition,h=a.label.textangle,p=a.label.padding,v=a.type,g=Math.PI/180*i,y=Math.sin(g),m=Math.cos(g),x=a.label.xanchor,b=a.label.yanchor;if("line"===v){"start"===d?(l=e,s=t):"end"===d?(l=r,s=n):(l=(e+r)/2,s=(t+n)/2),"auto"===x&&(x="start"===d?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===C&&(e[0][0]="M"),t[O]=e,k(),A())}}()}}function Y(e,r){!function(e,r){if(t.length)for(var n=0;n_?(A=h,C="y0",L=_,D="y1"):(A=_,C="y1",L=h,D="y0"),ee(n),ne(s,r),function(e,t,r){var n=t.xref,a=t.yref,i=o.getFromId(r,n),l=o.getFromId(r,a),s="";"paper"===n||i.autorange||(s+=n),"paper"===a||l.autorange||(s+=a),d.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),Q.moveFn="move"===R?te:re,Q.altKey=n.altKey)},doneFn:function(){b(e)||(v(t),ae(s),T(t,e,r),a.call("_guiRelayout",e,c.getUpdateObj()))},clickFn:function(){b(e)||ae(s)}};function ee(r){if(b(e))R=null;else if(B)R="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=Q.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!H&&a>z&&i>F&&!r.shiftKey?p.getCursor(o/a,1-l/i):"move";v(t,s),R=s.split("-")[0]}}function te(n,a){if("path"===r.type){var i=function(e){return e},o=i,c=i;N?Y("xanchor",r.xanchor=X(w+n)):(o=function(e){return X(Z(e)+n)},V&&"date"===V.type&&(o=y.encodeDate(o))),j?Y("yanchor",r.yanchor=K(k+a)):(c=function(e){return K(J(e)+a)},G&&"date"===G.type&&(c=y.encodeDate(c))),Y("path",r.path=M(E,o,c))}else N?Y("xanchor",r.xanchor=X(w+n)):(Y("x0",r.x0=X(f+n)),Y("x1",r.x1=X(x+n))),j?Y("yanchor",r.yanchor=K(k+a)):(Y("y0",r.y0=K(h+a)),Y("y1",r.y1=K(_+a)));t.attr("d",m(e,r)),ne(s,r),u(e,l,r,U)}function re(n,a){if(H){var i=function(e){return e},o=i,c=i;N?Y("xanchor",r.xanchor=X(w+n)):(o=function(e){return X(Z(e)+n)},V&&"date"===V.type&&(o=y.encodeDate(o))),j?Y("yanchor",r.yanchor=K(k+a)):(c=function(e){return K(J(e)+a)},G&&"date"===G.type&&(c=y.encodeDate(c))),Y("path",r.path=M(E,o,c))}else if(B){if("resize-over-start-point"===R){var d=f+n,p=j?h-a:h+a;Y("x0",r.x0=N?d:X(d)),Y("y0",r.y0=j?p:K(p))}else if("resize-over-end-point"===R){var v=x+n,g=j?_-a:_+a;Y("x1",r.x1=N?v:X(v)),Y("y1",r.y1=j?g:K(g))}}else{var b=function(e){return-1!==R.indexOf(e)},T=b("n"),q=b("s"),W=b("w"),$=b("e"),Q=T?A+a:A,ee=q?L+a:L,te=W?S+n:S,re=$?O+n:O;j&&(T&&(Q=A-a),q&&(ee=L-a)),(!j&&ee-Q>F||j&&Q-ee>F)&&(Y(C,r[C]=j?Q:K(Q)),Y(D,r[D]=j?ee:K(ee))),re-te>z&&(Y(P,r[P]=N?te:X(te)),Y(I,r[I]=N?re:X(re)))}t.attr("d",m(e,r)),ne(s,r),u(e,l,r,U)}function ne(e,t){(N||j)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=Z(N?t.xanchor:i.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=J(j?t.yanchor:i.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),N&&j){var l="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var s="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var u="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function ae(e){e.selectAll(".visual-cue").remove()}p.init(Q),$.node().onmousemove=ee}(e,F,c,t,r,R):!0===c.editable&&F.style("pointer-events",I||f.opacity(O)*S<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void k(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=k,x(e)}}}(e,F)}))}c._input&&!0===c.visible&&("above"===c.layer?A(e._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?A(e._fullLayout._shapeLowerLayer):"between"===c.layer?A(w.shapelayerBetween):w._hadPlotinfo?A((w.mainplotinfo||w).shapelayer):A(e._fullLayout._shapeLowerLayer))}function T(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function M(e,t,r){return e.replace(g.segmentRE,(function(e){var n=0,a=e.charAt(0),i=g.paramIsX[a],o=g.paramIsY[a],l=g.numParams[a];return a+e.substr(1).replace(g.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function k(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t0&&sh&&(e="X"),e}));return i>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+p}))}(r,l,u);if("pixel"===r.xsizemode){var b=l(r.xanchor);c=b+r.x0,f=b+r.x1}else c=l(r.x0),f=l(r.x1);if("pixel"===r.ysizemode){var _=u(r.yanchor);d=_-r.y0,h=_-r.y1}else d=u(r.y0),h=u(r.y1);if("line"===p)return"M"+c+","+d+"L"+f+","+h;if("rect"===p)return"M"+c+","+d+"H"+f+"V"+h+"H"+c+"Z";var w=(c+f)/2,T=(d+h)/2,M=Math.abs(w-c),k=Math.abs(T-d),A="A"+M+","+k,L=w+M+","+T;return"M"+L+A+" 0 1,1 "+w+","+(T-k)+A+" 0 0,1 "+L+"Z"}},1592:function(e,t,r){"use strict";var n=r(4016);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(6056),supplyLayoutDefaults:r(3712),supplyDrawNewShapeDefaults:r(5144),includeBasePlot:r(6632)("shapes"),calcAutorange:r(6084),draw:n.draw,drawOne:n.drawOne}},7728:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function a(e,r,n){return t(e.y1,n)-t(e.y0,n)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:a(e,0,r)/n(e,t)},dx:n,dy:a,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(a(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(a(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,a){return r((t(e.y1,a)+t(e.y0,a))/2,a)}}},9861:function(e,t,r){"use strict";var n=r(5376),a=r(6741),i=r(2880).extendDeepAll,o=r(7824).overrideAll,l=r(5656),s=r(1780).templatedArray,u=r(876),c=s("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(a({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},876:function(e){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(e,t,r){"use strict";var n=r(3400),a=r(1272),i=r(9861),o=r(876).name,l=i.steps;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:u}),s=0,c=0;c0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*f.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,t))}function O(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",f.railTouchRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function D(e,t){var r=t._dims,n=r.inputAreaLength-2*f.railInset,a=l.ensureSingle(e,"rect",f.railRectClass);a.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,i=function(e,t){for(var r=e[f.name],n=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,g(t))}if(l.enter().append("g").classed(f.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(s)})).remove(),0!==i.length){var u=l.selectAll("g."+f.groupClassName).data(i,y);u.enter().append("g").classed(f.groupClassName,!0),u.exit().each(s).remove();for(var c=0;c0||_<0){var A={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[b.side];r.attr("transform",s(A[0],A[1]))}}}return Y.call(U),j&&(S?Y.on(".opacity",null):(k=0,A=!0,Y.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),Y.call(f.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,y,t,x):o.call("_guiRelayout",e,y,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(U)})).on("input",(function(e){this.text(e||" ").call(f.positionText,_.x,_.y)}))),Y.classed("js-placeholder",A),T}}},8444:function(e,t,r){"use strict";var n=r(5376),a=r(2548),i=r(2880).extendFlat,o=r(7824).overrideAll,l=r(6741),s=r(1780).templatedArray,u=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:u,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(l({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},1331:function(e){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},1384:function(e,t,r){"use strict";var n=r(3400),a=r(1272),i=r(8444),o=r(1331).name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},4420:function(e,t,r){"use strict";var n=r(3428),a=r(7316),i=r(6308),o=r(3616),l=r(3400),s=r(2736),u=r(1780).arrayEditor,c=r(4284).LINE_SPACING,f=r(1331),d=r(7400);function h(e){return e._index}function p(e,t){return+e.attr(f.menuIndexAttrName)===t._index}function v(e,t,r,n,a,i,o,l){t.active=o,u(e.layout,f.name,t).applyUpdate("active",o),"buttons"===t.type?y(e,n,null,null,t):"dropdown"===t.type&&(a.attr(f.menuIndexAttrName,"-1"),g(e,n,a,i,t),l||y(e,n,a,i,t))}function g(e,t,r,n,a){var i=l.ensureSingle(t,"g",f.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,u=a.active,c=a.buttons[u]||f.blankHeaderOpts,d={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(m,a,c,e).call(A,a,d,h),l.ensureSingle(t,"text",f.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])})).attr({x:s.headerWidth-f.arrowOffsetX+a.pad.l,y:s.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(L,String(p(r,a)?-1:a._index)),y(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(T,a)})),o.setTranslate(t,s.lx,s.ly)}function y(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(l.filterVisible(s)),d=c.enter().append("g").classed(u,!0),h=c.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+f.gapButtonHeader:p=y.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-y.openWidth);var b={x:y.lx+p+o.pad.l,y:y.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(l,s){var u=n.select(this);u.call(m,o,l,e).call(A,o,b),u.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(v(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(v(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(T,o),c.call(_,o)}))})),c.call(_,o),x?(M.w=Math.max(y.openWidth,y.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(y.openHeight,y.headerHeight)),M.direction=o.direction,i&&(c.size()?function(e,t,r,n,a,i){var o,l,s,u=a.direction,c="up"===u||"down"===u,d=a._dims,h=a.active;if(c)for(l=0,s=0;s0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+f.headerGroupClassName).data(r,h);s.enter().append("g").classed(f.headerGroupClassName,!0);for(var u=l.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),c=0;cw,k=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,L=p,S=g+y;S+A>u&&(S=u-A);var O=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),M?(this.hbar=O.attr({rx:l.barRadius,ry:l.barRadius,x:L,y:S,width:k,height:A}),this._hbarXMin=L+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,D=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,I=p+v,E=g;I+D>s&&(I=s-D);var R=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),C?(this.vbar=R.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:E,width:D,height:P}),this._vbarYMin=E+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var z=this.id,F=c-.5,N=C?f+D+.5:f+.5,j=d-.5,B=M?h+A+.5:h+.5,H=o._topdefs.selectAll("#"+z).data(M||C?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",z).append("rect"),M||C?(this._clipRect=H.select("rect").attr({x:Math.floor(F),y:Math.floor(j),width:Math.ceil(N)-Math.floor(F),height:Math.ceil(B)-Math.floor(j)}),this.container.call(i.setClipUrl,z,this.gd),this.bg.attr({x:p,y:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||C){var Y=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var U=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},4284:function(e){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},6208:function(e){"use strict";e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},6880:function(e){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},9104:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},3448:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},9032:function(e){"use strict";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},9616:function(e,t){"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},4884:function(e,t,r){"use strict";t.version=r(5788).version,r(8324),r(9288);for(var n=r(4040),a=t.register=n.register,i=r(2448),o=Object.keys(i),l=0;l",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},8308:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},1864:function(e,t,r){"use strict";var n=r(435),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function u(e,t){return i(t-e,l)}function c(e,t){if(s(t))return!0;var r,n;t[0](n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function f(e,t,r,n,a,i,u){a=a||0,i=i||0;var c,f,d,h,p,v=s([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}v?(c=0,f=o,d=l):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return f(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return f(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return f(e,t,r,n,a,i,1)}}},8116:function(e,t,r){"use strict";var n=r(3160).decode,a=r(3620),i=Array.isArray,o=ArrayBuffer,l=DataView;function s(e){return o.isView(e)&&!(e instanceof l)}function u(e){return i(e)||s(e)}t.isTypedArray=s,t.isArrayOrTypedArray=u,t.isArray1D=function(e){return!u(e[0])},t.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var c={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function f(e){return e.constructor===ArrayBuffer}function d(e,t,r){if(u(e)){if(u(e[0])){for(var n=r,a=0;aa.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){-1===(a.extras||[]).indexOf(e)?(p(e)&&(e=v(e)),e%1||!n(e)||void 0!==a.min&&ea.max?t.set(r):t.set(+e)):t.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(l.get(e,r))}},angle:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||f(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!f(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var a=e.split("+"),i=0;i=n&&e<=a?e:c}if("string"!=typeof e&&"number"!=typeof e)return c;e=String(e);var u=_(r),y=e.charAt(0);!u||"G"!==y&&"g"!==y||(e=e.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),T=e.match(w?x:m);if(!T)return c;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),L=Number(T[7]||0),S=Number(T[9]||0),O=Number(T[11]||0);if(u){if(2===M.length)return c;var C;M=Number(M);try{var D=g.getComponentMethod("calendars","getCal")(r);if(w){var P="i"===k.charAt(k.length-1);k=parseInt(k,10),C=D.newDate(M,D.toMonthIndex(M,k,P),A)}else C=D.newDate(M,Number(k),A)}catch(e){return c}return C?(C.toJD()-v)*f+L*d+S*h+O*p:c}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),k-=1;var I=new Date(Date.UTC(2e3,k,A,L,S));return I.setUTCFullYear(M),I.getUTCMonth()!==k||I.getUTCDate()!==A?c:I.getTime()+O*p},n=t.MIN_MS=t.dateTime2ms("-9999"),a=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==c};var T=90*f,M=3*d,k=5*h;function A(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}t.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return c;t||(t=0);var i,o,l,u,m,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var L=Math.floor(w/f)+v,S=Math.floor(s(e,f));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(e){i=y("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=n+f&&e<=a-f))return c;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return A(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===c)return r;if(t.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return l.error("unrecognized date",e),r;return e};var L=/%\d?f/g,S=/%h/g,O={1:"1",2:"1",3:"2",4:"2"};function C(e,t,r,n){e=e.replace(L,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(S,(function(){return O[r("%q")(a)]})),_(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var D=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,f),n=w(Math.floor(r/d),2)+":"+w(s(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),D[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+C(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return C(t,e,n,a)};var P=3*f;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,f);if(e=Math.round(e-n),r)try{var a=Math.round(e/f)+v,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-v)*f+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+P);return u.setUTCMonth(u.getUTCMonth()+t)+n-P},t.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,u=_(t)&&g.getComponentMethod("calendars","getCal")(t),c=0;c1||v<0||v>1?null:{x:e+s*v,y:t+f*v}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}t.segmentsIntersect=l,t.segmentDistance=function(e,t,r,n,a,i,o,u){if(l(e,t,r,n,a,i,o,u))return 0;var c=r-e,f=n-t,d=o-a,h=u-i,p=c*c+f*f,v=d*d+h*h,g=Math.min(s(c,f,p,a-e,i-t),s(c,f,p,o-e,u-t),s(d,h,v,e-a,t-i),s(d,h,v,r-a,n-i));return Math.sqrt(g)},t.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),u=e.getPointAtLength(o(r+l/2,t)),c=Math.atan((u.y-s.y)/(u.x-s.x)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+s.x+u.x)/6,y:(4*f.y+s.y+u.y)/6,theta:c};return n[r]=d,d},t.clearLocationCache=function(){a=null},t.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,u=0,c=e.getTotalLength(),f=c;function d(t){var r=e.getPointAtLength(t);0===t?n=r:t===c&&(a=r);var u=r.xo?r.x-o:0,f=r.ys?r.y-s:0;return Math.sqrt(u*u+f*f)}for(var h=d(u);h;){if((u+=h+r)>f)return;h=d(u)}for(h=d(f);h;){if(u>(f-=h+r))return;h=d(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,u=n.iterationLimit||30,c=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,f=0,d=0,h=l;f0?h=a:d=a,f++}return i}},5536:function(e){"use strict";e.exports=function(e){return e}},1396:function(e){"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(e,t,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(7624).E9,o=r(8248),l=r(9032),s=l.FP_SAFE,u=-s,c=l.BADNUM,f=e.exports={};f.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=i(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=r(2296),f.keyedContainer=r(7804),f.relativeAttr=r(3193),f.isPlainObject=r(3620),f.toLogRange=r(6896),f.relinkPrivateKeys=r(1528);var h=r(8116);f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var p=r(435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(3064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var g=r(7555);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(4952);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.findIndexOfMin,f.sortObjectKeys=r(2996);var m=r(3084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(2248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(1864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(8308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(2348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=r(2880);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var M=r(4248);f.log=M.log,f.warn=M.warn,f.error=M.error;var k=r(3756);f.counterRegex=k.counter;var A=r(1200);f.throttle=A.throttle,f.throttleDone=A.done,f.clearThrottle=A.clear;var L=r(2200);function S(e){var t={};for(var r in e)for(var n=e[r],a=0;as||e=t)&&o(e)&&e>=0&&e%1==0},f.noop=r(6628),f.identity=r(5536),f.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,r)?a>10?(f.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,u=new Array(s),c=new Array(o);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*u[n];c[r]=i}return c},f.syncOrAsync=function(e,t,r){var n;function a(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0}))},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,n){var a;return R.test(n)?a=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,a=r[n]()),f.isValidTextValue(a)?a:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return H.apply(z,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return H.apply(F,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return H.apply(j,arguments)};var B=/^[:|\|]/;function H(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,l,s){var u="_xother"===l||"_yother"===l,c="_xother_"===l||"_yother_"===l,d="xother_"===l||"yother_"===l,h="xother"===l||"yother"===l||u||d||c,p=l;(u||c)&&(p=p.substring(1)),(d||c)&&(p=p.substring(0,p.length-1));var v,g,y,m=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(N);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,m=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(y=3;y=48&&o<=57,u=l>=48&&l<=57;if(s&&(n=10*n+o-48),u&&(a=10*a+l-48),!s||!u){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var Y=2e9;f.seedPseudoRandom=function(){Y=2e9},f.pseudoRandom=function(){var e=Y;return Y=(69069*Y+1)%4294967296,Math.abs(Y-e)<429496729?f.pseudoRandom():Y/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(a))return n(a);var i=f.extractOption(e,t,"tx","text");return f.isValidTextValue(i)?n(i):void 0},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,f.strTranslate(a-u*(r+o),i-u*(n+l))+f.strScale(u)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var U=f.getFirefoxVersion(),V=null!==U&&U<86;f.getPositionFromD3Event=function(){return V?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},3620:function(e){"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},7804:function(e,t,r){"use strict";var n=r(2296),a=/^\w*$/;e.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var u={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var c={};if(l)for(o=0;o2)return u[t]=2|u[t],d.set(e,null);if(f){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},988:function(e,t,r){"use strict";var n=r(3428);e.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},2248:function(e,t,r){"use strict";var n=r(6524);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;nt/2?e-Math.round(e/t)*t:e}}},2296:function(e,t,r){"use strict";var n=r(8248),a=r(8116).isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,u=e;for(l=0;l/g),s=0;si||u===a||ul||t&&s(e))}:function(e,t){var s=e[0],u=e[1];if(s===a||si||u===a||ul)return!1;var c,f,d,h,p,v=r.length,g=r[0][0],y=r[0][1],m=0;for(c=1;cMath.max(f,g)||u>Math.max(d,y)))if(uc||Math.abs(n(o,d))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var u=s+1;u1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},4296:function(e,t,r){"use strict";var n=r(8248),a=r(5928);e.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!=typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var u=s.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},2416:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;na.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;rt}function f(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-l)-1:Math.floor((e-t.start)/t.size+l);var i,o,d=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?r?s:u:r?f:c,e+=v*l*(r?-1:1)*(v>=0?1:-1);d90&&a.log("Long binary search..."),d-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var a,i=n[r]-n[0]||1,l=i/(r||1)/1e4,s=[],u=0;u<=r;u++){var c=n[u],f=c-a;void 0===a?(s.push(c),a=c):f>l&&(i=Math.min(i,f),s.push(c),a=c)}return{vals:s,minDiff:i}},t.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,u=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(r)||(r=!1),a(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},2736:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.strTranslate,o=r(9616),l=r(4284).LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,g){var L=e.text(),S=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&L.match(s),D=n.select(e.node().parentNode);if(!D.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",D.selectAll("svg."+P).remove(),D.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),S?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var h=function(){var r="math-output-"+a.randstr({},64),i=(s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(i):MathJax.typeset([i])},p=function(){var t=s.select(2===d?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,l)}else a.log("There was an error in the tex syntax.",e),r();s.remove()};2===d?MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),h,p,(function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)})):3===d&&(o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){h(),p(),"svg"!==i&&(MathJax.config.startup.output=i),MathJax.config=o})))}else a.warn("No MathJax version:",MathJax.version)}(S[2],o,(function(n,a,o){D.selectAll("svg."+P).remove(),D.selectAll("g."+P+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return I(),void t();var s=D.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var u=o.width,c=o.height;l.attr({class:P,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=l.select("g");d.attr({fill:f,stroke:f});var h=d.node().getBoundingClientRect(),p=h.width,v=h.height;(p>u||v>c)&&(l.style("overflow","hidden"),p=(h=l.node().getBoundingClientRect()).width,v=h.height);var y=+e.attr("x"),m=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,y,m]+")"+i(-p/2,x-v/2)});else if("l"===P[0])m=x-v/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))y=0,m=x;else{var b=e.attr("text-anchor");y-=p*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}l.attr({x:y,y:m}),g&&g.call(e,s),t(s)}))}))):I(),e}function I(){D.empty()||(P=e.attr("class")+"-math",D.select("svg."+P).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(y," ");var r,i=!1,s=[],u=-1;function c(){u++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:u*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag .",t)}b.test(t)?c():(r=e,s=[{node:e}]);for(var S=t.split(m),D=0;D|>|>)/g,f=[["$","$"],["\\(","\\)"]],d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="​",g=["http:","https:","mailto:","",void 0,":"],y=t.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,M=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&O(n)}var A=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(m),i=[],o="",l=0,s=0;s3?i.push(u.substr(0,h-3)+"..."):i.push(u.substr(0,h));break}o=""}}return i.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function O(e){return e.replace(S,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):L[t])||e}))}function C(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==g.indexOf(a)&&-1!==g.indexOf(i)?t:""}function D(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",u=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return i="bottom"===s?function(){return u.bottom-n.height}:"middle"===s?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===l?function(){return u.right-n.width}:"center"===l?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var e=o()-c.left,t=i()-c.top,l=r.gd||{};if(r.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=O,t.sanitizeHTML=function(e){e=e.replace(y," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(m),o=0;oi.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var a in r)t.clear(a)}},6896:function(e,t,r){"use strict";var n=r(8248);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},1680:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(e){"use strict";e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{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"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},9820:function(e,t,r){"use strict";var n=r(4040);e.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,f=(l.subplotsRegistry.ternary||{}).attrRegex,d=(l.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(e);for(r=0;r3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),u.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(u(m))t.set(null);else{if(!Array.isArray(m))return i.warn("Unrecognized full array edit value",f,m),!0;t.set(m)}return!v&&(d(g,y),h(e),!0)}var x,b,_,w,T,M,k,A,L=Object.keys(r).map(Number).sort(o),S=t.get(),O=S||[],C=c(y,f).get(),D=[],P=-1,I=O.length;for(x=0;xO.length-(k?0:1))i.warn("index out of range",f,_);else if(void 0!==M)T.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(M)?D.push(_):k?("add"===M&&(M={}),O.splice(_,0,M),C&&C.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,M),-1===P&&(P=_);else for(b=0;b=0;x--)O.splice(D[x],1),C&&C.splice(D[x],1);if(O.length?S||t.set(O):t.set(null),v)return!1;if(d(g,y),p!==a){var E;if(-1===P)E=L;else{for(I=Math.max(O.length,I),E=[],x=0;x=P);x++)E.push(_);for(x=P;x=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function E(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in I(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var s=function(e,t,r,n){var i,s,u,c,f,d=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var v=0;v-1&&-1===r.indexOf("grouptitlefont")?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function U(e,t,r){e=o.getGraphDiv(e),T.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=J(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[d.previousPromises];i.layoutReplot?l.push(M.layoutReplot):Object.keys(n).length&&(V(e,i,a)||d.supplyDefaults(e),i.legend&&l.push(M.doLegend),i.layoutstyle&&l.push(M.layoutStyles),i.axrange&&q(l,a.rangesAltered),i.ticks&&l.push(M.doTicksRelayout),i.modebar&&l.push(M.doModeBar),i.camera&&l.push(M.doCamera),i.colorbars&&l.push(M.doColorBars),l.push(S)),l.push(d.rehover,d.redrag,d.reselect),u.add(e,U,[e,a.undoit],U,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function V(e,t,r){var n,a,i=e._fullLayout;if(!t.axrange)return!1;for(var l in t)if("axrange"!==l&&t[l])return!1;var s=function(e,t){return o.coerce(n,a,v,e,t)},u={};for(var c in r.rangesAltered){var f=h.id2name(c);if(n=e.layout[f],a=i[f],p(n,a,s,u),a._matchGroup)for(var d in a._matchGroup)if(d!==c){var g=i[h.id2name(d)];g.autorange=a.autorange,g.range=a.range.slice(),g._input.range=a.range.slice()}}return!0}function q(e,t){var r=t?function(e){var r=[];for(var n in t){var a=h.getFromId(e,n);if(r.push(n),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||r.push(i)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,M.doAutoRangeAndConstraints,r,M.drawData,M.finalDraw)}var G=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,W=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function J(e,t){var r,n,a,i=e.layout,s=e._fullLayout,u=s._guiEditing,d=j(s._preGUI,u),p=Object.keys(t),v=h.list(e),g=o.extendDeepAll({},t),y={};for(Y(t),p=Object.keys(t),n=0;n0&&"string"!=typeof I.parts[R];)R--;var z=I.parts[R],F=I.parts[R-1]+"."+z,B=I.parts.slice(0,R).join("."),H=l(e.layout,B).get(),U=l(s,B).get(),V=I.get();if(void 0!==E){M[P]=E,L[P]="reverse"===z?E:N(V);var q=f.getLayoutValObject(s,I.parts);if(q&&q.impliedEdits&&null!==E)for(var J in q.impliedEdits)S(o.relativeAttr(P,J),q.impliedEdits[J]);if(-1!==["width","height"].indexOf(P))if(E){S("autosize",null);var K="height"===P?"width":"height";S(K,s[K])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)S("width",E?null:s.width),S("height",E?null:s.height);else if(F.match(G))D(F),l(s,B+"._inputRange").set(null);else if(F.match(W)){D(F),l(s,B+"._inputRange").set(null);var $=l(s,B).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Z)&&l(s,B+"._inputDomain").set(null);if("type"===z){O=H;var Q="linear"===U.type&&"log"===E,ee="log"===U.type&&"linear"===E;if(Q||ee){if(O&&O.range)if(U.autorange)Q&&(O.range=O.range[1]>O.range[0]?[1,2]:[2,1]);else{var te=O.range[0],re=O.range[1];Q?(te<=0&&re<=0&&S(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),S(B+".range[0]",Math.log(te)/Math.LN10),S(B+".range[1]",Math.log(re)/Math.LN10)):(S(B+".range[0]",Math.pow(10,te)),S(B+".range[1]",Math.pow(10,re)))}else S(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(e,U,E,S),c.getComponentMethod("images","convertCoords")(e,U,E,S)}else S(B+".autorange",!0),S(B+".range",null);l(s,B+"._inputRange").set(null)}else if(z.match(A)){var ne=l(s,P).get(),ae=(E||{}).type;ae&&"-"!==ae||(ae="linear"),c.getComponentMethod("annotations","convertCoords")(e,ne,ae,S),c.getComponentMethod("images","convertCoords")(e,ne,ae,S)}var ie=w.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=q||{editType:"calc"};""!==n&&""===oe&&(w.isAddVal(E)?L[P]=null:w.isRemoveVal(E)?L[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),k.update(_,le),y[r]||(y[r]={});var se=y[r][n];se||(se=y[r][n]={}),se[oe]=E,delete t[P]}else"reverse"===z?(H.range?H.range.reverse():(S(B+".autorange",!0),H.range=[1,0]),U.autorange?_.calc=!0:_.plot=!0):("dragmode"===P&&(!1===E&&!1!==V||!1!==E&&!1===V)||s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===E||"select"===E)&&"lasso"!==V&&"select"!==V||s._has("gl2d")?_.plot=!0:q?k.update(_,q):_.calc=!0,I.set(E))}}for(r in y)w.applyContainerArrayChanges(e,d(i,r),y[r],_,d)||(_.plot=!0);for(var ue in C){var ce=(O=h.getFromId(e,ue))&&O._constraintGroup;if(ce)for(var fe in _.calc=!0,ce)C[fe]||(h.getFromId(e,fe)._constraintShrinkable=!0)}(X(e)||t.height||t.width)&&(_.plot=!0);var de=s.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function u(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,c){function f(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,d.transition(e,t.frame.data,t.frame.layout,T.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}var h,p,v=0;function g(e){return Array.isArray(a)?v>=a.length?e.transitionOpts=a[v]:e.transitionOpts=a[0]:e.transitionOpts=a,v++,e}var y=[],m=null==t,x=Array.isArray(t);if(m||x||!o.isPlainObject(t)){if(m||-1!==["string","number"].indexOf(typeof t))for(h=0;h0&&ww)&&M.push(p);y=M}}y.length>0?function(t){if(0!==t.length){for(var a=0;a=0;n--)if(o.isPlainObject(t[n])){var v=t[n].name,g=(c[v]||p[v]||{}).name,y=t[n].name,m=c[g]||p[g];g&&y&&"number"==typeof y&&m&&L<5&&(L++,o.warn('addFrames: overwriting frame "'+(c[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===L&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[v]={name:v},h.push({frame:d.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;c[a.name="frame "+e._transitionData._counter++];);if(c[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=d.modifyFrames,c=d.modifyFrames,f=[e,l],h=[e,i];return u&&u.add(e,s,f,c,h),d.modifyFrames(e,i)},t.addTraces=function e(r,n,a){r=o.getGraphDiv(r);var i,l,s=[],c=t.deleteTraces,f=e,d=[r,s],h=[r,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!_(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=s.length)return!1;a=(r=(n.transformsRegistry[s[u].type]||{}).attributes)&&r[t[2]],l=3}else{var c=e._module;if(c||(c=(n.modules[e.type||i.type.dflt]||{})._module),!c)return!1;if(!(a=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return b(a,t,l)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var u;for(r=0;r=a&&(r._input||{})._templateitemname;l&&(o=a);var s,u=t+"["+o+"]";function c(){s={},l&&(s[u]={},s[u][i]=l)}function f(e,t){l?n.nestedProperty(s[u],e).set(t):s[u+"."+e]=t}function d(){var e=s;return c(),e}return c(),{modifyBase:function(e,t){s[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},9172:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(3400),l=r(2736),s=r(3696),u=r(6308),c=r(3616),f=r(1668),d=r(3080),h=r(4460),p=r(4284),v=r(1888),g=v.enforce,y=v.clean,m=r(9280).doAutoRange,x="start";function b(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function _(e){var r,a,l,s,f,v,g=e._fullLayout,y=g._size,m=y.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return i.previousPromises(e);function _(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-m-n:t._offset+t._length+m+n:y.t+y.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+m+n:t._offset-m-n:y.l+y.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=r+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,r,n,a){var i=0;return"middle"===r&&(i+=a/2),"t"===e?("top"===r&&(i+=a),i+=n-t*n):("bottom"===r&&(i+=a),i+=t*n),i}(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),l>o?l:0}(e,r,g);if(y>0){!function(e,t,r,n){var a="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",u={x:l.x,y:l.y,t:0,b:0},c={};"paper"===l.yref&&function(e,t,r,n,a){var i="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=o.isTopAnchor(t)?n:n-a,s="b"===r?i-l:l;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&sT?c.push({code:"unused",traceType:m,templateCount:w,dataCount:T}):T>w&&c.push({code:"reused",traceType:m,templateCount:w,dataCount:T})}}else c.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=v(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&c.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:h,layout:d},""),c.length)return c.map(y)}},7024:function(e,t,r){"use strict";var n=r(8248),a=r(6424),i=r(7316),o=r(3400),l=r(7030),s=r(7164),u=r(3268),c=r(5788).version,f={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(e,t){var r,d,h,p;function v(e){return!(e in t)||o.validate(t[e],f[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],d=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),d=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!v("width")&&null!==t.width||!v("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var g={};function y(e,r){return o.coerce(t,g,f,e,r)}var m=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=o.extendFlat({},d);x?k.width=x:null===t.width&&n(p.width)&&(k.width=p.width),b?k.height=b:null===t.height&&n(p.height)&&(k.height=p.height);var A=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=l.getRedrawFunc(M);function S(){return new Promise((function(e){setTimeout(e,l.getDelay(M._fullLayout))}))}function O(){return new Promise((function(e,t){var r=s(M,m,_),n=M._fullLayout.width,f=M._fullLayout.height;function d(){a.purge(M),document.body.removeChild(M)}if("full-json"===m){var h=i.graphJson(M,!1,"keepdata","object",!0,!0);return h.version=c,h=JSON.stringify(h),d(),e(T?h:l.encodeJSON(h))}if(d(),"svg"===m)return e(T?r:l.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),u({format:m,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(M,r,k,A).then(L).then(S).then(O).then((function(t){e(function(e){return T?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},1480:function(e,t,r){"use strict";var n=r(3400),a=r(7316),i=r(3060),o=r(556).dfltConfig,l=n.isPlainObject,s=Array.isArray,u=n.isArrayOrTypedArray;function c(e,t,r,a,i,o){o=o||[];for(var f=Object.keys(e),d=0;dx.length&&a.push(h("unused",i,y.concat(x.length)));var k,A,L,S,O,C=x.length,D=Array.isArray(M);if(D&&(C=Math.min(C,M.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(h("unused",i,y.concat(A,x[A].length)));var P=x[A].length;for(k=0;k<(D?Math.min(P,M[A].length):P);k++)L=D?M[A][k]:M,S=m[A][k],O=x[A][k],n.validate(S,L)?O!==S&&O!==+S&&a.push(h("dynamic",i,y.concat(A,k),S,O)):a.push(h("value",i,y.concat(A,k),S))}else a.push(h("array",i,y.concat(A),m[A]));else for(A=0;A1&&d.push(h("object","layout"))),a.supplyDefaults(p);for(var v=p._fullData,g=r.length,y=0;y0&&Math.round(f)===f))return{vals:a};u=f}for(var d=t.calendar,h="start"===s,p="end"===s,v=e[r+"period0"],g=i(v,d)||0,y=[],m=[],x=[],b=a.length,_=0;_k;)M=o(M,-u,d);for(;M<=k;)M=o(M,u,d);T=o(M,-u,d)}else{for(M=g+(w=Math.round((k-g)/c))*c;M>k;)M-=c;for(;M<=k;)M+=c;T=M-c}y[_]=h?T:p?M:(T+M)/2,m[_]=T,x[_]=M}return{vals:y,starts:m,ends:x}}},6720:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},9280:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(3400),o=r(9032).FP_SAFE,l=r(4040),s=r(3616),u=r(9811),c=u.getFromId,f=u.isLinked;function d(e,t){var r,n,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),u=g(e,t),c=u.min,f=u.max;if(0===c.length||0===f.length)return i.simpleMap(t.range,t.r2l);var d=c[0].val,v=f[0].val;for(r=1;r0&&((k=C-l(b)-s(_))>D?A/k>P&&(w=b,T=_,P=A/k):A/C>P&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},P=A/C));if(d===v){var I=d-1,E=d+1;if(S)if(0===d)a=[0,1];else{var R=(d>0?f:c).reduce((function(e,t){return Math.max(e,s(t))}),0),z=d/(1-Math.min(.5,R/C));a=d>0?[0,z]:[z,0]}else a=O?[Math.max(0,I),Math.max(1,E)]:[I,E]}else S?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):O&&(w.val-P*l(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-w.val-h(t,b.val,_.val))/(C-l(w)-s(T)),a=[w.val-P*l(w),T.val+P*s(T)];return a=M(a,t),t.limitRange&&t.limitRange(),m&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),L=k((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=k(r.vpadplus||r.vpad),O=k(r.vpadminus||r.vpad);if(!T){if(d=1/0,h=-1/0,w)for(n=0;n0&&(d=i),i>h&&i-o&&(d=i),i>h&&i=P;n--)D(n);return{min:p,max:v,opts:r}},concatExtremes:g};var v=3;function g(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,u=[],f=[];function d(e,t){for(n=0;n=r&&(u.extrapad||!o)){l=!1;break}a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var c=i&&0===t;e.push({val:t,pad:c?0:r,extrapad:!c&&o})}}function b(e){return a(e)&&Math.abs(e)=t}function T(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=u&&(o=u,r=u),l<=u&&(l=u,n=u)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&T(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&T(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},6808:function(e){"use strict";e.exports=function(e,t,r){var n,a;if(r){var i="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[i?1:0],a=r[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?n:void 0),l=e("autorangeoptions.maxallowed",null===n?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},4460:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(7316),o=r(4040),l=r(3400),s=l.strTranslate,u=r(2736),c=r(1668),f=r(6308),d=r(3616),h=r(4724),p=r(8728),v=r(9032),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,M=v.ONEMINMONTH,k=v.ONEWEEK,A=v.ONEDAY,L=A/2,S=v.ONEHOUR,O=v.ONEMIN,C=v.ONESEC,D=v.MINUS_SIGN,P=v.BADNUM,I={K:"zeroline"},E={K:"gridline",L:"path"},R={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},F={K:"tick",L:"text"},N={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},j=r(4284),B=j.MID_SHIFT,H=j.CAP_SHIFT,Y=j.LINE_SPACING,U=j.OPPOSITE_SIDE,V=e.exports={};V.setConvert=r(8344);var q=r(2976),G=r(9811),W=G.idSort,Z=G.isLinked;V.id2name=G.id2name,V.name2id=G.name2id,V.cleanId=G.cleanId,V.list=G.list,V.listIds=G.listIds,V.getFromId=G.getFromId,V.getFromTrace=G.getFromTrace;var J=r(9280);V.getAutoRange=J.getAutoRange,V.findExtremes=J.findExtremes;var X=1e-4;function K(e){var t=(e[1]-e[0])*X;return[e[0]-t,e[1]+t]}V.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),c[u]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,c,u)},V.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},V.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==V.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var u=V.getFromId(t,n);s=r(a,i=u.fraction2r(i)),o=u.cleanPos}e[a]=o(s)},V.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:V.getFromId(t,r).cleanPos)(e)},V.redrawComponents=function(e,t){t=t||V.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),u={},c=0;cn&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},V.saveRangeInitial=function(e,t){for(var r=V.list(e,"",!0),n=!1,a=0;a.3*d||c(n)||c(i))){var h=r.dtick/2;e+=e+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=V.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=V.tickIncrement(e,"M1","reverse")+15.5*A:e-=L;var s=V.tickIncrement(e,r);if(s<=n)return s}return e}(m,e,y,u,i)),g=m;g<=c;)g=V.tickIncrement(g,y,!1,i);return{start:t.c2r(m,0,i),end:t.c2r(g,0,i),size:y,_dataSpan:c-u}},V.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,i=t.dtick&&a(t._tmin);if(i){var o=V.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);n=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(n,t.l2r),e._isMinor=!0,V.prepTicks(e,r),i){var u=a(t.dtick),c=a(e.dtick),f=u?t.dtick:+t.dtick.substring(1),d=c?e.dtick:+e.dtick.substring(1);u&&c?te(f,d)?f===2*k&&d===2*A&&(e.dtick=k):f===2*k&&d===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?re(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?c?e.dtick="M1":te(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(f,d)||(e.dtick=re(f/d,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},V.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,V.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=V.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=S,o&&!n&&e.dtick=(I?0:1);E--){var R=!E;E?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var z=E?e:l.extendFlat({},e,e.minor);if(R?V.prepMinorTicks(z,e,t):V.prepTicks(z,t),"array"!==z.tickmode)if("sync"!==z.tickmode){var F=K(c),N=F[0],j=F[1],B=a(z.dtick),H="log"===i&&!(B||"L"===z.dtick.charAt(0)),Y=V.tickFirst(z,t);if(E){if(e._tmin=Y,Y=j:W<=j;W=V.tickIncrement(W,Z,f,o)){if(E&&U++,z.rangebreaks&&!f){if(W=h)break}if(C.length>p||W===G)break;G=W;var J={value:W};E?(H&&W!==(0|W)&&(J.simpleLabel=!0),s>1&&U%s&&(J.skipLabel=!0),C.push(J)):(J.minor=!0,D.push(J))}}else C=[],v=ie(e);else E?(C=[],v=oe(e,!R)):(D=[],O=oe(e,!R))}if(I&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var X=C.map((function(e){return e.value})),$=[],Q=0;Q0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,u=e[o].value,c=Math.abs(u-s),f=r||c,d=0;f>=m?d=c>=m&&c<=g?c:y:r===b&&f>=_?d=c>=_&&c<=x?c:b:f>=M?d=c>=M&&c<=w?c:T:r===k&&f>=k?d=k:f>=A?d=A:r===L&&f>=L?d=L:r===S&&f>=S&&(d=S),d>=c&&(d=c,l=!0);var h=a+d;if(t.rangebreaks&&d>0){for(var p=0,v=0;v<84;v++){var O=(v+.5)/84;t.maskBreaks(a*(1-O)+O*h)!==P&&p++}(d*=p/84)||(e[n].drop=!0),l&&c>k&&(d=c)}(d>0||0===n)&&(e[n].periodX=a+d/2)}}(C,e,e._definedDelta),e.rangebreaks){var ae="y"===e._id.charAt(0),le=1;"auto"===e.tickmode&&(le=e.tickfont?e.tickfont.size:12);var se=NaN;for(r=C.length-1;r>-1;r--)if(C[r].drop)C.splice(r,1);else{C[r].value=Re(C[r].value,e);var ue=e.c2p(C[r].value);(ae?se>ue-le:seh||feh&&(ce.periodX=h),fe10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=A&&i<=10||t>=15*A)e._tickround="d";else if(t>=O&&i<=16||t>=S)e._tickround="M";else if(t>=C&&i<=19||t>=O)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),u=Math.floor(Math.log(s)/Math.LN10+.01),c=void 0===e.minexponent?3:e.minexponent;Math.abs(u)>c&&(me(e.exponentformat)&&!xe(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}function ge(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}V.autoTicks=function(e,t,r){var n;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var o=2*t;if(o>y)t/=y,n=i(10),e.dtick="M"+12*pe(t,n,le);else if(o>T)t/=T,e.dtick="M"+pe(t,1,se);else if(o>A){if(e.dtick=pe(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!r){var s=V.getTickFormat(e),u="period"===e.ticklabelmode;u&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),u&&(e._dowTick0=e.tick0)}}else o>S?e.dtick=pe(t,S,se):o>O?e.dtick=pe(t,O,ue):o>C?e.dtick=pe(t,C,ue):(n=i(10),e.dtick=pe(t,n,le))}else if("log"===e.type){e.tick0=0;var c=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=i(10),e.dtick="L"+pe(t,n,le)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Ee(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=i(10),e.dtick=pe(t,n,le));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},V.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),u=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,u,i);if("L"===s)return Math.log(Math.pow(10,e)+u)/Math.LN10;if("D"===s){var c="D2"===t?de:fe,f=e+.01*o,d=l.roundUp(l.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},V.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1]=0&&r<=e._length?t:null};if(s&&l.isArrayOrTypedArray(e.ticktext)){var h=l.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(i=0;i ")}else e._prevDateHead=s,u+="
"+s;t.text=u}(e,o,r,u):"log"===c?function(e,t,r,n,i){var o=e.dtick,s=t.x,u=e.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)t.text=be(Math.pow(10,s),e,i,n);else if(a(o)||"D"===c&&l.mod(s+.01,1)<.1){var f=Math.round(s),d=Math.abs(f),h=e.exponentformat;"power"===h||me(h)&&xe(f)?(t.text=0===f?1:1===f?"10":"10"+(f>1?"":D)+d+"",t.fontSize*=1.25):("e"===h||"E"===h)&&d>2?t.text="1"+h+(f>0?"+":D)+d:(t.text=be(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,o,0,u,g):"category"===c?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===c?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):Ee(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=be(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["",o[0],"","⁄","",o[1],"","π"].join(""),s&&(t.text=D+t.text)}}}}(e,o,r,u,g):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=be(t.x,e,a,n)}(e,o,0,u,g),n||(e.tickprefix&&!v(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!v(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var y=e.labelalias[o.text];"string"==typeof y&&(o.text=y)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)]),o},V.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=l.isArrayOrTypedArray(t)?t[0]:t,a=l.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return V.hoverLabelText(e,n,r)+" - "+V.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=V.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":D+o:o};var ye=["f","p","n","μ","m","","k","M","G","T"];function me(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",u=t._tickexponent,c=V.getTickFormat(t),f=t.separatethousands;if(n){var d={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ve(d),o=(Number(d._tickround)||0)+4,u=d._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,D);var h,p=Math.pow(10,-o)/2;if("none"===s&&(u=0),(e=Math.abs(e))"+h+"":"B"===s&&9===u?e+="B":me(s)&&(e+=ye[u/3+5])),i?D+e:e}function _e(e,t){if(e){var r=Object.keys(N).reduce((function(e,r){return-1!==t.indexOf(r)&&N[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function we(e,t){for(var r=[],n={},a=0;a1&&r=a.min&&e=0,i=c(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(a)))){r=n;break}break;case"log":for(t=0;t=0&&a.unshift(a.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return l.syncOrAsync(a.map((function(t){return function(){if(t){var n=V.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=i;var a=V.drawOne(e,n,r);return n._shiftPusher&&Ne(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}})))},V.drawOne=function(e,t,r){var n,a,s,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var v=e._fullLayout,g=t._id,y=g.charAt(0),m=V.counterLetter(g),x=v._plots[t._mainSubplot];if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),Ne(t,b,h,!0),Ne(t,t.shift||0,h,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var _=x[y+"axislayer"],w=t._mainLinePosition,T=w+=t._shift,M=t._mainMirrorPosition,k=t._vals=V.calcTicks(t),A=[t.mirror,T,M].join("_");for(n=0;n0?r.bottom-c:0,f))));var d=0,h=0;if(t._shiftPusher&&(d=Math.max(f,r.height>0?"l"===s?c-r.left:r.right-c:0),t.title.text!==v._dfltTitle[y]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=ke(t))),t._fullDepth=Math.max(d,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?c-r.top:0,f),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===s?(t._depth=Math.max(r.height>0?c-r.left:0,f),n[s]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-c:0,f),n[s]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==v._dfltTitle[y]&&(n[s]+=ke(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[u]+=f),!0===t.mirror||"ticks"===t.mirror?a[m]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[m]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}fe&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(_e(n,t.automargin),_e(a,t.automargin)),i.autoMargin(e,Se(t),n),i.autoMargin(e,Oe(t),a),i.autoMargin(e,Ce(t),l)})),l.syncOrAsync(ue)}}function de(e){var r=g+(e||"tick");return L[r]||(L[r]=function(e,t,r){var n,a,i,o;if(e._selections[t].size())n=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Le(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}));else{var l=V.makeLabelFns(e,r);n=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:a,left:i,right:o,height:a-n,width:o-i}}(t,r,T)),L[r]}},V.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},V.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},V.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var u=e.side,c=s?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;return(o||n)&&(c+=d*H,f+=(e.linewidth||0)/2),(a||i)&&(c+=(e.linewidth||0)/2,f+=3),l&&"top"===u&&(f-=d*(1-H)),(a||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[s?c:0,l?f:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return s(r+e._offset+e.l2p(Te(t)),n)}:function(t){return s(n,r+e._offset+e.l2p(Te(t)))}},V.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},V.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),u=i("right"),c=i("bottom")||s||o||u,f=i("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=d?e.ticklen:0;if(f?v*=-1:c&&(v=0),d&&(h+=v,r)){var g=l.deg2rad(r);h=v*Math.cos(g)+1,p=v*Math.sin(g)}e.showticklabels&&(d||e.showline)&&(h+=.2*e.tickfont.size);var y,m,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(f?-1:1),labelShift:p},T=0,M=e.side,k=e._id.charAt(0),A=e.tickangle;if("x"===k)b=(_=!f&&"bottom"===M||f&&"top"===M)?1:-1,f&&(b*=-1),y=p*b,m=t+h*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=B:x=-90===A&&"bottom"===M?H:90===A&&"top"===M?B:.5,T=B/2*(A/90)),w.xFn=function(e){return e.dx+y+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*x},w.anchorFn=function(e,t){if(c){if(s)return"end";if(u)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===k){if(b=(_=!f&&"left"===M||f&&"right"===M)?1:-1,f&&(b*=-1),y=h,m=p*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&"left"===M||90===A&&"right"===M?H:.5),f){var L=a(A)?+A:0;if(0!==L){var S=l.deg2rad(L);T=Math.abs(Math.sin(S))*H*b,x=0}}w.xFn=function(e){return e.dx+t-(y+e.fontSize*x)*b+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*B},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},V.drawTicks=function(e,t,r){r=r||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+a).data(i,Me);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Fe(t,[z]),o.attr("transform",r.transFn)},V.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?r.vals.filter((function(e){return e.minor})):[],l=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],s=r.counterAxis;if(s&&V.shouldShowZeroLine(e,t,s))for(var u="array"===t.tickmode,c=0;c=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+a).data(y?l:o,Me);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Fe(t,[E,R])}},V.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=V.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return W(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Fe(t,[I])},V.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,c=r.cls||o+"tick",f=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[c],g=r.layer.selectAll("g."+c).data(t.showticklabels?f:[],Me),y=[];function m(e,i){e.each((function(e){var o=n.select(this),l=o.select(".text-math-group"),c=h.anchorFn(e,i),f=r.transFn.call(o.node(),e)+(a(i)&&0!=+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=u.lineCount(o),v=Y*e.fontSize,g=h.heightFn(e,a(i)?+i:0,(p-1)*v);if(g&&(f+=s(0,g)),l.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":c}),y.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var m=d.bBox(l.node()).width*{end:-.5,start:.5}[c];l.attr("transform",f+s(m,0))}}))}g.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(u.positionText,h.xFn(t),h.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(u.convertToTspans,e),e._promises[a]?y.push(e._promises.pop().then((function(){m(r,p)}))):m(r,p)})),Fe(t,[F]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(e){n.select(this).select("text").call(u.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var a=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),s=0,u=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var c=l.simpleMap(t.range,t.r2l);s=t.l2p(c[0])+t._offset,u=t.l2p(c[1])+t._offset}var f=Math.min(s,u),h=Math.max(s,u),p=t.side,v=1/0,y=-1/0;for(var m in g.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=d.bBox(r.node()),l=0;o?(i.right>h||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},m(g,v+1?v:p);var x=null;t._selections&&(t._selections[c]=g);var b=[function(){return y.length&&Promise.all(y)}];t.automargin&&i._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(g,v)}))):b.push((function(){if(m(g,p),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,a=[],i=1;g.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Le(this),l=d.bBox(o.node());i=Math.max(i,u.lineCount(o)),a.push({top:0,bottom:10,height:10,left:r-l.width/2,right:r+l.width/2+2,width:l.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,s=f.length,c=Math.abs((f[s-1].x-f[0].x)*t._m)/(s-1),h=o?c/2:c,v=o?t.ticklen:1.25*n*i,y=h/Math.sqrt(Math.pow(h,2)+Math.pow(v,2)),b=t.autotickangles.map((function(e){return e*Math.PI/180})),_=b.find((function(e){return Math.abs(Math.cos(e))<=y}));void 0===_&&(_=b.reduce((function(e,t){return Math.abs(Math.cos(e))B*j&&(D=j,S[L]=O[L]=P[L])}var H=Math.abs(D-C);H-M>0?M*=1+M/(H-=M):M=0,"y"!==t._id.charAt(0)&&(M=-M),S[A]=w.p2r(w.r2p(O[A])+k*M),"min"===w.autorange||"max reversed"===w.autorange?(S[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(S[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[w._name+".range"]=S}var U=l.syncOrAsync(b);return U&&U.then&&e._promises.push(U),U},V.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},V.shouldShowZeroLine=function(e,t,r){var n=l.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(Ae(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=V.counterLetter(t._id),s=t._offset+(Math.abs(n[0])1)for(n=1;n2*o}(a,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),a=0,o=0,l={},c=0;c2*a}(a,g)?"category":function(e,t){for(var r=e.length,n=0;n=2){var l,u,c="";if(2===o.length)for(l=0;l<2;l++)if(u=_(o[l])){c=y;break}var f=a("pattern",c);if(f===y)for(l=0;l<2;l++)(u=_(o[l]))&&(t.bounds[l]=o[l]=u-1);if(f)for(l=0;l<2;l++)switch(u=o[l],f){case y:if(!n(u))return void(t.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=u;break;case m:if(!n(u))return void(t.enabled=!1);if((u=+u)<0||u>24)return void(t.enabled=!1);t.bounds[l]=o[l]=u}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},4796:function(e,t,r){"use strict";var n=r(8116).isTypedArraySpec;e.exports=function(e,t,r,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||n(o);l&&(i="array");var s,u=r("categoryorder",i);"array"===u&&(s=r("categoryarray")),l||"array"!==u||(u=t.categoryorder="trace"),"trace"===u?t._initialCategories=[]:"array"===u?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?a.substr(n):i.substr(r))+o:a+i+e*t:o}function g(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;ou*x)||T)for(r=0;rI&&FD&&(D=F);d/=(D-C)/(2*P),C=s.l2r(C),D=s.l2r(D),s.range=s._input.range=L=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function j(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",a+"Z")}function B(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(t,r)).attr("d","M0,0Z")}function H(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Y(e,t,a,i)}function Y(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,D)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function G(e,t,r,n,i){for(var o,l,s,u,c=!1,f={},d={},h=(i||{}).xaHash,p=(i||{}).yaHash,v=0;v=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(U(a),2!==e||ye||Ve(),ge)o.indexOf("select")>-1&&L(r,a,X,K,t.id,De),o.indexOf("event")>-1&&h.click(a,r,t.id);else if(1===e&&ye){var l=v?I:P,u="s"===v||"w"===y?0:1,f=l._name+".range["+u+"]",d=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,u),p="left",g="middle";if(l.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===l.side&&(p="right")):"e"===y&&(p="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(c.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(d),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,f,t)}))}}}function Ee(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Le="",Te.r=Te.l,Te.t=Te.b,Oe.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>D||o>D?(Le="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),Oe.attr("d",q(Te))):l();else if(ne.isSubplotConstrained)if(i>D||o>D){Le="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),u=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=u*ee,Te.b=(1-s)*te,Te.t=(1-u)*te,Oe.attr("d",q(Te))}else l();else!ie||o0){var c;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(c=0;c1&&(void 0!==i.maxallowed&&le===(i.range[0]1&&(void 0!==o.maxallowed&&se===(o.range[0]b[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},2568:function(e,t,r){"use strict";var n=r(5024);e.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},6312:function(e,t,r){"use strict";var n=r(6808);e.exports=function(e,t,r,a){var i=t._template||{},o=t.type||i.type||"-";r("minallowed"),r("maxallowed");var l,s=r("range");s||a.noInsiderange||"log"===o||(!(l=r("insiderange"))||null!==l[0]&&null!==l[1]||(t.insiderange=!1,l=void 0),l&&(s=r("range",l)));var u,c=t.getAutorangeDflt(s,a),f=r("autorange",c);!s||(null!==s[0]||null!==s[1])&&(null!==s[0]&&null!==s[1]||"reversed"!==f&&!0!==f)&&(null===s[0]||"min"!==f&&"max reversed"!==f)&&(null===s[1]||"max"!==f&&"min reversed"!==f)||(s=void 0,delete t.range,t.autorange=!0,u=!0),u||(f=r("autorange",c=t.getAutorangeDflt(s,a))),f&&(n(r,f,s),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},1160:function(e,t,r){"use strict";var n=r(4284).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},8344:function(e,t,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(3400),o=i.numberFormat,l=r(8248),s=i.cleanNumber,u=i.ms2DateTime,c=i.dateTime2ms,f=i.ensureNumber,d=i.isArrayOrTypedArray,h=r(9032),p=h.FP_SAFE,v=h.BADNUM,g=h.LOG_CLIP,y=h.ONEWEEK,m=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(9811),T=r(3816),M=T.HOUR_PATTERN,k=T.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function L(e){return null!=e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function S(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*g*Math.abs(n-a))}return v}function O(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=c(t,n||e.calendar);if(o===v){if(!l(t))return v;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),u=Math.round(t-s/10);o=c(new Date(u))+s/10}return o}function C(t,r,n){return u(t,r,n||e.calendar)}function D(t){return e._categories[Math.round(t)]}function P(t){if(L(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return v}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function E(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function R(e){return l(e)?+e:I(e)}function z(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var N=function(t){return l(t)?z(t,e._m,e._b):v},j=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var B="y"===h;N=function(t){if(!l(t))return v;var r=e._rangebreaks.length;if(!r)return z(t,e._m,e._b);var n=B;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;sc)){o=i<(u+c)/2?s:s+1;break}o=s+1}var f=e._B[o]||0;return isFinite(f)?z(t,e._m2,f):0},j=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;ae._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?S:f,e.l2c="log"===e.type?A:f,e.l2p=N,e.p2l=j,e.c2p="log"===e.type?function(e,t){return N(S(e,t))}:N,e.p2c="log"===e.type?function(e){return A(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=f,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return S(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=f,e.c2r=S,e.l2d=A,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return A(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=f):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=O,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,n){return e.l2p(O(t,0,n))},e.p2d=e.p2r=function(e,t,r){return C(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=E,e.r2c=function(t){var r=R(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=f,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:f(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=E,e.r2c=function(t){var r=E(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=f,e.r2l=E,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:f(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var u in s)if(u!==r){var c=t[w.id2name(u)];l=l.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(a=0;as[1]&&(a[l?0:1]=n),a[0]===a[1]){var u=e.l2r(r),c=e.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),a[l?1:0]=f}if(void 0!==n){var d=c+1;void 0!==r&&(d=Math.max(d,u)),a[l?0:1]=d}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===h?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length){var s=null===o[0],u=null===o[1];for("date"!==e.type||e.autorange||(o[0]=i.cleanDate(o[0],v,e.calendar),o[1]=i.cleanDate(o[1],v,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(o[n],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var c=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(c-1e3),o[1]=e.l2r(c+1e3);break}}else{if(!l(o[n])){if(s||u||!l(o[1-n])){e[t]=a;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,u=e.r2l(e[i][0],o),c=e.r2l(e[i][1],o),f="y"===h;if(f?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(u,c),Math.max(u,c)),e._rangebreaks.length)){for(l=0;lc&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(c-u)-e._lBreaks),e._B.push(-e._m2*(f?c:u)),l=0;la&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=l.min&&(el.max&&(l.max=n),a=!1)}a&&u.push({min:e,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,u=a._length,c=s._length,f=!!t.xr1,d=!!t.yr1,h=[];if(f){var p=i.simpleMap(t.xr0,a.r2l),v=i.simpleMap(t.xr1,a.r2l),g=p[1]-p[0],y=v[1]-v[0];h[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*u,h[2]=u*(1-r+r*y/g),a.range[0]=a.l2r(p[0]*(1-r)+r*v[0]),a.range[1]=a.l2r(p[1]*(1-r)+r*v[1])}else h[0]=0,h[2]=u;if(d){var m=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=m[1]-m[0],_=x[1]-x[0];h[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*c,h[3]=c*(1-r+r*_/b),s.range[0]=a.l2r(m[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(m[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=c;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=f?u/h[2]:1,T=d?c/h[3]:1,M=f?h[0]:0,k=d?h[1]:0,A=f?h[0]/h[2]*u:0,L=d?h[1]/h[3]*c:0,S=a._offset-A,O=s._offset-L;n.clipRect.call(o.setTranslate,M,k).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,S,O).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}l.redrawComponents(e)}},4944:function(e,t,r){"use strict";var n=r(4040).traceIs,a=r(2976);function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var u=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(u)if("histogram"!==u.type||s!=={v:"y",h:"x"}[u.orientation||"v"]){var c=s+"calendar",f=u[c],d={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&s==={h:"x",v:"y"}[u.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,o(u,s)){var h=i(u),p=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}t.manageCommandObserver=function(e,r,n,o){var l={},s=!0;r&&r._commandObserver&&(l=r._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var u=t.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(r&&r._commandObserver){if(u)return l;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,l}if(u){i(e,u,l.cache),l.check=function(){if(s){var t=i(e,u,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:u.type,prop:u.prop,traces:u.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function L(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i1&&E.length>1){for(s.getComponentMethod("grid","sizeDefaults")(u,l),o=0;o15&&E.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,c,n),w.cleanPlot(d,l,c,n);var j=!(!n._has||!n._has("gl2d")),B=!(!l._has||!l._has("gl2d")),H=!(!n._has||!n._has("cartesian"))||j,Y=!(!l._has||!l._has("cartesian"))||B;H&&!Y?n._bgLayer.remove():Y&&!H&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&v({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var c=1-2*l;n=Math.round(c*n),a=Math.round(c*a)}}var d=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,v=!t.height&&Math.abs(r.height-a)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,l=s.componentsRegistry,u=t._basePlotModules,c=s.subplotsRegistry.cartesian;for(a in l)(o=l[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in u.length||u.push(c),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),c.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(f.subplotSort);for(i=0;i1&&(r.l/=y,r.r/=y)}if(h){var m=(r.t+r.b)/h;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},v[t]=1}else delete p[t],delete v[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),P(t);var a=t._size,i=t.margin,l={t:0,b:0,l:0,r:0},u=f.extendFlat({},a),c=i.l,d=i.r,h=i.t,v=i.b,g=t._pushmargin,y=t._pushmarginIds,m=t.minreducedwidth,x=t.minreducedheight;if(!1!==i.autoexpand){for(var b in g)y[b]||delete g[b];var _=e._fullLayout._reservedMargin;for(var T in _)for(var M in _[T]){var k=_[T][M];l[M]=Math.max(l[M],k)}for(var A in g.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:v}},l){var L=0;for(var S in g)"base"!==S&&o(g[S][A].size)&&(L=g[S][A].size>L?g[S][A].size:L);var O=Math.max(0,i[A]-L);l[A]=Math.max(0,l[A]-O)}for(var C in g){var D=g[C].l||{},I=g[C].b||{},E=D.val,R=D.size,z=I.val,F=I.size,N=r-l.r-l.l,j=n-l.t-l.b;for(var B in g){if(o(R)&&g[B].r){var H=g[B].r.val,Y=g[B].r.size;if(H>E){var U=(R*H+(Y-N)*E)/(H-E),V=(Y*(1-E)+(R-N)*(1-H))/(H-E);U+V>c+d&&(c=U,d=V)}}if(o(F)&&g[B].t){var q=g[B].t.val,G=g[B].t.size;if(q>z){var W=(F*q+(G-j)*z)/(q-z),Z=(G*(1-z)+(F-j)*(1-q))/(q-z);W+Z>v+h&&(v=W,h=Z)}}}}}var J=f.constrain(r-i.l-i.r,2,m),X=f.constrain(n-i.t-i.b,2,x),K=Math.max(0,r-J),$=Math.max(0,n-X);if(K){var Q=(c+d)/K;Q>1&&(c/=Q,d/=Q)}if($){var ee=(v+h)/$;ee>1&&(v/=ee,h/=ee)}if(a.l=Math.round(c)+l.l,a.r=Math.round(d)+l.r,a.t=Math.round(h)+l.t,a.b=Math.round(v)+l.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(w.didMarginChange(u,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(y).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var i=0,o=0;function l(){return i++,function(){var t;o++,n||o!==i||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],i=f.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(f.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=c(e[i],t)}else t&&(a[i]="_function")})),a}var i=Array.isArray(e),o=f.isTypedArray(e);if((i||o)&&e.dtype&&e.shape){var s=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:f.isArrayBuffer(s)?l.encode(s):s},t)}return i?e.map((function(e){return c(e,t)})):o?f.simpleMap(e,f.identity):f.isJSDate(e)?f.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=c(s),a)){var h=s._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return u&&(d.frames=c(u)),i&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;i--)if(s[i].enabled){r._indexToPoints=s[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(z(o,l,c),a=0;a0){for(var n=[],a=0;a-1&&(f[h[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},4664:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;rf+u||!n(c))}for(var h=0;h=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(i)||"auto"===i,g=v||"inside"===i,y=v||"outside"===i;if(g||y){var m=d(n,"textfont",r.font),x=a.extendFlat({},m),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(n,"insidetextfont",x),p){var _=a.extendFlat({},m);b&&delete _.color,d(n,"pathbar.textfont",_)}y&&d(n,"outsidetextfont",m),l&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),u&&n("constraintext"),c&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}g&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function c(r,n){return a.coerce(e,t,f,r,n)}if(l(e,t,n,c)){s(e,t,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var d=c("textposition");p(e,0,n,c,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(e,t,c,r,n);var h=(t.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(e,t,h||i.defaultLine,{axis:"y"}),v(e,t,h||i.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(t,c)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function i(e,t){return a.coerce(n._input,n,f,e,t)}for(var o=0;oi))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return i(e)?t0?t+=r:c<0&&(t-=r)}return t}function E(e){var t=c,r=e.b,a=I(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var R=e[f+"a"],z=e[d+"a"];v=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));var F=n.getDistanceFunction(a,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(g,F,e),!1!==e.index&&g[e.index].p!==u){M||(O=function(e){return Math.min(k(e),e.p-m.bargroupwidth/2)},C=function(e){return Math.max(A(e),e.p+m.bargroupwidth/2)});var N=g[e.index],j=y.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=z.c2p(N[d],!0),e[d+"LabelVal"]=j;var B=m.extents[m.extents.round(N.p)];e[f+"0"]=R.c2p(x?O(N):B[0],!0),e[f+"1"]=R.c2p(x?C(N):B[1],!0);var H=void 0!==N.orig_p;return e[f+"LabelVal"]=H?N.orig_p:N.p,e.labelLabel=s(R,e[f+"LabelVal"],y[f+"hoverformat"]),e.valueLabel=s(z,e[d+"LabelVal"],y[d+"hoverformat"]),e.baseLabel=s(z,N.b,y[d+"hoverformat"]),e.spikeDistance=(function(e){var t=c,r=e.b,a=I(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(N)+function(e){return D(k(e),A(e),w)}(N))/2,e[f+"Spike"]=R.c2p(N.p,!0),o(N,y,e),e.hovertemplate=y.hovertemplate,e}}function f(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(e,t,r,n,i){var o=c(e,t,r,n,i);if(o){var l=o.cd,s=l[0].trace,u=l[o.index];return o.color=f(s,u),a.getComponentMethod("errorbars","hoverInfo")(u,s,o),[o]}},hoverOnBars:c,getTraceColor:f}},1132:function(e,t,r){"use strict";e.exports={attributes:r(832),layoutAttributes:r(9324),supplyDefaults:r(1508).supplyDefaults,crossTraceDefaults:r(1508).crossTraceDefaults,supplyLayoutDefaults:r(7156),calc:r(9439),crossTraceCalc:r(6376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(4664),plot:r(8184).plot,style:r(100).style,styleOnSelect:r(100).styleOnSelect,hoverPoints:r(1020).hoverPoints,eventData:r(2160),selectPoints:r(5784),moduleType:"trace",name:"bar",basePlotModule:r(7952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},9324:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},7156:function(e,t,r){"use strict";var n=r(4040),a=r(4460),i=r(3400),o=r(9324),l=r(1508).validateCornerradius;e.exports=function(e,t,r){function s(r,n){return i.coerce(e,t,o,r,n)}for(var u=!1,c=!1,f=!1,d={},h=s("barmode"),p=0;p0)-(e<0)}function k(e,t){return e0}function S(e,t,r,n,a){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(a?e>=r*(t/n):t>=n*(e/r)))}function O(e){return"auto"===e?0:e}function C(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function D(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=i.anchor,c="end"===u,f="start"===u,d=((i.leftToRight||0)+1)/2,h=1-d,p=i.hasB,v=i.r,g=i.overhead,y=a.width,m=a.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=O(s);"auto"!==s||y<=x&&m<=b||!(y>x||m>b)||(y>b||m>x)&&y_){var S=function(e,t,r,n,a,i,o,l,s){var u,c,f,d,h=Math.max(0,Math.abs(t-e)-2*_),p=Math.max(0,Math.abs(n-r)-2*_),v=i-_,g=o?v-Math.sqrt(v*v-(v-o)*(v-o)):v,y=s?2*v:l?v-o:2*g,m=s?2*v:l?2*g:v-o;return a.y/a.x>=p/(h-y)?d=p/a.y:a.y/a.x<=(p-m)/h?d=h/a.x:!s&&l?(u=a.x*a.x+a.y*a.y/4,f=(h-v)*(h-v)+(p/2-v)*(p/2-v)-v*v,d=(-(c=-2*a.x*(h-v)-a.y*(p/2-v))+Math.sqrt(c*c-4*u*f))/(2*u)):s?(u=(a.x*a.x+a.y*a.y)/4,f=(h/2-v)*(h/2-v)+(p/2-v)*(p/2-v)-v*v,d=(-(c=-a.x*(h/2-v)-a.y*(p/2-v))+Math.sqrt(c*c-4*u*f))/(2*u)):(u=a.x*a.x/4+a.y*a.y,f=(h/2-v)*(h/2-v)+(p-v)*(p-v)-v*v,d=(-(c=-a.x*(h/2-v)-2*a.y*(p-v))+Math.sqrt(c*c-4*u*f))/(2*u)),{scale:d=Math.min(1,d),pad:l?Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(p-a.y*d)/2)*(v-(p-a.y*d)/2)))-o):Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(h-a.x*d)/2)*(v-(h-a.x*d)/2)))-o)}}(e,t,r,n,L,v,g,o,p);M=S.scale,A=S.pad}else M=1,l&&(M=Math.min(1,x/L.x,b/L.y)),A=0;var D=a.left*h+a.right*d,P=(a.top+a.bottom)/2,I=(e+_)*h+(t-_)*d,E=(r+n)/2,R=0,z=0;if(f||c){var F=(o?L.x:L.y)/2;v&&(c||p)&&(w+=A);var N=o?k(e,t):k(r,n);o?f?(I=e+N*w,R=-N*F):(I=t-N*w,R=N*F):f?(E=r+N*w,z=-N*F):(E=n-N*w,z=N*F)}return{textX:D,textY:P,targetX:I,targetY:E,anchorX:R,anchorY:z,scale:M,rotate:T}}e.exports={plot:function(e,t,r,f,g,y){var w=t.xaxis,P=t.yaxis,I=e._fullLayout,E=e._context.staticPlot;g||(g={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var R=i.makeTraceGroups(f,r,"trace bars").each((function(r){var u=n.select(this),f=r[0].trace,h=r[0].t,R="waterfall"===f.type,z="funnel"===f.type,F="histogram"===f.type,N="bar"===f.type,j=N||z,B=0;R&&f.connector.visible&&"between"===f.connector.mode&&(B=f.connector.line.width/2);var H="h"===f.orientation,Y=L(g),U=i.ensureSingle(u,"g","points"),V=T(f),q=U.selectAll("g.point").data(i.identity,V);q.enter().append("g").classed("point",!0),q.exit().remove(),q.each((function(u,T){var L,R,z=n.select(this),U=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),n?[a,i]:[i,a]}(u,w,P,H),V=U[0][0],q=U[0][1],G=U[1][0],W=U[1][1],Z=0==(H?q-V:W-G);if(Z&&j&&v.getLineWidth(f,u)&&(Z=!1),Z||(Z=!(a(V)&&a(q)&&a(G)&&a(W))),u.isBlank=Z,Z&&(H?q=V:W=G),B&&!Z&&(H?(V-=k(V,q)*B,q+=k(V,q)*B):(G-=k(G,W)*B,W+=k(G,W)*B)),"waterfall"===f.type){if(!Z){var J=f[u.dir].marker;L=J.line.width,R=J.color}}else L=v.getLineWidth(f,u),R=u.mc||f.marker.color;function X(e){var t=n.round(L/2%1,2);return 0===g.gap&&0===g.groupgap?n.round(Math.round(e)-t,2):e}var K=l.opacity(R)<1||L>.01?X:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?X(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(V=K(V,q,H),q=K(q,V,H),G=K(G,W,!H),W=K(W,G,!H));var $,Q=H?w.c2p:P.c2p;$=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=N||F?function(e,t){if(!e)return 0;var r,n=H?Math.abs(W-G):Math.abs(q-V),a=H?Math.abs(q-V):Math.abs(W-G),i=K(Math.abs(Q($,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,a/2):Math.min(n/2,i);return r="%"===t?n*(Math.min(50,e)/100):e,K(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+V+","+G+"V"+W+"H"+q+"V"+G+"Z",ae=0;if(re&&u.s){var ie=0===M(u.s0)||M(u.s)===M(u.s0)?u.s1:u.s0;if((ae=K(u.hasB?0:Math.abs(Q($,!0)-Q(ie,!0))))0?Math.sqrt(ae*(2*re-ae)):0,fe=oe>0?Math.max:Math.min;ee="M"+V+","+G+"V"+(W-ue*le)+"H"+fe(q-(re-ae)*oe,V)+"A "+re+","+re+" 0 0 "+se+" "+q+","+(W-re*le-ce)+"V"+(G+re*le+ce)+"A "+re+","+re+" 0 0 "+se+" "+fe(q-(re-ae)*oe,V)+","+(G+ue*le)+"Z"}else if(u.hasB)ee="M"+(V+re*oe)+","+G+"A "+re+","+re+" 0 0 "+se+" "+V+","+(G+re*le)+"V"+(W-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(V+re*oe)+","+W+"H"+(q-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+q+","+(W-re*le)+"V"+(G+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(q-re*oe)+","+G+"Z";else{var de=(te=Math.abs(W-G)+ae)0?Math.sqrt(ae*(2*re-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(V+de*oe)+","+G+"V"+pe(W-(re-ae)*le,G)+"A "+re+","+re+" 0 0 "+se+" "+(V+re*oe-he)+","+W+"H"+(q-re*oe+he)+"A "+re+","+re+" 0 0 "+se+" "+(q-de*oe)+","+pe(W-(re-ae)*le,G)+"V"+G+"Z"}}else ee=ne}else ee=ne;var ve=A(i.ensureSingle(z,"path"),I,g,y);if(ve.style("vector-effect",E?"none":"non-scaling-stroke").attr("d",isNaN((q-V)*(W-G))||Z&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&Y){var ge=s.makePointStyleFns(f);s.singlePointStyle(u,ve,f,ge,e)}!function(e,t,r,n,a,l,u,f,h,g,y,w,T){var M,L=t.xaxis,P=t.yaxis,I=e._fullLayout;function E(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+M,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(o.convertToTspans,e)}var R=n[0].trace,z="h"===R.orientation,F=function(e,t,r,n,a){var o,l=t[0].trace;return o=l.texttemplate?function(e,t,r,n,a){var o=t[0].trace,l=i.castOption(o,r,"texttemplate");if(!l)return"";var s,u,f,d,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,g="h"===o.orientation;function y(e){return c(d,d.c2l(e),!0).text}g?(s="y",u=a,f="x",d=n):(s="x",u=n,f="y",d=a);var m,x=t[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(m=x.p,c(u,u.c2l(m),!0).text);var w=i.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var T={};b(T,o,x.i),(h||void 0===T.x)&&(T.x=g?_.value:_.label),(h||void 0===T.y)&&(T.y=g?_.label:_.value),(h||void 0===T.xLabel)&&(T.xLabel=g?_.valueLabel:_.labelLabel),(h||void 0===T.yLabel)&&(T.yLabel=g?_.labelLabel:_.valueLabel),p&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=i.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=i.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=i.formatPercent(x.sumR));var M=i.castOption(o,x.i,"customdata");return M&&(_.customdata=M),i.texttemplateString(l,_,e._d3locale,T,_,o._meta||{})}(e,t,r,n,a):l.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function u(e){return c(o?r:n,+e,!0).text}var f,d,h=a.textinfo,p=e[t],v=h.split("+"),g=[],y=function(e){return-1!==v.indexOf(e)};if(y("label")&&g.push((d=e[t].p,c(o?n:r,d,!0).text)),y("text")&&(0===(f=i.castOption(a,p.i,"text"))||f)&&g.push(f),l){var m=+p.rawS||p.s,x=p.v,b=x-m;y("initial")&&g.push(u(b)),y("delta")&&g.push(u(m)),y("final")&&g.push(u(x))}if(s){y("value")&&g.push(u(p.s));var _=0;y("percent initial")&&_++,y("percent previous")&&_++,y("percent total")&&_++;var w=_>1;y("percent initial")&&(f=i.formatPercent(p.begR),w&&(f+=" of initial"),g.push(f)),y("percent previous")&&(f=i.formatPercent(p.difR),w&&(f+=" of previous"),g.push(f)),y("percent total")&&(f=i.formatPercent(p.sumR),w&&(f+=" of total"),g.push(f))}return g.join("
")}(t,r,n,a):v.getValue(l.text,r),v.coerceString(m,o)}(I,n,a,L,P);M=function(e,t){var r=v.getValue(e.textposition,t);return v.coerceEnumerated(x,r)}(R,a);var N="stack"===w.mode||"relative"===w.mode,j=n[a],B=!N||j._outmost,H=j.hasB,Y=g&&g-y>_;if(F&&"none"!==M&&(!j.isBlank&&l!==u&&f!==h||"auto"!==M&&"inside"!==M)){var U=I.font,V=p.getBarColor(n[a],R),q=p.getInsideTextFont(R,a,U,V),G=p.getOutsideTextFont(R,a,U),W=R.insidetextanchor||"end",Z=r.datum();z?"log"===L.type&&Z.s0<=0&&(l=L.range[0]0&&$>0;ae=Y?H?S(re-2*g,ne,K,$,z)||S(re,ne-2*g,K,$,z):z?S(re-(g-y),ne,K,$,z)||S(re,ne-2*(g-y),K,$,z):S(re,ne-(g-y),K,$,z)||S(re-2*(g-y),ne,K,$,z):S(re,ne,K,$,z),ie&&ae?M="inside":(M="outside",J.remove(),J=null)}else M="inside";if(!J){var oe=(J=E(r,F,Q=i.ensureUniformFontSize(e,"outside"===M?G:q))).attr("transform");if(J.attr("transform",""),K=(X=s.bBox(J.node())).width,$=X.height,J.attr("transform",oe),K<=0||$<=0)return void J.remove()}var le,se=R.textangle;le="outside"===M?function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,u=i.angle||0,c=a.width,f=a.height,d=Math.abs(t-e),h=Math.abs(n-r);o=l?h>2*_?_:0:d>2*_?_:0;var p=1;s&&(p=l?Math.min(1,h/f):Math.min(1,d/c));var v=O(u),g=C(a,v),y=(l?g.x:g.y)/2,m=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,M=0,A=l?k(t,e):k(r,n);return l?(b=t-A*o,T=A*y):(w=n+A*o,M=-A*y),{textX:m,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:M,scale:p,rotate:v}}(l,u,f,h,X,{isHorizontal:z,constrained:"both"===R.constraintext||"outside"===R.constraintext,angle:se}):D(l,u,f,h,X,{isHorizontal:z,constrained:"both"===R.constraintext||"inside"===R.constraintext,angle:se,anchor:W,hasB:H,r:g,overhead:y}),le.fontSize=Q.size,d("histogram"===R.type?"bar":R.type,le,I),j.transform=le;var ue=A(J,I,w,T);i.setTransormAndDisplay(ue,le)}else r.select("text").remove()}(e,t,z,r,T,V,q,G,W,re,ae,g,y),t.layerClipId&&s.hideOutsideRangePoint(u,z.select("text"),w,P,f.xcalendar,f.ycalendar)}));var G=!1===f.cliponaxis;s.setClipUrl(u,G?null:t.layerClipId,e)}));u.getComponentMethod("errorbars","plot")(e,R,t,g)},toMoveInsideBar:D}},5784:function(e){"use strict";function t(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}e.exports=function(e,r){var n,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,u="h"===l.orientation,c=[];if(!1===r)for(n=0;n1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,l=n.select(this);if(e.selected){a=o.ensureUniformFontSize(r,g(l,e,t,r));var s=t.selected.textfont&&t.selected.textfont.color;s&&(a.color=s),i.font(l,a)}else i.selectedTextStyle(l,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(p(r,a,e),l.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:s}},5592:function(e,t,r){"use strict";var n=r(6308),a=r(4288).hasColorscale,i=r(7260),o=r(3400).coercePattern;e.exports=function(e,t,r,l,s){var u=r("marker.color",l),c=a(e,"marker");c&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},2744:function(e,t,r){"use strict";var n=r(3428),a=r(3400);function i(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=i(e),a=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o=0})),("funnelarea"===t.type?y:t.sort)&&i.sort((function(e,t){return t.v-e.v})),i[0]&&(i[0].vTotal=g),i},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=s(i,o));for(var u=0,c=0;c0){l=!0;break}}l||(o=0)}return{hasLabels:r,hasValues:i,len:o}}function c(e,t,r,n,a){n("marker.line.width")&&n("marker.line.color",a?void 0:r.paper_bgcolor);var i=n("marker.colors");s(n,"marker.pattern",i),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:u,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,n){function s(r,n){return a.coerce(e,t,i,r,n)}var f=u(s("labels"),s("values")),d=f.len;if(t._hasLabels=f.hasLabels,t._hasValues=f.hasValues,!t._hasLabels&&t._hasValues&&(s("label0"),s("dlabel")),d){t._length=d,c(e,t,n,s,!0),s("scalegroup");var h,p=s("text"),v=s("texttemplate");if(v||(h=s("textinfo",a.isArrayOrTypedArray(p)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),v||h&&"none"!==h){var g=s("textposition");l(e,t,n,s,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&s("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&s("insidetextorientation")}else"none"===h&&s("textposition","none");o(t,n,s);var y=s("hole");if(s("title.text")){var m=s("title.position",y?"middle center":"top center");y||"middle center"!==m||(t.title.position="top center"),a.coerceFont(s,"title.font",n.font)}s("sort"),s("direction"),s("rotation"),s("pull")}else t.visible=!1}}},3644:function(e,t,r){"use strict";var n=r(624).appendArrayMultiPointValues;e.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},1552:function(e,t,r){"use strict";var n=r(3616),a=r(6308);e.exports=function(e,t,r,i){var o=r.marker.pattern;o&&o.shape?n.pointStyle(e,r,i,t):a.fill(e,t.color)}},9656:function(e,t,r){"use strict";var n=r(3400);function a(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=a((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=a(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(n.isArrayOrTypedArray(e))for(var r=0;r"),name:f.hovertemplate||-1!==d.indexOf("name")?f.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(f.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[y(e,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,t.emit("plotly_hover",{points:[y(e,f)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[u.index],o=n.select(this).datum();u._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[y(o,a)],event:n.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),u._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[u.index];t._dragging||!1===r.hovermode||(t._hoverdata=[y(e,a)],i.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var a=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,i=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,l=g.castOption(e.insidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,s=g.castOption(e.insidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,u=g.castOption(e.insidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,c=g.castOption(e.insidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,f=g.castOption(e.insidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,d=g.castOption(e.insidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||o.contrast(t.color),family:a,size:i,weight:l,style:s,variant:u,textcase:c,lineposition:f,shadow:d}}function _(e,t){for(var r,n,a=0;at&&t>n||r=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(f||h){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(l||p||f){var m=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/m,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;v.push(i)}(p||h)&&((i=T(e,n,o,s,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i)),(p||d)&&((i=M(e,n,o,s,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i));for(var x=0,b=0,_=0;_=1)break}return v[x]}function T(e,t,r,n,a){t=Math.max(0,t-2*v);var i=e.width/e.height,o=L(i,n,t,r);return{scale:2*o/e.height,rCenter:k(i,o/t),rotate:A(a)}}function M(e,t,r,n,a){t=Math.max(0,t-2*v);var i=e.height/e.width,o=L(i,n,t,r);return{scale:2*o/e.width,rCenter:k(i,o/t),rotate:A(a+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function L(e,t,r,n){var a=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(e*e+n/2)+e))}function S(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function O(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function C(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=P(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,l.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var s,u=e.r/(void 0===(s=e.trace.aspectratio)?1:s),c=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(c+=u,o.x-=(1+a)*u,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?c*=2:-1!==i.title.position.indexOf("right")&&(c+=u,o.x+=(1+a)*u,l.tx-=e.titleBox.width/2),r=c/e.titleBox.width,n=D(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:l.tx,ty:l.ty}}function D(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n1?c=(u=r.r)/a.aspectratio:u=(c=r.r)*a.aspectratio,s=(u*=(1+a.baseratio)/2)*c}o=Math.min(o,s/r.vTotal)}for(n=0;n")}if(i){var x=s.castOption(a,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=g.getFirstFilled(a.text,t.pts);(m(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function z(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,i=e._fullLayout,d=i._size;p("pie",i),_(t,e),I(t,d);var v=s.makeTraceGroups(i._pielayer,t,"trace").each((function(t){var p=n.select(this),v=t[0],y=v.trace;!function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=g.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,u="px0",c="px1";if("counterclockwise"===o.direction){for(t=0;ta.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=S(r,a))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var m=n.select(this).selectAll("g.slice").data(t);m.enter().append("g").classed("slice",!0),m.exit().remove();var _=[[[],[]],[[],[]]],T=!1;m.each((function(a,o){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=y.index,_[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var u=v.cx,c=v.cy,d=n.select(this),p=d.selectAll("path.surface").data([a]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),d.call(x,e,t),y.pull){var m=+g.castOption(y.pull,a.pts)||0;m>0&&(u+=m*a.pxmid[0],c+=m*a.pxmid[1])}a.cxFinal=u,a.cyFinal=c;var M=y.hole;if(a.v===v.vTotal){var k="M"+(u+a.px0[0])+","+(c+a.px0[1])+D(a.px0,a.pxmid,!0,1)+D(a.pxmid,a.px0,!0,1)+"Z";M?p.attr("d","M"+(u+M*a.px0[0])+","+(c+M*a.px0[1])+D(a.px0,a.pxmid,!1,M)+D(a.pxmid,a.px0,!1,M)+"Z"+k):p.attr("d",k)}else{var A=D(a.px0,a.px1,!0,1);if(M){var L=1-M;p.attr("d","M"+(u+M*a.px1[0])+","+(c+M*a.px1[1])+D(a.px1,a.px0,!1,M)+"l"+L*a.px0[0]+","+L*a.px0[1]+A+"Z")}else p.attr("d","M"+u+","+c+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}R(e,a,v);var S=g.castOption(y.textposition,a.pts),C=d.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),d=s.ensureUniformFontSize(e,"outside"===S?function(e,t,r){return{color:g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,family:g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,size:g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,weight:g.castOption(e.outsidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,style:g.castOption(e.outsidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,variant:g.castOption(e.outsidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,textcase:g.castOption(e.outsidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,lineposition:g.castOption(e.outsidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,shadow:g.castOption(e.outsidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow}}(y,a,i.font):b(y,a,i.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,d).call(f.convertToTspans,e);var p,m=l.bBox(r.node());if("outside"===S)p=O(m,a);else if(p=w(m,a,v),"auto"===S&&p.scale<1){var x=s.ensureUniformFontSize(e,y.outsidetextfont);r.call(l.font,x),p=O(m=l.bBox(r.node()),a)}var _=p.textPosAngle,M=void 0===_?a.pxmid:E(v.r,_);if(p.targetX=u+M[0]*p.rCenter+(p.x||0),p.targetY=c+M[1]*p.rCenter+(p.y||0),z(p,m),p.outside){var k=p.targetY;a.yLabelMin=k-m.height/2,a.yLabelMid=k,a.yLabelMax=k+m.height/2,a.labelExtraX=0,a.labelExtraY=0,T=!0}p.fontSize=d.size,h(y.type,p,i),t[o].transform=p,s.setTransormAndDisplay(r,p)}))}function D(e,t,r,n){var i=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*v.r+","+n*v.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var M=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(M.enter().append("g").classed("titletext",!0),M.exit().remove(),M.each((function(){var t,r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=y.title.text;y._meta&&(a=s.templateString(a,y._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,y.title.font).call(f.convertToTspans,e),t="middle center"===y.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(v):C(v,d),r.attr("transform",c(t.x,t.y)+u(Math.min(1,t.scale))+c(t.tx,t.ty))})),T&&function(e,t){var r,n,a,i,o,l,u,c,f,d,h,p,v;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function m(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var a,c,f,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),v=n?e.yLabelMin:e.yLabelMax,y=n?e.yLabelMax:e.yLabelMin,m=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-v;if(x*u>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(c=0;c=(g.castOption(t.pull,f.pts)||0)||((e.pxmid[1]-f.pxmid[1])*u>0?(x=f.cyFinal+o(f.px0[1],f.px1[1])-v-e.labelExtraY)*u>0&&(e.labelExtraY+=x):(y+e.labelExtraY-m)*u>0&&(a=3*l*Math.abs(c-d.indexOf(e)),(h=f.cxFinal+i(f.px0[0],f.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?y:m,o=n?Math.max:Math.min,u=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,l=r?1:-1,(c=e[n][r]).sort(a),f=e[1-n][r],d=f.concat(c),p=[],h=0;hMath.abs(f)?l+="l"+f*e.pxmid[0]/e.pxmid[1]+","+f+"H"+(i+e.labelExtraX+u):l+="l"+e.labelExtraX+","+c+"v"+(f-c)+"h"+u}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+u;s.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else r.select("path.textline").remove()}))}(m,y),T&&y.automargin){var k=l.bBox(p.node()),A=y.domain,L=d.w*(A.x[1]-A.x[0]),S=d.h*(A.y[1]-A.y[0]),D=(.5*L-v.r)/d.w,P=(.5*S-v.r)/d.h;a.autoMargin(e,"pie."+y.uid+".automargin",{xl:A.x[0]-D,xr:A.x[1]+D,yb:A.y[0]-P,yt:A.y[1]+P,l:Math.max(v.cx-v.r-k.left,0),r:Math.max(k.right-(v.cx+v.r),0),b:Math.max(k.bottom-(v.cy+v.r),0),t:Math.max(v.cy-v.r-k.top,0),pad:5})}}))}));setTimeout((function(){v.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:R,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:z}},2152:function(e,t,r){"use strict";var n=r(3428),a=r(528),i=r(2744).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var r=t[0].trace,i=n.select(this);i.style({opacity:r.opacity}),i.selectAll("path.surface").each((function(t){n.select(this).call(a,t,r,e)}))}))}},528:function(e,t,r){"use strict";var n=r(6308),a=r(9656).castOption,i=r(1552);e.exports=function(e,t,r,o){var l=r.marker.line,s=a(l.color,t.pts)||n.defaultLine,u=a(l.width,t.pts)||0;e.call(i,t,r,o).style("stroke-width",u).call(n.stroke,s)}},148:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;rs&&C[y].gap;)y--;for(x=C[y].s,v=C.length-1;v>y;v--)C[v].s=x;for(;sL[f]&&f=0;f--){var d=e[f];if("scatter"===d.type&&d.xaxis===u.xaxis&&d.yaxis===u.yaxis){d.opacity=void 0;break}}}}}},8800:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(2904),o=r(8200),l=r(3028),s=r(3980),u=r(1147),c=r(3912),f=r(4428),d=r(6828),h=r(1731),p=r(124),v=r(840),g=r(3400).coercePattern;e.exports=function(e,t,r,y){function m(r,a){return n.coerce(e,t,i,r,a)}var x=s(e,t,y,m);if(x||(t.visible=!1),t.visible){u(e,t,y,m),m("xhoverformat"),m("yhoverformat"),m("zorder");var b=c(e,t,y,m);"group"===y.scattermode&&void 0===t.orientation&&m("orientation","v");var _=!b&&x=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(d.c2p(e.x)-p);return i=Math.min(t,r)&&v<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(h.c2p(e.y)-v);return ir!=(u=a[n][1])>=r&&(o=a[n-1][0],l=a[n][0],u-s&&(i=o+(l-o)*(r-s)/(u-s),f=Math.min(f,i),p=Math.max(p,i)));return{x0:f=Math.max(f,0),x1:p=Math.min(p,d._length),y0:r,y1:r}}(f._polygons);null===P&&(P={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=l.defaultLine;return l.opacity(f.fillcolor)?I=f.fillcolor:l.opacity((f.line||{}).color)&&(I=f.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:P.x0,x1:P.x1,y0:P.y0,y1:P.y1,color:I,hovertemplate:!1}),delete e.index,f.text&&!n.isArrayOrTypedArray(f.text)?e.text=String(f.text):e.text=f.name,[e]}}},5875:function(e,t,r){"use strict";var n=r(3028);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(2904),layoutAttributes:r(5308),supplyDefaults:r(8800),crossTraceDefaults:r(5036),supplyLayoutDefaults:r(9748),calc:r(6356).calc,crossTraceCalc:r(6664),arraysToCalcdata:r(148),plot:r(6504),colorbar:r(5528),formatLabels:r(6688),style:r(6844).style,styleOnSelect:r(6844).styleOnSelect,hoverPoints:r(8723),selectPoints:r(1560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(7952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},5308:function(e){"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},9748:function(e,t,r){"use strict";var n=r(3400),a=r(5308);e.exports=function(e,t){var r,i="group"===t.barmode;"group"===t.scattermode&&("scattergap",r=i?t.bargap:.2,n.coerce(e,t,a,"scattergap",r))}},6828:function(e,t,r){"use strict";var n=r(3400).isArrayOrTypedArray,a=r(4288).hasColorscale,i=r(7260);e.exports=function(e,t,r,o,l,s){s||(s={});var u=(e.marker||{}).color;u&&u._inputArray&&(u=u._inputArray),l("line.color",r),a(e,"line")?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!n(u)&&u||r),l("line.width"),s.noDash||l("line.dash"),s.backoff&&l("line.backoff")}},2340:function(e,t,r){"use strict";var n=r(3616),a=r(9032),i=a.BADNUM,o=a.LOG_CLIP,l=o+.5,s=o-.5,u=r(3400),c=u.segmentsIntersect,f=u.constrain,d=r(8200);e.exports=function(e,t){var r,a,o,h,p,v,g,y,m,x,b,_,w,T,M,k,A,L,S=t.trace||{},O=t.xaxis,C=t.yaxis,D="log"===O.type,P="log"===C.type,I=O._length,E=C._length,R=t.backoff,z=S.marker,F=t.connectGaps,N=t.baseTolerance,j=t.shape,B="linear"===j,H=S.fill&&"none"!==S.fill,Y=[],U=d.minTolerance,V=e.length,q=new Array(V),G=0;function W(r){var n=e[r];if(!n)return!1;var a=t.linearized?O.l2p(n.x):O.c2p(n.x),o=t.linearized?C.l2p(n.y):C.c2p(n.y);if(a===i){if(D&&(a=O.c2p(n.x,!0)),a===i)return!1;P&&o===i&&(a*=Math.abs(O._m*E*(O._m>0?l:s)/(C._m*I*(C._m>0?l:s)))),a*=1e3}if(o===i){if(P&&(o=C.c2p(n.y,!0)),o===i)return!1;o*=1e3}return[a,o]}function Z(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,u=a*o+i*l;if(u>0&&uoe||e[1]se)return[f(e[0],ie,oe),f(e[1],le,se)]}function fe(e,t){return e[0]===t[0]&&(e[0]===ie||e[0]===oe)||e[1]===t[1]&&(e[1]===le||e[1]===se)||void 0}function de(e,t,r){return function(n,a){var i=ce(n),o=ce(a),l=[];if(i&&o&&fe(i,o))return l;i&&l.push(i),o&&l.push(o);var s=2*u.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);return s&&((i&&o?s>0==i[e]>o[e]?i:o:i||o)[e]+=s),l}}function he(e){var t=e[0],r=e[1],n=t===q[G-1][0],a=r===q[G-1][1];if(!n||!a)if(G>1){var i=t===q[G-2][0],o=r===q[G-2][1];n&&(t===ie||t===oe)&&i?o?G--:q[G-1]=e:a&&(r===le||r===se)&&o?i?G--:q[G-1]=e:q[G++]=e}else q[G++]=e}function pe(e){q[G-1][0]!==e[0]&&q[G-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===j||"spline"===j?ne=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ue[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&X(o,e)oe?oe:0,$=t[1]se?se:0,K||$){if(G)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),q[G++]=n[1])}else re=ne(q[G-1],t)[0],q[G++]=re;else q[G++]=[K||t[0],$||t[1]];var a=q[G-1];K&&$&&(a[0]!==K||a[1]!==$)?(te&&(Q!==K&&ee!==$?he(Q&&ee?(i=te,l=(o=t)[0]-i[0],s=(o[1]-i[1])/l,(i[1]*o[0]-o[1]*i[0])/l>0?[s>0?ie:oe,se]:[s>0?oe:ie,le]):[Q||K,ee||$]):Q&&ee&&he([Q,ee])),he([K,$])):Q-K&&ee-$&&he([K||Q,$||ee]),te=t,Q=K,ee=$}else te&&pe(ne(te,t)[0]),q[G++]=t;var i,o,l,s}for(r=0;rJ(v,ye))break;o=v,(w=m[0]*y[0]+m[1]*y[1])>b?(b=w,h=v,g=!1):w<_&&(_=w,p=v,g=!0)}if(g?(ge(h),o!==p&&ge(p)):(p!==a&&ge(p),o!==h&&ge(h)),ge(o),r>=e.length||!v)break;ge(v),a=v}}else ge(h)}te&&he([Q||te[0],ee||te[1]]),Y.push(q.slice(0,G))}var me=j.slice(j.length-1);if(R&&"h"!==me&&"v"!==me){for(var xe=!1,be=-1,_e=[],we=0;we=0?s=h:(s=h=d,d++),s0?Math.max(r,i):0}}},5528:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},4428:function(e,t,r){"use strict";var n=r(6308),a=r(4288).hasColorscale,i=r(7260),o=r(3028);e.exports=function(e,t,r,l,s,u){var c=o.isBubble(e),f=(e.line||{}).color;u=u||{},f&&(r=f),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),u.noAngle||(s("marker.angle"),u.noAngleRef||s("marker.angleref"),u.noStandOff||s("marker.standoff")),s("marker.color",r),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),u.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),u.noLine||(s("marker.line.color",f&&!Array.isArray(f)&&t.marker.color!==f?f:c?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0)),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),u.gradient&&"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}},1147:function(e,t,r){"use strict";var n=r(3400).dateTick0,a=r(9032).ONEWEEK;function i(e,t){return n(t,e%a==0?1:0)}e.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var l=n("yperiod");l&&(n("yperiod0",i(l,t.ycalendar)),n("yperiodalignment"))}}},6504:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=i.ensureSingle,l=i.identity,s=r(3616),u=r(3028),c=r(2340),f=r(4328),d=r(2065).tester;function h(e,t,r,f,h,p,v){var g,y=e._context.staticPlot;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,c=n.extent(i.simpleMap(l.range,l.r2c)),f=n.extent(i.simpleMap(s.range,s.r2c)),d=a[0].trace;if(u.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=a.filter((function(e){return e.x>=c[0]&&e.x<=c[1]&&e.y>=f[0]&&e.y<=f[1]})),v=Math.ceil(p.length/h),g=0;o.forEach((function(e,r){var n=e[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return m?e.transition():e}var b=r.xaxis,_=r.yaxis,w=f[0].trace,T=w.line,M=n.select(p),k=o(M,"g","errorbars"),A=o(M,"g","lines"),L=o(M,"g","points"),S=o(M,"g","text");if(a.getComponentMethod("errorbars","plot")(e,k,r,v),!0===w.visible){var O,C;x(M).style("opacity",w.opacity);var D,P,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(D=1,P=_.c2p(0,!0)):"x"===I&&(D=0,P=b.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=M;var E,R,z="",F=[],N=w._prevtrace,j=null,B=null;N&&(z=N._prevRevpath||"",C=N._nextFill,F=N._ownPolygons,j=N._fillsegments,B=N._fillElement);var H,Y,U,V,q,G,W="",Z="",J=[];w._polygons=[];var X=[],K=[],$=i.noop;if(O=w._ownFill,u.hasLines(w)||"none"!==w.fill){C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(H=s.steps(T.shape),Y=s.steps(T.shape.split("").reverse().join(""))):H=Y="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},U=function(e){return Y(e.reverse())},K=c(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),X=new Array(K.length);var Q=0;for(g=0;g0,g=f(e,t,r);(c=a.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");s.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,u=[];i._ownfill&&u.push("_ownFill"),i._nexttrace&&u.push("_nextFill");var c=a.selectAll("g").data(u,l);c.enter().append("g"),c.exit().each((function(e){i[e]=null})).remove(),c.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,c,t),v?(u&&(d=u()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,i)}))}))):c.each((function(r,n){h(e,n,t,r,g,this,i)})),p&&c.exit().remove(),a.selectAll("path:not([d])").remove()}},1560:function(e,t,r){"use strict";var n=r(3028);e.exports=function(e,t){var r,a,i,o,l=e.cd,s=e.xaxis,u=e.yaxis,c=[],f=l[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===t)for(r=0;ra&&(a=c,o=u)}}return a?i(o):l};case"rms":return function(e,t){for(var r=0,a=0,o=0;o":return function(e){return h(e)>f};case">=":return function(e){return h(e)>=f};case"[]":return function(e){var t=h(e);return t>=f[0]&&t<=f[1]};case"()":return function(e){var t=h(e);return t>f[0]&&t=f[0]&&tf[0]&&t<=f[1]};case"][":return function(e){var t=h(e);return t<=f[0]||t>=f[1]};case")(":return function(e){var t=h(e);return tf[1]};case"](":return function(e){var t=h(e);return t<=f[0]||t>f[1]};case")[":return function(e){var t=h(e);return t=f[1]};case"{}":return function(e){return-1!==f.indexOf(h(e))};case"}{":return function(e){return-1===f.indexOf(h(e))}}}(r,i.getDataToCoordFunc(e,t,l,a),d),x={},b={},_=0;p?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(f))},y=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},y=function(e,t){var r=x[e.astr][t];e.get().push(r)}),M(g);for(var w=o(t.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var s=e.styles,u=o.styles=[];if(s)for(i=0;i1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(i=!0),i}},3428:function(e,t,r){var n,a;(function(){var i={version:"3.8.2"},o=[].slice,l=function(e){return o.call(e)},s=self.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(s)try{l(s.documentElement.childNodes)[0].nodeType}catch(e){l=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),s)try{s.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){v.call(this,e,t+"",r)}}function g(e,t){return et?1:e>=t?0:NaN}function y(e){return null===e?NaN:+e}function m(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}i.ascending=g,i.descending=function(e,t){return te?1:t>=e?0:NaN},i.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},i.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},i.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(s-1)},i.deviation=function(){var e=i.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);function _(e){return e.length}i.bisectLeft=b.left,i.bisect=i.bisectRight=b.right,i.bisector=function(e){return x(1===e.length?function(t,r){return g(e(t),r)}:e)},i.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},i.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},i.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var w=Math.abs;function T(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function M(){this._=Object.create(null)}i.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=function(e){for(var t=1;e*t%1;)t*=10;return t}(w(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)=n.length)return t?t.call(r,i):e?i.sort(e):i;for(var s,u,c,f,d=-1,h=i.length,p=n[l++],v=new M;++d=n.length)return e;var r=[],i=a[t++];return e.forEach((function(e,n){r.push({key:e,values:l(n,t)})})),i?r.sort((function(e,t){return i(e.key,t.key)})):r}return r.map=function(e,t){return o(t,e,0)},r.entries=function(e){return l(o(i.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return a[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},i.set=function(e){var t=new E;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},i.event=null,i.requote=function(e){return e.replace(q,"\\$&")};var q=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function W(e){return G(e,K),e}var Z=function(e,t){return t.querySelector(e)},J=function(e,t){return t.querySelectorAll(e)},X=function(e,t){var r=e.matches||e[F(e,"matchesSelector")];return X=function(e,t){return r.call(e,t)},X(e,t)};"function"==typeof Sizzle&&(Z=function(e,t){return Sizzle(e,t)[0]||null},J=Sizzle,X=Sizzle.matchesSelector),i.selection=function(){return i.select(s.documentElement)};var K=i.selection.prototype=[];function $(e){return"function"==typeof e?e:function(){return Z(e,this)}}function Q(e){return"function"==typeof e?e:function(){return J(e,this)}}K.select=function(e){var t,r,n,a,i=[];e=$(e);for(var o=-1,l=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},K.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node();return(e=i.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},K.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=ie(e)).length,a=-1;if(t=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},K.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,a));var s=xe.get(e);function u(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return s&&(e=s,o=_e),a?t?function(){var a=o(t,l(arguments));u.call(this),this.addEventListener(e,this[n]=a,a.$=r),a._=t}:u:t?j:function(){var t,r=new RegExp("^__on([^.]+)"+i.requote(e)+"$");for(var n in this)if(t=n.match(r)){var a=this[n];this.removeEventListener(t[1],a,a.$),delete this[n]}}}i.selection.enter=ge,i.selection.enter.prototype=ye,ye.append=K.append,ye.empty=K.empty,ye.node=K.node,ye.call=K.call,ye.size=K.size,ye.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l=n&&(n=t+1);!(o=l[n])&&++n1?Ie:e<-1?-Ie:Math.asin(e)}function Fe(e){return((e=Math.exp(e))+1/e)/2}var Ne=Math.SQRT2;i.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],u=t[2],c=l-a,f=s-i,d=c*c+f*f;if(d0&&(e=e.transition().duration(v)),e.call(w.event)}function L(){l&&l.domain(o.range().map((function(e){return(e-d.x)/d.k})).map(o.invert)),f&&f.domain(u.range().map((function(e){return(e-d.y)/d.k})).map(u.invert))}function S(e){g++||e({type:"zoomstart"})}function O(e){L(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function C(e){--g||(e({type:"zoomend"}),t=null)}function D(){var e=this,t=_.of(e,arguments),r=0,n=i.select(c(e)).on(m,(function(){r=1,k(i.mouse(e),a),O(t)})).on(x,(function(){n.on(m,null).on(x,null),o(r),C(t)})),a=T(i.mouse(e)),o=Me(e);Xa.call(e),S(t)}function P(){var e,t=this,r=_.of(t,arguments),n={},o=0,l=".zoom-"+i.event.changedTouches[0].identifier,s="touchmove"+l,u="touchend"+l,c=[],f=i.select(t),h=Me(t);function p(){var r=i.touches(t);return e=d.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=T(e))})),r}function v(){var e=i.event.target;i.select(e).on(s,g).on(u,m),c.push(e);for(var r=i.event.changedTouches,l=0,f=r.length;l1){y=h[0];var x=h[1],b=y[0]-x[0],_=y[1]-x[1];o=b*b+_*_}}function g(){var l,s,u,c,f=i.touches(t);Xa.call(t);for(var d=0,h=f.length;d360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new it(i(e+120),i(e),i(e-120))}function Ge(e,t,r){return this instanceof Ge?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof Ge?new Ge(e.h,e.c,e.l):function(e,t,r){return e>0?new Ge(Math.atan2(r,t)*Re,Math.sqrt(t*t+r*r),e):new Ge(NaN,NaN,e)}(e instanceof Je?e.l:(e=dt((e=i.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ge(e,t,r)}Ve.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ue(this.h,this.s,this.l/e)},Ve.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ue(this.h,this.s,e*this.l)},Ve.rgb=function(){return qe(this.h,this.s,this.l)},i.hcl=Ge;var We=Ge.prototype=new Ye;function Ze(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Je(r,Math.cos(e*=Ee)*t,Math.sin(e)*t)}function Je(e,t,r){return this instanceof Je?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Je?new Je(e.l,e.a,e.b):e instanceof Ge?Ze(e.h,e.c,e.l):dt((e=it(e)).r,e.g,e.b):new Je(e,t,r)}We.brighter=function(e){return new Ge(this.h,this.c,Math.min(100,this.l+Xe*(arguments.length?e:1)))},We.darker=function(e){return new Ge(this.h,this.c,Math.max(0,this.l-Xe*(arguments.length?e:1)))},We.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},i.lab=Je;var Xe=18,Ke=.95047,$e=1,Qe=1.08883,et=Je.prototype=new Ye;function tt(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new it(at(3.2404542*(a=rt(a)*Ke)-1.5371385*(n=rt(n)*$e)-.4985314*(i=rt(i)*Qe)),at(-.969266*a+1.8760108*n+.041556*i),at(.0556434*a-.2040259*n+1.0572252*i))}function rt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function nt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function at(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function it(e,t,r){return this instanceof it?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof it?new it(e.r,e.g,e.b):ct(""+e,it,qe):new it(e,t,r)}function ot(e){return new it(e>>16,e>>8&255,255&e)}function lt(e){return ot(e)+""}et.brighter=function(e){return new Je(Math.min(100,this.l+Xe*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Je(Math.max(0,this.l-Xe*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},i.rgb=it;var st=it.prototype=new Ye;function ut(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ct(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(pt(a[0]),pt(a[1]),pt(a[2]))}return(i=vt.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function ft(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t0&&s<1?0:n),new Ue(n,a,s)}function dt(e,t,r){var n=nt((.4124564*(e=ht(e))+.3575761*(t=ht(t))+.1804375*(r=ht(r)))/Ke),a=nt((.2126729*e+.7151522*t+.072175*r)/$e);return Je(116*a-16,500*(n-a),200*(a-nt((.0193339*e+.119192*t+.9503041*r)/Qe)))}function ht(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}st.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(a,u)}catch(e){return void o.error.call(a,e)}o.load.call(a,e)}else o.error.call(a,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(e){var t=i.event;i.event=e;try{o.progress.call(a,u)}finally{i.event=t}},a.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",a)},a.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",a):t},a.responseType=function(e){return arguments.length?(c=e,a):c},a.response=function(e){return r=e,a},["get","post"].forEach((function(e){a[e]=function(){return a.send.apply(a,[e].concat(l(arguments)))}})),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),u.open(r,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),u.setRequestHeader)for(var l in s)u.setRequestHeader(l,s[l]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=i&&a.on("error",i).on("load",(function(e){i(null,e)})),o.beforesend.call(a,u),u.send(null==n?null:n),a},a.abort=function(){return u.abort(),a},i.rebind(a,o,"on"),null==n?a:a.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}vt.forEach((function(e,t){vt.set(e,ot(t))})),i.functor=gt,i.xhr=yt(R),i.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=mt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a=s)return o;if(a)return a=!1,i;var t=u;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(wt),wt=setTimeout(kt,t)),_t=0):(_t=1,Tt(kt))}function At(){for(var e=Date.now(),t=xt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Lt(){for(var e,t=xt,r=1/0;t;)t.c?(t.t1&&(t=e[i[o-2]],r=e[i[o-1]],n=e[l],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Dt(e,t){return e[0]-t[0]||e[1]-t[1]}i.timer=function(){Mt.apply(this,arguments)},i.timer.flush=function(){At(),Lt()},i.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},i.geom={},i.geom.hull=function(e){var t=St,r=Ot;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=gt(t),i=gt(r),o=e.length,l=[],s=[];for(n=0;n=0;--n)h.push(e[l[u[n]][2]]);for(n=+f;nSe)l=l.L;else{if(!((a=i-Jt(l,o))>Se)){n>-Se?(t=l.P,r=l):a>-Se?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=Vt(e);if(Nt.insert(t,s),t||r){if(t===r)return er(t),r=Vt(t.site),Nt.insert(s,r),s.edge=r.edge=nr(t.site,s.site),Qt(t),void Qt(r);if(r){er(t),er(r);var u=t.site,c=u.x,f=u.y,d=e.x-c,h=e.y-f,p=r.site,v=p.x-c,g=p.y-f,y=2*(d*g-h*v),m=d*d+h*h,x=v*v+g*g,b={x:(g*m-h*x)/y+c,y:(d*x-v*m)/y+f};ar(r.edge,u,p,b),s.edge=nr(u,e,null,b),r.edge=nr(e,p,null,b),Qt(t),Qt(r)}else s.edge=nr(t.site,s.site)}}function Zt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,u=s-t;if(!u)return l;var c=l-n,f=1/i-1/u,d=c/u;return f?(-d+Math.sqrt(d*d-2*f*(c*c/(-2*u)-s+u/2+a-i/2)))/f+n:(n+l)/2}function Jt(e,t){var r=e.N;if(r)return Zt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Xt(e){this.site=e,this.edges=[]}function Kt(e,t){return t.angle-e.angle}function $t(){lr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Qt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,u=n.y-l,c=i.x-o,f=2*(s*(g=i.y-l)-u*c);if(!(f>=-Oe)){var d=s*s+u*u,h=c*c+g*g,p=(g*d-u*h)/f,v=(s*h-c*d)/f,g=v+l,y=Yt.pop()||new $t;y.arc=e,y.site=a,y.x=p+o,y.y=g+Math.sqrt(p*p+v*v),y.cy=g,e.circle=y;for(var m=null,x=Bt._;x;)if(y.y=l)return;if(d>p){if(i){if(i.y>=u)return}else i={x:g,y:s};r={x:g,y:u}}else{if(i){if(i.y1)if(d>p){if(i){if(i.y>=u)return}else i={x:(s-a)/n,y:s};r={x:(u-a)/n,y:u}}else{if(i){if(i.y=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x0)){if(t/=d,d<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=a-s,d||!(t<0)){if(t/=d,d<0){if(t>f)return;t>c&&(c=t)}else if(d>0){if(t0)){if(t/=h,h<0){if(t0){if(t>f)return;t>c&&(c=t)}if(t=i-u,h||!(t<0)){if(t/=h,h<0){if(t>f)return;t>c&&(c=t)}else if(h>0){if(t0&&(e.a={x:s+c*d,y:u+c*h}),f<1&&(e.b={x:s+f*d,y:u+f*h}),e}}}}}),s=o.length;s--;)(!tr(t=o[s],e)||!l(t)||w(t.a.x-t.b.x)Se||w(a-r)>Se)&&(l.splice(o,0,new ir((y=i.site,m=c,x=w(n-f)Se?{x:f,y:w(t-f)Se?{x:w(r-p)Se?{x:d,y:w(t-d)Se?{x:w(r-h)=r&&u.x<=a&&u.y>=n&&u.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Se)*Se,y:Math.round(a(e,t)/Se)*Se,i:t}}))}return o.links=function(e){return fr(l(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return fr(l(e)).cells.forEach((function(r,n){for(var a,i,o,l,s=r.site,u=r.edges.sort(Kt),c=-1,f=u.length,d=u[f-1].edge,h=d.l===s?d.r:d.l;++ci&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:xr(r,n)})),i=wr.lastIndex;return iv&&(v=s.x),s.y>g&&(g=s.y),u.push(s.x),c.push(s.y);else for(f=0;fv&&(v=x),b>g&&(g=b),u.push(x),c.push(b)}var _=v-h,T=g-p;function M(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,u=e.y;if(null!=s)if(w(s-r)+w(u-n)<.01)k(e,t,r,n,a,i,o,l);else{var c=e.point;e.x=e.y=e.point=null,k(e,c,s,u,a,i,o,l),k(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else k(e,t,r,n,a,i,o,l)}function k(e,t,r,n,a,i,o,l){var s=.5*(a+o),u=.5*(i+l),c=r>=s,f=n>=u,d=f<<1|c;e.leaf=!1,c?a=s:o=s,f?i=u:l=u,M(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}_>T?g=p+_:v=h+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(A,e,+y(e,++f),+m(e,f),h,p,v,g)},visit:function(e){gr(e,A,h,p,v,g)},find:function(e){return function(e,t,r,n,a,i,o){var l,s=1/0;return function e(u,c,f,d,h){if(!(c>i||f>o||d=_)<<1|t>=b,T=w+4;w=0&&!(r=i.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Ir(e){return 1-Math.cos(e*Ie)}function Er(e){return Math.pow(2,10*(e-1))}function Rr(e){return 1-Math.sqrt(1-e*e)}function zr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Nr(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=Br(a),l=jr(a,i),s=Br(((t=i)[0]+=(n=-l)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]=0?e.slice(0,r):e,a=r>=0?e.slice(r+1):"in";return n=Ar.get(n)||kr,a=Lr.get(a)||R,t=a(n.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},i.interpolateHcl=function(e,t){e=i.hcl(e),t=i.hcl(t);var r=e.h,n=e.c,a=e.l,o=t.h-r,l=t.c-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.c:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Ze(r+o*e,n+l*e,a+s*e)+""}},i.interpolateHsl=function(e,t){e=i.hsl(e),t=i.hsl(t);var r=e.h,n=e.s,a=e.l,o=t.h-r,l=t.s-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.s:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return qe(r+o*e,n+l*e,a+s*e)+""}},i.interpolateLab=function(e,t){e=i.lab(e),t=i.lab(t);var r=e.l,n=e.a,a=e.b,o=t.l-r,l=t.a-n,s=t.b-a;return function(e){return tt(r+o*e,n+l*e,a+s*e)+""}},i.interpolateRound=Fr,i.transform=function(e){var t=s.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new Nr(r?r.matrix:Hr)})(e)},Nr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Hr={a:1,b:0,c:0,d:1,e:0,f:0};function Yr(e){return e.length?e.pop()+",":""}function Ur(e,t){var r=[],n=[];return e=i.transform(e),t=i.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:xr(e[0],t[0])},{i:a-2,x:xr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Yr(r)+"rotate(",null,")")-2,x:xr(e,t)})):t&&r.push(Yr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Yr(r)+"skewX(",null,")")-2,x:xr(e,t)}):t&&r.push(Yr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Yr(r)+"scale(",null,",",null,")");n.push({i:a-4,x:xr(e[0],t[0])},{i:a-2,x:xr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Yr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,a=-1,i=n.length;++a0?r=t:(e.c=null,e.t=NaN,e=null,s.end({type:"end",alpha:r=0})):t>0&&(s.start({type:"start",alpha:r=t}),e=Mt(l.tick)),l):r},l.start=function(){var e,t,r,i=y.length,s=m.length,c=u[0],p=u[1];for(e=0;e=0;)r.push(a[n])}function an(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(c=u[s]),c.parent=i,c.depth=i.depth+1;r&&(i.value=0),i.children=u}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return an(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(nn(e,(function(e){e.children&&(e.value=0)})),an(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},i.layout.partition=function(){var e=i.layout.hierarchy(),t=[1,1];function r(e,t,n,a){var i=e.children;if(e.x=t,e.y=e.depth*a,e.dx=n,e.dy=a,i&&(o=i.length)){var o,l,s,u=-1;for(n=e.value?n/e.value:0;++ul&&(l=n),o.push(n)}for(r=0;ra&&(n=r,a=t);return n}function xn(e){return e.reduce(bn,0)}function bn(e,t){return e+t[1]}function _n(e,t){return wn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function wn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function Tn(e){return[i.min(e),i.max(e)]}function Mn(e,t){return e.value-t.value}function kn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function An(e,t){e._pack_next=t,t._pack_prev=e}function Ln(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function Sn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,u=1/0,c=-1/0,f=1/0,d=-1/0;if(t.forEach(On),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(Pn(r,n,a=t[2]),x(a),kn(r,a),r._pack_prev=a,kn(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=f[0]&&s<=f[1]&&((l=u[i.bisect(d,s,1,p)-1]).y+=v,l.push(a[o]));return u}return a.value=function(e){return arguments.length?(t=e,a):t},a.range=function(e){return arguments.length?(r=gt(e),a):r},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return wn(t,e)}:gt(e),a):n},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},i.layout.pack=function(){var e,t=i.layout.hierarchy().sort(Mn),r=0,n=[1,1];function a(a,i){var o=t.call(this,a,i),l=o[0],s=n[0],u=n[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,an(l,(function(e){e.r=+c(e.value)})),an(l,Sn),r){var f=r*(e?1:Math.max(2*l.r/s,2*l.r/u))/2;an(l,(function(e){e.r+=f})),an(l,Sn),an(l,(function(e){e.r-=f}))}return Dn(l,s/2,u/2,e?1:1/Math.max(2*l.r/s,2*l.r/u)),o}return a.size=function(e){return arguments.length?(n=e,a):n},a.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,a):e},a.padding=function(e){return arguments.length?(r=+e,a):r},rn(a,t)},i.layout.tree=function(){var e=i.layout.hierarchy().sort(null).value(null),t=In,r=[1,1],n=null;function a(a,i){var u=e.call(this,a,i),c=u[0],f=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var a,i=t.children,o=0,l=i.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var v=t(d,h)/2-d.x,g=r[0]/(h.x+t(h,d)/2+v),y=r[1]/(p.depth||1);nn(c,(function(e){e.x=(e.x+v)*g,e.y=e.depth*y}))}return u}function o(e){var r=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(r.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(r[0].z+r[r.length-1].z)/2;a?(e.z=a.z+t(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+t(e._,a._));e.parent.A=function(e,r,n){if(r){for(var a,i=e,o=e,l=r,s=i.parent.children[0],u=i.m,c=o.m,f=l.m,d=s.m;l=Rn(l),i=En(i),l&&i;)s=En(s),(o=Rn(o)).a=e,(a=l.z+f-i.z-u+t(l._,i._))>0&&(zn(Fn(l,e,n),e,a),u+=a,c+=a),f+=l.m,u+=i.m,d+=s.m,c+=o.m;l&&!Rn(o)&&(o.t=l,o.m+=f-c),i&&!En(s)&&(s.t=i,s.m+=u-d,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=r[0],e.y=e.depth*r[1]}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e)?s:null,a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:s,a):n?r:null},rn(a,e)},i.layout.cluster=function(){var e=i.layout.hierarchy().sort(null).value(null),t=In,r=[1,1],n=!1;function a(a,o){var l,s=e.call(this,a,o),u=s[0],c=0;an(u,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+i.max(e,(function(e){return e.y}))}(r)):(e.x=l?c+=t(e,l):0,e.y=0,l=e)}));var f=Nn(u),d=jn(u),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return an(u,n?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),s}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e),a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null!=(r=e),a):n?r:null},rn(a,e)},i.layout.treemap=function(){var e,t=i.layout.hierarchy(),r=Math.round,n=[1,1],a=null,o=Bn,l=!1,s="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var r,n,a=-1,i=e.length;++a0;)l.push(r=u[a-1]),l.area+=r.area,"squarify"!==s||(n=h(l,v))<=d?(u.pop(),d=n):(l.area-=l.pop().area,p(l,v,i,!1),v=Math.min(i.dx,i.dy),l.length=l.area=0,d=1/0);l.length&&(p(l,v,i,!0),l.length=l.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(c(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(p(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(d)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++oa&&(a=r));return t*=t,(n*=n)?Math.max(t*a*u/n,n/(t*i*u)):1/0}function p(e,t,n,a){var i,o=-1,l=e.length,s=n.x,u=n.y,c=t?r(e.area/t):0;if(t==n.dx){for((a||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=i.random.normal.apply(i,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=i.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Zn:Vn,s=n?qr:Vr;return a=o(e,t,s,r),i=o(t,e,s,Tr),l}function l(e){return a(e)}return l.invert=function(e){return i(e)},l.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},l.range=function(e){return arguments.length?(t=e,o()):t},l.rangeRound=function(e){return l.range(e).interpolate(Fr)},l.clamp=function(e){return arguments.length?(n=e,o()):n},l.interpolate=function(e){return arguments.length?(r=e,o()):r},l.ticks=function(t){return Qn(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return Kn(e,t),o()},l.copy=function(){return Jn(e,t,r,n)},o()}function Xn(e,t){return i.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Kn(e,t){return qn(e,Gn($n(e,t)[2])),qn(e,Gn($n(e,t)[2])),e}function $n(e,t){null==t&&(t=10);var r=Yn(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function Qn(e,t){return i.range.apply(i,$n(e,t))}function ea(e,t,r,n){function a(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function i(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(a(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(a)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(a)),o):t},o.nice=function(){var t=qn(n.map(a),r?Math:ta);return e.domain(t),n=t.map(i),o},o.ticks=function(){var e=Yn(n),o=[],l=e[0],s=e[1],u=Math.floor(a(l)),c=Math.ceil(a(s)),f=t%1?2:t;if(isFinite(c-u)){if(r){for(;u0;d--)o.push(i(u)*d);for(u=0;o[u]s;c--);o=o.slice(u,c)}return o},o.copy=function(){return ea(e.copy(),t,r,n)},Xn(o,e)}i.scale.linear=function(){return Jn([0,1],[0,1],Tr,!1)},i.scale.log=function(){return ea(i.scale.linear().domain([0,1]),10,!0,[1,10])};var ta={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ra(e,t,r){var n=na(t),a=na(1/t);function i(t){return e(n(t))}return i.invert=function(t){return a(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),i):r},i.ticks=function(e){return Qn(r,e)},i.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},i.nice=function(e){return i.domain(Kn(r,e))},i.exponent=function(o){return arguments.length?(n=na(t=o),a=na(1/t),e.domain(r.map(n)),i):t},i.copy=function(){return ra(e.copy(),t,r)},Xn(i,e)}function na(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function aa(e,t){var r,n,a;function o(a){return n[((r.get(a)||("range"===t.t?r.set(a,e.push(a)):NaN))-1)%n.length]}function l(t,r){return i.range(e.length).map((function(e){return t+r*e}))}return o.domain=function(n){if(!arguments.length)return e;e=[],r=new M;for(var a,i=-1,l=n.length;++i0?r[n-1]:e[0],nf?0:1;if(u=Pe)return s(u,h)+(l?s(l,1-h):"")+"Z";var p,v,g,y,m,x,b,_,w,T,M,k,A=0,L=0,S=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===pa?Math.sqrt(l*l+u*u):+n.apply(this,arguments),h||(L*=-1),u&&(L=ze(g/u*Math.sin(y))),l&&(A=ze(g/l*Math.sin(y)))),u){m=u*Math.cos(c+L),x=u*Math.sin(c+L),b=u*Math.cos(f-L),_=u*Math.sin(f-L);var O=Math.abs(f-c-2*L)<=Ce?0:1;if(L&&ba(m,x,b,_)===h^O){var C=(c+f)/2;m=u*Math.cos(C),x=u*Math.sin(C),b=_=null}}else m=x=0;if(l){w=l*Math.cos(f-A),T=l*Math.sin(f-A),M=l*Math.cos(c+A),k=l*Math.sin(c+A);var D=Math.abs(c-f+2*A)<=Ce?0:1;if(A&&ba(w,T,M,k)===1-h^D){var P=(c+f)/2;w=l*Math.cos(P),T=l*Math.sin(P),M=k=null}}else w=T=0;if(d>Se&&(p=Math.min(Math.abs(u-l)/2,+r.apply(this,arguments)))>.001){v=l0?0:1}function _a(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,u=-l*i,c=e[0]+s,f=e[1]+u,d=t[0]+s,h=t[1]+u,p=(c+d)/2,v=(f+h)/2,g=d-c,y=h-f,m=g*g+y*y,x=r-n,b=c*h-d*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-b*b)),w=(b*y-g*_)/m,T=(-b*g-y*_)/m,M=(b*y+g*_)/m,k=(-b*g+y*_)/m,A=w-p,L=T-v,S=M-p,O=k-v;return A*A+L*L>S*S+O*O&&(w=M,T=k),[[w-s,T-u],[w*r/x,T*r/x]]}function wa(){return!0}function Ta(e){var t=St,r=Ot,n=wa,a=ka,i=a.key,o=.7;function l(i){var l,s=[],u=[],c=-1,f=i.length,d=gt(t),h=gt(r);function p(){s.push("M",a(e(u),o))}for(;++c1&&a.push("H",n[0]),a.join("")},"step-before":La,"step-after":Sa,basis:Da,"basis-open":function(e){if(e.length<4)return ka(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(Pa(Ra,i)+","+Pa(Ra,o)),--n;++n9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n);for(l=-1;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function ka(e){return e.length>1?e.join("L"):e+"Z"}function Aa(e){return e.join("L")+"Z"}function La(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var u=2;uCe)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=gt(e),i):r},i.source=function(t){return arguments.length?(e=gt(t),i):e},i.target=function(e){return arguments.length?(t=gt(e),i):t},i.startAngle=function(e){return arguments.length?(n=gt(e),i):n},i.endAngle=function(e){return arguments.length?(a=gt(e),i):a},i},i.svg.diagonal=function(){var e=Ba,t=Ha,r=Ua;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=gt(t),n):e},n.target=function(e){return arguments.length?(t=gt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},i.svg.diagonal.radial=function(){var e=i.svg.diagonal(),t=Ua,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Ie;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},i.svg.symbol=function(){var e=qa,t=Va;function r(r,n){return(Wa.get(e.call(this,r,n))||Ga)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=gt(t),r):e},r.size=function(e){return arguments.length?(t=gt(e),r):t},r};var Wa=i.map({circle:Ga,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ja)),r=t*Ja;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Za),r=t*Za/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Za),r=t*Za/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});i.svg.symbolTypes=Wa.keys();var Za=Math.sqrt(3),Ja=Math.tan(30*Ee);K.transition=function(e){for(var t,r,n=Qa||++ri,a=ii(e),i=[],o=ei||{time:Date.now(),ease:Pr,delay:0,duration:250},l=-1,s=this.length;++l0;)u[--d].call(e,o);if(i>=1)return f.event&&f.event.end.call(e,e.__data__,t),--c.count?delete c[n]:delete e[r],1}f||(i=a.time,o=Mt((function(e){var t=f.delay;if(o.t=t+i,t<=e)return d(e-t);o.c=d}),0,i),f=c[n]={tween:new M,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++c.count)}ti.call=K.call,ti.empty=K.empty,ti.node=K.node,ti.size=K.size,i.transition=function(e,t){return e&&e.transition?Qa?e.transition(t):e:i.selection().transition(e)},i.transition.prototype=ti,ti.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=$(e);for(var l=-1,s=this.length;++lrect,.s>rect").attr("width",o[1]-o[0])}function v(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var f,g,y=this,m=i.select(i.event.target),x=r.of(y,arguments),b=i.select(y),_=m.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,M=m.classed("extent"),k=Me(y),A=i.mouse(y),L=i.select(c(y)).on("keydown.brush",(function(){32==i.event.keyCode&&(M||(f=null,A[0]-=o[1],A[1]-=l[1],M=2),Y())})).on("keyup.brush",(function(){32==i.event.keyCode&&2==M&&(A[0]+=o[1],A[1]+=l[1],M=0,Y())}));if(i.event.changedTouches?L.on("touchmove.brush",C).on("touchend.brush",P):L.on("mousemove.brush",C).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),M)A[0]=o[0]-A[0],A[1]=l[0]-A[1];else if(_){var S=+/w$/.test(_),O=+/^n/.test(_);g=[o[1-S]-A[0],l[1-O]-A[1]],A[0]=o[S],A[1]=l[O]}else i.event.altKey&&(f=A.slice());function C(){var e=i.mouse(y),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),M||(i.event.altKey?(f||(f=[(o[0]+o[1])/2,(l[0]+l[1])/2]),A[0]=o[+(e[0]>2],i+=n[(3&r[t])<<4|r[t+1]>>4],i+=n[(15&r[t+1])<<2|r[t+2]>>6],i+=n[63&r[t+2]];return a%3==2?i=i.substring(0,i.length-1)+"=":a%3==1&&(i=i.substring(0,i.length-2)+"=="),i},l=function(e){var t,r,n,i,o,l=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(l--,"="===e[e.length-2]&&l--);var c=new ArrayBuffer(l),f=new Uint8Array(c);for(t=0;t>4,f[u++]=(15&n)<<4|i>>2,f[u++]=(3&i)<<6|63&o;return c}},7624:function(e,t,r){"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{E9:function(){return d},SO:function(){return v}});var a,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new l({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function l(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,t){var r=n(e,t);if(!r)return e+"";var a=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}o.prototype=l.prototype,l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,t){var r=n(e,t);if(!r)return e+"";var i=r[0],o=r[1],l=o-(a=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+n(e,Math.max(0,t+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var f,d,h=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(e){var t,r,i=void 0===e.grouping||void 0===e.thousands?c:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var a=e.length,i=[],o=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),i.push(e.substring(a-=l,a+l)),!((s+=l+1)>n));)l=t[o=(o+1)%t.length];return i.reverse().join(r)}),l=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",f=void 0===e.decimal?".":e.decimal+"",d=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),v=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",y=void 0===e.nan?"NaN":e.nan+"";function m(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,c=e.symbol,h=e.zero,m=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var T="$"===c?l:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===c?s:/[%p]/.test(w)?v:"",k=u[w],A=/[defgprs%]/.test(w);function L(e){var o,l,s,u=T,c=M;if("c"===w)c=k(e)+c,e="";else{var v=(e=+e)<0||1/e<0;if(e=isNaN(e)?y:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),v&&0==+e&&"+"!==n&&(v=!1),u=(v?"("===n?n:g:"-"===n||"("===n?"":n)+u,c=("s"===w?p[8+a/3]:"")+c+(v&&"("===n?")":""),A)for(o=-1,l=e.length;++o(s=e.charCodeAt(o))||s>57){c=(46===s?f+e.slice(o+1):e.slice(o))+c,e=e.slice(0,o);break}}x&&!h&&(e=i(e,1/0));var L=u.length+e.length+c.length,S=L>1)+u+e+c+S.slice(L);break;default:e=S+u+e+c}return d(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),L.toString=function(){return e+""},L}return{format:m,formatPrefix:function(e,t){var r,a=m(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),l=Math.pow(10,-i),s=p[8+i/3];return function(e){return a(l*e)+s}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=f.format,f.formatPrefix},4336:function(e,t,r){"use strict";r.d(t,{Yn:function(){return p},m_:function(){return d},E9:function(){return v}});var n=r(8208),a=r(8931),i=r(6192),o=r(8936),l=r(2171),s=r(3528);function u(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function c(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function f(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function d(e){var t=e.dateTime,r=e.date,l=e.time,s=e.periods,d=e.days,h=e.shortDays,p=e.months,v=e.shortMonths,y=w(s),m=T(s),x=w(d),b=T(d),_=w(h),Le=T(h),Se=w(p),Oe=T(p),Ce=w(v),De=T(v),Pe={a:function(e){return h[e.getDay()]},A:function(e){return d[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:V,e:V,f:J,H:q,I:G,j:W,L:Z,m:X,M:K,p:function(e){return s[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ke,s:Ae,S:$,u:Q,U:ee,V:te,w:re,W:ne,x:null,X:null,y:ae,Y:ie,Z:oe,"%":Me},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return d[e.getUTCDay()]},b:function(e){return v[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:le,e:le,f:de,H:se,I:ue,j:ce,L:fe,m:he,M:pe,p:function(e){return s[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ke,s:Ae,S:ve,u:ge,U:ye,V:me,w:xe,W:be,x:null,X:null,y:_e,Y:we,Z:Te,"%":Me},Ee={a:function(e,t,r){var n=_.exec(t.slice(r));return n?(e.w=Le[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Ce.exec(t.slice(r));return n?(e.m=De[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Se.exec(t.slice(r));return n?(e.m=Oe[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Fe(e,t,r,n)},d:E,e:E,f:B,H:z,I:z,j:R,L:j,m:I,M:F,p:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.p=m[n[0].toLowerCase()],r+n[0].length):-1},q:P,Q:Y,s:U,S:N,u:k,U:A,V:L,w:M,W:S,x:function(e,t,n){return Fe(e,r,t,n)},X:function(e,t,r){return Fe(e,l,t,r)},y:C,Y:O,Z:D,"%":H};function Re(e,t){return function(r){var n,a,i,o=[],l=-1,s=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in d||(d.w=1),"Z"in d?(s=(l=c(f(d.y,0,1))).getUTCDay(),l=s>4||0===s?n.ot.ceil(l):(0,n.ot)(l),l=a.c.offset(l,7*(d.V-1)),d.y=l.getUTCFullYear(),d.m=l.getUTCMonth(),d.d=l.getUTCDate()+(d.w+6)%7):(s=(l=u(f(d.y,0,1))).getDay(),l=s>4||0===s?i.qT.ceil(l):(0,i.qT)(l),l=o.c.offset(l,7*(d.V-1)),d.y=l.getFullYear(),d.m=l.getMonth(),d.d=l.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),s="Z"in d?c(f(d.y,0,1)).getUTCDay():u(f(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+7*d.W-(s+5)%7:d.w+7*d.U-(s+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,c(d)):u(d)}}function Fe(e,t,r,n){for(var a,i,o=0,l=t.length,s=r.length;o=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Ee[a in g?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return Pe.x=Re(r,Pe),Pe.X=Re(l,Pe),Pe.c=Re(t,Pe),Ie.x=Re(r,Ie),Ie.X=Re(l,Ie),Ie.c=Re(t,Ie),{format:function(e){var t=Re(e+="",Pe);return t.toString=function(){return e},t},parse:function(e){var t=ze(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Re(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=ze(e+="",!0);return t.toString=function(){return e},t}}}var h,p,v,g={"-":"",_:" ",0:"0"},y=/^\s*\d+/,m=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i68?1900:2e3),r+n[0].length):-1}function D(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function P(e,t,r){var n=y.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function I(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function E(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function R(e,t,r){var n=y.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function z(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function F(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function j(e,t,r){var n=y.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function B(e,t,r){var n=y.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function H(e,t,r){var n=m.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Y(e,t,r){var n=y.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function U(e,t,r){var n=y.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function V(e,t){return b(e.getDate(),t,2)}function q(e,t){return b(e.getHours(),t,2)}function G(e,t){return b(e.getHours()%12||12,t,2)}function W(e,t){return b(1+o.c.count((0,l.c)(e),e),t,3)}function Z(e,t){return b(e.getMilliseconds(),t,3)}function J(e,t){return Z(e,t)+"000"}function X(e,t){return b(e.getMonth()+1,t,2)}function K(e,t){return b(e.getMinutes(),t,2)}function $(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(i.uU.count((0,l.c)(e)-1,e),t,2)}function te(e,t){var r=e.getDay();return e=r>=4||0===r?(0,i.kD)(e):i.kD.ceil(e),b(i.kD.count((0,l.c)(e),e)+(4===(0,l.c)(e).getDay()),t,2)}function re(e){return e.getDay()}function ne(e,t){return b(i.qT.count((0,l.c)(e)-1,e),t,2)}function ae(e,t){return b(e.getFullYear()%100,t,2)}function ie(e,t){return b(e.getFullYear()%1e4,t,4)}function oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function le(e,t){return b(e.getUTCDate(),t,2)}function se(e,t){return b(e.getUTCHours(),t,2)}function ue(e,t){return b(e.getUTCHours()%12||12,t,2)}function ce(e,t){return b(1+a.c.count((0,s.c)(e),e),t,3)}function fe(e,t){return b(e.getUTCMilliseconds(),t,3)}function de(e,t){return fe(e,t)+"000"}function he(e,t){return b(e.getUTCMonth()+1,t,2)}function pe(e,t){return b(e.getUTCMinutes(),t,2)}function ve(e,t){return b(e.getUTCSeconds(),t,2)}function ge(e){var t=e.getUTCDay();return 0===t?7:t}function ye(e,t){return b(n.EV.count((0,s.c)(e)-1,e),t,2)}function me(e,t){var r=e.getUTCDay();return e=r>=4||0===r?(0,n.yA)(e):n.yA.ceil(e),b(n.yA.count((0,s.c)(e),e)+(4===(0,s.c)(e).getUTCDay()),t,2)}function xe(e){return e.getUTCDay()}function be(e,t){return b(n.ot.count((0,s.c)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function we(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Te(){return"+0000"}function Me(){return"%"}function ke(e){return+e}function Ae(e){return Math.floor(+e/1e3)}h=d({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"]}),p=h.format,h.parse,v=h.utcFormat,h.utcParse},8936:function(e,t,r){"use strict";r.d(t,{m:function(){return o}});var n=r(1628),a=r(9792),i=(0,n.c)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.iy)/a.SK}),(function(e){return e.getDate()-1}));t.c=i;var o=i.range},9792:function(e,t,r){"use strict";r.d(t,{KK:function(){return l},SK:function(){return o},cg:function(){return i},iy:function(){return a},yc:function(){return n}});var n=1e3,a=6e4,i=36e5,o=864e5,l=6048e5},3220:function(e,t,r){"use strict";r.r(t),r.d(t,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return m.iB},timeFridays:function(){return m.sJ},timeHour:function(){return v},timeHours:function(){return g},timeInterval:function(){return n.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return o},timeMinute:function(){return d},timeMinutes:function(){return h},timeMonday:function(){return m.qT},timeMondays:function(){return m.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return m.Wc},timeSaturdays:function(){return m.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return m.uU},timeSundays:function(){return m.Ab},timeThursday:function(){return m.kD},timeThursdays:function(){return m.eC},timeTuesday:function(){return m.Mf},timeTuesdays:function(){return m.Oc},timeWednesday:function(){return m.eg},timeWednesdays:function(){return m.sn},timeWeek:function(){return m.uU},timeWeeks:function(){return m.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return O.c},utcDays:function(){return O.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return L},utcHours:function(){return S},utcMillisecond:function(){return i},utcMilliseconds:function(){return o},utcMinute:function(){return M},utcMinutes:function(){return k},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return P},utcMonths:function(){return I},utcSaturday:function(){return C.Ad},utcSaturdays:function(){return C.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return C.EV},utcSundays:function(){return C.Wq},utcThursday:function(){return C.yA},utcThursdays:function(){return C.ob},utcTuesday:function(){return C.sG},utcTuesdays:function(){return C.kl},utcWednesday:function(){return C._6},utcWednesdays:function(){return C.W_},utcWeek:function(){return C.EV},utcWeeks:function(){return C.Wq},utcYear:function(){return E.c},utcYears:function(){return E.i}});var n=r(1628),a=(0,n.c)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,n.c)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):a:null};var i=a,o=a.range,l=r(9792),s=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*l.yc)}),(function(e,t){return(t-e)/l.yc}),(function(e){return e.getUTCSeconds()})),u=s,c=s.range,f=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.yc)}),(function(e,t){e.setTime(+e+t*l.iy)}),(function(e,t){return(t-e)/l.iy}),(function(e){return e.getMinutes()})),d=f,h=f.range,p=(0,n.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.yc-e.getMinutes()*l.iy)}),(function(e,t){e.setTime(+e+t*l.cg)}),(function(e,t){return(t-e)/l.cg}),(function(e){return e.getHours()})),v=p,g=p.range,y=r(8936),m=r(6192),x=(0,n.c)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),b=x,_=x.range,w=r(2171),T=(0,n.c)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*l.iy)}),(function(e,t){return(t-e)/l.iy}),(function(e){return e.getUTCMinutes()})),M=T,k=T.range,A=(0,n.c)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l.cg)}),(function(e,t){return(t-e)/l.cg}),(function(e){return e.getUTCHours()})),L=A,S=A.range,O=r(8931),C=r(8208),D=(0,n.c)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),P=D,I=D.range,E=r(3528)},1628:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=new Date,a=new Date;function i(e,t,r,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t0))return o;do{o.push(i=new Date(+r)),t(r,a),e(r)}while(i=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(l.count=function(t,i){return n.setTime(+t),a.setTime(+i),e(n),e(a),Math.floor(r(n,a))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e==0}:function(t){return l.count(0,t)%e==0}):l:null}),l}},8931:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(1628),a=r(9792),i=(0,n.c)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/a.SK}),(function(e){return e.getUTCDate()-1}));t.c=i;var o=i.range},8208:function(e,t,r){"use strict";r.d(t,{Ad:function(){return d},EV:function(){return o},K8:function(){return x},W_:function(){return g},Wq:function(){return h},_6:function(){return u},iG:function(){return m},iO:function(){return p},kl:function(){return v},ob:function(){return y},od:function(){return f},ot:function(){return l},sG:function(){return s},yA:function(){return c}});var n=r(1628),a=r(9792);function i(e){return(0,n.c)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/a.KK}))}var o=i(0),l=i(1),s=i(2),u=i(3),c=i(4),f=i(5),d=i(6),h=o.range,p=l.range,v=s.range,g=u.range,y=c.range,m=f.range,x=d.range},3528:function(e,t,r){"use strict";r.d(t,{i:function(){return i}});var n=r(1628),a=(0,n.c)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.c)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null},t.c=a;var i=a.range},6192:function(e,t,r){"use strict";r.d(t,{Ab:function(){return h},Mf:function(){return s},Oc:function(){return v},QP:function(){return p},Wc:function(){return d},aI:function(){return x},eC:function(){return y},eg:function(){return u},iB:function(){return f},kD:function(){return c},qT:function(){return l},sJ:function(){return m},sn:function(){return g},uU:function(){return o}});var n=r(1628),a=r(9792);function i(e){return(0,n.c)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.iy)/a.KK}))}var o=i(0),l=i(1),s=i(2),u=i(3),c=i(4),f=i(5),d=i(6),h=o.range,p=l.range,v=s.range,g=u.range,y=c.range,m=f.range,x=d.range},2171:function(e,t,r){"use strict";r.d(t,{Q:function(){return i}});var n=r(1628),a=(0,n.c)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.c)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},t.c=a;var i=a.range},1252:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var a,i,o,u;if(l(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=s(e))>0&&o.length>a&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=c.bind(n);return a.listener=r,n.wrapFn=a,a}function d(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)n(s,this,t);else{var u=s.length,c=p(s,u);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8248:function(e,t,r){"use strict";var n=r(4576);e.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0==(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},2408:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15];return e[0]=l*(d*y-h*g)-f*(s*y-u*g)+v*(s*h-u*d),e[1]=-(n*(d*y-h*g)-f*(a*y-i*g)+v*(a*h-i*d)),e[2]=n*(s*y-u*g)-l*(a*y-i*g)+v*(a*u-i*s),e[3]=-(n*(s*h-u*d)-l*(a*h-i*d)+f*(a*u-i*s)),e[4]=-(o*(d*y-h*g)-c*(s*y-u*g)+p*(s*h-u*d)),e[5]=r*(d*y-h*g)-c*(a*y-i*g)+p*(a*h-i*d),e[6]=-(r*(s*y-u*g)-o*(a*y-i*g)+p*(a*u-i*s)),e[7]=r*(s*h-u*d)-o*(a*h-i*d)+c*(a*u-i*s),e[8]=o*(f*y-h*v)-c*(l*y-u*v)+p*(l*h-u*f),e[9]=-(r*(f*y-h*v)-c*(n*y-i*v)+p*(n*h-i*f)),e[10]=r*(l*y-u*v)-o*(n*y-i*v)+p*(n*u-i*l),e[11]=-(r*(l*h-u*f)-o*(n*h-i*f)+c*(n*u-i*l)),e[12]=-(o*(f*g-d*v)-c*(l*g-s*v)+p*(l*d-s*f)),e[13]=r*(f*g-d*v)-c*(n*g-a*v)+p*(n*d-a*f),e[14]=-(r*(l*g-s*v)-o*(n*g-a*v)+p*(n*s-a*l)),e[15]=r*(l*d-s*f)-o*(n*d-a*f)+c*(n*s-a*l),e}},6860:function(e){e.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},4492:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4212:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},800:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],g=e[15];return(t*o-r*i)*(f*g-d*v)-(t*l-n*i)*(c*g-d*p)+(t*s-a*i)*(c*v-f*p)+(r*l-n*o)*(u*g-d*h)-(r*s-a*o)*(u*v-f*h)+(n*s-a*l)*(u*p-c*h)}},1784:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,u=r*o,c=n*o,f=n*l,d=a*o,h=a*l,p=a*s,v=i*o,g=i*l,y=i*s;return e[0]=1-f-p,e[1]=c+y,e[2]=d-g,e[3]=0,e[4]=c-y,e[5]=1-u-p,e[6]=h+v,e[7]=0,e[8]=d+g,e[9]=h-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},1616:function(e){e.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(o*=u=1/u,l*=u,s*=u,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},1944:function(e){e.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,u=i+i,c=n*l,f=n*s,d=n*u,h=a*s,p=a*u,v=i*u,g=o*l,y=o*s,m=o*u;return e[0]=1-(h+v),e[1]=f+m,e[2]=d-y,e[3]=0,e[4]=f-m,e[5]=1-(c+v),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(c+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},9444:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8268:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},1856:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},9216:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},7736:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8848:function(e){e.exports=function(e,t,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),u=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}},6635:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6524:function(e,t,r){e.exports={create:r(4212),clone:r(6860),copy:r(4492),identity:r(6635),transpose:r(6520),invert:r(4308),adjoint:r(2408),determinant:r(800),multiply:r(944),translate:r(5176),scale:r(8152),rotate:r(16),rotateX:r(5456),rotateY:r(4840),rotateZ:r(4192),fromRotation:r(1616),fromRotationTranslation:r(1944),fromScaling:r(9444),fromTranslation:r(8268),fromXRotation:r(1856),fromYRotation:r(9216),fromZRotation:r(7736),fromQuat:r(1784),frustum:r(8848),perspective:r(1296),perspectiveFromFieldOfView:r(3688),ortho:r(7688),lookAt:r(6508),str:r(9412)}},4308:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=r*l-n*o,x=r*s-a*o,b=r*u-i*o,_=n*s-a*l,w=n*u-i*l,T=a*u-i*s,M=c*v-f*p,k=c*g-d*p,A=c*y-h*p,L=f*g-d*v,S=f*y-h*v,O=d*y-h*g,C=m*O-x*S+b*L+_*A-w*k+T*M;return C?(C=1/C,e[0]=(l*O-s*S+u*L)*C,e[1]=(a*S-n*O-i*L)*C,e[2]=(v*T-g*w+y*_)*C,e[3]=(d*w-f*T-h*_)*C,e[4]=(s*A-o*O-u*k)*C,e[5]=(r*O-a*A+i*k)*C,e[6]=(g*b-p*T-y*x)*C,e[7]=(c*T-d*b+h*x)*C,e[8]=(o*S-l*A+u*M)*C,e[9]=(n*A-r*S-i*M)*C,e[10]=(p*w-v*b+y*m)*C,e[11]=(f*b-c*w-h*m)*C,e[12]=(l*k-o*L-s*M)*C,e[13]=(r*L-n*k+a*M)*C,e[14]=(v*x-p*_-g*m)*C,e[15]=(c*_-f*x+d*m)*C,e):null}},6508:function(e,t,r){var n=r(6635);e.exports=function(e,t,r,a){var i,o,l,s,u,c,f,d,h,p,v=t[0],g=t[1],y=t[2],m=a[0],x=a[1],b=a[2],_=r[0],w=r[1],T=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(y-T)<1e-6?n(e):(f=v-_,d=g-w,h=y-T,i=x*(h*=p=1/Math.sqrt(f*f+d*d+h*h))-b*(d*=p),o=b*(f*=p)-m*h,l=m*d-x*f,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0),s=d*l-h*o,u=h*i-f*l,c=f*o-d*i,(p=Math.sqrt(s*s+u*u+c*c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=o,e[5]=u,e[6]=d,e[7]=0,e[8]=l,e[9]=c,e[10]=h,e[11]=0,e[12]=-(i*v+o*g+l*y),e[13]=-(s*v+u*g+c*y),e[14]=-(f*v+d*g+h*y),e[15]=1,e)}},944:function(e){e.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],g=t[13],y=t[14],m=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*f+w*v,e[1]=x*a+b*s+_*d+w*g,e[2]=x*i+b*u+_*h+w*y,e[3]=x*o+b*c+_*p+w*m,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*f+w*v,e[5]=x*a+b*s+_*d+w*g,e[6]=x*i+b*u+_*h+w*y,e[7]=x*o+b*c+_*p+w*m,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*f+w*v,e[9]=x*a+b*s+_*d+w*g,e[10]=x*i+b*u+_*h+w*y,e[11]=x*o+b*c+_*p+w*m,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*f+w*v,e[13]=x*a+b*s+_*d+w*g,e[14]=x*i+b*u+_*h+w*y,e[15]=x*o+b*c+_*p+w*m,e}},7688:function(e){e.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*u,e[15]=1,e}},1296:function(e){e.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},3688:function(e){e.exports=function(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},16:function(e){e.exports=function(e,t,r,n){var a,i,o,l,s,u,c,f,d,h,p,v,g,y,m,x,b,_,w,T,M,k,A,L,S=n[0],O=n[1],C=n[2],D=Math.sqrt(S*S+O*O+C*C);return Math.abs(D)<1e-6?null:(S*=D=1/D,O*=D,C*=D,a=Math.sin(r),o=1-(i=Math.cos(r)),l=t[0],s=t[1],u=t[2],c=t[3],f=t[4],d=t[5],h=t[6],p=t[7],v=t[8],g=t[9],y=t[10],m=t[11],x=S*S*o+i,b=O*S*o+C*a,_=C*S*o-O*a,w=S*O*o-C*a,T=O*O*o+i,M=C*O*o+S*a,k=S*C*o+O*a,A=O*C*o-S*a,L=C*C*o+i,e[0]=l*x+f*b+v*_,e[1]=s*x+d*b+g*_,e[2]=u*x+h*b+y*_,e[3]=c*x+p*b+m*_,e[4]=l*w+f*T+v*M,e[5]=s*w+d*T+g*M,e[6]=u*w+h*T+y*M,e[7]=c*w+p*T+m*M,e[8]=l*k+f*A+v*L,e[9]=s*k+d*A+g*L,e[10]=u*k+h*A+y*L,e[11]=c*k+p*A+m*L,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5456:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=l*a+f*n,e[7]=s*a+d*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-l*n,e[11]=d*a-s*n,e}},4840:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],u=t[8],c=t[9],f=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=l*a-f*n,e[3]=s*a-d*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=l*n+f*a,e[11]=s*n+d*a,e}},4192:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],u=t[4],c=t[5],f=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=l*a+f*n,e[3]=s*a+d*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-l*n,e[7]=d*a-s*n,e}},8152:function(e){e.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},9412:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},5176:function(e){e.exports=function(e,t,r){var n,a,i,o,l,s,u,c,f,d,h,p,v=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*v+t[4]*g+t[8]*y+t[12],e[13]=t[1]*v+t[5]*g+t[9]*y+t[13],e[14]=t[2]*v+t[6]*g+t[10]*y+t[14],e[15]=t[3]*v+t[7]*g+t[11]*y+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],u=t[6],c=t[7],f=t[8],d=t[9],h=t[10],p=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=u,e[7]=c,e[8]=f,e[9]=d,e[10]=h,e[11]=p,e[12]=n*v+l*g+f*y+t[12],e[13]=a*v+s*g+d*y+t[13],e[14]=i*v+u*g+h*y+t[14],e[15]=o*v+c*g+p*y+t[15]),e}},6520:function(e){e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},2264:function(e,t,r){"use strict";var n,a=r(1820);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:a,e.exports=n},9184:function(e,t,r){"use strict";var n=r(1820);e.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},1820:function(e){e.exports=!0},4576:function(e){"use strict";e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},9128:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,l=(a=r)===window||a===document||a===document.body?t:a.getBoundingClientRect();return n[0]=i-l.left,n[1]=o-l.top,n}},8324:function(e,t,r){var n,a,i,o;a="Promise",o=function(){"use strict";var e,t,r,n=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function i(e,n){r.add(e,n),t||(t=a(r.drain))}function o(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e0&&i(l,r))}catch(e){c.call(new d(r),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(l,t))}function f(e,t,r,n){for(var a=0;a2&&(a.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==t[o])return i.unshift(r),a.push(i);if(i.lengthi!=h>i&&a<(d-c)*(i-f)/(h-f)+c&&(o=!o)}return o}},4756:function(e,t,r){var n,a=r(2928),i=r(8648),o=r(9819),l=r(1403),s=r(2368),u=r(7792),c=!1,f=i();function d(e,t,r){var a=n.segments(e),i=n.segments(t),o=r(n.combine(a,i));return n.polygon(o)}n={buildLog:function(e){return!0===e?c=a():!1===e&&(c=!1),!1!==c&&c.list},epsilon:function(e){return f.epsilon(e)},segments:function(e){var t=o(!0,f,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,f,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:s.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:s.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:s.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:s.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:s.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:l(e.segments,f,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return u.toPolygon(n,e)},polygonToGeoJSON:function(e){return u.fromPolygon(n,f,e)},union:function(e,t){return d(e,t,n.selectUnion)},intersect:function(e,t){return d(e,t,n.selectIntersect)},difference:function(e,t){return d(e,t,n.selectDifference)},differenceRev:function(e,t){return d(e,t,n.selectDifferenceRev)},xor:function(e,t){return d(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),e.exports=n},2928:function(e){e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},8648:function(e){e.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var a=r[0],i=r[1],o=n[0],l=n[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-a>e&&(i-u)*(a-c)/(o-c)+u-n>e&&(l=!l),i=u,o=c}return l}};return t}},7792:function(e){var t={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a0}))}function c(e,n){var a=e.seg,i=n.seg,o=a.start,l=a.end,u=i.start,c=i.end;r&&r.checkIntersection(a,i);var f=t.linesIntersect(o,l,u,c);if(!1===f){if(!t.pointsCollinear(o,l,u))return!1;if(t.pointsSame(o,c)||t.pointsSame(l,u))return!1;var d=t.pointsSame(o,u),h=t.pointsSame(l,c);if(d&&h)return n;var p=!d&&t.pointBetween(o,u,c),v=!h&&t.pointBetween(l,u,c);if(d)return v?s(n,l):s(e,c),n;p&&(h||(v?s(n,l):s(e,c)),s(n,o))}else 0===f.alongA&&(-1===f.alongB?s(e,u):0===f.alongB?s(e,f.pt):1===f.alongB&&s(e,c)),0===f.alongB&&(-1===f.alongA?s(n,o):0===f.alongA?s(n,f.pt):1===f.alongA&&s(n,l));return!1}for(var f=[];!i.isEmpty();){var d=i.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var h=u(d),p=h.before?h.before.ev:null,v=h.after?h.after.ev:null;function g(){if(p){var e=c(d,p);if(e)return e}return!!v&&c(d,v)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!v&&v.seg);var y,m,x=g();if(x&&(e?(m=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(x.seg),d.other.remove(),d.remove()),i.getHead()!==d){r&&r.rewind(d.seg);continue}e?(m=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=v?v.seg.myFill.above:a,d.seg.myFill.above=m?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(y=v?d.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:d.primary?o:a,d.seg.otherFill={above:y,below:y}),r&&r.status(d.seg,!!p&&p.seg,!!v&&v.seg),d.other.status=h.insert(n.node({ev:d}))}else{var b=d.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(b.prev)&&l.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}f.push(d.seg)}i.getHead().remove()}return r&&r.done(),f}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],s=0;s1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,f,h),p=!0,v="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=P(s),{ok:p,format:e.format||v,r:u(255,c(l.r,0)),g:u(255,c(l.g,0)),b:u(255,c(l.b,0)),a:s}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=s(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=r.ok,this._tc_id=l++}function h(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,a,i=c(e,t,r),o=u(e,t,r),l=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=l>.5?s/(2-i-o):s/(i+o),i){case e:n=(t-r)/s+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(d(n));return i}function O(e,t){t=t||6;for(var r=d(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(d({h:n,s:a,v:i})),i=(i+l)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),n=s(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),n=s(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return v(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[z(s(e).toString(16)),z(s(t).toString(16)),z(s(r).toString(16)),z(N(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*I(this._r,255))+"%",g:s(100*I(this._g,255))+"%",b:s(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%)":"rgba("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=d(e);r="#"+g(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,r){r=0===r?0:r||50;var n=d(e).toRgb(),a=d(t).toRgb(),i=r/100;return d({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},d.readability=function(e,t){var r=d(e),n=d(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},d.isReadable=function(e,t,r){var n,a,i,o,l,s=d.readability(e,t);switch(a=!1,(i=r,o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase(),l=(i.size||"small").toLowerCase(),"AA"!==o&&"AAA"!==o&&(o="AA"),"small"!==l&&"large"!==l&&(l="small"),n={level:o,size:l}).level+n.size){case"AAsmall":case"AAAlarge":a=s>=4.5;break;case"AAlarge":a=s>=3;break;case"AAAsmall":a=s>=7}return a},d.mostReadable=function(e,t,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;us&&(s=n,l=d(t[u]));return d.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],r))};var C=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=d.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(C);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function E(e){return u(1,c(0,e))}function R(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function N(e){return a.round(255*parseFloat(e)).toString(16)}function j(e){return R(e)/255}var B,H,Y,U=(H="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",Y="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+Y),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+Y),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+Y),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(n=function(){return d}.call(t,r,t,e))||(e.exports=n)}(Math)},7020:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(s);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),l=d[o-d[0]],s=l>>9&4095,u=l>>5&15,c=31&l;(a=i.newDate(s,u,c)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(f/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=f[e-f[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,l,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,r,n,a){var i,o,l;if("object"==typeof e)o=e,i=t||{};else{var s;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i={}),o={year:e,month:t,day:r,isIntercalary:s}}l=o.day-1;var u,c=f[o.year-f[0]],h=c>>13;u=h&&(o.month>h||o.isIntercalary)?o.month:o.month-1;for(var p=0;p>9&4095,(v>>5&15)-1,(31&v)+l);return i.year=g.getFullYear(),i.month=1+g.getMonth(),i.day=g.getDate(),i}(e,l,r,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){var a,i;if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i={}}var o=d[a.year-d[0]],l=a.year<<9|a.month<<5|a.day;i.year=l>=o?a.year:a.year-1,o=d[i.year-d[0]];var s,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(a.year,a.month-1,a.day);s=Math.round((c-u)/864e5);var h,p=f[i.year-f[0]];for(h=0;h<13;h++){var v=p&1<<12-h?30:29;if(s>13;return!g||h=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},2787:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},2084:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},6368:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},4747:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),n.calendars.julian=i},5616:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function l(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[l(20+(e-=this.jdEpoch),20),l(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},632:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},3040:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var u=e-(l>9||9===l&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=r,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*l-110)/2816)+365*(l-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),l=o(n,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*r+474;s=s<=0?s-1:s;var u=e-this.toJD(s,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(s,c,1)+1;return this.newDate(s,c,f)}}),n.calendars.persian=i,n.calendars.jalali=i},9075:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},4592:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},5348:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,u=t-o[r-1]+1;return this.newDate(l,s,u)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},8700:function(e,t,r){var n=r(896);function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function l(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(l.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var u=e.exports=new a;u.cdate=i,u.baseCalendar=l,u.calendars.gregorian=s},5168:function(e,t,r){var n=r(896),a=r(8700);n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,s=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,d=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;_+n1}),h=function(e,t,r,n){var a=""+t;if(d(e,n))for(;a.length1},x=function(e,r){var n=m(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=t.substring(k).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){m("m");var e=s.call(b,t.substring(k));return k+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=m(e,i)?n:r,l=0;l-1){h=1,p=v;for(var S=this.daysInMonth(d,h);p>S;S=this.daysInMonth(d,h))h++,p-=S}return f>-1?this.fromJD(f):this.newDate(d,h,p)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(3472)}()},e.exports=t()}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=[["235","102","59"],["46","145","229"],["225","95","153"],["28","167","28"],["167","119","241"],["182","129","0"],["134","42","22"],["0","160","139"],["175","0","56"],["108","124","50"],["81","28","251"],["218","22","255"],["98","0","66"],["251","0","209"],["252","0","128"],["119","138","174"],["22","22","167"],["218","96","202"]],t=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t<0&&(t*=-1),"rgba(".concat(e[t%e.length].join(","),", ").concat(r,")")},n=r(809),a=r(543),i=r.n(a),o=r(420),l=r.n(o);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function v(e,t,r,n,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,a)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){v(i,n,a,o,l,"next",e)}function l(e){v(i,n,a,o,l,"throw",e)}o(void 0)}))}}var y="assets/data/clustering",m={showticklabels:!1,showgrid:!1,zeroline:!1,title:{text:"The 🍷 FineWeb dataset, clustered and annotated with educational score labels",font:{size:16,style:"italic"}},range:[5,15.6461]},x={showticklabels:!1,showgrid:!1,zeroline:!1,range:[0,8.5]},b=function(e,t){var r;return"Text: ".concat(e.text,"
Label: ").concat(null!==(r=t[e.label])&&void 0!==r?r:"Unknown","
Edu label: ").concat(e.eduScore)};function _(e){var t=e.reduce((function(e,t){return e[t]=(e[t]||0)+1,e}),{}),r=Object.entries(t).sort((function(e,t){return t[1]-e[1]})).map((function(e){return e[0]})),n={};return r.forEach((function(e,t){n[e]=t})),n}var w=function(){var e=g(p().mark((function e(t){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(t);case 2:return e.abrupt("return",e.sent.filter((function(e){return-1!=parseInt(e.cluster_id)})).map((function(e){return{x:parseFloat(e.cluster_position_x),y:parseFloat(e.cluster_position_y),label:parseInt(e.cluster_id),text:e.cluster_summaries}})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e){return e.map((function(e){return d({showarrow:!1,font:{size:14,color:"black",weight:"bold"},bgcolor:t(e.label,.6),borderpad:2},e)}))},M=function(e,t,r,n,a){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:15;return e.filter((function(e){return e.x>=t&&e.x<=r&&e.y>=n&&e.y<=a})).sort((function(e,t){return e.ord-t.ord})).slice(0,i)},k=function(e){return{x0:Math.min.apply(Math,u(e.map((function(e){return e.x})))),x1:Math.max.apply(Math,u(e.map((function(e){return e.x})))),y0:Math.min.apply(Math,u(e.map((function(e){return e.y})))),y1:Math.max.apply(Math,u(e.map((function(e){return e.y}))))}},A=function(){var e=g(p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O("".concat(y,"/data.csv"));case 2:return e.abrupt("return",e.sent.map((function(e){return{x:parseFloat(e.X),y:parseFloat(e.Y),eduScore:parseFloat(e.edu_labels),label:parseInt(e.cluster_labels),text:e.content_display}})));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(e){var t=e.querySelector("img");console.log(t),t.remove()};function S(){return(S=g(p().mark((function e(){var r,n,a,o,s,u,c,f,h,v,g,S;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=document.getElementById("clusters-plot"),e.next=3,A();case 3:return n=e.sent,a=_(n.map((function(e){return e.label}))),e.t0=T,e.next=8,w("".concat(y,"/info.csv"));case 8:e.t1=e.sent,o=(0,e.t0)(e.t1).map((function(e){return d(d({},e),{},{ord:a[e.label]})})),s=o.reduce((function(e,t){return e[t.label]=t.text,e}),{}),u=[{type:"scatter",mode:"markers",x:n.map((function(e){return e.x})),y:n.map((function(e){return e.y})),marker:{color:n.map((function(e){return t(e.label,.4)})),size:5.5},hoverinfo:"text",hovertext:n.map((function(e){return b(e,s)})),hoverlabel:{bgcolor:"white"}}],c=k(n),f=c.x0,h=c.x1,v=c.y0,g=c.y1,S={height:550,width:r.clientWidth,xaxis:m,yaxis:x,annotations:M(o,m.range[0],m.range[1],x.range[0],x.range[1]),font:{family:"apple-system, Arial, sans-serif"},margin:{t:0,b:50,l:0,r:0}},L(r),l().newPlot(r,u,S),r.on("plotly_relayout",(function(e){if(console.log(e),e["xaxis.range[0]"]){var t=[e["xaxis.range[0]"],e["xaxis.range[1]"]],n=t[0],a=t[1],s=[e["yaxis.range[0]"],e["yaxis.range[1]"]],u=s[0],c=s[1],d=M(o,n,a,u,c);console.log(f,h,v,g);var p=Math.min((h-f)/(a-n),(g-v)/(c-u))/1.2;l().update(r,{"marker.size":5.5*p},{annotations:d})}else if(e["xaxis.autorange"]||e["xaxis.range"]){var y=M(o,f,h,v,g),b=i().merge({},m,{range:[f,h]}),_=i().merge({},x,{range:[v,g]});l().update(r,{"marker.size":5.5},{annotations:y,xaxis:b,yaxis:_})}})),window.addEventListener("resize",(function(){window.innerWidth<768||l().relayout(r,{width:r.offsetWidth})}));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=function(){var e=g(p().mark((function e(t){var r,a,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.text();case 5:return a=e.sent,i=(0,n.parse)(a,{header:!0,skipEmptyLines:!0}),e.abrupt("return",i.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function D(){D=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),l=new P(n||[]);return a(o,"_invoke",{value:A(e,r,l)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",g={};function y(){}function m(){}function x(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(I([])));w&&w!==r&&n.call(w,o)&&(b=w);var T=x.prototype=y.prototype=Object.create(b);function M(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(a,i,o,l){var s=f(e[a],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==C(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,l)}))}l(s.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function A(t,r,n){var a=d;return function(i,o){if(a===p)throw Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var l=n.delegate;if(l){var s=L(l,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===d)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=p;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?v:h,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=v,n.method="throw",n.arg=u.arg)}}}function L(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){u=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}(e,t)||F(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=F(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw i}}}}function E(e,t,r,n,a,i,o){try{var l=e[i](o),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,a)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){E(i,n,a,o,l,"next",e)}function l(e){E(i,n,a,o,l,"throw",e)}o(void 0)}))}}function z(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1){var l=document.createElement("label");l.textContent="Metric:",(o=document.createElement("select")).innerHTML=i.map((function(e){return'")})).join(""),o.value=r.defaultMetric;var s=document.createElement("div");s.classList.add("plotly_input_container"),s.appendChild(l),s.appendChild(o),a.appendChild(s)}var u=void 0;if(null!==r.slider){var c=document.createElement("label");c.textContent="Rolling window:",(u=document.createElement("input")).type="range",u.min=r.slider.min,u.max=r.slider.max,u.value=r.slider.default;var f=document.createElement("span");f.textContent=u.value,u.addEventListener("input",(function(){f.textContent=u.value}));var d=document.createElement("div");d.classList.add("plotly_slider"),d.appendChild(u),d.appendChild(f);var h=document.createElement("div");h.classList.add("plotly_input_container"),h.appendChild(c),h.appendChild(d),a.appendChild(h)}return{dropdown:o,slider:u,plot:n}},J=function(e,t){if(0===t)return e;for(var r=[],n=t;n