diff --git a/docs/Frontend_overview.svg b/docs/Frontend_overview.svg index cf6750703..dd470bd4f 100644 --- a/docs/Frontend_overview.svg +++ b/docs/Frontend_overview.svg @@ -1,3 +1,3 @@ -
<HTTP request>
Login credentials
(username, pass)
[Not supported by viewer]
<websockets>
Subscriptions
Commands
[Not supported by viewer]
Frontend
Frontend
<HTTP response>
Token
<HTTP response><br>Token
<websockets>
Data
Cmd Acks
[Not supported by viewer]
Manager
Manager
Server Side
(LSST Servers)
[Not supported by viewer]
Client Side
(Client Browser)
[Not supported by viewer]
\ No newline at end of file +
<HTTP request>
Login credentials
(username, pass)
<HTTP request>...
<websockets>
Subscriptions
<websockets>...
Frontend
Frontend
<HTTP response>
Token
<HTTP response>...
<websockets>
Events & Telemetries
<websockets>...
Manager
Manager
Server Side
(LSST Servers)
Server Side...
Client Side
(Client Browser)
Client Side...
<HTTP request>
Commands
<HTTP request>...
<HTTP response>
Commands ack
<HTTP response>...
<HTTP request/response>
UI Framework Views
SAL Info
<HTTP request/response>...
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/docs/asset-manifest.json b/docs/asset-manifest.json index b3b6003ab..8695f6e80 100644 --- a/docs/asset-manifest.json +++ b/docs/asset-manifest.json @@ -1,28 +1,31 @@ { "files": { - "main.css": "/static/css/main.f1a0019b.chunk.css", - "main.js": "/build/main.98f1ed5e.js", + "main.css": "/static/css/main.da8110f3.chunk.css", + "main.js": "/build/main.b3548170.js", "runtime-main.js": "/build/bundle.e2439c58.js", "static/css/2.ee241de9.chunk.css": "/static/css/2.ee241de9.chunk.css", - "build/2.f48525ee.js": "/build/2.f48525ee.js", + "build/2.7e38024c.js": "/build/2.7e38024c.js", "Frontend_overview.svg": "/Frontend_overview.svg", - "build/2.f48525ee.js.LICENSE.txt": "/build/2.f48525ee.js.LICENSE.txt", + "build/2.7e38024c.js.LICENSE.txt": "/build/2.7e38024c.js.LICENSE.txt", "details.svg": "/details.svg", "index.html": "/index.html", - "precache-manifest.9ea304bc0afdc49ab503b923e9031493.js": "/precache-manifest.9ea304bc0afdc49ab503b923e9031493.js", + "precache-manifest.301f93ba7ce01fda2330726a75eff62d.js": "/precache-manifest.301f93ba7ce01fda2330726a75eff62d.js", + "redux-auth.drawio": "/redux-auth.drawio", + "redux-auth.svg": "/redux-auth.svg", "redux-script-validation.svg": "/redux-script-validation.svg", + "redux-ws-connection.drawio": "/redux-ws-connection.drawio", "redux-ws-connection.svg": "/redux-ws-connection.svg", "responsive-grid-state-machine.svg": "/responsive-grid-state-machine.svg", "service-worker.js": "/service-worker.js", "static/css/2.ee241de9.chunk.css.map": "/static/css/2.ee241de9.chunk.css.map", - "static/css/main.f1a0019b.chunk.css.map": "/static/css/main.f1a0019b.chunk.css.map", - "static/media/index.css": "/static/media/AvenirLTStd-Light.0b78ec9d.otf" + "static/css/main.da8110f3.chunk.css.map": "/static/css/main.da8110f3.chunk.css.map", + "static/media/index.css": "/static/media/Montserrat-ThinItalic.3c2b290f.ttf" }, "entrypoints": [ "build/bundle.e2439c58.js", "static/css/2.ee241de9.chunk.css", - "build/2.f48525ee.js", - "static/css/main.f1a0019b.chunk.css", - "build/main.98f1ed5e.js" + "build/2.7e38024c.js", + "static/css/main.da8110f3.chunk.css", + "build/main.b3548170.js" ] } \ No newline at end of file diff --git a/docs/build/2.7e38024c.js b/docs/build/2.7e38024c.js new file mode 100644 index 000000000..9f0702b8b --- /dev/null +++ b/docs/build/2.7e38024c.js @@ -0,0 +1,2 @@ +/*! For license information please see 2.7e38024c.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";var a=function(e,t,n){return e.fields=t||[],e.fname=n,e};function r(e){return null==e?null:e.fname}function i(e){return null==e?null:e.fields}var o=function(e){throw Error(e)},s=function(e){var t,n,a,r=[],i=null,s=0,u=e.length,d="";function c(){r.push(d+e.substring(t,n)),d="",t=n+1}for(e+="",t=n=0;nt&&c(),s=t=n+1):"]"===a&&(s||o("Access path missing open bracket: "+e),s>0&&c(),s=0,t=n+1):n>t?c():t=n+1}return s&&o("Access path missing closing bracket: "+e),i&&o("Access path missing closing quote: "+e),n>t&&(n++,c()),r},u=Array.isArray,d=function(e){return e===Object(e)},c=function(e){return"string"==typeof e};function l(e){return u(e)?"["+e.map(l)+"]":d(e)||c(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}var f=function(e,t){var n=s(e),r="return _["+n.map(l).join("][")+"];";return a(Function("_",r),[e=1===n.length?n[0]:e],t||e)},g=[],h=f("id"),p=a((function(e){return e}),g,"identity"),A=a((function(){return 0}),g,"zero"),v=a((function(){return 1}),g,"one"),m=a((function(){return!0}),g,"true"),y=a((function(){return!1}),g,"false");function R(e,t,n){var a=[t].concat([].slice.call(n));console[e].apply(console,a)}var b=function(e,t){var n=e||0;return{level:function(e){return arguments.length?(n=+e,this):n},error:function(){return n>=1&&R(t||"error","ERROR",arguments),this},warn:function(){return n>=2&&R(t||"warn","WARN",arguments),this},info:function(){return n>=3&&R(t||"log","INFO",arguments),this},debug:function(){return n>=4&&R(t||"log","DEBUG",arguments),this}}},w=function(e){return"__proto__"!==e};function x(){for(var e=arguments.length,t=new Array(e),n=0;n=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]},q=function(e){return"function"==typeof e},G=function(e,t){var n,r,o,u,d,c,f,g,h,p=[],A=(e=V(e)).map((function(e,t){return null==e?null:(p.push(t),q(e)?e:s(e).map(l).join("]["))})),v=p.length-1,m=V(t),y="var u,v;return ";if(v<0)return null;for(r=0;r<=v;++r)o=A[n=p[r]],q(o)?(u="(u=this."+(c="f"+n)+"(a))",d="(v=this."+c+"(b))",(f=f||{})[c]=o):(u="(u=a["+o+"])",d="(v=b["+o+"])"),c="((v=v instanceof Date?+v:v),(u=u instanceof Date?+u:u))","descending"!==m[n]?(h=1,g=-1):(h=-1,g=1),y+="("+u+"<"+d+"||u==null)&&v!=null?"+g+":(u>v||v==null)&&u!=null?"+h+":"+c+"!==u&&v===v?"+g+":v!==v&&u===u?"+h+(ni&&(i=a))}else{for(a=t(e[o]);oi&&(i=a))}return[r,i]},Z=function(e,t){var n,a,r,i,o,s=-1,u=e.length;if(null==t){for(;++s=a){n=r=a;break}if(s===u)return[-1,-1];for(i=o=s;++sa&&(n=a,i=s),r=a){n=r=a;break}if(s===u)return[-1,-1];for(i=o=s;++sa&&(n=a,i=s),ro&&(r=i,i=o,o=r),a=void 0===a||a,((n=void 0===n||n)?i<=e:ie&&(n=t,t={},a=1),t[r]=i};return r(),{clear:r,has:function(e){return te(t,e)||te(n,e)},get:function(e){return te(t,e)?t[e]:te(n,e)?i(e,n[e]):void 0},set:function(e,n){return te(t,e)?t[e]=n:i(e,n)}}},he=function(e,t,n,a){var r=t.length,i=n.length;if(!i)return t;if(!r)return n;for(var o=a||new t.constructor(r+i),s=0,u=0,d=0;s0?n[u++]:t[s++];for(;s=0;)n+=e;return n},Ae=function(e,t,n,a){var r=n||" ",i=e+"",o=t-i.length;return o<=0?i:"left"===a?pe(r,o)+i:"center"===a?pe(r,~~(o/2))+i+pe(r,Math.ceil(o/2)):i+pe(r,o)},ve=function(e){return e&&k(e)-e[0]||0},me=function(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e)&&!!e};function ye(e){return de(e)||ue(e)?e:Date.parse(e)}var Re=function(e,t){return t=t||ye,null==e||""===e?null:t(e)},be=function(e){return null==e||""===e?null:e+""},we=function(e){for(var t={},n=0,a=e.length;n=n&&tn)return e;if(t<=a&&n>=r)e.splice(i,2);else{if(t>=a&&n=a&&t<=r)e[i+1]=t;else if(n>=a&&n<=r)return e[i]=n+1,e;i+=2}}return e},b=function(e,t){var n,a,r=0,i=null,o=e.length;if(t<0||t>1114111)throw RangeError(u);for(;r=n&&tt)return e.splice(null!=i?i+2:0,0,t,t+1),e;if(t==a)return t+1==e[r+2]?(e.splice(r,4,n,e[r+3]),e):(e[r+1]=t+1,e);i=r,r+=2}return e.push(t,t+1),e},w=function(e,t){for(var n,a,r=0,i=e.slice(),o=t.length;r1114111||n<0||n>1114111)throw RangeError(u);for(var a,r,i=0,o=!1,d=e.length;in)return e;a>=t&&a<=n&&(r>t&&r-1<=n?(e.splice(i,2),i-=2):(e.splice(i-1,2),i-=2))}else{if(a==n+1)return e[i]=t,e;if(a>n)return e.splice(i,0,t,n+1),e;if(t>=a&&t=a&&t=r&&(e[i]=t,e[i+1]=n+1,o=!0)}i+=2}return o||e.push(t,n+1),e},E=function(e,t){var n=0,a=e.length,r=e[n],i=e[a-1];if(a>=2&&(ti))return!1;for(;n=r&&t=40&&e<=43||46==e||47==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+j(e):e>=32&&e<=126?j(e):e<=255?"\\x"+A(v(e),2):"\\u"+A(v(e),4)},T=function(e){return e<=65535?D(e):"\\u{"+e.toString(16).toUpperCase()+"}"},M=function(e){var t=e.length,n=e.charCodeAt(0);return n>=55296&&n<=56319&&t>1?1024*(n-55296)+e.charCodeAt(1)-56320+65536:n},N=function(e){var t,n,a="",r=0,i=e.length;if(C(e))return D(e[0]);for(;r1&&(t=m.call(arguments)),this instanceof e?(this.data=[],t?this.add(t):this):(new e).add(t)};P.version="1.3.3";var L=P.prototype;!function(e,t){var n;for(n in t)l.call(t,n)&&(e[n]=t[n])}(L,{add:function(e){var t=this;return null==e?t:e instanceof P?(t.data=w(t.data,e.data),t):(arguments.length>1&&(e=m.call(arguments)),h(e)?(f(e,(function(e){t.add(e)})),t):(t.data=b(t.data,p(e)?e:M(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof P?(t.data=x(t.data,e.data),t):(arguments.length>1&&(e=m.call(arguments)),h(e)?(f(e,(function(e){t.remove(e)})),t):(t.data=y(t.data,p(e)?e:M(e)),t))},addRange:function(e,t){return this.data=_(this.data,p(e)?e:M(e),p(t)?t:M(t)),this},removeRange:function(e,t){var n=p(e)?e:M(e),a=p(t)?t:M(t);return this.data=R(this.data,n,a),this},intersection:function(e){var t=e instanceof P?O(e.data):e;return this.data=function(e,t){for(var n,a=0,r=t.length,i=[];a=55296&&n<=56319&&(i.push(t,55296),a.push(55296,n+1)),n>=56320&&n<=57343&&(i.push(t,55296),a.push(55296,56320),r.push(56320,n+1)),n>57343&&(i.push(t,55296),a.push(55296,56320),r.push(56320,57344),n<=65535?i.push(57344,n+1):(i.push(57344,65536),o.push(65536,n+1)))):t>=55296&&t<=56319?(n>=55296&&n<=56319&&a.push(t,n+1),n>=56320&&n<=57343&&(a.push(t,56320),r.push(56320,n+1)),n>57343&&(a.push(t,56320),r.push(56320,57344),n<=65535?i.push(57344,n+1):(i.push(57344,65536),o.push(65536,n+1)))):t>=56320&&t<=57343?(n>=56320&&n<=57343&&r.push(t,n+1),n>57343&&(r.push(t,57344),n<=65535?i.push(57344,n+1):(i.push(57344,65536),o.push(65536,n+1)))):t>57343&&t<=65535?n<=65535?i.push(t,n+1):(i.push(t,65536),o.push(65536,n+1)):o.push(t,n+1),s+=2;return{loneHighSurrogates:a,loneLowSurrogates:r,bmp:i,astral:o}}(e),i=r.loneHighSurrogates,o=r.loneLowSurrogates,s=r.bmp,u=r.astral,d=!k(i),c=!k(o),l=U(u);return t&&(s=w(s,i),d=!1,s=w(s,o),c=!1),k(s)||a.push(N(s)),l.length&&a.push(function(e){var t=[];return f(e,(function(e){var n=e[0],a=e[1];t.push(N(n)+N(a))})),t.join("|")}(l)),d&&a.push(N(i)+"(?![\\uDC00-\\uDFFF])"),c&&a.push("(?:[^\\uD800-\\uDBFF]|^)"+N(o)),a.join("|")}(this.data,!!e&&e.bmpOnly,!!e&&e.hasUnicodeFlag);return t?t.replace(d,"\\0$1"):"[]"},toRegExp:function(e){var t=this.toString(e&&-1!=e.indexOf("u")?{hasUnicodeFlag:!0}:null);return RegExp(t,e||"")},valueOf:function(){return O(this.data)}}),L.toArray=L.valueOf,void 0===(r=function(){return P}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(59)(e),n(54))},function(e,t,n){e.exports=n(613)()},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(e,t){for(var n=0;n"']/g,P=RegExp(N.source),L=RegExp(U.source),I=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,q=RegExp(W.source),G=/^\s+|\s+$/g,X=/^\s+/,Y=/\s+$/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ae=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,de=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,le=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ge="\\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",he="["+ge+"]",pe="["+fe+"]",Ae="\\d+",ve="[a-z\\xdf-\\xf6\\xf8-\\xff]",me="[^\\ud800-\\udfff"+ge+Ae+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ye="\\ud83c[\\udffb-\\udfff]",Re="[^\\ud800-\\udfff]",be="(?:\\ud83c[\\udde6-\\uddff]){2}",we="[\\ud800-\\udbff][\\udc00-\\udfff]",xe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",_e="(?:"+ve+"|"+me+")",Ee="(?:"+xe+"|"+me+")",ke="(?:"+pe+"|"+ye+")?",Ce="[\\ufe0e\\ufe0f]?"+ke+"(?:\\u200d(?:"+[Re,be,we].join("|")+")[\\ufe0e\\ufe0f]?"+ke+")*",Oe="(?:"+["[\\u2700-\\u27bf]",be,we].join("|")+")"+Ce,Be="(?:"+[Re+pe+"?",pe,be,we,"[\\ud800-\\udfff]"].join("|")+")",Se=RegExp("['\u2019]","g"),Fe=RegExp(pe,"g"),je=RegExp(ye+"(?="+ye+")|"+Be+Ce,"g"),De=RegExp([xe+"?"+ve+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[he,xe,"$"].join("|")+")",Ee+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[he,xe+_e,"$"].join("|")+")",xe+"?"+_e+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",xe+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,Oe].join("|"),"g"),Te=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["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"],Ue=-1,Pe={};Pe[E]=Pe[k]=Pe[C]=Pe[O]=Pe[B]=Pe[S]=Pe["[object Uint8ClampedArray]"]=Pe[F]=Pe[j]=!0,Pe[u]=Pe[d]=Pe[x]=Pe[c]=Pe[_]=Pe[l]=Pe[f]=Pe[g]=Pe[p]=Pe[A]=Pe[v]=Pe[m]=Pe[y]=Pe[R]=Pe[w]=!1;var Le={};Le[u]=Le[d]=Le[x]=Le[_]=Le[c]=Le[l]=Le[E]=Le[k]=Le[C]=Le[O]=Le[B]=Le[p]=Le[A]=Le[v]=Le[m]=Le[y]=Le[R]=Le[b]=Le[S]=Le["[object Uint8ClampedArray]"]=Le[F]=Le[j]=!0,Le[f]=Le[g]=Le[w]=!1;var Ie={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qe=parseFloat,He=parseInt,ze="object"==typeof e&&e&&e.Object===Object&&e,Ke="object"==typeof self&&self&&self.Object===Object&&self,Ve=ze||Ke||Function("return this")(),We=t&&!t.nodeType&&t,qe=We&&"object"==typeof a&&a&&!a.nodeType&&a,Ge=qe&&qe.exports===We,Xe=Ge&&ze.process,Ye=function(){try{return qe&&qe.require&&qe.require("util").types||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Je=Ye&&Ye.isArrayBuffer,$e=Ye&&Ye.isDate,Ze=Ye&&Ye.isMap,et=Ye&&Ye.isRegExp,tt=Ye&&Ye.isSet,nt=Ye&&Ye.isTypedArray;function at(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function rt(e,t,n,a){for(var r=-1,i=null==e?0:e.length;++r-1}function ct(e,t,n){for(var a=-1,r=null==e?0:e.length;++a-1;);return n}function jt(e,t){for(var n=e.length;n--&&yt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,a=0;n--;)e[n]===t&&++a;return a}var Tt=_t({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Mt=_t({"&":"&","<":"<",">":">",'"':""","'":"'"});function Nt(e){return"\\"+Ie[e]}function Ut(e){return Te.test(e)}function Pt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,a){n[++t]=[a,e]})),n}function Lt(e,t){return function(n){return e(t(n))}}function It(e,t){for(var n=-1,a=e.length,r=0,i=[];++n",""":'"',"'":"'"}),Vt=function e(t){var n,a=(t=null==t?Ve:Vt.defaults(Ve.Object(),t,Vt.pick(Ve,Ne))).Array,r=t.Date,fe=t.Error,ge=t.Function,he=t.Math,pe=t.Object,Ae=t.RegExp,ve=t.String,me=t.TypeError,ye=a.prototype,Re=ge.prototype,be=pe.prototype,we=t["__core-js_shared__"],xe=Re.toString,_e=be.hasOwnProperty,Ee=0,ke=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ce=be.toString,Oe=xe.call(pe),Be=Ve._,je=Ae("^"+xe.call(_e).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=Ge?t.Buffer:void 0,Ie=t.Symbol,ze=t.Uint8Array,Ke=Te?Te.allocUnsafe:void 0,We=Lt(pe.getPrototypeOf,pe),qe=pe.create,Xe=be.propertyIsEnumerable,Ye=ye.splice,At=Ie?Ie.isConcatSpreadable:void 0,_t=Ie?Ie.iterator:void 0,Wt=Ie?Ie.toStringTag:void 0,qt=function(){try{var e=Jr(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Gt=t.clearTimeout!==Ve.clearTimeout&&t.clearTimeout,Xt=r&&r.now!==Ve.Date.now&&r.now,Yt=t.setTimeout!==Ve.setTimeout&&t.setTimeout,Jt=he.ceil,$t=he.floor,Zt=pe.getOwnPropertySymbols,en=Te?Te.isBuffer:void 0,tn=t.isFinite,nn=ye.join,an=Lt(pe.keys,pe),rn=he.max,on=he.min,sn=r.now,un=t.parseInt,dn=he.random,cn=ye.reverse,ln=Jr(t,"DataView"),fn=Jr(t,"Map"),gn=Jr(t,"Promise"),hn=Jr(t,"Set"),pn=Jr(t,"WeakMap"),An=Jr(pe,"create"),vn=pn&&new pn,mn={},yn=_i(ln),Rn=_i(fn),bn=_i(gn),wn=_i(hn),xn=_i(pn),_n=Ie?Ie.prototype:void 0,En=_n?_n.valueOf:void 0,kn=_n?_n.toString:void 0;function Cn(e){if(Ho(e)&&!Fo(e)&&!(e instanceof Fn)){if(e instanceof Sn)return e;if(_e.call(e,"__wrapped__"))return Ei(e)}return new Sn(e)}var On=function(){function e(){}return function(t){if(!Qo(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Bn(){}function Sn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Fn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Xn(e,t,n,a,r,i){var o,s=1&t,d=2&t,f=4&t;if(n&&(o=r?n(e,a,r,i):n(e)),void 0!==o)return o;if(!Qo(e))return e;var w=Fo(e);if(w){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&_e.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return pr(e,o)}else{var D=ei(e),T=D==g||D==h;if(Mo(e))return dr(e,s);if(D==v||D==u||T&&!r){if(o=d||T?{}:ni(e),!s)return d?function(e,t){return Ar(e,Zr(e),t)}(e,function(e,t){return e&&Ar(t,ys(t),e)}(o,e)):function(e,t){return Ar(e,$r(e),t)}(e,Vn(o,e))}else{if(!Le[D])return r?e:{};o=function(e,t,n){var a=e.constructor;switch(t){case x:return cr(e);case c:case l:return new a(+e);case _:return function(e,t){var n=t?cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case E:case k:case C:case O:case B:case S:case"[object Uint8ClampedArray]":case F:case j:return lr(e,n);case p:return new a;case A:case R:return new a(e);case m:return function(e){var t=new e.constructor(e.source,ae.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new a;case b:return function(e){return En?pe(En.call(e)):{}}(e)}}(e,D,s)}}i||(i=new Nn);var M=i.get(e);if(M)return M;i.set(e,o),qo(e)?e.forEach((function(a){o.add(Xn(a,t,n,a,e,i))})):zo(e)&&e.forEach((function(a,r){o.set(r,Xn(a,t,n,r,e,i))}));var N=w?void 0:(f?d?Kr:zr:d?ys:ms)(e);return it(N||e,(function(a,r){N&&(a=e[r=a]),Hn(o,r,Xn(a,t,n,r,e,i))})),o}function Yn(e,t,n){var a=n.length;if(null==e)return!a;for(e=pe(e);a--;){var r=n[a],i=t[r],o=e[r];if(void 0===o&&!(r in e)||!i(o))return!1}return!0}function Jn(e,t,n){if("function"!=typeof e)throw new me(i);return vi((function(){e.apply(void 0,n)}),t)}function $n(e,t,n,a){var r=-1,i=dt,o=!0,s=e.length,u=[],d=t.length;if(!s)return u;n&&(t=lt(t,Ot(n))),a?(i=ct,o=!1):t.length>=200&&(i=St,o=!1,t=new Mn(t));e:for(;++r-1},Dn.prototype.set=function(e,t){var n=this.__data__,a=zn(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this},Tn.prototype.clear=function(){this.size=0,this.__data__={hash:new jn,map:new(fn||Dn),string:new jn}},Tn.prototype.delete=function(e){var t=Xr(this,e).delete(e);return this.size-=t?1:0,t},Tn.prototype.get=function(e){return Xr(this,e).get(e)},Tn.prototype.has=function(e){return Xr(this,e).has(e)},Tn.prototype.set=function(e,t){var n=Xr(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this},Mn.prototype.add=Mn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Mn.prototype.has=function(e){return this.__data__.has(e)},Nn.prototype.clear=function(){this.__data__=new Dn,this.size=0},Nn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Nn.prototype.get=function(e){return this.__data__.get(e)},Nn.prototype.has=function(e){return this.__data__.has(e)},Nn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Dn){var a=n.__data__;if(!fn||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tn(a)}return n.set(e,t),this.size=n.size,this};var Zn=yr(sa),ea=yr(ua,!0);function ta(e,t){var n=!0;return Zn(e,(function(e,a,r){return n=!!t(e,a,r)})),n}function na(e,t,n){for(var a=-1,r=e.length;++a0&&n(s)?t>1?ra(s,t-1,n,a,r):ft(r,s):a||(r[r.length]=s)}return r}var ia=Rr(),oa=Rr(!0);function sa(e,t){return e&&ia(e,t,ms)}function ua(e,t){return e&&oa(e,t,ms)}function da(e,t){return ut(t,(function(t){return Po(e[t])}))}function ca(e,t){for(var n=0,a=(t=ir(t,e)).length;null!=e&&nt}function ha(e,t){return null!=e&&_e.call(e,t)}function pa(e,t){return null!=e&&t in pe(e)}function Aa(e,t,n){for(var r=n?ct:dt,i=e[0].length,o=e.length,s=o,u=a(o),d=1/0,c=[];s--;){var l=e[s];s&&t&&(l=lt(l,Ot(t))),d=on(l.length,d),u[s]=!n&&(t||i>=120&&l.length>=120)?new Mn(s&&l):void 0}l=e[0];var f=-1,g=u[0];e:for(;++f=s?u:u*("desc"==n[a]?-1:1)}return e.index-t.index}(e,t,n)}))}function Fa(e,t,n){for(var a=-1,r=t.length,i={};++a-1;)s!==e&&Ye.call(s,u,1),Ye.call(e,u,1);return e}function Da(e,t){for(var n=e?t.length:0,a=n-1;n--;){var r=t[n];if(n==a||r!==i){var i=r;ri(r)?Ye.call(e,r,1):Ja(e,r)}}return e}function Ta(e,t){return e+$t(dn()*(t-e+1))}function Ma(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=$t(t/2))&&(e+=e)}while(t);return n}function Na(e,t){return mi(fi(e,t,Ks),e+"")}function Ua(e){return Pn(Cs(e))}function Pa(e,t){var n=Cs(e);return bi(n,Gn(t,0,n.length))}function La(e,t,n,a){if(!Qo(e))return e;for(var r=-1,i=(t=ir(t,e)).length,o=i-1,s=e;null!=s&&++ri?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=a(i);++r>>1,o=e[i];null!==o&&!Xo(o)&&(n?o<=t:o=200){var d=t?null:Mr(e);if(d)return Qt(d);o=!1,r=St,u=new Mn}else u=t?[]:s;e:for(;++a=a?e:za(e,t,n)}var ur=Gt||function(e){return Ve.clearTimeout(e)};function dr(e,t){if(t)return e.slice();var n=e.length,a=Ke?Ke(n):new e.constructor(n);return e.copy(a),a}function cr(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function lr(e,t){var n=t?cr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function fr(e,t){if(e!==t){var n=void 0!==e,a=null===e,r=e==e,i=Xo(e),o=void 0!==t,s=null===t,u=t==t,d=Xo(t);if(!s&&!d&&!i&&e>t||i&&o&&u&&!s&&!d||a&&o&&u||!n&&u||!r)return 1;if(!a&&!i&&!d&&e1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,o&&ii(n[0],n[1],o)&&(i=r<3?void 0:i,r=1),t=pe(t);++a-1?r[i?t[o]:o]:void 0}}function Er(e){return Hr((function(t){var n=t.length,a=n,r=Sn.prototype.thru;for(e&&t.reverse();a--;){var o=t[a];if("function"!=typeof o)throw new me(i);if(r&&!s&&"wrapper"==Wr(o))var s=new Sn([],!0)}for(a=s?a:n;++a1&&y.reverse(),l&&ds))return!1;var d=i.get(e),c=i.get(t);if(d&&c)return d==t&&c==e;var l=-1,f=!0,g=2&n?new Mn:void 0;for(i.set(e,t),i.set(t,e);++l-1&&e%1==0&&e1?"& ":"")+t[a],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(a,function(e,t){return it(s,(function(n){var a="_."+n[0];t&n[1]&&!dt(e,a)&&e.push(a)})),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Z):[]}(a),n)))}function Ri(e){var t=0,n=0;return function(){var a=sn(),r=16-(a-n);if(n=a,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bi(e,t){var n=-1,a=e.length,r=a-1;for(t=void 0===t?a:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Vi(e,n)}));function $i(e){var t=Cn(e);return t.__chain__=!0,t}function Zi(e,t){return t(e)}var eo=Hr((function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,r=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&a instanceof Fn&&ri(n)?((a=a.slice(n,+n+(t?1:0))).__actions__.push({func:Zi,args:[r],thisArg:void 0}),new Sn(a,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(r)})),to=vr((function(e,t,n){_e.call(e,n)?++e[n]:Wn(e,n,1)})),no=_r(Bi),ao=_r(Si);function ro(e,t){return(Fo(e)?it:Zn)(e,Gr(t,3))}function io(e,t){return(Fo(e)?ot:ea)(e,Gr(t,3))}var oo=vr((function(e,t,n){_e.call(e,n)?e[n].push(t):Wn(e,n,[t])})),so=Na((function(e,t,n){var r=-1,i="function"==typeof t,o=Do(e)?a(e.length):[];return Zn(e,(function(e){o[++r]=i?at(t,e,n):va(e,t,n)})),o})),uo=vr((function(e,t,n){Wn(e,n,t)}));function co(e,t){return(Fo(e)?lt:Ea)(e,Gr(t,3))}var lo=vr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),fo=Na((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ii(e,t[0],t[1])?t=[]:n>2&&ii(t[0],t[1],t[2])&&(t=[t[0]]),Sa(e,ra(t,1),[])})),go=Xt||function(){return Ve.Date.now()};function ho(e,t,n){return t=n?void 0:t,Ur(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function po(e,t){var n;if("function"!=typeof t)throw new me(i);return e=ts(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Ao=Na((function(e,t,n){var a=1;if(n.length){var r=It(n,qr(Ao));a|=32}return Ur(e,a,t,n,r)})),vo=Na((function(e,t,n){var a=3;if(n.length){var r=It(n,qr(vo));a|=32}return Ur(t,a,e,n,r)}));function mo(e,t,n){var a,r,o,s,u,d,c=0,l=!1,f=!1,g=!0;if("function"!=typeof e)throw new me(i);function h(t){var n=a,i=r;return a=r=void 0,c=t,s=e.apply(i,n)}function p(e){return c=e,u=vi(v,t),l?h(e):s}function A(e){var n=e-d;return void 0===d||n>=t||n<0||f&&e-c>=o}function v(){var e=go();if(A(e))return m(e);u=vi(v,function(e){var n=t-(e-d);return f?on(n,o-(e-c)):n}(e))}function m(e){return u=void 0,g&&a?h(e):(a=r=void 0,s)}function y(){var e=go(),n=A(e);if(a=arguments,r=this,d=e,n){if(void 0===u)return p(d);if(f)return ur(u),u=vi(v,t),h(d)}return void 0===u&&(u=vi(v,t)),s}return t=as(t)||0,Qo(n)&&(l=!!n.leading,o=(f="maxWait"in n)?rn(as(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),y.cancel=function(){void 0!==u&&ur(u),c=0,a=d=r=u=void 0},y.flush=function(){return void 0===u?s:m(go())},y}var yo=Na((function(e,t){return Jn(e,1,t)})),Ro=Na((function(e,t,n){return Jn(e,as(t)||0,n)}));function bo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(i);var n=function n(){var a=arguments,r=t?t.apply(this,a):a[0],i=n.cache;if(i.has(r))return i.get(r);var o=e.apply(this,a);return n.cache=i.set(r,o)||i,o};return n.cache=new(bo.Cache||Tn),n}function wo(e){if("function"!=typeof e)throw new me(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)}}bo.Cache=Tn;var xo=or((function(e,t){var n=(t=1==t.length&&Fo(t[0])?lt(t[0],Ot(Gr())):lt(ra(t,1),Ot(Gr()))).length;return Na((function(a){for(var r=-1,i=on(a.length,n);++r=t})),So=ma(function(){return arguments}())?ma:function(e){return Ho(e)&&_e.call(e,"callee")&&!Xe.call(e,"callee")},Fo=a.isArray,jo=Je?Ot(Je):function(e){return Ho(e)&&fa(e)==x};function Do(e){return null!=e&&Io(e.length)&&!Po(e)}function To(e){return Ho(e)&&Do(e)}var Mo=en||au,No=$e?Ot($e):function(e){return Ho(e)&&fa(e)==l};function Uo(e){if(!Ho(e))return!1;var t=fa(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Vo(e)}function Po(e){if(!Qo(e))return!1;var t=fa(e);return t==g||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Lo(e){return"number"==typeof e&&e==ts(e)}function Io(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Qo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ho(e){return null!=e&&"object"==typeof e}var zo=Ze?Ot(Ze):function(e){return Ho(e)&&ei(e)==p};function Ko(e){return"number"==typeof e||Ho(e)&&fa(e)==A}function Vo(e){if(!Ho(e)||fa(e)!=v)return!1;var t=We(e);if(null===t)return!0;var n=_e.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==Oe}var Wo=et?Ot(et):function(e){return Ho(e)&&fa(e)==m},qo=tt?Ot(tt):function(e){return Ho(e)&&ei(e)==y};function Go(e){return"string"==typeof e||!Fo(e)&&Ho(e)&&fa(e)==R}function Xo(e){return"symbol"==typeof e||Ho(e)&&fa(e)==b}var Yo=nt?Ot(nt):function(e){return Ho(e)&&Io(e.length)&&!!Pe[fa(e)]},Jo=jr(_a),$o=jr((function(e,t){return e<=t}));function Zo(e){if(!e)return[];if(Do(e))return Go(e)?zt(e):pr(e);if(_t&&e[_t])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[_t]());var t=ei(e);return(t==p?Pt:t==y?Qt:Cs)(e)}function es(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ts(e){var t=es(e),n=t%1;return t==t?n?t-n:t:0}function ns(e){return e?Gn(ts(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Xo(e))return NaN;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=e.replace(G,"");var n=ie.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):re.test(e)?NaN:+e}function rs(e){return Ar(e,ys(e))}function is(e){return null==e?"":Xa(e)}var os=mr((function(e,t){if(di(t)||Do(t))Ar(t,ms(t),e);else for(var n in t)_e.call(t,n)&&Hn(e,n,t[n])})),ss=mr((function(e,t){Ar(t,ys(t),e)})),us=mr((function(e,t,n,a){Ar(t,ys(t),e,a)})),ds=mr((function(e,t,n,a){Ar(t,ms(t),e,a)})),cs=Hr(qn),ls=Na((function(e,t){e=pe(e);var n=-1,a=t.length,r=a>2?t[2]:void 0;for(r&&ii(t[0],t[1],r)&&(a=1);++n1),t})),Ar(e,Kr(e),n),a&&(n=Xn(n,7,Ir));for(var r=t.length;r--;)Ja(n,t[r]);return n})),xs=Hr((function(e,t){return null==e?{}:function(e,t){return Fa(e,t,(function(t,n){return hs(e,n)}))}(e,t)}));function _s(e,t){if(null==e)return{};var n=lt(Kr(e),(function(e){return[e]}));return t=Gr(t),Fa(e,n,(function(e,n){return t(e,n[0])}))}var Es=Nr(ms),ks=Nr(ys);function Cs(e){return null==e?[]:Bt(e,ms(e))}var Os=wr((function(e,t,n){return t=t.toLowerCase(),e+(n?Bs(t):t)}));function Bs(e){return Us(is(e).toLowerCase())}function Ss(e){return(e=is(e))&&e.replace(de,Tt).replace(Fe,"")}var Fs=wr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),js=wr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ds=br("toLowerCase"),Ts=wr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ms=wr((function(e,t,n){return e+(n?" ":"")+Us(t)})),Ns=wr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Us=br("toUpperCase");function Ps(e,t,n){return e=is(e),void 0===(t=n?void 0:t)?function(e){return Me.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Ls=Na((function(e,t){try{return at(e,void 0,t)}catch(e){return Uo(e)?e:new fe(e)}})),Is=Hr((function(e,t){return it(t,(function(t){t=xi(t),Wn(e,t,Ao(e[t],e))})),e}));function Qs(e){return function(){return e}}var Hs=Er(),zs=Er(!0);function Ks(e){return e}function Vs(e){return wa("function"==typeof e?e:Xn(e,1))}var Ws=Na((function(e,t){return function(n){return va(n,e,t)}})),qs=Na((function(e,t){return function(n){return va(e,n,t)}}));function Gs(e,t,n){var a=ms(t),r=da(t,a);null!=n||Qo(t)&&(r.length||!a.length)||(n=t,t=e,e=this,r=da(t,ms(t)));var i=!(Qo(n)&&"chain"in n&&!n.chain),o=Po(e);return it(r,(function(n){var a=t[n];e[n]=a,o&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),r=n.__actions__=pr(this.__actions__);return r.push({func:a,args:arguments,thisArg:e}),n.__chain__=t,n}return a.apply(e,ft([this.value()],arguments))})})),e}function Xs(){}var Ys=Br(lt),Js=Br(st),$s=Br(pt);function Zs(e){return oi(e)?xt(xi(e)):function(e){return function(t){return ca(t,e)}}(e)}var eu=Fr(),tu=Fr(!0);function nu(){return[]}function au(){return!1}var ru,iu=Or((function(e,t){return e+t}),0),ou=Tr("ceil"),su=Or((function(e,t){return e/t}),1),uu=Tr("floor"),du=Or((function(e,t){return e*t}),1),cu=Tr("round"),lu=Or((function(e,t){return e-t}),0);return Cn.after=function(e,t){if("function"!=typeof t)throw new me(i);return e=ts(e),function(){if(--e<1)return t.apply(this,arguments)}},Cn.ary=ho,Cn.assign=os,Cn.assignIn=ss,Cn.assignInWith=us,Cn.assignWith=ds,Cn.at=cs,Cn.before=po,Cn.bind=Ao,Cn.bindAll=Is,Cn.bindKey=vo,Cn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Fo(e)?e:[e]},Cn.chain=$i,Cn.chunk=function(e,t,n){t=(n?ii(e,t,n):void 0===t)?1:rn(ts(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,s=a(Jt(r/t));ir?0:r+n),(a=void 0===a||a>r?r:ts(a))<0&&(a+=r),a=n>a?0:ns(a);n>>0)?(e=is(e))&&("string"==typeof t||null!=t&&!Wo(t))&&!(t=Xa(t))&&Ut(e)?sr(zt(e),0,n):e.split(t,n):[]},Cn.spread=function(e,t){if("function"!=typeof e)throw new me(i);return t=null==t?0:rn(ts(t),0),Na((function(n){var a=n[t],r=sr(n,0,t);return a&&ft(r,a),at(e,this,r)}))},Cn.tail=function(e){var t=null==e?0:e.length;return t?za(e,1,t):[]},Cn.take=function(e,t,n){return e&&e.length?za(e,0,(t=n||void 0===t?1:ts(t))<0?0:t):[]},Cn.takeRight=function(e,t,n){var a=null==e?0:e.length;return a?za(e,(t=a-(t=n||void 0===t?1:ts(t)))<0?0:t,a):[]},Cn.takeRightWhile=function(e,t){return e&&e.length?Za(e,Gr(t,3),!1,!0):[]},Cn.takeWhile=function(e,t){return e&&e.length?Za(e,Gr(t,3)):[]},Cn.tap=function(e,t){return t(e),e},Cn.throttle=function(e,t,n){var a=!0,r=!0;if("function"!=typeof e)throw new me(i);return Qo(n)&&(a="leading"in n?!!n.leading:a,r="trailing"in n?!!n.trailing:r),mo(e,t,{leading:a,maxWait:t,trailing:r})},Cn.thru=Zi,Cn.toArray=Zo,Cn.toPairs=Es,Cn.toPairsIn=ks,Cn.toPath=function(e){return Fo(e)?lt(e,xi):Xo(e)?[e]:pr(wi(is(e)))},Cn.toPlainObject=rs,Cn.transform=function(e,t,n){var a=Fo(e),r=a||Mo(e)||Yo(e);if(t=Gr(t,4),null==n){var i=e&&e.constructor;n=r?a?new i:[]:Qo(e)&&Po(i)?On(We(e)):{}}return(r?it:sa)(e,(function(e,a,r){return t(n,e,a,r)})),n},Cn.unary=function(e){return ho(e,1)},Cn.union=Qi,Cn.unionBy=Hi,Cn.unionWith=zi,Cn.uniq=function(e){return e&&e.length?Ya(e):[]},Cn.uniqBy=function(e,t){return e&&e.length?Ya(e,Gr(t,2)):[]},Cn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Ya(e,void 0,t):[]},Cn.unset=function(e,t){return null==e||Ja(e,t)},Cn.unzip=Ki,Cn.unzipWith=Vi,Cn.update=function(e,t,n){return null==e?e:$a(e,t,rr(n))},Cn.updateWith=function(e,t,n,a){return a="function"==typeof a?a:void 0,null==e?e:$a(e,t,rr(n),a)},Cn.values=Cs,Cn.valuesIn=function(e){return null==e?[]:Bt(e,ys(e))},Cn.without=Wi,Cn.words=Ps,Cn.wrap=function(e,t){return _o(rr(t),e)},Cn.xor=qi,Cn.xorBy=Gi,Cn.xorWith=Xi,Cn.zip=Yi,Cn.zipObject=function(e,t){return nr(e||[],t||[],Hn)},Cn.zipObjectDeep=function(e,t){return nr(e||[],t||[],La)},Cn.zipWith=Ji,Cn.entries=Es,Cn.entriesIn=ks,Cn.extend=ss,Cn.extendWith=us,Gs(Cn,Cn),Cn.add=iu,Cn.attempt=Ls,Cn.camelCase=Os,Cn.capitalize=Bs,Cn.ceil=ou,Cn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Gn(as(e),t,n)},Cn.clone=function(e){return Xn(e,4)},Cn.cloneDeep=function(e){return Xn(e,5)},Cn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Cn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Cn.conformsTo=function(e,t){return null==t||Yn(e,t,ms(t))},Cn.deburr=Ss,Cn.defaultTo=function(e,t){return null==e||e!=e?t:e},Cn.divide=su,Cn.endsWith=function(e,t,n){e=is(e),t=Xa(t);var a=e.length,r=n=void 0===n?a:Gn(ts(n),0,a);return(n-=t.length)>=0&&e.slice(n,r)==t},Cn.eq=Co,Cn.escape=function(e){return(e=is(e))&&L.test(e)?e.replace(U,Mt):e},Cn.escapeRegExp=function(e){return(e=is(e))&&q.test(e)?e.replace(W,"\\$&"):e},Cn.every=function(e,t,n){var a=Fo(e)?st:ta;return n&&ii(e,t,n)&&(t=void 0),a(e,Gr(t,3))},Cn.find=no,Cn.findIndex=Bi,Cn.findKey=function(e,t){return vt(e,Gr(t,3),sa)},Cn.findLast=ao,Cn.findLastIndex=Si,Cn.findLastKey=function(e,t){return vt(e,Gr(t,3),ua)},Cn.floor=uu,Cn.forEach=ro,Cn.forEachRight=io,Cn.forIn=function(e,t){return null==e?e:ia(e,Gr(t,3),ys)},Cn.forInRight=function(e,t){return null==e?e:oa(e,Gr(t,3),ys)},Cn.forOwn=function(e,t){return e&&sa(e,Gr(t,3))},Cn.forOwnRight=function(e,t){return e&&ua(e,Gr(t,3))},Cn.get=gs,Cn.gt=Oo,Cn.gte=Bo,Cn.has=function(e,t){return null!=e&&ti(e,t,ha)},Cn.hasIn=hs,Cn.head=ji,Cn.identity=Ks,Cn.includes=function(e,t,n,a){e=Do(e)?e:Cs(e),n=n&&!a?ts(n):0;var r=e.length;return n<0&&(n=rn(r+n,0)),Go(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&yt(e,t,n)>-1},Cn.indexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var r=null==n?0:ts(n);return r<0&&(r=rn(a+r,0)),yt(e,t,r)},Cn.inRange=function(e,t,n){return t=es(t),void 0===n?(n=t,t=0):n=es(n),function(e,t,n){return e>=on(t,n)&&e=-9007199254740991&&e<=9007199254740991},Cn.isSet=qo,Cn.isString=Go,Cn.isSymbol=Xo,Cn.isTypedArray=Yo,Cn.isUndefined=function(e){return void 0===e},Cn.isWeakMap=function(e){return Ho(e)&&ei(e)==w},Cn.isWeakSet=function(e){return Ho(e)&&"[object WeakSet]"==fa(e)},Cn.join=function(e,t){return null==e?"":nn.call(e,t)},Cn.kebabCase=Fs,Cn.last=Ni,Cn.lastIndexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var r=a;return void 0!==n&&(r=(r=ts(n))<0?rn(a+r,0):on(r,a-1)),t==t?function(e,t,n){for(var a=n+1;a--;)if(e[a]===t)return a;return a}(e,t,r):mt(e,bt,r,!0)},Cn.lowerCase=js,Cn.lowerFirst=Ds,Cn.lt=Jo,Cn.lte=$o,Cn.max=function(e){return e&&e.length?na(e,Ks,ga):void 0},Cn.maxBy=function(e,t){return e&&e.length?na(e,Gr(t,2),ga):void 0},Cn.mean=function(e){return wt(e,Ks)},Cn.meanBy=function(e,t){return wt(e,Gr(t,2))},Cn.min=function(e){return e&&e.length?na(e,Ks,_a):void 0},Cn.minBy=function(e,t){return e&&e.length?na(e,Gr(t,2),_a):void 0},Cn.stubArray=nu,Cn.stubFalse=au,Cn.stubObject=function(){return{}},Cn.stubString=function(){return""},Cn.stubTrue=function(){return!0},Cn.multiply=du,Cn.nth=function(e,t){return e&&e.length?Ba(e,ts(t)):void 0},Cn.noConflict=function(){return Ve._===this&&(Ve._=Be),this},Cn.noop=Xs,Cn.now=go,Cn.pad=function(e,t,n){e=is(e);var a=(t=ts(t))?Ht(e):0;if(!t||a>=t)return e;var r=(t-a)/2;return Sr($t(r),n)+e+Sr(Jt(r),n)},Cn.padEnd=function(e,t,n){e=is(e);var a=(t=ts(t))?Ht(e):0;return t&&at){var a=e;e=t,t=a}if(n||e%1||t%1){var r=dn();return on(e+r*(t-e+Qe("1e-"+((r+"").length-1))),t)}return Ta(e,t)},Cn.reduce=function(e,t,n){var a=Fo(e)?gt:Et,r=arguments.length<3;return a(e,Gr(t,4),n,r,Zn)},Cn.reduceRight=function(e,t,n){var a=Fo(e)?ht:Et,r=arguments.length<3;return a(e,Gr(t,4),n,r,ea)},Cn.repeat=function(e,t,n){return t=(n?ii(e,t,n):void 0===t)?1:ts(t),Ma(is(e),t)},Cn.replace=function(){var e=arguments,t=is(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Cn.result=function(e,t,n){var a=-1,r=(t=ir(t,e)).length;for(r||(r=1,e=void 0);++a9007199254740991)return[];var n=4294967295,a=on(e,4294967295);e-=4294967295;for(var r=Ct(a,t=Gr(t));++n=i)return e;var s=n-Ht(a);if(s<1)return a;var u=o?sr(o,0,s).join(""):e.slice(0,s);if(void 0===r)return u+a;if(o&&(s+=u.length-s),Wo(r)){if(e.slice(s).search(r)){var d,c=u;for(r.global||(r=Ae(r.source,is(ae.exec(r))+"g")),r.lastIndex=0;d=r.exec(c);)var l=d.index;u=u.slice(0,void 0===l?s:l)}}else if(e.indexOf(Xa(r),s)!=s){var f=u.lastIndexOf(r);f>-1&&(u=u.slice(0,f))}return u+a},Cn.unescape=function(e){return(e=is(e))&&P.test(e)?e.replace(N,Kt):e},Cn.uniqueId=function(e){var t=++Ee;return is(e)+t},Cn.upperCase=Ns,Cn.upperFirst=Us,Cn.each=ro,Cn.eachRight=io,Cn.first=ji,Gs(Cn,(ru={},sa(Cn,(function(e,t){_e.call(Cn.prototype,t)||(ru[t]=e)})),ru),{chain:!1}),Cn.VERSION="4.17.19",it(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Cn[e].placeholder=Cn})),it(["drop","take"],(function(e,t){Fn.prototype[e]=function(n){n=void 0===n?1:rn(ts(n),0);var a=this.__filtered__&&!t?new Fn(this):this.clone();return a.__filtered__?a.__takeCount__=on(n,a.__takeCount__):a.__views__.push({size:on(n,4294967295),type:e+(a.__dir__<0?"Right":"")}),a},Fn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),it(["filter","map","takeWhile"],(function(e,t){var n=t+1,a=1==n||3==n;Fn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Gr(e,3),type:n}),t.__filtered__=t.__filtered__||a,t}})),it(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Fn.prototype[e]=function(){return this[n](1).value()[0]}})),it(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Fn.prototype[e]=function(){return this.__filtered__?new Fn(this):this[n](1)}})),Fn.prototype.compact=function(){return this.filter(Ks)},Fn.prototype.find=function(e){return this.filter(e).head()},Fn.prototype.findLast=function(e){return this.reverse().find(e)},Fn.prototype.invokeMap=Na((function(e,t){return"function"==typeof e?new Fn(this):this.map((function(n){return va(n,e,t)}))})),Fn.prototype.reject=function(e){return this.filter(wo(Gr(e)))},Fn.prototype.slice=function(e,t){e=ts(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Fn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ts(t))<0?n.dropRight(-t):n.take(t-e)),n)},Fn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Fn.prototype.toArray=function(){return this.take(4294967295)},sa(Fn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),r=Cn[a?"take"+("last"==t?"Right":""):t],i=a||/^find/.test(t);r&&(Cn.prototype[t]=function(){var t=this.__wrapped__,o=a?[1]:arguments,s=t instanceof Fn,u=o[0],d=s||Fo(t),c=function(e){var t=r.apply(Cn,ft([e],o));return a&&l?t[0]:t};d&&n&&"function"==typeof u&&1!=u.length&&(s=d=!1);var l=this.__chain__,f=!!this.__actions__.length,g=i&&!l,h=s&&!f;if(!i&&d){t=h?t:new Fn(this);var p=e.apply(t,o);return p.__actions__.push({func:Zi,args:[c],thisArg:void 0}),new Sn(p,l)}return g&&h?e.apply(this,o):(p=this.thru(c),g?a?p.value()[0]:p.value():p)})})),it(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);Cn.prototype[e]=function(){var e=arguments;if(a&&!this.__chain__){var r=this.value();return t.apply(Fo(r)?r:[],e)}return this[n]((function(n){return t.apply(Fo(n)?n:[],e)}))}})),sa(Fn.prototype,(function(e,t){var n=Cn[t];if(n){var a=n.name+"";_e.call(mn,a)||(mn[a]=[]),mn[a].push({name:t,func:n})}})),mn[kr(void 0,2).name]=[{name:"wrapper",func:void 0}],Fn.prototype.clone=function(){var e=new Fn(this.__wrapped__);return e.__actions__=pr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pr(this.__views__),e},Fn.prototype.reverse=function(){if(this.__filtered__){var e=new Fn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Fn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Fo(e),a=t<0,r=n?e.length:0,i=function(e,t,n){for(var a=-1,r=n.length;++a=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Cn.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var a=Ei(n);a.__index__=0,a.__values__=void 0,t?r.__wrapped__=a:t=a;var r=a;n=n.__wrapped__}return r.__wrapped__=e,t},Cn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Fn){var t=e;return this.__actions__.length&&(t=new Fn(this)),(t=t.reverse()).__actions__.push({func:Zi,args:[Ii],thisArg:void 0}),new Sn(t,this.__chain__)}return this.thru(Ii)},Cn.prototype.toJSON=Cn.prototype.valueOf=Cn.prototype.value=function(){return er(this.__wrapped__,this.__actions__)},Cn.prototype.first=Cn.prototype.head,_t&&(Cn.prototype[_t]=function(){return this}),Cn}();Ve._=Vt,void 0===(r=function(){return Vt}.call(t,n,t,a))||(a.exports=r)}).call(this)}).call(this,n(54),n(59)(e))},function(e,t,n){var a=n(1154);function r(t,n,i){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=r=Reflect.get:e.exports=r=function(e,t,n){var r=a(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}},r(t,n,i||t)}e.exports=r},function(e,t,n){var a;try{a={cloneDeep:n(1379),constant:n(530),defaults:n(1436),each:n(1440),filter:n(1443),find:n(1468),flatten:n(544),forEach:n(533),forIn:n(1475),has:n(1476),isUndefined:n(1478),last:n(1479),map:n(1480),mapValues:n(1481),max:n(1482),merge:n(1484),min:n(1491),minBy:n(1492),now:n(1493),pick:n(1494),range:n(1499),reduce:n(1502),sortBy:n(1505),uniqueId:n(1510),values:n(1511),zipObject:n(1513)}}catch(e){}a||(a=window._),e.exports=a},,function(e,t,n){"use strict";function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return a}))},,function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var a=n(1),r=n.n(a),i=r.a.createContext({codeRevision:0,cssRevision:"0",config:{},slots:{},displayMode:"collapse"}),o=i;function s(){return r.a.useContext(i)}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}))},,function(e,t,n){"use strict";var a=n(43),r=n(168).map,i=n(297),o=n(169),s=i("map"),u=o("map");a({target:"Array",proto:!0,forced:!s||!u},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var a=n(33);function r(e,t,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(a.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){var a=n(46),r=n(286).f,i=n(120),o=n(139),s=n(288),u=n(393),d=n(397);e.exports=function(e,t){var n,c,l,f,g,h=e.target,p=e.global,A=e.stat;if(n=p?a:A?a[h]||s(h,{}):(a[h]||{}).prototype)for(c in t){if(f=t[c],l=e.noTargetGet?(g=r(n,c))&&g.value:n[c],!d(p?c:h+(A?".":"#")+c,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),o(n,c,f,e)}}},,,function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(54))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var a=n(13),r=n(14),i=n(253),o=n(252),s=o.MAX_LENGTH,u=o.MAX_SAFE_INTEGER,d=n(151),c=d.re,l=d.t,f=n(366).compareIdentifiers,g=function(){"use strict";function e(t,n){if(a(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>s)throw new TypeError("version is longer than ".concat(s," characters"));i("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?c[l.LOOSE]:c[l.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=g},function(e,t,n){"use strict";function a(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",(function(){return a}))},,function(e,t,n){"use strict";var a=n(31),r=n(75).Graph;function i(e,t,n,r){var i;do{i=a.uniqueId(r)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function o(e){return a.max(a.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!a.isUndefined(n))return n})))}e.exports={addDummyNode:i,simplify:function(e){var t=(new r).setGraph(e.graph());return a.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),a.forEach(e.edges(),(function(n){var a=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:a.weight+r.weight,minlen:Math.max(a.minlen,r.minlen)})})),t},asNonCompoundGraph:function(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return a.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),a.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=a.map(e.nodes(),(function(t){var n={};return a.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return a.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=a.map(e.nodes(),(function(t){var n={};return a.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return a.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,a,r=e.x,i=e.y,o=t.x-r,s=t.y-i,u=e.width/2,d=e.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(o)*d?(s<0&&(d=-d),n=d*o/s,a=d):(o<0&&(u=-u),n=u,a=u*s/o),{x:r+n,y:i+a}},buildLayerMatrix:function(e){var t=a.map(a.range(o(e)+1),(function(){return[]}));return a.forEach(e.nodes(),(function(n){var r=e.node(n),i=r.rank;a.isUndefined(i)||(t[i][r.order]=n)})),t},normalizeRanks:function(e){var t=a.min(a.map(e.nodes(),(function(t){return e.node(t).rank})));a.forEach(e.nodes(),(function(n){var r=e.node(n);a.has(r,"rank")&&(r.rank-=t)}))},removeEmptyRanks:function(e){var t=a.min(a.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];a.forEach(e.nodes(),(function(a){var r=e.node(a).rank-t;n[r]||(n[r]=[]),n[r].push(a)}));var r=0,i=e.graph().nodeRankFactor;a.forEach(n,(function(t,n){a.isUndefined(t)&&n%i!=0?--r:r&&a.forEach(t,(function(t){e.node(t).rank+=r}))}))},addBorderNode:function(e,t,n,a){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=a),i(e,"border",r,t)},maxRank:o,partition:function(e,t){var n={lhs:[],rhs:[]};return a.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=a.now();try{return t()}finally{console.log(e+" time: "+(a.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(61),o=n(112),s=n(472),u=n(22);r(n(61),t),r(n(112),t),r(n(472),t),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new i.DiagramEngine(e);return t.getLayerFactories().registerFactory(new i.NodeLayerFactory),t.getLayerFactories().registerFactory(new i.LinkLayerFactory),t.getLayerFactories().registerFactory(new u.SelectionBoxLayerFactory),t.getLabelFactories().registerFactory(new o.DefaultLabelFactory),t.getNodeFactories().registerFactory(new o.DefaultNodeFactory),t.getLinkFactories().registerFactory(new o.DefaultLinkFactory),t.getLinkFactories().registerFactory(new s.PathFindingLinkFactory),t.getPortFactories().registerFactory(new o.DefaultPortFactory),t.getStateMachine().pushState(new i.DefaultDiagramState),t}},function(e,t,n){"use strict";function a(e,t){for(var n=0;n=t&&e<=n}function Z(e,t){return void 0===t&&(t=2),e.toString().length=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function se(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,a=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===a?53:52}function ue(e){return e>99?e:e>60?1900+e:2e3+e}function de(e,t,n,a){void 0===a&&(a=null);var r=new Date(e),i={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(i.timeZone=a);var o=Object.assign({timeZoneName:t},i),s=W();if(s&&q()){var u=new Intl.DateTimeFormat(n,o).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}if(s){var d=new Intl.DateTimeFormat(n,i).format(r);return new Intl.DateTimeFormat(n,o).format(r).substring(d.length).replace(/^[, \u200e]+/,"")}return null}function ce(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var a=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-a:a)}function le(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new v("Invalid unit value "+e);return t}function fe(e,t,n){var a={};for(var r in e)if(J(e,r)){if(n.indexOf(r)>=0)continue;var i=e[r];if(null==i)continue;a[t(r)]=le(i)}return a}function ge(e,t){var n=Math.trunc(e/60),a=Math.abs(e%60),r=n>=0&&!Object.is(n,-0)?"+":"-",i=""+r+Math.abs(n);switch(t){case"short":return""+r+Z(Math.abs(n),2)+":"+Z(a,2);case"narrow":return a>0?i+":"+a:i;case"techie":return""+r+Z(Math.abs(n),2)+Z(a,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function he(e){return Y(e,["hour","minute","second","millisecond"])}var pe=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function Ae(e){return JSON.stringify(e,Object.keys(e).sort())}var ve=["January","February","March","April","May","June","July","August","September","October","November","December"],me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ye=["J","F","M","A","M","J","J","A","S","O","N","D"];function Re(e){switch(e){case"narrow":return ye;case"short":return me;case"long":return ve;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],we=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],xe=["M","T","W","T","F","S","S"];function _e(e){switch(e){case"narrow":return xe;case"short":return we;case"long":return be;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Ee=["AM","PM"],ke=["Before Christ","Anno Domini"],Ce=["BC","AD"],Oe=["B","A"];function Be(e){switch(e){case"narrow":return Oe;case"short":return Ce;case"long":return ke;default:return null}}function Se(e,t){var n="",a=e,r=Array.isArray(a),i=0;for(a=r?a:a[Symbol.iterator]();;){var o;if(r){if(i>=a.length)break;o=a[i++]}else{if((i=a.next()).done)break;o=i.value}var s=o;s.literal?n+=s.val:n+=t(s.val)}return n}var Fe={D:w,DD:x,DDD:_,DDDD:E,t:k,tt:C,ttt:O,tttt:B,T:S,TT:F,TTT:j,TTTT:D,f:T,ff:N,fff:L,ffff:Q,F:M,FF:U,FFF:I,FFFF:H},je=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",a=!1,r=[],i=0;i0&&r.push({literal:a,val:n}),t=null,n="",a=!a):a||o===t?n+=o:(n.length>0&&r.push({literal:!1,val:n}),n=o,t=o)}return n.length>0&&r.push({literal:a,val:n}),r},e.macroTokenToFormatOpts=function(e){return Fe[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return Z(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var a=this,r="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&q(),o=function(e,n){return a.loc.extract(t,e,n)},s=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},u=function(e,n){return r?function(e,t){return Re(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},d=function(e,n){return r?function(e,t){return _e(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},c=function(e){return r?function(e,t){return Be(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return Se(e.parseFormat(n),(function(n){switch(n){case"S":return a.num(t.millisecond);case"u":case"SSS":return a.num(t.millisecond,3);case"s":return a.num(t.second);case"ss":return a.num(t.second,2);case"m":return a.num(t.minute);case"mm":return a.num(t.minute,2);case"h":return a.num(t.hour%12==0?12:t.hour%12);case"hh":return a.num(t.hour%12==0?12:t.hour%12,2);case"H":return a.num(t.hour);case"HH":return a.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:a.opts.allowZ});case"ZZ":return s({format:"short",allowZ:a.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:a.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:a.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:a.loc.locale});case"z":return t.zoneName;case"a":return r?function(e){return Ee[e.hour<12?0:1]}(t):o({hour:"numeric",hour12:!0},"dayperiod");case"d":return i?o({day:"numeric"},"day"):a.num(t.day);case"dd":return i?o({day:"2-digit"},"day"):a.num(t.day,2);case"c":return a.num(t.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return a.num(t.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):a.num(t.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):a.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):a.num(t.month);case"MM":return i?o({month:"2-digit"},"month"):a.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):a.num(t.year);case"yy":return i?o({year:"2-digit"},"year"):a.num(t.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):a.num(t.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):a.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return a.num(t.weekYear.toString().slice(-2),2);case"kkkk":return a.num(t.weekYear,4);case"W":return a.num(t.weekNumber);case"WW":return a.num(t.weekNumber,2);case"o":return a.num(t.ordinal);case"ooo":return a.num(t.ordinal,3);case"q":return a.num(t.quarter);case"qq":return a.num(t.quarter,2);case"X":return a.num(Math.floor(t.ts/1e3));case"x":return a.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?a.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var a=this,r=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},i=e.parseFormat(n),o=i.reduce((function(e,t){var n=t.literal,a=t.val;return n?e:e.concat(a)}),[]);return Se(i,function(e){return function(t){var n=r(t);return n?a.num(e.get(n),t.length):t}}(t.shiftTo.apply(t,o.map(r).filter((function(e){return e})))))},e}(),De=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Te=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new m},t.formatOffset=function(e,t){throw new m},t.offset=function(e){throw new m},t.equals=function(e){throw new m},r(e,[{key:"type",get:function(){throw new m}},{key:"name",get:function(){throw new m}},{key:"universal",get:function(){throw new m}},{key:"isValid",get:function(){throw new m}}]),e}(),Me=null,Ne=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.offsetName=function(e,t){return de(e,t.format,t.locale)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},r(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return W()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Me&&(Me=new t),Me}}]),t}(Te),Ue=RegExp("^"+pe.source+"$"),Pe={},Le={year:0,month:1,day:2,hour:3,minute:4,second:5},Ie={},Qe=function(e){function t(n){var a;return(a=e.call(this)||this).zoneName=n,a.valid=t.isValidZone(n),a}i(t,e),t.create=function(e){return Ie[e]||(Ie[e]=new t(e)),Ie[e]},t.resetCache=function(){Ie={},Pe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(Ue))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return de(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){var t=new Date(e),n=function(e){return Pe[e]||(Pe[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Pe[e]}(this.name),a=n.formatToParts?function(e,t){for(var n=e.formatToParts(t),a=[],r=0;r=0?d:1e3+d))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Te),He=null,ze=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}i(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(ce(n[1],n[2]))}return null},r(t,null,[{key:"utcInstance",get:function(){return null===He&&(He=new t(0)),He}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return ge(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ge(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Te),Ke=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}i(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Te);function Ve(e,t){var n;if(z(e)||null===e)return t;if(e instanceof Te)return e;if(function(e){return"string"==typeof e}(e)){var a=e.toLowerCase();return"local"===a?t:"utc"===a||"gmt"===a?ze.utcInstance:null!=(n=Qe.parseGMTOffset(e))?ze.instance(n):Qe.isValidSpecifier(a)?Qe.create(e):ze.parseSpecifier(a)||new Ke(e)}return K(e)?ze.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ke(e)}var We=function(){return Date.now()},qe=null,Ge=null,Xe=null,Ye=null,Je=!1,$e=function(){function e(){}return e.resetCaches=function(){ut.resetCache(),Qe.resetCache()},r(e,null,[{key:"now",get:function(){return We},set:function(e){We=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){qe=e?Ve(e):null}},{key:"defaultZone",get:function(){return qe||Ne.instance}},{key:"defaultLocale",get:function(){return Ge},set:function(e){Ge=e}},{key:"defaultNumberingSystem",get:function(){return Xe},set:function(e){Xe=e}},{key:"defaultOutputCalendar",get:function(){return Ye},set:function(e){Ye=e}},{key:"throwOnInvalid",get:function(){return Je},set:function(e){Je=e}}]),e}(),Ze={};function et(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),a=Ze[n];return a||(a=new Intl.DateTimeFormat(e,t),Ze[n]=a),a}var tt={},nt={};var at=null;function rt(e,t,n,a,r){var i=e.listingMode(n);return"error"===i?null:"en"===i?a(t):r(t)}var it=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&W()){var a={useGrouping:!1};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),a=tt[n];return a||(a=new Intl.NumberFormat(e,t),tt[n]=a),a}(e,a)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Z(this.floor?Math.floor(e):ne(e,3),this.padTo)},e}(),ot=function(){function e(e,t,n){var a;if(this.opts=n,this.hasIntl=W(),e.zone.universal&&this.hasIntl?(a="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:ea.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:(this.dt=e,a=e.zone.name),this.hasIntl){var r=Object.assign({},this.opts);a&&(r.timeZone=a),this.dtf=et(t,r)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(Ae(Y(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case Ae(w):return"M/d/yyyy";case Ae(x):return"LLL d, yyyy";case Ae(_):return"LLLL d, yyyy";case Ae(E):return"EEEE, LLLL d, yyyy";case Ae(k):return"h:mm a";case Ae(C):return"h:mm:ss a";case Ae(O):case Ae(B):return"h:mm a";case Ae(S):return"HH:mm";case Ae(F):return"HH:mm:ss";case Ae(j):case Ae(D):return"HH:mm";case Ae(T):return"M/d/yyyy, h:mm a";case Ae(N):return"LLL d, yyyy, h:mm a";case Ae(L):return"LLLL d, yyyy, h:mm a";case Ae(Q):return"EEEE, LLLL d, yyyy, h:mm a";case Ae(M):return"M/d/yyyy, h:mm:ss a";case Ae(U):return"LLL d, yyyy, h:mm:ss a";case Ae(P):return"EEE, d LLL yyyy, h:mm a";case Ae(I):return"LLLL d, yyyy, h:mm:ss a";case Ae(H):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ut.create("en-US");return je.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&q()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),st=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&G()&&(this.rtf=function(e,t){void 0===t&&(t={});var n=t,a=(n.base,function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a=0||(r[n]=e[n]);return r}(n,["base"])),r=JSON.stringify([e,a]),i=nt[r];return i||(i=new Intl.RelativeTimeFormat(e,t),nt[r]=i),i}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,a){void 0===n&&(n="always"),void 0===a&&(a=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+r[e][0];case-1:return o?"yesterday":"last "+r[e][0];case 0:return o?"today":"this "+r[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),d=1===u,c=r[e],l=a?d?c[1]:c[2]||c[1]:d?r[e][0]:e;return s?u+" "+l+" ago":"in "+u+" "+l}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ut=function(){function e(e,t,n,a){var r=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,a=e.substring(0,t);try{n=et(e).resolvedOptions()}catch(e){n=et(a).resolvedOptions()}var r=n;return[a,r.numberingSystem,r.calendar]}(e),i=r[0],o=r[1],s=r[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.intl=function(e,t,n){return W()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,a,r){void 0===r&&(r=!1);var i=t||$e.defaultLocale;return new e(i||(r?"en-US":function(){if(at)return at;if(W()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||$e.defaultNumberingSystem,a||$e.defaultOutputCalendar,i)},e.resetCache=function(){at=null,Ze={},tt={},nt={}},e.fromObject=function(t){var n=void 0===t?{}:t,a=n.locale,r=n.numberingSystem,i=n.outputCalendar;return e.create(a,r,i)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=W()&&q(),n=this.isEnglish(),a=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&a||e?!t||n&&a?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var a=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),rt(this,e,n,Re,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return a.monthsCache[r][e]||(a.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var a=ea.utc(2016,n,1);t.push(e(a))}return t}((function(e){return a.extract(e,n,"month")}))),a.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var a=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),rt(this,e,n,_e,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return a.weekdaysCache[r][e]||(a.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var a=ea.utc(2016,11,13+n);t.push(e(a))}return t}((function(e){return a.extract(e,n,"weekday")}))),a.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),rt(this,void 0,e,(function(){return Ee}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[ea.utc(2016,11,13,9),ea.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),rt(this,e,t,Be,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[ea.utc(-40,1,1),ea.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var a=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return a?a.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new it(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ot(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new st(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||W()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||W()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}(this)),this.fastNumbersCached}}]),e}();function dt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),a=1;a3?be.indexOf(e)+1:we.indexOf(e)+1),s}var St=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ft(e){var t,n=e[1],a=e[2],r=e[3],i=e[4],o=e[5],s=e[6],u=e[7],d=e[8],c=e[9],l=e[10],f=e[11],g=Bt(n,i,r,a,o,s,u);return t=d?Ot[d]:c?0:ce(l,f),[g,new ze(t)]}var jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Dt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Tt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mt(e){var t=e[1],n=e[2],a=e[3];return[Bt(t,e[4],a,n,e[5],e[6],e[7]),ze.utcInstance]}function Nt(e){var t=e[1],n=e[2],a=e[3],r=e[4],i=e[5],o=e[6];return[Bt(t,e[7],n,a,r,i,o),ze.utcInstance]}var Ut=dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,At),Pt=dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,At),Lt=dt(/(\d{4})-?(\d{3})/,At),It=dt(pt),Qt=ct(wt,xt,_t),Ht=ct(vt,xt,_t),zt=ct(mt,xt),Kt=ct(xt,_t),Vt=dt(/(\d{4})-(\d\d)-(\d\d)/,Rt),Wt=dt(yt),qt=ct(wt,xt,_t,Et),Gt=ct(xt,_t,Et),Xt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Yt=Object.assign({years:{months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Xt),Jt=Object.assign({years:{months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Xt),$t=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Zt=$t.slice(0).reverse();function en(e,t,n){void 0===n&&(n=!1);var a={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new an(a)}function tn(e,t,n,a,r){var i=e[r][n],o=t[n]/i,s=Math.sign(o)!==Math.sign(a[r])&&0!==a[r]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);a[r]+=s,t[n]-=s*i}function nn(e,t){Zt.reduce((function(n,a){return z(t[a])?n:(n&&tn(e,t,n,t,a),a)}),null)}var an=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ut.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Jt:Yt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new v("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:fe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ut.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var a=function(e){return lt(e,[kt,Ct])}(t)[0];if(a){var r=Object.assign(a,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new v("need to specify a reason the Duration is invalid");var a=t instanceof De?t:new De(t,n);if($e.throwOnInvalid)throw new h(a);return new e({invalid:a})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new A(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?je.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=ne(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.valueOf=function(){return this.as("milliseconds")},t.plus=function(e){if(!this.isValid)return this;var t=rn(e),n={},a=$t,r=Array.isArray(a),i=0;for(a=r?a:a[Symbol.iterator]();;){var o;if(r){if(i>=a.length)break;o=a[i++]}else{if((i=a.next()).done)break;o=i.value}var s=o;(J(t.values,s)||J(this.values,s))&&(n[s]=t.get(s)+this.get(s))}return en(this,{values:n},!0)},t.minus=function(e){if(!this.isValid)return this;var t=rn(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,a=Object.keys(this.values);n=u.length)break;l=u[c++]}else{if((c=u.next()).done)break;l=c.value}var f=l;if(n.indexOf(f)>=0){r=f;var g=0;for(var h in o)g+=this.matrix[h][f]*o[h],o[h]=0;K(s[f])&&(g+=s[f]);var p=Math.trunc(g);for(var A in i[f]=p,o[f]=g-p,s)$t.indexOf(A)>$t.indexOf(f)&&tn(this.matrix,s,A,i,f)}else K(s[f])&&(o[f]=s[f])}for(var v in o)0!==o[v]&&(i[r]+=v===r?o[v]:o[v]/this.matrix[r][v]);return en(this,{values:i},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t=t.length)break;r=t[a++]}else{if((a=t.next()).done)break;r=a.value}var i=r;if(this.values[i]!==e.values[i])return!1}return!0},r(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function rn(e){if(K(e))return an.fromMillis(e);if(an.isDuration(e))return e;if("object"==typeof e)return an.fromObject(e);throw new v("Unknown duration argument "+e+" of type "+typeof e)}var on="Invalid Interval";var sn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new v("need to specify a reason the Interval is invalid");var a=t instanceof De?t:new De(t,n);if($e.throwOnInvalid)throw new g(a);return new e({invalid:a})},e.fromDateTimes=function(t,n){var a=ta(t),r=ta(n),i=function(e,t){return e&&e.isValid?t&&t.isValid?te},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&this.s<=e&&this.e>e},t.set=function(t){var n=void 0===t?{}:t,a=n.start,r=n.end;return this.isValid?e.fromDateTimes(a||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,a=new Array(n),r=0;r+this.e?this.e:d;o.push(e.fromDateTimes(s,c)),s=c,u+=1}return o},t.splitBy=function(t){var n=rn(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var a,r,i=this.s,o=[];i+this.e?this.e:a,o.push(e.fromDateTimes(i,r)),i=r;return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s=e.e},t.equals=function(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,a=this.ea?null:e.fromDateTimes(n,a)},t.union=function(t){if(!this.isValid)return this;var n=this.st.e?this.e:t.e;return e.fromDateTimes(n,a)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],a=e[1];return a?a.overlaps(t)||a.abutsStart(t)?[n,a.union(t)]:[n.concat([a]),t]:[n,t]}),[[],null]),n=t[0],a=t[1];return a&&n.push(a),n},e.xor=function(t){var n,a=null,r=0,i=[],o=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),s=(n=Array.prototype).concat.apply(n,o).sort((function(e,t){return e.time-t.time})),u=Array.isArray(s),d=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(d>=s.length)break;c=s[d++]}else{if((d=s.next()).done)break;c=d.value}var l=c;1===(r+="s"===l.type?1:-1)?a=l.time:(a&&+a!=+l.time&&i.push(e.fromDateTimes(a,l.time)),a=null)}return e.merge(i)},t.difference=function(){for(var t=this,n=arguments.length,a=new Array(n),r=0;r=o&&a<=s&&(t+=a-o)}}return parseInt(t,10)}return t}(n))}}}function pn(e){return e.replace(/\./,"\\.?")}function An(e){return e.replace(/\./,"").toLowerCase()}function vn(e,t){return null===e?null:{regex:RegExp(e.map(pn).join("|")),deser:function(n){var a=n[0];return e.findIndex((function(e){return An(a)===An(e)}))+t}}}function mn(e,t){return{regex:e,deser:function(e){return ce(e[1],e[2])},groups:t}}function yn(e){return{regex:e,deser:function(e){return e[0]}}}var Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}},bn=null;function wn(e,t,n){var a=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return function(e,t){if(e.literal)return e;var n=je.macroTokenToFormatOpts(e.val);if(!n)return e;var a=je.create(t,n).formatDateTimeParts((bn||(bn=ea.fromMillis(1555555555555)),bn)).map((function(e){return function(e,t,n){var a=e.type,r=e.value;if("literal"===a)return{literal:!0,val:r};var i=n[a],o=Rn[a];return"object"==typeof o&&(o=o[i]),o?{literal:!1,val:o}:void 0}(e,0,n)}));return a.includes(void 0)?e:a}(e,t)})))}(je.parseFormat(n),e),r=a.map((function(t){return function(e,t){var n=gn(t),a=gn(t,"{2}"),r=gn(t,"{3}"),i=gn(t,"{4}"),o=gn(t,"{6}"),s=gn(t,"{1,2}"),u=gn(t,"{1,3}"),d=gn(t,"{1,6}"),c=gn(t,"{1,9}"),l=gn(t,"{2,4}"),f=gn(t,"{4,6}"),g=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},h=function(h){if(e.literal)return g(h);switch(h.val){case"G":return vn(t.eras("short",!1),0);case"GG":return vn(t.eras("long",!1),0);case"y":return hn(d);case"yy":return hn(l,ue);case"yyyy":return hn(i);case"yyyyy":return hn(f);case"yyyyyy":return hn(o);case"M":return hn(s);case"MM":return hn(a);case"MMM":return vn(t.months("short",!0,!1),1);case"MMMM":return vn(t.months("long",!0,!1),1);case"L":return hn(s);case"LL":return hn(a);case"LLL":return vn(t.months("short",!1,!1),1);case"LLLL":return vn(t.months("long",!1,!1),1);case"d":return hn(s);case"dd":return hn(a);case"o":return hn(u);case"ooo":return hn(r);case"HH":return hn(a);case"H":return hn(s);case"hh":return hn(a);case"h":return hn(s);case"mm":return hn(a);case"m":case"q":return hn(s);case"qq":return hn(a);case"s":return hn(s);case"ss":return hn(a);case"S":return hn(u);case"SSS":return hn(r);case"u":return yn(c);case"a":return vn(t.meridiems(),0);case"kkkk":return hn(i);case"kk":return hn(l,ue);case"W":return hn(s);case"WW":return hn(a);case"E":case"c":return hn(n);case"EEE":return vn(t.weekdays("short",!1,!1),1);case"EEEE":return vn(t.weekdays("long",!1,!1),1);case"ccc":return vn(t.weekdays("short",!0,!1),1);case"cccc":return vn(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return mn(new RegExp("([+-]"+s.source+")(?::("+a.source+"))?"),2);case"ZZZ":return mn(new RegExp("([+-]"+s.source+")("+a.source+")?"),2);case"z":return yn(/[a-z_+-/]{1,256}?/i);default:return g(h)}}(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return h.token=e,h}(t,e)})),i=r.find((function(e){return e.invalidReason}));if(i)return{input:t,tokens:a,invalidReason:i.invalidReason};var o=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),s=o[0],u=o[1],d=RegExp(s,"i"),c=function(e,t,n){var a=e.match(t);if(a){var r={},i=1;for(var o in n)if(J(n,o)){var s=n[o],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(r[s.token.val[0]]=s.deser(a.slice(i,i+u))),i+=u}return[a,r]}return[a,{}]}(t,d,u),l=c[0],f=c[1],g=f?function(e){var t;return t=z(e.Z)?z(e.z)?null:Qe.create(e.z):new ze(e.Z),z(e.q)||(e.M=3*(e.q-1)+1),z(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),z(e.u)||(e.S=te(e.u)),[Object.keys(e).reduce((function(t,n){var a=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return a&&(t[a]=e[n]),t}),{}),t]}(f):[null,null],h=g[0],A=g[1];if(J(f,"a")&&J(f,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:a,regex:d,rawMatches:l,matches:f,result:h,zone:A}}var xn=[0,31,59,90,120,151,181,212,243,273,304,334],_n=[0,31,60,91,121,152,182,213,244,274,305,335];function En(e,t){return new De("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function kn(e,t,n){var a=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===a?7:a}function Cn(e,t,n){return n+(ae(e)?_n:xn)[t-1]}function On(e,t){var n=ae(e)?_n:xn,a=n.findIndex((function(e){return ese(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:o},he(e))}function Sn(e){var t,n=e.weekYear,a=e.weekNumber,r=e.weekday,i=kn(n,1,4),o=re(n),s=7*a+r-i-3;s<1?s+=re(t=n-1):s>o?(t=n+1,s-=re(n)):t=n;var u=On(t,s),d=u.month,c=u.day;return Object.assign({year:t,month:d,day:c},he(e))}function Fn(e){var t=e.year,n=Cn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},he(e))}function jn(e){var t=e.year,n=On(t,e.ordinal),a=n.month,r=n.day;return Object.assign({year:t,month:a,day:r},he(e))}function Dn(e){var t=V(e.year),n=$(e.month,1,12),a=$(e.day,1,ie(e.year,e.month));return t?n?!a&&En("day",e.day):En("month",e.month):En("year",e.year)}function Tn(e){var t=e.hour,n=e.minute,a=e.second,r=e.millisecond,i=$(t,0,23)||24===t&&0===n&&0===a&&0===r,o=$(n,0,59),s=$(a,0,59),u=$(r,0,999);return i?o?s?!u&&En("millisecond",r):En("second",a):En("minute",n):En("hour",t)}function Mn(e){return new De("unsupported zone",'the zone "'+e.name+'" is not supported')}function Nn(e){return null===e.weekData&&(e.weekData=Bn(e.c)),e.weekData}function Un(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new ea(Object.assign({},n,t,{old:n}))}function Pn(e,t,n){var a=e-60*t*1e3,r=n.offset(a);if(t===r)return[a,t];a-=60*(r-t)*1e3;var i=n.offset(a);return r===i?[a,r]:[e-60*Math.min(r,i)*1e3,Math.max(r,i)]}function Ln(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function In(e,t,n){return Pn(oe(e),t,n)}function Qn(e,t){var n,a=Object.keys(t.values);-1===a.indexOf("milliseconds")&&a.push("milliseconds"),t=(n=t).shiftTo.apply(n,a);var r=e.o,i=e.c.year+t.years,o=e.c.month+t.months+3*t.quarters,s=Object.assign({},e.c,{year:i,month:o,day:Math.min(e.c.day,ie(i,o))+t.days+7*t.weeks}),u=an.fromObject({hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),d=Pn(oe(s),r,e.zone),c=d[0],l=d[1];return 0!==u&&(c+=u,l=e.zone.offset(c)),{ts:c,o:l}}function Hn(e,t,n,a,r){var i=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var s=t||o,u=ea.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return i?u:u.setZone(o)}return ea.invalid(new De("unparsable",'the input "'+r+"\" can't be parsed as "+a))}function zn(e,t,n){return void 0===n&&(n=!0),e.isValid?je.create(ut.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Kn(e,t){var n=t.suppressSeconds,a=void 0!==n&&n,r=t.suppressMilliseconds,i=void 0!==r&&r,o=t.includeOffset,s=t.includeZone,u=void 0!==s&&s,d=t.spaceZone,c=void 0!==d&&d,l=t.format,f=void 0===l?"extended":l,g="basic"===f?"HHmm":"HH:mm";return a&&0===e.second&&0===e.millisecond||(g+="basic"===f?"ss":":ss",i&&0===e.millisecond||(g+=".SSS")),(u||o)&&c&&(g+=" "),u?g+="z":o&&(g+="basic"===f?"ZZZ":"ZZ"),zn(e,g)}var Vn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wn={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},qn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Gn=["year","month","day","hour","minute","second","millisecond"],Xn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Yn=["year","ordinal","hour","minute","second","millisecond"];function Jn(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new A(e);return t}function $n(e,t){var n=Gn,a=Array.isArray(n),r=0;for(n=a?n:n[Symbol.iterator]();;){var i;if(a){if(r>=n.length)break;i=n[r++]}else{if((r=n.next()).done)break;i=r.value}var o=i;z(e[o])&&(e[o]=Vn[o])}var s=Dn(e)||Tn(e);if(s)return ea.invalid(s);var u=$e.now(),d=In(e,t.offset(u),t),c=d[0],l=d[1];return new ea({ts:c,zone:t,o:l})}function Zn(e,t,n){var a=!!z(n.round)||n.round,r=function(e,r){return e=ne(e,a||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},i=function(a){return n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a)};if(n.unit)return r(i(n.unit),n.unit);var o=n.units,s=Array.isArray(o),u=0;for(o=s?o:o[Symbol.iterator]();;){var d;if(s){if(u>=o.length)break;d=o[u++]}else{if((u=o.next()).done)break;d=u.value}var c=d,l=i(c);if(Math.abs(l)>=1)return r(l,c)}return r(0,n.units[n.units.length-1])}var ea=function(){function e(e){var t=e.zone||$e.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new De("invalid input"):null)||(t.isValid?null:Mn(t));this.ts=z(e.ts)?$e.now():e.ts;var a=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var i=[e.old.c,e.old.o];a=i[0],r=i[1]}else{var o=t.offset(this.ts);a=Ln(this.ts,o),a=(n=Number.isNaN(a.year)?new De("invalid input"):null)?null:a,r=n?null:o}this._zone=t,this.loc=e.loc||ut.create(),this.invalid=n,this.weekData=null,this.c=a,this.o=r,this.isLuxonDateTime=!0}e.local=function(t,n,a,r,i,o,s){return z(t)?new e({ts:$e.now()}):$n({year:t,month:n,day:a,hour:r,minute:i,second:o,millisecond:s},$e.defaultZone)},e.utc=function(t,n,a,r,i,o,s){return z(t)?new e({ts:$e.now(),zone:ze.utcInstance}):$n({year:t,month:n,day:a,hour:r,minute:i,second:o,millisecond:s},ze.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var a=function(e){return"[object Date]"===Object.prototype.toString.call(e)}(t)?t.valueOf():NaN;if(Number.isNaN(a))return e.invalid("invalid input");var r=Ve(n.zone,$e.defaultZone);return r.isValid?new e({ts:a,zone:r,loc:ut.fromObject(n)}):e.invalid(Mn(r))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),K(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ve(n.zone,$e.defaultZone),loc:ut.fromObject(n)});throw new v("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),K(t))return new e({ts:1e3*t,zone:Ve(n.zone,$e.defaultZone),loc:ut.fromObject(n)});throw new v("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ve(t.zone,$e.defaultZone);if(!n.isValid)return e.invalid(Mn(n));var a=$e.now(),r=n.offset(a),i=fe(t,Jn,["zone","locale","outputCalendar","numberingSystem"]),o=!z(i.ordinal),s=!z(i.year),u=!z(i.month)||!z(i.day),d=s||u,c=i.weekYear||i.weekNumber,l=ut.fromObject(t);if((d||o)&&c)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new p("Can't mix ordinal dates with month/day");var f,g,h=c||i.weekday&&!d,A=Ln(a,r);h?(f=Xn,g=Wn,A=Bn(A)):o?(f=Yn,g=qn,A=Fn(A)):(f=Gn,g=Vn);var v=!1,m=f,y=Array.isArray(m),R=0;for(m=y?m:m[Symbol.iterator]();;){var b;if(y){if(R>=m.length)break;b=m[R++]}else{if((R=m.next()).done)break;b=R.value}var w=b;z(i[w])?i[w]=v?g[w]:A[w]:v=!0}var x=(h?function(e){var t=V(e.weekYear),n=$(e.weekNumber,1,se(e.weekYear)),a=$(e.weekday,1,7);return t?n?!a&&En("weekday",e.weekday):En("week",e.week):En("weekYear",e.weekYear)}(i):o?function(e){var t=V(e.year),n=$(e.ordinal,1,re(e.year));return t?!n&&En("ordinal",e.ordinal):En("year",e.year)}(i):Dn(i))||Tn(i);if(x)return e.invalid(x);var _=In(h?Sn(i):o?jn(i):i,r,n),E=new e({ts:_[0],zone:n,o:_[1],loc:l});return i.weekday&&d&&t.weekday!==E.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+E.toISO()):E},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return lt(e,[Ut,Qt],[Pt,Ht],[Lt,zt],[It,Kt])}(e);return Hn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return lt(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[St,Ft])}(e);return Hn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return lt(e,[jt,Mt],[Dt,Mt],[Tt,Nt])}(e);return Hn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,a){if(void 0===a&&(a={}),z(t)||z(n))throw new v("fromFormat requires an input string and a format");var r=a,i=r.locale,o=void 0===i?null:i,s=r.numberingSystem,u=void 0===s?null:s,d=function(e,t,n){var a=wn(e,t,n);return[a.result,a.zone,a.invalidReason]}(ut.fromOpts({locale:o,numberingSystem:u,defaultToEN:!0}),t,n),c=d[0],l=d[1],f=d[2];return f?e.invalid(f):Hn(c,l,a,"format "+n,t)},e.fromString=function(t,n,a){return void 0===a&&(a={}),e.fromFormat(t,n,a)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return lt(e,[Vt,qt],[Wt,Gt])}(e);return Hn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new v("need to specify a reason the DateTime is invalid");var a=t instanceof De?t:new De(t,n);if($e.throwOnInvalid)throw new f(a);return new e({invalid:a})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=je.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(ze.instance(e),t)},t.toLocal=function(){return this.setZone($e.defaultZone)},t.setZone=function(t,n){var a=void 0===n?{}:n,r=a.keepLocalTime,i=void 0!==r&&r,o=a.keepCalendarTime,s=void 0!==o&&o;if((t=Ve(t,$e.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(i||s){var d=t.offset(this.ts);u=In(this.toObject(),d,t)[0]}return Un(this,{ts:u,zone:t})}return e.invalid(Mn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,a=t.numberingSystem,r=t.outputCalendar;return Un(this,{loc:this.loc.clone({locale:n,numberingSystem:a,outputCalendar:r})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=fe(e,Jn,[]);z(n.weekYear)&&z(n.weekNumber)&&z(n.weekday)?z(n.ordinal)?(t=Object.assign(this.toObject(),n),z(n.day)&&(t.day=Math.min(ie(t.year,t.month),t.day))):t=jn(Object.assign(Fn(this.c),n)):t=Sn(Object.assign(Bn(this.c),n));var a=In(t,this.o,this.zone);return Un(this,{ts:a[0],o:a[1]})},t.plus=function(e){return this.isValid?Un(this,Qn(this,rn(e))):this},t.minus=function(e){return this.isValid?Un(this,Qn(this,rn(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=an.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var a=Math.ceil(this.month/3);t.month=3*(a-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?je.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=w),this.isValid?je.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?je.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),zn(this,n)},t.toISOWeekDate=function(){return zn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,a=void 0!==n&&n,r=t.suppressSeconds,i=void 0!==r&&r,o=t.includeOffset,s=void 0===o||o,u=t.format;return Kn(this,{suppressSeconds:i,suppressMilliseconds:a,includeOffset:s,format:void 0===u?"extended":u})},t.toRFC2822=function(){return zn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return zn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return zn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,a=void 0===n||n,r=t.includeZone;return Kn(this,{includeOffset:a,includeZone:void 0!==r&&r,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return an.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var a=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),r=function(e){return Array.isArray(e)?e:[e]}(t).map(an.normalizeUnit),i=e.valueOf()>this.valueOf(),o=function(e,t,n,a){var r,i=function(e,t,n){for(var a,r,i={},o=0,s=[["years",function(e,t){return t.year-e.year}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=dn(e,t);return(n-n%7)/7}],["days",dn]];o=0){var l;a=d;var f,g=c(e,t);(r=e.plus(((l={})[d]=g,l)))>t?(e=e.plus(((f={})[d]=g-1,f)),g-=1):e=r,i[d]=g}}return[e,i,r,a]}(e,t,n),o=i[0],s=i[1],u=i[2],d=i[3],c=t-o,l=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));0===l.length&&(u0?(f=an.fromMillis(c,a)).shiftTo.apply(f,l).plus(g):g}(i?this:e,i?e:this,r,a);return i?o.negate():o},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.local(),t,n)},t.until=function(e){return this.isValid?sn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),a=t.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ae(this.year)}},{key:"daysInMonth",get:function(){return ie(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?re(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?se(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return w}},{key:"DATE_MED",get:function(){return x}},{key:"DATE_FULL",get:function(){return _}},{key:"DATE_HUGE",get:function(){return E}},{key:"TIME_SIMPLE",get:function(){return k}},{key:"TIME_WITH_SECONDS",get:function(){return C}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return O}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return B}},{key:"TIME_24_SIMPLE",get:function(){return S}},{key:"TIME_24_WITH_SECONDS",get:function(){return F}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return j}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return D}},{key:"DATETIME_SHORT",get:function(){return T}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return M}},{key:"DATETIME_MED",get:function(){return N}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return U}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return P}},{key:"DATETIME_FULL",get:function(){return L}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return I}},{key:"DATETIME_HUGE",get:function(){return Q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return H}}]),e}();function ta(e){if(ea.isDateTime(e))return e;if(e&&e.valueOf&&K(e.valueOf()))return ea.fromJSDate(e);if(e&&"object"==typeof e)return ea.fromObject(e);throw new v("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=ea,t.Duration=an,t.FixedOffsetZone=ze,t.IANAZone=Qe,t.Info=un,t.Interval=sn,t.InvalidZone=Ke,t.LocalZone=Ne,t.Settings=$e,t.Zone=Te},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var a=n(55);e.exports=function(e){if(!a(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var a=n(43),r=n(196);a({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){var a=n(46),r=n(291),i=n(64),o=n(192),s=n(295),u=n(401),d=r("wks"),c=a.Symbol,l=u?c:c&&c.withoutSetter||o;e.exports=function(e){return i(d,e)||(s&&i(c,e)?d[e]=c[e]:d[e]=l("Symbol."+e)),d[e]}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1194),t),r(n(1205),t),r(n(317),t),r(n(318),t),r(n(458),t),r(n(325),t),r(n(459),t),r(n(1207),t),r(n(324),t),r(n(460),t),r(n(1209),t),r(n(218),t),r(n(461),t),r(n(219),t),r(n(1210),t),r(n(1211),t),r(n(463),t),r(n(462),t),r(n(1212),t)},,function(e,t,n){var a=n(36);e.exports=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var a=n(63),r=n(388),i=n(56),o=n(191),s=Object.defineProperty;t.f=a?s:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var a=n(43),r=n(298);a({target:"String",proto:!0,forced:n(299)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){var a=n(404),r="object"==typeof self&&self&&self.Object===Object&&self,i=a||r||Function("return this")();e.exports=i},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){var a;try{a={clone:n(1243),constant:n(497),each:n(1301),filter:n(1307),has:n(1330),isArray:n(40),isEmpty:n(1332),isFunction:n(224),isUndefined:n(1333),keys:n(126),map:n(1334),reduce:n(1336),size:n(1339),transform:n(1345),union:n(1346),values:n(1365)}}catch(e){}a||(a=window._),e.exports=a},function(e,t,n){"use strict";n.r(t);var a=n(580),r=n.n(a),i=n(1),o=n(268),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=Object(o.a)((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),d=n(180),c=n(103),l=n(102),f=u,g=function(e){return"theme"!==e&&"innerRef"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:g};function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function A(e){for(var t=1;t=51||!r((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),A=l("concat"),v=function(e){if(!o(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};a({target:"Array",proto:!0,forced:!p||!A},{concat:function(e){var t,n,a,r,i,o=s(this),l=c(o,0),f=0;for(t=-1,a=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");d(l,f++,i)}return l.length=f,l}})},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var a=n(43),r=n(396).indexOf,i=n(209),o=n(169),s=[].indexOf,u=!!s&&1/[1].indexOf(1,-0)<0,d=i("indexOf"),c=o("indexOf",{ACCESSORS:!0,1:0});a({target:"Array",proto:!0,forced:u||!d||!c},{indexOf:function(e){return u?s.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var a=n(313);e.exports=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=a(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}},function(e,t,n){var a;try{a=n(1241)}catch(e){}a||(a=window.graphlib),e.exports=a},function(e,t,n){var a=n(514),r="object"==typeof self&&self&&self.Object===Object&&self,i=a||r||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var a=n(48);e.exports=function(e,t,n){return new a(e,n).compare(new a(t,n))}},function(e,t,n){var a=n(13),r=n(14),i=function(){"use strict";function e(t,n){var r=this;if(a(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof o)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return r(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var a=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(a,k(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),s("comparator trim",e,c[l.COMPARATORTRIM]),e=(e=(e=e.replace(c[l.TILDETRIM],g)).replace(c[l.CARETTRIM],h)).split(/\s+/).join(" ");var r=n?c[l.COMPARATORLOOSE]:c[l.COMPARATOR];return e.split(" ").map((function(e){return A(e,t.options)})).join(" ").split(/\s+/).map((function(e){return E(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(r)}:function(){return!0}).map((function(e){return new o(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((function(e){return p(e,n)&&t.set.some((function(t){return p(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(var t=0;t=".concat(n,".").concat(r,".0").concat(a," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".0").concat(a," <").concat(+n+1,".0.0-0"):o?(s("replaceCaret pr",o),u="0"===n?"0"===r?">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(r,".").concat(+i+1,"-0"):">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(+n+1,".0.0-0")):(s("no pr"),u="0"===n?"0"===r?">=".concat(n,".").concat(r,".").concat(i).concat(a," <").concat(n,".").concat(r,".").concat(+i+1,"-0"):">=".concat(n,".").concat(r,".").concat(i).concat(a," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".").concat(i," <").concat(+n+1,".0.0-0")),s("caret return",u),u}))},w=function(e,t){return s("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return x(e,t)})).join(" ")},x=function(e,t){e=e.trim();var n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(function(n,a,r,i,o,u){s("xRange",e,n,a,r,i,o,u);var d=v(r),c=d||v(i),l=c||v(o),f=l;return"="===a&&f&&(a=""),u=t.includePrerelease?"-0":"",d?n=">"===a||"<"===a?"<0.0.0-0":"*":a&&f?(c&&(i=0),o=0,">"===a?(a=">=",c?(r=+r+1,i=0,o=0):(i=+i+1,o=0)):"<="===a&&(a="<",c?r=+r+1:i=+i+1),"<"===a&&(u="-0"),n="".concat(a+r,".").concat(i,".").concat(o).concat(u)):c?n=">=".concat(r,".0.0").concat(u," <").concat(+r+1,".0.0-0"):l&&(n=">=".concat(r,".").concat(i,".0").concat(u," <").concat(r,".").concat(+i+1,".0-0")),s("xRange return",n),n}))},_=function(e,t){return s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")},E=function(e,t){return s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")},k=function(e){return function(t,n,a,r,i,o,s,u,d,c,l,f,g){return n=v(a)?"":v(r)?">=".concat(a,".0.0").concat(e?"-0":""):v(i)?">=".concat(a,".").concat(r,".0").concat(e?"-0":""):o?">=".concat(n):">=".concat(n).concat(e?"-0":""),u=v(d)?"":v(c)?"<".concat(+d+1,".0.0-0"):v(l)?"<".concat(d,".").concat(+c+1,".0-0"):f?"<=".concat(d,".").concat(c,".").concat(l,"-").concat(f):e?"<".concat(d,".").concat(c,".").concat(+l+1,"-0"):"<=".concat(u),"".concat(n," ").concat(u).trim()}},C=function(e,t,n){for(var a=0;a0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},,function(e,t,n){"use strict";function a(e){return e&&e.replace(/^['"]|['"]$/g,"")}function r(e){return e.flowType?"union"===e.flowType.name&&e.flowType.elements.every((function(e){return"literal"===e.name}))?Object.assign({},e.flowType,{name:"enum",value:e.flowType.elements}):e.flowType:e.type}function i(e){return e&&e.replace(/^\s|\s$/g,"\u2423")}n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n(726),n(20),n(24),n(57),n(109)},function(e,t,n){"use strict";n(73),n(24),n(93),n(66);var a=n(1),r=n.n(a),i=n(3),o=n.n(i),s=n(28),u=n(12);function d(){return(d=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["classes","semantic","size","color","underlined","children"]),f=a||"span",g=Object(s.a)(n.text,n[i+"Size"],n[o+"Color"],((t={})[n[f]]=!!a,t[n.isUnderlined]=u,t));return r.a.createElement(f,d({},l,{className:g}),c)};c.propTypes={classes:o.a.objectOf(o.a.string.isRequired).isRequired,semantic:o.a.oneOf(["em","strong"]),size:o.a.oneOf(["inherit","small","base","text"]),color:o.a.oneOf(["base","light"]),underlined:o.a.bool,children:o.a.node.isRequired},c.defaultProps={size:"inherit",color:"base",underlined:!1};var l=Object(u.a)((function(e){var t=e.fontFamily,n=e.fontSize,a=e.color;return{text:{fontFamily:t.base},inheritSize:{fontSize:"inherit"},smallSize:{fontSize:n.small},baseSize:{fontSize:n.base},textSize:{fontSize:n.text},baseColor:{color:a.base},lightColor:{color:a.light},em:{fontStyle:"italic"},strong:{fontWeight:"bold"},isUnderlined:{borderBottom:[[1,"dotted",a.lightest]]}}}))(c);n.d(t,"a",(function(){return l}))},,function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(215),t),r(n(319),t),r(n(441),t),r(n(1198),t)},function(e,t,n){var a=n(480),r="object"==typeof self&&self&&self.Object===Object&&self,i=a||r||Function("return this")();e.exports=i},,,,function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var a=n(43),r=n(46),i=n(166),o=n(392),s=n(63),u=n(295),d=n(401),c=n(36),l=n(64),f=n(296),g=n(55),h=n(56),p=n(141),A=n(138),v=n(191),m=n(189),y=n(679),R=n(195),b=n(193),w=n(682),x=n(293),_=n(286),E=n(65),k=n(287),C=n(120),O=n(139),B=n(291),S=n(290),F=n(165),j=n(192),D=n(58),T=n(415),M=n(683),N=n(684),U=n(289),P=n(168).forEach,L=S("hidden"),I=D("toPrimitive"),Q=U.set,H=U.getterFor("Symbol"),z=Object.prototype,K=r.Symbol,V=i("JSON","stringify"),W=_.f,q=E.f,G=w.f,X=k.f,Y=B("symbols"),J=B("op-symbols"),$=B("string-to-symbol-registry"),Z=B("symbol-to-string-registry"),ee=B("wks"),te=r.QObject,ne=!te||!te.prototype||!te.prototype.findChild,ae=s&&c((function(){return 7!=y(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(e,t,n){var a=W(z,t);a&&delete z[t],q(e,t,n),a&&e!==z&&q(z,t,a)}:q,re=function(e,t){var n=Y[e]=y(K.prototype);return Q(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=d?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof K},oe=function(e,t,n){e===z&&oe(J,t,n),h(e);var a=v(t,!0);return h(n),l(Y,a)?(n.enumerable?(l(e,L)&&e[L][a]&&(e[L][a]=!1),n=y(n,{enumerable:m(0,!1)})):(l(e,L)||q(e,L,m(1,{})),e[L][a]=!0),ae(e,a,n)):q(e,a,n)},se=function(e,t){h(e);var n=A(t),a=R(n).concat(le(n));return P(a,(function(t){s&&!ue.call(n,t)||oe(e,t,n[t])})),e},ue=function(e){var t=v(e,!0),n=X.call(this,t);return!(this===z&&l(Y,t)&&!l(J,t))&&(!(n||!l(this,t)||!l(Y,t)||l(this,L)&&this[L][t])||n)},de=function(e,t){var n=A(e),a=v(t,!0);if(n!==z||!l(Y,a)||l(J,a)){var r=W(n,a);return!r||!l(Y,a)||l(n,L)&&n[L][a]||(r.enumerable=!0),r}},ce=function(e){var t=G(A(e)),n=[];return P(t,(function(e){l(Y,e)||l(F,e)||n.push(e)})),n},le=function(e){var t=e===z,n=G(t?J:A(e)),a=[];return P(n,(function(e){!l(Y,e)||t&&!l(z,e)||a.push(Y[e])})),a};u||(O((K=function(){if(this instanceof K)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=j(e),n=function e(n){this===z&&e.call(J,n),l(this,L)&&l(this[L],t)&&(this[L][t]=!1),ae(this,t,m(1,n))};return s&&ne&&ae(z,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return H(this).tag})),O(K,"withoutSetter",(function(e){return re(j(e),e)})),k.f=ue,E.f=oe,_.f=de,b.f=w.f=ce,x.f=le,T.f=function(e){return re(D(e),e)},s&&(q(K.prototype,"description",{configurable:!0,get:function(){return H(this).description}}),o||O(z,"propertyIsEnumerable",ue,{unsafe:!0}))),a({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:K}),P(R(ee),(function(e){M(e)})),a({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(l($,t))return $[t];var n=K(t);return $[t]=n,Z[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(l(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),a({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?y(e):se(y(e),t)},defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:de}),a({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ce,getOwnPropertySymbols:le}),a({target:"Object",stat:!0,forced:c((function(){x.f(1)}))},{getOwnPropertySymbols:function(e){return x.f(p(e))}}),V&&a({target:"JSON",stat:!0,forced:!u||c((function(){var e=K();return"[null]"!=V([e])||"{}"!=V({a:e})||"{}"!=V(Object(e))}))},{stringify:function(e,t,n){for(var a,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(a=t,(g(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof a&&(t=a.call(this,e,t)),!ie(t))return t}),r[1]=t,V.apply(null,r)}}),K.prototype[I]||C(K.prototype,I,K.prototype.valueOf),N(K,"Symbol"),F[L]=!0},function(e,t,n){"use strict";var a=n(43),r=n(63),i=n(46),o=n(64),s=n(55),u=n(65).f,d=n(393),c=i.Symbol;if(r&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var l={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new c(e):void 0===e?c():c(e);return""===e&&(l[t]=!0),t};d(f,c);var g=f.prototype=c.prototype;g.constructor=f;var h=g.toString,p="Symbol(test)"==String(c("test")),A=/^Symbol\((.*)\)[^)]+$/;u(g,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(o(l,e))return"";var n=p?t.slice(7,-1):t.replace(A,"$1");return""===n?void 0:n}}),a({global:!0,forced:!0},{Symbol:f})}},function(e,t,n){var a=n(43),r=n(141),i=n(195);a({target:"Object",stat:!0,forced:n(36)((function(){i(1)}))},{keys:function(e){return i(r(e))}})},function(e,t,n){"use strict";var a=n(43),r=n(168).filter,i=n(297),o=n(169),s=i("filter"),u=o("filter");a({target:"Array",proto:!0,forced:!s||!u},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var a=n(13),r=n(14);Object.defineProperty(t,"__esModule",{value:!0}),t.Action=t.InputType=void 0;var i=n(214);!function(e){e.MOUSE_DOWN="mouse-down",e.MOUSE_UP="mouse-up",e.MOUSE_MOVE="mouse-move",e.MOUSE_WHEEL="mouse-wheel",e.KEY_DOWN="key-down",e.KEY_UP="key-up"}(t.InputType||(t.InputType={}));var o=function(){function e(t){a(this,e),this.options=t,this.id=i.Toolkit.UID()}return r(e,[{key:"setEngine",value:function(e){this.engine=e}}]),e}();t.Action=o},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";function a(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a=0||(r[n]=e[n]);return r}n.d(t,"a",(function(){return a}))},,,,function(e,t,n){"use strict";var a=function(e){for(var t,n=0,a=0,r=e.length;r>=4;++a,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(a)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(268);n.d(t,"a",(function(){return p}));var o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},d=function(e){return null!=e&&"boolean"!=typeof e},c=Object(i.a)((function(e){return u(e)?e:e.replace(o,"-$&").toLowerCase()})),l=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return g={name:t,styles:n,next:g},t}))}return 1===r[e]||u(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,n,a){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return g={name:n.name,styles:n.styles,next:g},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)g={name:r.name,styles:r.styles,next:g},r=r.next;return n.styles+";"}return function(e,t,n){var a="";if(Array.isArray(n))for(var r=0;r]*>)/g,p=/\$([$&'`]|\d\d?)/g,A=function(e){return void 0===e?e:String(e)};a("replace",2,(function(e,t,n,a){var v=a.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,m=a.REPLACE_KEEPS_$0,y=v?"$":"$0";return[function(n,a){var r=u(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r,a):t.call(String(r),n,a)},function(e,a){if(!v&&m||"string"==typeof a&&-1===a.indexOf(y)){var i=n(t,e,this,a);if(i.done)return i.value}var u=r(e),g=String(this),h="function"==typeof a;h||(a=String(a));var p=u.global;if(p){var b=u.unicode;u.lastIndex=0}for(var w=[];;){var x=c(u,g);if(null===x)break;if(w.push(x),!p)break;""===String(x[0])&&(u.lastIndex=d(g,o(u.lastIndex),b))}for(var _="",E=0,k=0;k=E&&(_+=g.slice(E,O)+D,E=O+C.length)}return _+g.slice(E)}];function R(e,n,a,r,o,s){var u=a+e.length,d=r.length,c=p;return void 0!==o&&(o=i(o),c=h),t.call(s,c,(function(t,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,a);case"'":return n.slice(u);case"<":s=o[i.slice(1,-1)];break;default:var c=+i;if(0===c)return t;if(c>d){var l=g(c/10);return 0===l?t:l<=d?void 0===r[l-1]?i.charAt(1):r[l-1]+i.charAt(1):t}s=r[c-1]}return void 0===s?"":s}))}}))},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var a=n(303),r=n(306);e.exports=function(e){return null!=e&&r(e.length)&&!a(e)}},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1213),t),r(n(326),t),r(n(464),t),r(n(1214),t),r(n(327),t),r(n(466),t),r(n(468),t),r(n(467),t),r(n(1218),t),r(n(469),t),r(n(470),t),r(n(1219),t),r(n(471),t),r(n(328),t)},function(e,t,n){var a=n(1445),r=n(1458),i=n(131),o=n(47),s=n(1465);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?r(e[0],e[1]):a(e):s(e)}},function(e,t,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),e.exports=n(605)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(182);function r(e,t){if(e){if("string"==typeof e)return Object(a.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(a.a)(e,t):void 0}}},,,,,function(e,t,n){var a=n(63),r=n(65),i=n(189);e.exports=a?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var a=n(627),r=n(632);e.exports=function(e,t){var n=r(e,t);return a(n)?n:void 0}},function(e,t,n){var a=n(202),r=n(628),i=n(629),o=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):i(e)}},function(e,t){function n(e){for(var t=[[e.x,e.y]];e.parent;)e=e.parent,t.push([e.x,e.y]);return t.reverse()}function a(e,t,n,a){var r,i,o,s,u,d,c=Math.abs,l=[];for(r=e-s&&(u-=s,e+=r),de)return!1;if((n+=t[a+1])>=e)return!0}}function h(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&d.test(String.fromCharCode(e)):!1!==t&&g(e,l)))}function p(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&(g(e,l)||g(e,f)))))}var A=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function v(e,t){return new A(e,{beforeExpr:!0,binop:t})}var m={beforeExpr:!0},y={startsExpr:!0},R={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,R[e]=new A(e,t)}var w={num:new A("num",y),regexp:new A("regexp",y),string:new A("string",y),name:new A("name",y),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",m),semi:new A(";",m),colon:new A(":",m),dot:new A("."),question:new A("?",m),arrow:new A("=>",m),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",m),backQuote:new A("`",y),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:v("%",10),star:v("*",10),slash:v("/",10),starstar:new A("**",{beforeExpr:!0}),_break:b("break"),_case:b("case",m),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",m),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",m),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",m),_switch:b("switch"),_throw:b("throw",m),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class",y),_extends:b("extends",m),_export:b("export"),_import:b("import",y),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,_=new RegExp(x.source,"g");function E(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var k=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,O=Object.prototype,B=O.hasOwnProperty,S=O.toString;function F(e,t){return B.call(e,t)}var j=Array.isArray||function(e){return"[object Array]"===S.call(e)};function D(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var T=function(e,t){this.line=e,this.column=t};T.prototype.offset=function(e){return new T(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function N(e,t){for(var n=1,a=0;;){_.lastIndex=a;var r=_.exec(e);if(!(r&&r.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),j(t.onToken)){var a=t.onToken;t.onToken=function(e){return a.push(e)}}return j(t.onComment)&&(t.onComment=function(e,t){return function(n,a,r,i,o,s){var u={type:n?"Block":"Line",value:a,start:r,end:i};e.locations&&(u.loc=new M(this,o,s)),e.ranges&&(u.range=[r,i]),t.push(u)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=D(i[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";if(!0!==e.allowReserved){for(var o=e.ecmaVersion;!(r=a[o]);o--);"module"===e.sourceType&&(r+=" await")}this.reservedWords=D(r);var s=(r?r+" ":"")+a.strict;this.reservedWordsStrict=D(s),this.reservedWordsStrictBind=D(s+" "+a.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=w.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},I={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};L.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},I.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},I.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},I.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},I.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},I.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},I.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},L.prototype.inNonArrowFunction=function(){return(2&this.currentThisScope().flags)>0},L.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,a=0;a-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},Q.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,a=e.doubleProto;if(!t)return n>=0||a>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),a>=0&&this.raiseRecoverable(a,"Redefinition of __proto__ property")},Q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case w._class:return e&&this.unexpected(),this.parseClass(i,!0);case w._if:return this.parseIfStatement(i);case w._return:return this.parseReturnStatement(i);case w._switch:return this.parseSwitchStatement(i);case w._throw:return this.parseThrowStatement(i);case w._try:return this.parseTryStatement(i);case w._const:case w._var:return a=a||this.value,e&&"var"!==a&&this.unexpected(),this.parseVarStatement(i,a);case w._while:return this.parseWhileStatement(i);case w._with:return this.parseWithStatement(i);case w.braceL:return this.parseBlock(!0,i);case w.semi:return this.parseEmptyStatement(i);case w._export:case w._import:if(this.options.ecmaVersion>10&&r===w._import){C.lastIndex=this.pos;var o=C.exec(this.input),s=this.pos+o[0].length;if(40===this.input.charCodeAt(s))return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===w._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.value,d=this.parseExpression();return r===w.name&&"Identifier"===d.type&&this.eat(w.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},K.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(w.semi)||this.insertSemicolon()?e.label=null:this.type!==w.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a=6?this.eat(w.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},K.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(V),this.enterScope(0),this.expect(w.parenL),this.type===w.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===w._var||this.type===w._const||n){var a=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(a,!0,r),this.finishNode(a,"VariableDeclaration"),(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===a.declarations.length?(this.options.ecmaVersion>=9&&(this.type===w._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,a)):(t>-1&&this.unexpected(t),this.parseFor(e,a))}var i=new z,o=this.parseExpression(!0,i);return this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===w._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,i),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(i,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},K.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,G|(n?0:X),!1,t)},K.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(w._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},K.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(w.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},K.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(w.braceL),this.labels.push(W),this.enterScope(0);for(var n=!1;this.type!==w.braceR;)if(this.type===w._case||this.type===w._default){var a=this.type===w._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(w.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},K.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var q=[];K.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===w._catch){var t=this.startNode();if(this.next(),this.eat(w.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLVal(t.param,n?4:2),this.expect(w.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(w._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},K.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},K.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(V),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},K.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},K.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},K.parseLabeledStatement=function(e,t,n,a){for(var r=0,i=this.labels;r=0;s--){var u=this.labels[s];if(u.statementStart!==e.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(a?-1===a.indexOf("label")?a+"label":a:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},K.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},K.parseBlock=function(e,t){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(w.braceL),e&&this.enterScope(0);!this.eat(w.braceR);){var n=this.parseStatement(null);t.body.push(n)}return e&&this.exitScope(),this.finishNode(t,"BlockStatement")},K.parseFor=function(e,t){return e.init=t,this.expect(w.semi),e.test=this.type===w.semi?null:this.parseExpression(),this.expect(w.semi),e.update=this.type===w.parenR?null:this.parseExpression(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},K.parseForIn=function(e,t){var n=this.type===w._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)?this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"):"AssignmentPattern"===t.type&&this.raise(t.start,"Invalid left-hand side in for-loop"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},K.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(w.eq)?a.init=this.parseMaybeAssign(t):"const"!==n||this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===a.id.type||t&&(this.type===w._in||this.isContextual("of"))?a.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(w.comma))break}return e},K.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var G=1,X=2;K.parseFunction=function(e,t,n,a){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===w.star&&t&X&&this.unexpected(),e.generator=this.eat(w.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&G&&(e.id=4&t&&this.type!==w.name?null:this.parseIdent(),!e.id||t&X||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(P(e.async,e.generator)),t&G||(e.id=this.type===w.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(e,t&G?"FunctionDeclaration":"FunctionExpression")},K.parseFunctionParams=function(e){this.expect(w.parenL),e.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},K.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var a=this.startNode(),r=!1;for(a.body=[],this.expect(w.braceL);!this.eat(w.braceR);){var i=this.parseClassElement(null!==e.superClass);i&&(a.body.push(i),"MethodDefinition"===i.type&&"constructor"===i.kind&&(r&&this.raise(i.start,"Duplicate constructor in the same class"),r=!0))}return e.body=this.finishNode(a,"ClassBody"),this.strict=n,this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},K.parseClassElement=function(e){var t=this;if(this.eat(w.semi))return null;var n=this.startNode(),a=function(e,a){void 0===a&&(a=!1);var r=t.start,i=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===w.parenL||a&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(r,i),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=a("static");var r=this.eat(w.star),i=!1;r||(this.options.ecmaVersion>=8&&a("async",!0)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(w.star)):a("get")?n.kind="get":a("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var o=n.key,s=!1;return n.computed||n.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?n.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),r&&this.raise(o.start,"Constructor can't be a generator"),i&&this.raise(o.start,"Constructor can't be an async method"),n.kind="constructor",s=e),this.parseClassMethod(n,r,i,s),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},K.parseClassMethod=function(e,t,n,a){return e.value=this.parseMethod(t,n,a),this.finishNode(e,"MethodDefinition")},K.parseClassId=function(e,t){this.type===w.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},K.parseClassSuper=function(e){e.superClass=this.eat(w._extends)?this.parseExprSubscripts():null},K.parseExport=function(e,t){if(this.next(),this.eat(w.star))return this.expectContextual("from"),this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(w._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===w._function||(n=this.isAsyncFunction())){var a=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(a,4|G,!1,n)}else if(this.type===w._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,o=e.specifiers;i=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var a=0,r=e.properties;a=8&&!i&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(w._function))return this.parseFunction(this.startNodeAt(a,r),0,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(w.arrow))return this.parseArrowExpression(this.startNodeAt(a,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===w.name&&!i)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(w.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,r),[o],!0)}return o;case w.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case w.num:case w.string:return this.parseLiteral(this.value);case w._null:case w._true:case w._false:return(t=this.startNode()).value=this.type===w._null?null:this.type===w._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case w.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case w.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(w.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case w.braceL:return this.parseObj(!1,e);case w._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case w._class:return this.parseClass(this.startNode(),!1);case w._new:return this.parseNew();case w.backQuote:return this.parseTemplate();case w._import:return this.options.ecmaVersion>10?this.parseDynamicImport():this.unexpected();default:this.unexpected()}},J.parseDynamicImport=function(){var e=this.startNode();return this.next(),this.type!==w.parenL&&this.unexpected(),this.finishNode(e,"Import")},J.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1)),this.next(),this.finishNode(t,"Literal")},J.parseParenExpression=function(){this.expect(w.parenL);var e=this.parseExpression();return this.expect(w.parenR),e},J.parseParenAndDistinguishExpression=function(e){var t,n=this.start,a=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var i,o=this.start,s=this.startLoc,u=[],d=!0,c=!1,l=new z,f=this.yieldPos,g=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==w.parenR;){if(d?d=!1:this.expect(w.comma),r&&this.afterTrailingComma(w.parenR,!0)){c=!0;break}if(this.type===w.ellipsis){i=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===w.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var h=this.start,p=this.startLoc;if(this.expect(w.parenR),e&&!this.canInsertSemicolon()&&this.eat(w.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=g,this.parseParenArrowList(n,a,u);u.length&&!c||this.unexpected(this.lastTokStart),i&&this.unexpected(i),this.checkExpressionErrors(l,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=g||this.awaitPos,u.length>1?((t=this.startNodeAt(o,s)).expressions=u,this.finishNodeAt(t,"SequenceExpression",h,p)):t=u[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var A=this.startNodeAt(n,a);return A.expression=t,this.finishNode(A,"ParenthesizedExpression")}return t},J.parseParenItem=function(e){return e},J.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var $=[];J.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(w.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var a=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),a,r,!0),this.options.ecmaVersion>10&&"Import"===e.callee.type&&this.raise(e.callee.start,"Cannot use new with import(...)"),this.eat(w.parenL)?e.arguments=this.parseExprList(w.parenR,this.options.ecmaVersion>=8&&"Import"!==e.callee.type,!1):e.arguments=$,this.finishNode(e,"NewExpression")},J.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===w.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===w.backQuote,this.finishNode(n,"TemplateElement")},J.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var a=this.parseTemplateElement({isTagged:t});for(n.quasis=[a];!a.tail;)this.type===w.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(w.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(w.braceR),n.quasis.push(a=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},J.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===w.name||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===w.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},J.parseObj=function(e,t){var n=this.startNode(),a=!0,r={};for(n.properties=[],this.next();!this.eat(w.braceR);){if(a)a=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;var i=this.parseProperty(e,t);e||this.checkPropClash(i,r,t),n.properties.push(i)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},J.parseProperty=function(e,t){var n,a,r,i,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(w.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===w.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===w.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===w.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(r=this.start,i=this.startLoc),e||(n=this.eat(w.star)));var s=this.containsEsc;return this.parsePropertyName(o),!e&&!s&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(a=!0,n=this.options.ecmaVersion>=9&&this.eat(w.star),this.parsePropertyName(o,t)):a=!1,this.parsePropertyValue(o,e,n,a,r,i,t,s),this.finishNode(o,"Property")},J.parsePropertyValue=function(e,t,n,a,r,i,o,s){if((n||a)&&this.type===w.colon&&this.unexpected(),this.eat(w.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===w.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,a);else if(t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===w.comma||this.type===w.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||a)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,i,e.key):this.type===w.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,i,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||a)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var u="get"===e.kind?0:1;if(e.value.params.length!==u){var d=e.value.start;"get"===e.kind?this.raiseRecoverable(d,"getter should have no params"):this.raiseRecoverable(d,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},J.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(w.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(w.bracketR),e.key;e.computed=!1}return e.key=this.type===w.num||this.type===w.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},J.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},J.parseMethod=function(e,t,n){var a=this.startNode(),r=this.yieldPos,i=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(a),this.options.ecmaVersion>=6&&(a.generator=e),this.options.ecmaVersion>=8&&(a.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|P(t,a.generator)|(n?128:0)),this.expect(w.parenL),a.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0),this.yieldPos=r,this.awaitPos=i,this.awaitIdentPos=o,this.finishNode(a,"FunctionExpression")},J.parseArrowExpression=function(e,t,n){var a=this.yieldPos,r=this.awaitPos,i=this.awaitIdentPos;return this.enterScope(16|P(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=a,this.awaitPos=r,this.awaitIdentPos=i,this.finishNode(e,"ArrowFunctionExpression")},J.parseFunctionBody=function(e,t,n){var a=t&&this.type!==w.braceL,r=this.strict,i=!1;if(a)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!o||(i=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var s=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&!n&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=s}this.exitScope(),this.strict&&e.id&&this.checkLVal(e.id,5),this.strict=r},J.isSimpleParamList=function(e){for(var t=0,n=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var i=this.currentScope();a=this.treatFunctionsAsVar?i.lexical.indexOf(e)>-1:i.lexical.indexOf(e)>-1||i.var.indexOf(e)>-1,i.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(32&s.flags&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){a=!0;break}if(s.var.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e],3&s.flags)break}a&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},ee.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},ee.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ee.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags)return t}},ee.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags&&!(16&t.flags))return t}};var ne=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ae=L.prototype;function re(e,t,n,a){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=n),e}ae.startNode=function(){return new ne(this,this.start,this.startLoc)},ae.startNodeAt=function(e,t){return new ne(this,e,t)},ae.finishNode=function(e,t){return re.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ae.finishNodeAt=function(e,t,n,a){return re.call(this,e,t,n,a)};var ie=function(e,t,n,a,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=a,this.generator=!!r},oe={b_stat:new ie("{",!1),b_expr:new ie("{",!0),b_tmpl:new ie("${",!1),p_stat:new ie("(",!1),p_expr:new ie("(",!0),q_tmpl:new ie("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ie("function",!1),f_expr:new ie("function",!0),f_expr_gen:new ie("function",!0,!1,null,!0),f_gen:new ie("function",!1,!1,null,!0)},se=L.prototype;se.initialContext=function(){return[oe.b_stat]},se.braceIsBlock=function(e){var t=this.curContext();return t===oe.f_expr||t===oe.f_stat||(e!==w.colon||t!==oe.b_stat&&t!==oe.b_expr?e===w._return||e===w.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===w._else||e===w.semi||e===w.eof||e===w.parenR||e===w.arrow||(e===w.braceL?t===oe.b_stat:e!==w._var&&e!==w._const&&e!==w.name&&!this.exprAllowed):!t.isExpr)},se.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},se.updateContext=function(e){var t,n=this.type;n.keyword&&e===w.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},w.parenR.updateContext=w.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===oe.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},w.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?oe.b_stat:oe.b_expr),this.exprAllowed=!0},w.dollarBraceL.updateContext=function(){this.context.push(oe.b_tmpl),this.exprAllowed=!0},w.parenL.updateContext=function(e){var t=e===w._if||e===w._for||e===w._with||e===w._while;this.context.push(t?oe.p_stat:oe.p_expr),this.exprAllowed=!0},w.incDec.updateContext=function(){},w._function.updateContext=w._class.updateContext=function(e){!e.beforeExpr||e===w.semi||e===w._else||e===w._return&&x.test(this.input.slice(this.lastTokEnd,this.start))||(e===w.colon||e===w.braceL)&&this.curContext()===oe.b_stat?this.context.push(oe.f_stat):this.context.push(oe.f_expr),this.exprAllowed=!1},w.backQuote.updateContext=function(){this.curContext()===oe.q_tmpl?this.context.pop():this.context.push(oe.q_tmpl),this.exprAllowed=!1},w.star.updateContext=function(e){if(e===w._function){var t=this.context.length-1;this.context[t]===oe.f_expr?this.context[t]=oe.f_expr_gen:this.context[t]=oe.f_gen}this.exprAllowed=!0},w.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==w.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ue="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",de={9:ue,10:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic",11:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic"},ce="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",le="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",fe={9:le,10:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"},ge={};function he(e){var t=ge[e]={binary:D(de[e]+" "+ce),nonBinary:{General_Category:D(ce),Script:D(fe[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}he(9),he(10),he(11);var pe=L.prototype,Ae=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=ge[e.options.ecmaVersion>=11?11:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function ve(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function me(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function ye(e){return e>=65&&e<=90||e>=97&&e<=122}function Re(e){return ye(e)||95===e}function be(e){return Re(e)||we(e)}function we(e){return e>=48&&e<=57}function xe(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function _e(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ee(e){return e>=48&&e<=55}Ae.prototype.reset=function(e,t,n){var a=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchN=a&&this.parser.options.ecmaVersion>=9},Ae.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ae.prototype.at=function(e){var t=this.source,n=t.length;if(e>=n)return-1;var a=t.charCodeAt(e);if(!this.switchU||a<=55295||a>=57344||e+1>=n)return a;var r=t.charCodeAt(e+1);return r>=56320&&r<=57343?(a<<10)+r-56613888:a},Ae.prototype.nextIndex=function(e){var t=this.source,n=t.length;if(e>=n)return n;var a,r=t.charCodeAt(e);return!this.switchU||r<=55295||r>=57344||e+1>=n||(a=t.charCodeAt(e+1))<56320||a>57343?e+1:e+2},Ae.prototype.current=function(){return this.at(this.pos)},Ae.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},Ae.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},Ae.prototype.eat=function(e){return this.current()===e&&(this.advance(),!0)},pe.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,a=0;a-1&&this.raise(e.start,"Duplicate regular expression flag")}},pe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},pe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},pe.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},pe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},pe.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var a=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},pe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},pe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},pe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!me(t)&&(e.lastIntValue=t,e.advance(),!0)},pe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!me(n);)e.advance();return e.pos!==t},pe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},pe.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},pe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},pe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ve(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ve(e.lastIntValue);return!0}return!1},pe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return h(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},pe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=e.current();return e.advance(),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e)&&(n=e.lastIntValue),function(e){return p(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},pe.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},pe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},pe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},pe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},pe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},pe.regexp_eatZero=function(e){return 48===e.current()&&!we(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},pe.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},pe.regexp_eatControlLetter=function(e){var t=e.current();return!!ye(t)&&(e.lastIntValue=t%32,e.advance(),!0)},pe.regexp_eatRegExpUnicodeEscapeSequence=function(e){var t=e.pos;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(e.switchU&&n>=55296&&n<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(r>=56320&&r<=57343)return e.lastIntValue=1024*(n-55296)+(r-56320)+65536,!0}e.pos=a,e.lastIntValue=n}return!0}if(e.switchU&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&function(e){return e>=0&&e<=1114111}(e.lastIntValue))return!0;e.switchU&&e.raise("Invalid unicode escape"),e.pos=t}return!1},pe.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},pe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},pe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},pe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,a),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r),!0}return!1},pe.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){F(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},pe.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},pe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Re(t=e.current());)e.lastStringValue+=ve(t),e.advance();return""!==e.lastStringValue},pe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";be(t=e.current());)e.lastStringValue+=ve(t),e.advance();return""!==e.lastStringValue},pe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},pe.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},pe.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},pe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Ee(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var a=e.current();return 93!==a&&(e.lastIntValue=a,e.advance(),!0)},pe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},pe.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!we(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},pe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},pe.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;we(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},pe.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;xe(n=e.current());)e.lastIntValue=16*e.lastIntValue+_e(n),e.advance();return e.pos!==t},pe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},pe.regexp_eatOctalDigit=function(e){var t=e.current();return Ee(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},pe.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var a=0;a>10),56320+(1023&e)))}Ce.next=function(){this.options.onToken&&this.options.onToken(new ke(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Ce.getToken=function(){return this.next(),new ke(this)},"undefined"!=typeof Symbol&&(Ce[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===w.eof,value:t}}}}),Ce.curContext=function(){return this.context[this.context.length-1]},Ce.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(w.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Ce.readToken=function(e){return h(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Ce.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},Ce.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,a=this.input.indexOf("*/",this.pos+=2);if(-1===a&&this.raise(this.pos-2,"Unterminated comment"),this.pos=a+2,this.options.locations)for(_.lastIndex=n;(e=_.exec(this.input))&&e.index8&&e<14||e>=5760&&k.test(String.fromCharCode(e))))break e;++this.pos}}},Ce.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Ce.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(w.ellipsis)):(++this.pos,this.finishToken(w.dot))},Ce.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(w.assign,2):this.finishOp(w.slash,1)},Ce.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,a=42===e?w.star:w.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,a=w.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(w.assign,n+1):this.finishOp(a,n)},Ce.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?w.logicalOR:w.logicalAND,2):61===t?this.finishOp(w.assign,2):this.finishOp(124===e?w.bitwiseOR:w.bitwiseAND,1)},Ce.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(w.assign,2):this.finishOp(w.bitwiseXOR,1)},Ce.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!x.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(w.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(w.assign,2):this.finishOp(w.plusMin,1)},Ce.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(w.assign,n+1):this.finishOp(w.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(w.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Ce.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(w.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(w.arrow)):this.finishOp(61===e?w.eq:w.prefix,1)},Ce.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(w.parenL);case 41:return++this.pos,this.finishToken(w.parenR);case 59:return++this.pos,this.finishToken(w.semi);case 44:return++this.pos,this.finishToken(w.comma);case 91:return++this.pos,this.finishToken(w.bracketL);case 93:return++this.pos,this.finishToken(w.bracketR);case 123:return++this.pos,this.finishToken(w.braceL);case 125:return++this.pos,this.finishToken(w.braceR);case 58:return++this.pos,this.finishToken(w.colon);case 63:return++this.pos,this.finishToken(w.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(w.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(w.prefix,1)}this.raise(this.pos,"Unexpected character '"+Oe(e)+"'")},Ce.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Ce.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var a=this.input.charAt(this.pos);if(x.test(a)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===a)t=!0;else if("]"===a&&t)t=!1;else if("/"===a&&!t)break;e="\\"===a}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var i=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(i);var s=this.regexpState||(this.regexpState=new Ae(this));s.reset(n,r,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(w.regexp,{pattern:r,flags:o,value:u})},Ce.readInt=function(e,t){for(var n=this.pos,a=0,r=0,i=null==t?1/0:t;r=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,a=a*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:a},Ce.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n="undefined"!=typeof BigInt?BigInt(this.input.slice(t,this.pos)):null,++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,n)},Ce.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var a=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===a){var r=this.input.slice(t,this.pos),i="undefined"!=typeof BigInt?BigInt(r):null;return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,i)}46!==a||n||(++this.pos,this.readInt(10),a=this.input.charCodeAt(this.pos)),69!==a&&101!==a||n||(43!==(a=this.input.charCodeAt(++this.pos))&&45!==a||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o=this.input.slice(t,this.pos),s=n?parseInt(o,8):parseFloat(o);return this.finishToken(w.num,s)},Ce.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Ce.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;92===a?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(a,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(w.string,t)};var Be={};Ce.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Be)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ce.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Be;this.raise(e,t)},Ce.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==w.template&&this.type!==w.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(w.template,e)):36===n?(this.pos+=2,this.finishToken(w.dollarBraceL)):(++this.pos,this.finishToken(w.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Ce.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(n,8);return a>255&&(n=n.slice(0,-1),a=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return E(t)?"":String.fromCharCode(t)}},Ce.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Ce.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,a=this.options.ecmaVersion>=6;this.pos0?r(a(e),9007199254740991):0}},function(e,t,n){var a=n(90);e.exports=function(e){return Object(a(e))}},function(e,t,n){"use strict";var a=n(139),r=n(56),i=n(36),o=n(294),s=RegExp.prototype,u=s.toString,d=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),c="toString"!=u.name;(d||c)&&a(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?o.call(e):n)}),{unsafe:!0})},function(e,t,n){var a=n(144),r=n(1256),i=n(1257),o=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):i(e)}},function(e,t,n){var a=n(86).Symbol;e.exports=a},function(e,t,n){var a=n(1287),r=n(335),i=n(1288),o=n(494),s=n(1289),u=n(143),d=n(481),c=d(a),l=d(r),f=d(i),g=d(o),h=d(s),p=u;(a&&"[object DataView]"!=p(new a(new ArrayBuffer(1)))||r&&"[object Map]"!=p(new r)||i&&"[object Promise]"!=p(i.resolve())||o&&"[object Set]"!=p(new o)||s&&"[object WeakMap]"!=p(new s))&&(p=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,a=n?d(n):"";if(a)switch(a){case c:return"[object DataView]";case l:return"[object Map]";case f:return"[object Promise]";case g:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=p},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var a=n(148),r=n(1392),i=n(1393),o=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):i(e)}},function(e,t,n){var a=n(76).Symbol;e.exports=a},function(e,t,n){var a=n(518),r=n(1417),i=n(130);e.exports=function(e){return i(e)?a(e,!0):r(e)}},function(e,t,n){var a=n(147),r=n(97);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==a(e)}},function(e,t,n){var a=n(252).MAX_SAFE_COMPONENT_LENGTH,r=n(253),i=(t=e.exports={}).re=[],o=t.src=[],s=t.t={},u=0,d=function(e,t,n){var a=u++;r(a,t),s[e]=a,o[a]=t,i[a]=new RegExp(t,n?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","[0-9]+"),d("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),d("MAINVERSION","(".concat(o[s.NUMERICIDENTIFIER],")\\.")+"(".concat(o[s.NUMERICIDENTIFIER],")\\.")+"(".concat(o[s.NUMERICIDENTIFIER],")")),d("MAINVERSIONLOOSE","(".concat(o[s.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[s.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[s.NUMERICIDENTIFIERLOOSE],")")),d("PRERELEASEIDENTIFIER","(?:".concat(o[s.NUMERICIDENTIFIER],"|").concat(o[s.NONNUMERICIDENTIFIER],")")),d("PRERELEASEIDENTIFIERLOOSE","(?:".concat(o[s.NUMERICIDENTIFIERLOOSE],"|").concat(o[s.NONNUMERICIDENTIFIER],")")),d("PRERELEASE","(?:-(".concat(o[s.PRERELEASEIDENTIFIER],"(?:\\.").concat(o[s.PRERELEASEIDENTIFIER],")*))")),d("PRERELEASELOOSE","(?:-?(".concat(o[s.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(o[s.PRERELEASEIDENTIFIERLOOSE],")*))")),d("BUILDIDENTIFIER","[0-9A-Za-z-]+"),d("BUILD","(?:\\+(".concat(o[s.BUILDIDENTIFIER],"(?:\\.").concat(o[s.BUILDIDENTIFIER],")*))")),d("FULLPLAIN","v?".concat(o[s.MAINVERSION]).concat(o[s.PRERELEASE],"?").concat(o[s.BUILD],"?")),d("FULL","^".concat(o[s.FULLPLAIN],"$")),d("LOOSEPLAIN","[v=\\s]*".concat(o[s.MAINVERSIONLOOSE]).concat(o[s.PRERELEASELOOSE],"?").concat(o[s.BUILD],"?")),d("LOOSE","^".concat(o[s.LOOSEPLAIN],"$")),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE","".concat(o[s.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),d("XRANGEIDENTIFIER","".concat(o[s.NUMERICIDENTIFIER],"|x|X|\\*")),d("XRANGEPLAIN","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:".concat(o[s.PRERELEASE],")?").concat(o[s.BUILD],"?")+")?)?"),d("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[s.PRERELEASELOOSE],")?").concat(o[s.BUILD],"?")+")?)?"),d("XRANGE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAIN],"$")),d("XRANGELOOSE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAINLOOSE],"$")),d("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(a,"})")+"(?:\\.(\\d{1,".concat(a,"}))?")+"(?:\\.(\\d{1,".concat(a,"}))?")+"(?:$|[^\\d])"),d("COERCERTL",o[s.COERCE],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM","(\\s*)".concat(o[s.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",d("TILDE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAIN],"$")),d("TILDELOOSE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAINLOOSE],"$")),d("LONECARET","(?:\\^)"),d("CARETTRIM","(\\s*)".concat(o[s.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",d("CARET","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAIN],"$")),d("CARETLOOSE","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAINLOOSE],"$")),d("COMPARATORLOOSE","^".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],")$|^$")),d("COMPARATOR","^".concat(o[s.GTLT],"\\s*(").concat(o[s.FULLPLAIN],")$|^$")),d("COMPARATORTRIM","(\\s*)".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],"|").concat(o[s.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE","^\\s*(".concat(o[s.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAIN],")")+"\\s*$"),d("HYPHENRANGELOOSE","^\\s*(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s*$"),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0.0.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,n){var a=n(252).MAX_LENGTH,r=n(151),i=r.re,o=r.t,s=n(48);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>a)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},,function(e,t,n){"use strict";t.__esModule=!0,t.DOCS_THIRDPARTIES=t.DOCS_DOCUMENTING=t.DOCS_WEBPACK=t.DOCS_COMPONENTS=t.DOCS_CONFIG=t.BUGS=t.HOMEPAGE=void 0,t.HOMEPAGE="https://react-styleguidist.js.org/",t.BUGS="https://github.com/styleguidist/react-styleguidist/issues",t.DOCS_CONFIG="https://react-styleguidist.js.org/docs/configuration.html",t.DOCS_COMPONENTS="https://react-styleguidist.js.org/docs/components.html",t.DOCS_WEBPACK="https://react-styleguidist.js.org/docs/webpack.html",t.DOCS_DOCUMENTING="https://react-styleguidist.js.org/docs/documenting.html",t.DOCS_THIRDPARTIES="https://react-styleguidist.js.org/docs/thirdparties.html"},,function(e,t,n){var a=n(420),r=n(421),i=n(206),o=n(72),s=n(111),u=n(207),d=n(205),c=n(208),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=r(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(d(e))return!a(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}},,,,,,,,function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var a=n(394),r=n(46),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(a[e])||i(r[e]):a[e]&&a[e][t]||r[e]&&r[e][t]}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var a=n(685),r=n(190),i=n(141),o=n(140),s=n(402),u=[].push,d=function(e){var t=1==e,n=2==e,d=3==e,c=4==e,l=6==e,f=5==e||l;return function(g,h,p,A){for(var v,m,y=i(g),R=r(y),b=a(h,p,3),w=o(R.length),x=0,_=A||s,E=t?_(g,w):n?_(g,0):void 0;w>x;x++)if((f||x in R)&&(m=b(v=R[x],x,y),e))if(t)E[x]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return x;case 2:u.call(E,v)}else if(c)return!1;return l?-1:d||c?c:E}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6)}},function(e,t,n){var a=n(63),r=n(36),i=n(64),o=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(i(s,e))return s[e];t||(t={});var n=[][e],d=!!i(t,"ACCESSORS")&&t.ACCESSORS,c=i(t,0)?t[0]:u,l=i(t,1)?t[1]:void 0;return s[e]=!!n&&!r((function(){if(d&&!a)return!0;var e={length:-1};d?o(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,c,l)}))}},function(e,t,n){"use strict";var a=n(43),r=n(190),i=n(138),o=n(209),s=[].join,u=r!=Object,d=o("join",",");a({target:"Array",proto:!0,forced:u||!d},{join:function(e){return s.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";(function(e){var a=n(1151),r=n(1152),i=n(1153);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(a)return I(e).length;t=(""+t).toLowerCase(),a=!0}}function p(e,t,n){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function A(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}function v(e,t,n,a,r){if(0===e.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=u.from(t,a)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var i,o=1,s=e.length,u=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var c=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var l=!0,f=0;fr&&(a=r):a=r;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");a>i/2&&(a=i/2);for(var o=0;o>8,r=n%256,i.push(r),i.push(a);return i}(t,e.length-n),e,n,a)}function E(e,t,n){return 0===t&&n===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r239?4:d>223?3:d>191?2:1;if(r+l<=n)switch(l){case 1:d<128&&(c=d);break;case 2:128==(192&(i=e[r+1]))&&(u=(31&d)<<6|63&i)>127&&(c=u);break;case 3:i=e[r+1],o=e[r+2],128==(192&i)&&128==(192&o)&&(u=(15&d)<<12|(63&i)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[r+1],o=e[r+2],s=e[r+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(u=(15&d)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,a.push(c>>>10&1023|55296),c=56320|1023&c),a.push(c),r+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",a=0;aa)&&(n=a);for(var r="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,a,r,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function D(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,i=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function T(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,i=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function M(e,t,n,a,r,i){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,a,i){return i||M(e,0,n,4),r.write(e,t,n,a,23,4),n+4}function U(e,t,n,a,i){return i||M(e,0,n,8),r.write(e,t,n,a,52,8),n+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return d(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,a){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof a?s(e,t).fill(n,a):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,a=t.length,r=0,i=Math.min(n,a);r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,a,r){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),t<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&t>=n)return 0;if(a>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(a>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(i,o),d=this.slice(a,r),c=e.slice(t,n),l=0;lr)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return R(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,a=this.length;if((e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(t=void 0===t?a:~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),t0&&(r*=256);)a+=this[e+--t]*r;return a},u.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var a=this[e],r=1,i=0;++i=(r*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var a=t,r=1,i=this[e+--a];a>0&&(r*=256);)i+=this[e+--a]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),r.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),r.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,a){e=+e,t|=0,n|=0,a||j(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+r]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t|=0,!a){var r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}var i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t|=0,!a){var r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}var i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,a){if(n||(n=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===a){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Q(e){return a.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(54))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var a=n(13),r=n(14);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseObserver=void 0;var i=n(214),o=function(){function e(){a(this,e),this.listeners={}}return r(e,[{key:"fireEventInternal",value:function(e,t,n){this.iterateListeners((function(a){if(!e&&!n.firing)return!1;a[t]&&a[t](n)}))}},{key:"fireEvent",value:function(e,t){e=Object.assign({firing:!0,stopPropagation:function(){e.firing=!1}},e),this.fireEventInternal(!0,"eventWillFire",Object.assign(Object.assign({},e),{function:t})),this.fireEventInternal(!1,t,e),this.fireEventInternal(!0,"eventDidFire",Object.assign(Object.assign({},e),{function:t}))}},{key:"iterateListeners",value:function(e){for(var t in this.listeners)if(!1===e(this.listeners[t]))return}},{key:"getListenerHandle",value:function(e){var t=this,n=function(n){if(t.listeners[n]===e)return{v:{id:n,listener:e,deregister:function(){delete t.listeners[n]}}}};for(var a in this.listeners){var r=n(a);if("object"==typeof r)return r.v}}},{key:"registerListener",value:function(e){var t=this,n=i.Toolkit.UID();return this.listeners[n]=e,{id:n,listener:e,deregister:function(){delete t.listeners[n]}}}},{key:"deregisterListener",value:function(e){if("object"==typeof e)return e.deregister(),!0;var t=this.getListenerHandle(e);return!!t&&(t.deregister(),!0)}}]),e}();t.BaseObserver=o},function(e,t){e.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},octile:function(e,t){var n=Math.SQRT2-1;return e<+~=|^:(),"'`\s])/g,y="undefined"!=typeof CSS&&CSS.escape,R=function(e){return y?y(e):e.replace(m,"\\$1")},b=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var a=n.sheet,r=n.Renderer;this.key=e,this.options=n,this.style=t,a?this.renderer=a.renderer:r&&(this.renderer=new r)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var a=!!n&&n.force;if(!a&&this.style[e]===t)return this;var r=t;n&&!1===n.process||(r=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==r||!1===r,o=e in this.style;if(i&&!o&&!a)return this;var s=i&&o;if(s?delete this.style[e]:this.style[e]=r,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,r),this;var u=this.options.sheet;return u&&u.attached,this},e}(),w=function(e){function t(t,n,a){var r;(r=e.call(this,t,n,a)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=a.selector,o=a.scoped,s=a.sheet,u=a.generateId;return i?r.selectorText=i:!1!==o&&(r.id=u(d(d(r)),s),r.selectorText="."+R(r.id)),r}u(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var a in n)t.setProperty(e,a,n[a])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=p(n))}return e},n.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?Object(a.a)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,n)},s(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;n&&t&&(t.setSelector(n,e)||t.replaceRule(n,this))}},get:function(){return this.selectorText}}]),t}(b),x={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new w(e,t,n)}},_={indent:1,children:!0},E=/@([\w-]+)/,k=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=n.name;var r=e.match(E);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new X(Object(a.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var a=this.rules.add(e,t,n);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.toString=function(e){if(void 0===e&&(e=_),null==e.indent&&(e.indent=_.indent),null==e.children&&(e.children=_.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),C=/@media|@supports\s+/,O={onCreateRule:function(e,t,n){return C.test(e)?new k(e,t,n):null}},B={indent:1,children:!0},S=/@keyframes\s+([\w-]+)/,F=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(S);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,s=n.generateId;for(var u in this.id=!1===i?this.name:R(s(this,o)),this.rules=new X(Object(a.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(a.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=B),null==e.indent&&(e.indent=B.indent),null==e.children&&(e.children=B.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),j=/@keyframes\s+/,D=/\$([\w-]+)/g,T=function(e,t){return"string"==typeof e?e.replace(D,(function(e,n){return n in t?t[n]:e})):e},M=function(e,t,n){var a=e[t],r=T(a,n);r!==a&&(e[t]=r)},N={onCreateRule:function(e,t,n){return"string"==typeof e&&j.test(e)?new F(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&M(e,"animation-name",n.keyframes),"animation"in e&&M(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var a=n.options.sheet;if(!a)return e;switch(t){case"animation":case"animation-name":return T(e,a.keyframes);default:return e}}},U=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),r=0;r=this.index)t.push(e);else for(var a=0;an)return void t.splice(a,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,a=Object(c.a)(t,["attached"]),r="",i=0;ia)&&(n=a);try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},le=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=oe,this.setSelector=se,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&$.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,a=t.meta,r=t.element;this.element=r||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),a&&this.element.setAttribute("data-meta",a);var i=de();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,a=function(e){var t=$.registry;if(t.length>0){var n=function(e,t){for(var n=0;nt.index&&a.options.insertionPoint===t.insertionPoint)return a}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var a=e[n];if(a.attached&&a.options.insertionPoint===t.insertionPoint)return a}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var a=e.insertionPoint;if(a&&"string"==typeof a){var r=function(e){for(var t=ue(),n=0;n-1)return e(t,n.split(" "));var r=t.options.parent;if("$"===n[0]){var i=r.getRule(n.substr(1));return!!i&&i!==t&&(r.classes[t.key]+=" "+r.classes[i.key],!0)}return r.classes[t.key]+=" "+n,!0}(t,e.composes),delete e.composes,e):e}}]});t.a=Le},function(e,t,n){"use strict";n.r(t);var a=n(581),r=n.n(a),i=n(1),o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var a=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;ta&&(a=(t=t.trim()).charCodeAt(0)),a){case 38:return t.replace(p,"$1"+e.trim());case 58:return e.trim()+t.replace(p,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:o=o.replace(u,"-webkit-"+u)+";"+o;break;case 207:case 102:o=o.replace(u,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0g)&&(L=(H=H.replace(" ",":")).length),0e.length)&&(t=e.length);for(var n=0,a=new Array(t);n0?a:n)(e)}},function(e,t,n){var a=n(395),r=n(292);e.exports=Object.keys||function(e){return a(e,r)}},function(e,t,n){"use strict";var a,r,i=n(294),o=n(399),s=RegExp.prototype.exec,u=String.prototype.replace,d=s,c=(a=/a/,r=/b*/g,s.call(a,"a"),s.call(r,"a"),0!==a.lastIndex||0!==r.lastIndex),l=o.UNSUPPORTED_Y||o.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(c||f||l)&&(d=function(e){var t,n,a,r,o=this,d=l&&o.sticky,g=i.call(o),h=o.source,p=0,A=e;return d&&(-1===(g=g.replace("y","")).indexOf("g")&&(g+="g"),A=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(h="(?: "+h+")",A=" "+A,p++),n=new RegExp("^(?:"+h+")",g)),f&&(n=new RegExp("^"+h+"$(?!\\s)",g)),c&&(t=o.lastIndex),a=s.call(d?n:o,A),d?a?(a.input=a.input.slice(p),a[0]=a[0].slice(p),a.index=o.lastIndex,o.lastIndex+=a[0].length):o.lastIndex=0:c&&a&&(o.lastIndex=o.global?a.index+a[0].length:t),f&&a&&a.length>1&&u.call(a[0],n,(function(){for(r=1;r")})),c="$0"==="a".replace(/./,"$0"),l=i("replace"),f=!!/./[l]&&""===/./[l]("a","$0"),g=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,l){var h=i(e),p=!r((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),A=p&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!p||!A||"replace"===e&&(!d||!c||f)||"split"===e&&!g){var v=/./[h],m=n(h,""[e],(function(e,t,n,a,r){return t.exec===o?p&&!r?{done:!0,value:v.call(t,n,a)}:{done:!0,value:e.call(n,t,a)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),y=m[0],R=m[1];a(String.prototype,e,y),a(RegExp.prototype,h,2==t?function(e,t){return R.call(e,this,t)}:function(e){return R.call(e,this)})}l&&s(RegExp.prototype[h],"sham",!0)}},function(e,t,n){var a=n(164),r=n(196);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==a(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";var a=n(43),r=n(298);a({target:"String",proto:!0,forced:n(299)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){var a=n(617),r=n(618),i=n(619),o=n(620),s=n(621);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&!this.isKeysFullfilled(e)&&(this.eject(),!0)}},{key:"tryActivateChildState",value:function(e){var t=this.findStateToActivate(e);return!!t&&(this.engine.getStateMachine().pushState(t),!0)}},{key:"findStateToActivate",value:function(e){var t,n=a(this.childStates);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.isKeysFullfilled(e))return r}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"isKeysFullfilled",value:function(e){return s.intersection(this.keys,e).length===this.keys.length}},{key:"activated",value:function(e){var t=this,n=this.engine.getActionEventBus().getKeys();if(!this.tryActivateParentState(n)&&!this.tryActivateChildState(n)){this.handler1=this.engine.getActionEventBus().registerAction(new o.Action({type:o.InputType.KEY_DOWN,fire:function(){t.tryActivateChildState(t.engine.getActionEventBus().getKeys())}})),this.handler2=this.engine.getActionEventBus().registerAction(new o.Action({type:o.InputType.KEY_UP,fire:function(){t.tryActivateParentState(t.engine.getActionEventBus().getKeys())}}));var r,i=a(this.actions);try{for(i.s();!(r=i.n()).done;){var s=r.value;this.engine.getActionEventBus().registerAction(s)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"deactivated",value:function(e){this.handler1&&this.handler1(),this.handler2&&this.handler2();var t,n=a(this.actions);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.engine.getActionEventBus().deregisterAction(r)}}catch(e){n.e(e)}finally{n.f()}}}]),e}();t.State=u},function(e,t,n){"use strict";var a=n(74),r=n(13),i=n(14),o=n(25),s=n(30),u=n(15),d=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.NodeModel=void 0;var c=n(29),l=n(85),f=function(e){d(n,e);var t=u(n);function n(e){var a;return r(this,n),(a=t.call(this,e)).ports={},a.width=0,a.height=0,a}return i(n,[{key:"getBoundingBox",value:function(){return new l.Rectangle(this.getPosition(),this.width,this.height)}},{key:"setPosition",value:function(e,t){var a=this.position;s(o(n.prototype),"setPosition",this).call(this,e,t),c.forEach(this.ports,(function(n){n.setPosition(n.getX()+e-a.x,n.getY()+t-a.y)}))}},{key:"deserialize",value:function(e){var t=this;s(o(n.prototype),"deserialize",this).call(this,e),c.forEach(e.data.ports,(function(n){var a=e.engine.getFactoryForPort(n.type).generateModel({});a.deserialize(Object.assign(Object.assign({},e),{data:n})),e.registerModel(a),t.addPort(a)}))}},{key:"serialize",value:function(){return Object.assign(Object.assign({},s(o(n.prototype),"serialize",this).call(this)),{ports:c.map(this.ports,(function(e){return e.serialize()}))})}},{key:"doClone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.ports={},c.forEach(this.ports,(function(n){t.addPort(n.clone(e))}))}},{key:"remove",value:function(){s(o(n.prototype),"remove",this).call(this),c.forEach(this.ports,(function(e){c.forEach(e.getLinks(),(function(e){e.remove()}))}))}},{key:"getPortFromID",value:function(e){for(var t in this.ports)if(this.ports[t].getID()===e)return this.ports[t];return null}},{key:"getLink",value:function(e){for(var t in this.ports){var n=this.ports[t].getLinks();if(n[e])return n[e]}}},{key:"getPort",value:function(e){return this.ports[e]}},{key:"getPorts",value:function(){return this.ports}},{key:"removePort",value:function(e){var t,n=a(c.values(e.getLinks()));try{for(n.s();!(t=n.n()).done;)t.value.clearPort(e)}catch(e){n.e(e)}finally{n.f()}this.ports[e.getName()]&&(this.ports[e.getName()].setParent(null),delete this.ports[e.getName()])}},{key:"addPort",value:function(e){return e.setParent(this),this.ports[e.getName()]=e,e}},{key:"updateDimensions",value:function(e){var t=e.width,n=e.height;this.width=t,this.height=n}}]),n}(n(22).BasePositionModel);t.NodeModel=f},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.PortModel=t.PortModelAlignment=void 0;var d=n(29),c=n(85),l=n(22);!function(e){e.TOP="top",e.LEFT="left",e.BOTTOM="bottom",e.RIGHT="right"}(t.PortModelAlignment||(t.PortModelAlignment={}));var f=function(e){u(n,e);var t=s(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).links={},r.reportedPosition=!1,r}return r(n,[{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.reportedPosition=!1,this.options.name=e.data.name,this.options.alignment=e.data.alignment}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{name:this.options.name,alignment:this.options.alignment,parentNode:this.parent.getID(),links:d.map(this.links,(function(e){return e.getID()}))})}},{key:"setPosition",value:function(e,t){var a=this,r=this.position;o(i(n.prototype),"setPosition",this).call(this,e,t),d.forEach(this.getLinks(),(function(n){var i=n.getPointForPort(a);i.setPosition(i.getX()+e-r.x,i.getY()+t-r.y)}))}},{key:"doClone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.links={},t.parentNode=this.getParent().clone(e)}},{key:"getNode",value:function(){return this.getParent()}},{key:"getName",value:function(){return this.options.name}},{key:"getMaximumLinks",value:function(){return this.options.maximumLinks}},{key:"setMaximumLinks",value:function(e){this.options.maximumLinks=e}},{key:"removeLink",value:function(e){delete this.links[e.getID()]}},{key:"addLink",value:function(e){this.links[e.getID()]=e}},{key:"getLinks",value:function(){return this.links}},{key:"createLinkModel",value:function(){if(d.isFinite(this.options.maximumLinks)){var e=d.size(this.links);if(1===this.options.maximumLinks&&e>=1)return d.values(this.links)[0];if(e>=this.options.maximumLinks)return null}return null}},{key:"reportPosition",value:function(){var e=this;d.forEach(this.getLinks(),(function(t){t.getPointForPort(e).setPosition(e.getCenter())})),this.fireEvent({entity:this},"reportInitialPosition")}},{key:"getCenter",value:function(){return new c.Point(this.getX()+this.width/2,this.getY()+this.height/2)}},{key:"updateCoords",value:function(e){this.width=e.getWidth(),this.height=e.getHeight(),this.setPosition(e.getTopLeft()),this.reportedPosition=!0,this.reportPosition()}},{key:"canLinkToPort",value:function(e){return!0}},{key:"isLocked",value:function(){return o(i(n.prototype),"isLocked",this).call(this)||this.getParent().isLocked()}}]),n}(l.BasePositionModel);t.PortModel=f},function(e,t,n){e.exports=n(1222)},function(e,t,n){var a=n(220),r=n(123),i=n(174);function o(e){e=e||{},this.heuristic=e.heuristic||i.manhattan,this.trackJumpRecursion=e.trackJumpRecursion||!1}n(60),o.prototype.findPath=function(e,t,n,i,o){var s,u=this.openList=new a((function(e,t){return e.f-t.f})),d=this.startNode=o.getNodeAt(e,t),c=this.endNode=o.getNodeAt(n,i);for(this.grid=o,d.g=0,d.f=0,u.push(d),d.opened=!0;!u.empty();){if((s=u.pop()).closed=!0,s===c)return r.expandPath(r.backtrace(c));this._identifySuccessors(s)}return[]},o.prototype._identifySuccessors=function(e){var t,n,a,r,o,s,u,d,c,l,f=this.grid,g=this.heuristic,h=this.openList,p=this.endNode.x,A=this.endNode.y,v=e.x,m=e.y,y=Math.abs;for(Math.max,r=0,o=(t=this._findNeighbors(e)).length;r-1&&e%1==0&&e0}},function(e,t,n){var a=n(13),r=n(14),i=Symbol("SemVer ANY"),o=function(){"use strict";function e(t,n){if(a(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}l("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===i?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}return r(e,null,[{key:"ANY",get:function(){return i}}]),r(e,[{key:"parse",value:function(e){var t=this.options.loose?u[d.COMPARATORLOOSE]:u[d.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=i}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(l("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new f(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new g(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new g(this.value,n).test(t.semver);var a=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=c(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=c(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return a||r||i&&o||s||u}}]),e}();e.exports=o;var s=n(151),u=s.re,d=s.t,c=n(553),l=n(253),f=n(48),g=n(79)},function(e,t,n){var a=n(79);e.exports=function(e,t,n){try{t=new a(t,n)}catch(e){return!1}return t.test(e)}},,function(e,t,n){"use strict";n.r(t),n.d(t,"spaceFactor",(function(){return a})),n.d(t,"space",(function(){return r})),n.d(t,"color",(function(){return i})),n.d(t,"fontFamily",(function(){return o})),n.d(t,"fontSize",(function(){return s})),n.d(t,"mq",(function(){return u})),n.d(t,"borderRadius",(function(){return d})),n.d(t,"maxWidth",(function(){return c})),n.d(t,"sidebarWidth",(function(){return l})),n.d(t,"buttonTextTransform",(function(){return f}));var a=8,r=[a/2,a,2*a,3*a,4*a,5*a,6*a],i={base:"#333",light:"#767676",lightest:"#ccc",link:"#1673b1",linkHover:"#e90",focus:"rgba(22, 115, 177, 0.25)",border:"#e8e8e8",name:"#690",type:"#905",error:"#c00",baseBackground:"#fff",codeBackground:"#f5f5f5",sidebarBackground:"#f5f5f5",ribbonBackground:"#e90",ribbonText:"#fff",codeBase:"#333",codeComment:"#6d6d6d",codePunctuation:"#999",codeProperty:"#905",codeDeleted:"#905",codeString:"#690",codeInserted:"#690",codeOperator:"#9a6e3a",codeKeyword:"#1673b1",codeFunction:"#DD4A68",codeVariable:"#e90"},o={base:["-apple-system","BlinkMacSystemFont",'"Segoe UI"','"Roboto"','"Oxygen"','"Ubuntu"','"Cantarell"','"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],monospace:["Consolas",'"Liberation Mono"',"Menlo","monospace"]},s={base:15,text:16,small:13,h1:48,h2:36,h3:24,h4:18,h5:16,h6:16},u={small:"@media (max-width: 600px)"},d=3,c=1e3,l=200,f="uppercase"},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return renderDefault}));var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(73),core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(20),core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),rsg_components_Text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(82),rsg_components_Code__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(135),_util__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(81),defaultValueBlacklist=["null","undefined"];function renderDefault(prop){if(prop.defaultValue){var defaultValueString=Object(_util__WEBPACK_IMPORTED_MODULE_5__.b)(Object(_util__WEBPACK_IMPORTED_MODULE_5__.c)(String(prop.defaultValue.value)));if(prop.type||prop.flowType){var propName=prop.type?prop.type.name:prop.flowType&&prop.flowType.type;if(defaultValueBlacklist.indexOf(prop.defaultValue.value)>-1)return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Code__WEBPACK_IMPORTED_MODULE_4__.a,null,defaultValueString);if("func"===propName||"function"===propName)return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Text__WEBPACK_IMPORTED_MODULE_3__.a,{size:"small",color:"light",underlined:!0,title:defaultValueString},"Function");if("shape"===propName||"object"===propName)try{var object=eval("("+prop.defaultValue.value+")");return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Text__WEBPACK_IMPORTED_MODULE_3__.a,{size:"small",color:"light",underlined:!0,title:JSON.stringify(object,null,2)},"Shape")}catch(E){return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Text__WEBPACK_IMPORTED_MODULE_3__.a,{size:"small",color:"light",underlined:!0,title:prop.defaultValue.value},"Shape")}}return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Code__WEBPACK_IMPORTED_MODULE_4__.a,null,defaultValueString)}return prop.required?react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(rsg_components_Text__WEBPACK_IMPORTED_MODULE_3__.a,{size:"small",color:"light"},"Required"):""}},function(e,t,n){var a=n(1160)(n(1161));e.exports=a},function(e,t,n){"use strict";function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return a}))},,,function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var a=n(0);function r(t,n){var r=n&&n.property?Object(a.t)(n.property):a.x;return Object(a.F)(t)&&!function(t){return!("function"!=typeof e||!Object(a.D)(e.isBuffer))&&e.isBuffer(t)}(t)?function(e,t){return t&&t.copy?JSON.parse(JSON.stringify(e)):e}(r(t)):r(JSON.parse(t))}r.responseType="json"}).call(this,n(171).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var a=n(0);function r(t,n){var r=n&&n.property?Object(a.t)(n.property):a.x;return Object(a.F)(t)&&!function(t){return!("function"!=typeof e||!Object(a.D)(e.isBuffer))&&e.isBuffer(t)}(t)?function(e,t){return t&&t.copy?JSON.parse(JSON.stringify(e)):e}(r(t)):r(JSON.parse(t))}r.responseType="json"}).call(this,n(171).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var a=n(0);function r(t,n){var r=n&&n.property?Object(a.t)(n.property):a.x;return Object(a.F)(t)&&!function(t){return!("function"!=typeof e||!Object(a.D)(e.isBuffer))&&e.isBuffer(t)}(t)?function(e,t){return t&&t.copy?JSON.parse(JSON.stringify(e)):e}(r(t)):r(JSON.parse(t))}r.responseType="json"}).call(this,n(171).Buffer)},function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var a,r,i;if(Array.isArray(t)){if((a=t.length)!=n.length)return!1;for(r=a;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((a=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=a;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=a;0!=r--;){var o=i[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},,function(e,t,n){"use strict";var a=n(1),r=n.n(a),i=(n(3),r.a.createContext(null)),o=function(e){e()},s={notify:function(){}};var u=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=o,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var a=!0,r=n={callback:e,next:null,prev:n};return r.prev?r.prev.next=r:t=r,function(){a&&null!==t&&(a=!1,r.next?r.next.prev=r.prev:n=r.prev,r.prev?r.prev.next=r.next:t=r.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}(),d=n(21),c=n(98),l=n(380),f=n.n(l),g=n(376),h="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?a.useLayoutEffect:a.useEffect,p=[],A=[null,null];function v(e,t){var n=e[1];return[t.payload,n+1]}function m(e,t,n){h((function(){return e.apply(void 0,t)}),n)}function y(e,t,n,a,r,i,o){e.current=a,t.current=r,n.current=!1,i.current&&(i.current=null,o())}function R(e,t,n,a,r,i,o,s,u,d){if(e){var c=!1,l=null,f=function(){if(!c){var e,n,f=t.getState();try{e=a(f,r.current)}catch(e){n=e,l=e}n||(l=null),e===i.current?o.current||u():(i.current=e,s.current=e,o.current=!0,d({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=f,n.trySubscribe(),f(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,l)throw l}}}var b=function(){return[null,0]};function w(e,t){void 0===t&&(t={});var n=t,o=n.getDisplayName,s=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,l=n.methodName,h=void 0===l?"connectAdvanced":l,w=n.renderCountProp,x=void 0===w?void 0:w,_=n.shouldHandleStateChanges,E=void 0===_||_,k=n.storeKey,C=void 0===k?"store":k,O=(n.withRef,n.forwardRef),B=void 0!==O&&O,S=n.context,F=void 0===S?i:S,j=Object(c.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),D=F;return function(t){var n=t.displayName||t.name||"Component",i=s(n),o=Object(d.a)({},j,{getDisplayName:s,methodName:h,renderCountProp:x,shouldHandleStateChanges:E,storeKey:C,displayName:i,wrappedComponentName:n,WrappedComponent:t}),l=j.pure,w=l?a.useMemo:function(e){return e()};function _(n){var i=Object(a.useMemo)((function(){var e=n.forwardedRef,t=Object(c.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),s=i[0],l=i[1],f=i[2],h=Object(a.useMemo)((function(){return s&&s.Consumer&&Object(g.isContextConsumer)(r.a.createElement(s.Consumer,null))?s:D}),[s,D]),x=Object(a.useContext)(h),_=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(x)&&Boolean(x.store);var k=_?n.store:x.store,C=Object(a.useMemo)((function(){return function(t){return e(t.dispatch,o)}(k)}),[k]),O=Object(a.useMemo)((function(){if(!E)return A;var e=new u(k,_?null:x.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[k,_,x]),B=O[0],S=O[1],F=Object(a.useMemo)((function(){return _?x:Object(d.a)({},x,{subscription:B})}),[_,x,B]),j=Object(a.useReducer)(v,p,b),T=j[0][0],M=j[1];if(T&&T.error)throw T.error;var N=Object(a.useRef)(),U=Object(a.useRef)(f),P=Object(a.useRef)(),L=Object(a.useRef)(!1),I=w((function(){return P.current&&f===U.current?P.current:C(k.getState(),f)}),[k,T,f]);m(y,[U,N,L,f,I,P,S]),m(R,[E,k,B,C,U,N,L,P,S,M],[k,B,C]);var Q=Object(a.useMemo)((function(){return r.a.createElement(t,Object(d.a)({},I,{ref:l}))}),[l,t,I]);return Object(a.useMemo)((function(){return E?r.a.createElement(h.Provider,{value:F},Q):Q}),[h,Q,F])}var k=l?r.a.memo(_):_;if(k.WrappedComponent=t,k.displayName=i,B){var O=r.a.forwardRef((function(e,t){return r.a.createElement(k,Object(d.a)({},e,{forwardedRef:t}))}));return O.displayName=i,O.WrappedComponent=t,f()(O,t)}return f()(k,t)}}function x(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function _(e,t){if(x(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;r=0;a--){var r=t[a](e);if(r)return r}return function(t,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function P(e,t){return e===t}var L=function(e){var t=void 0===e?{}:e,n=t.connectHOC,a=void 0===n?w:n,r=t.mapStateToPropsFactories,i=void 0===r?F:r,o=t.mapDispatchToPropsFactories,s=void 0===o?S:o,u=t.mergePropsFactories,l=void 0===u?D:u,f=t.selectorFactory,g=void 0===f?N:f;return function(e,t,n,r){void 0===r&&(r={});var o=r,u=o.pure,f=void 0===u||u,h=o.areStatesEqual,p=void 0===h?P:h,A=o.areOwnPropsEqual,v=void 0===A?_:A,m=o.areStatePropsEqual,y=void 0===m?_:m,R=o.areMergedPropsEqual,b=void 0===R?_:R,w=Object(c.a)(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),x=U(e,i,"mapStateToProps"),E=U(t,s,"mapDispatchToProps"),k=U(n,l,"mergeProps");return a(g,Object(d.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:x,initMapDispatchToProps:E,initMergeProps:k,pure:f,areStatesEqual:p,areOwnPropsEqual:v,areStatePropsEqual:y,areMergedPropsEqual:b},w))}}(),I=n(114);n.d(t,"a",(function(){return L})),function(e){o=e}(I.unstable_batchedUpdates)},,,,,,,function(e,t,n){"use strict";var a=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,t){var n,r,i;return t=t||{},n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),r=""===n?1/0:void 0===t.maxLength?80:t.maxLength,i=t.replacer,function e(t,o,s){var u,d,c,l,f,g,h,p,A,v,m,y;if(t&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===(m=JSON.stringify(t,i)))return m;if(h=r-o.length-s,m.length<=h&&(A=m.replace(a,(function(e,t){return t||e+" "}))).length<=h)return A;if(null!=i&&(t=JSON.parse(m),i=void 0),"object"==typeof t&&null!==t){if(p=o+n,c=[],d=0,Array.isArray(t))for(v="[",u="]",h=t.length;d0)return[v,n+c.join(",\n"+p),u].join("\n"+o)}return m}(e,"",0)}},,,,,function(e,t,n){var a=n(63),r=n(287),i=n(189),o=n(138),s=n(191),u=n(64),d=n(388),c=Object.getOwnPropertyDescriptor;t.f=a?c:function(e,t){if(e=o(e),t=s(t,!0),d)try{return c(e,t)}catch(e){}if(u(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";var a={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!a.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:a},function(e,t,n){var a=n(46),r=n(120);e.exports=function(e,t){try{r(a,e,t)}catch(n){a[e]=t}return t}},function(e,t,n){var a,r,i,o=n(601),s=n(46),u=n(55),d=n(120),c=n(64),l=n(290),f=n(165),g=s.WeakMap;if(o){var h=new g,p=h.get,A=h.has,v=h.set;a=function(e,t){return v.call(h,e,t),t},r=function(e){return p.call(h,e)||{}},i=function(e){return A.call(h,e)}}else{var m=l("state");f[m]=!0,a=function(e,t){return d(e,m,t),t},r=function(e){return c(e,m)?e[m]:{}},i=function(e){return c(e,m)}}e.exports={set:a,get:r,has:i,enforce:function(e){return i(e)?r(e):a(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var a=n(291),r=n(192),i=a("keys");e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,n){var a=n(392),r=n(391);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:a?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var a=n(56);e.exports=function(){var e=a(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var a=n(36);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){return!String(Symbol())}))},function(e,t,n){var a=n(164);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(36),r=n(58),i=n(403),o=r("species");e.exports=function(e){return i>=51||!a((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var a=n(90),r=/"/g;e.exports=function(e,t,n,i){var o=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(i).replace(r,""")+'"'),s+">"+o+""}},function(e,t,n){var a=n(36);e.exports=function(e){return a((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var a=n(615).charAt;e.exports=function(e,t,n){return t+(n?a(e,t).length:1)}},function(e,t,n){var a=n(200),r=n(622),i=n(623),o=n(624),s=n(625),u=n(626);function d(e){var t=this.__data__=new a(e);this.size=t.size}d.prototype.clear=r,d.prototype.delete=i,d.prototype.get=o,d.prototype.has=s,d.prototype.set=u,e.exports=d},function(e,t,n){var a=n(121)(n(67),"Map");e.exports=a},function(e,t,n){var a=n(122),r=n(84);e.exports=function(e){if(!r(e))return!1;var t=a(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var a=n(633),r=n(640),i=n(642),o=n(643),s=n(644);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var a=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==a||"symbol"!=a&&n.test(e))&&e>-1&&e%1==0&&e1||"".split(/.?/).length?function(e,n){var a=String(o(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[a];if(!r(e))return t.call(a,e,i);for(var s,u,d,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,p=new RegExp(e.source,f+"g");(s=l.call(p,a))&&!((u=p.lastIndex)>h&&(c.push(a.slice(h,s.index)),s.length>1&&s.index=i));)p.lastIndex===s.index&&p.lastIndex++;return h===a.length?!d&&p.test("")||c.push(""):c.push(a.slice(h)),c.length>i?c.slice(0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=o(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,r,n):a.call(String(r),t,n)},function(e,r){var o=n(a,e,this,r,a!==t);if(o.done)return o.value;var l=i(e),f=String(this),g=s(l,RegExp),A=l.unicode,v=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(p?"y":"g"),m=new g(p?l:"^(?:"+l.source+")",v),y=void 0===r?4294967295:r>>>0;if(0===y)return[];if(0===f.length)return null===c(m,f)?[f]:[];for(var R=0,b=0,w=[];b0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.setPoints(l.map(this.getPoints(),(function(t){return t.clone(e)}))),this.sourcePort&&t.setSourcePort(this.sourcePort.clone(e)),this.targetPort&&t.setTargetPort(this.targetPort.clone(e))}},{key:"clearPort",value:function(e){this.sourcePort===e?this.setSourcePort(null):this.targetPort===e&&this.setTargetPort(null)}},{key:"remove",value:function(){this.sourcePort&&this.sourcePort.removeLink(this),this.targetPort&&this.targetPort.removeLink(this),s(o(n.prototype),"remove",this).call(this)}},{key:"isLastPoint",value:function(e){return this.getPointIndex(e)===this.points.length-1}},{key:"getPointIndex",value:function(e){return this.points.indexOf(e)}},{key:"getPointModel",value:function(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:1;return this.addPoint(this.generatePoint(e,t),n)}},{key:"addLabel",value:function(e){e.setParent(this),this.labels.push(e)}},{key:"getPoints",value:function(){return this.points}},{key:"getLabels",value:function(){return this.labels}},{key:"setPoints",value:function(e){var t=this;l.forEach(e,(function(e){e.setParent(t)})),this.points=e}},{key:"removePoint",value:function(e){this.points.splice(this.getPointIndex(e),1)}},{key:"removePointsBefore",value:function(e){this.points.splice(0,this.getPointIndex(e))}},{key:"removePointsAfter",value:function(e){this.points.splice(this.getPointIndex(e)+1)}},{key:"removeMiddlePoints",value:function(){this.points.length>2&&this.points.splice(0,this.points.length-2)}},{key:"addPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.setParent(this),this.points.splice(t,0,e),e}},{key:"generatePoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new c.PointModel({link:this,position:new f.Point(e,t)})}}]),n}(n(22).BaseModel);t.LinkModel=g},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.PointModel=void 0;var d=function(e){u(n,e);var t=s(n);function n(e){var r;return a(this,n),(r=t.call(this,Object.assign(Object.assign({},e),{type:"point"}))).parent=e.link,r}return r(n,[{key:"isConnectedToPort",value:function(){return null!==this.parent.getPortForPoint(this)}},{key:"getLink",value:function(){return this.getParent()}},{key:"remove",value:function(){this.parent&&this.parent.removePoint(this),o(i(n.prototype),"remove",this).call(this)}},{key:"isLocked",value:function(){return o(i(n.prototype),"isLocked",this).call(this)||this.getParent().isLocked()}}]),n}(n(22).BasePositionModel);t.PointModel=d},function(e,t,n){"use strict";var a=n(13),r=n(14);Object.defineProperty(t,"__esModule",{value:!0}),t.Polygon=void 0;var i=n(215),o=n(29),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),this.points=t}return r(e,[{key:"serialize",value:function(){return o.map(this.points,(function(e){return[e.x,e.y]}))}},{key:"deserialize",value:function(e){this.points=o.map(e,(function(e){return new i.Point(e[0],e[1])}))}},{key:"scale",value:function(e,t,n){var a=i.Point.createScaleMatrix(e,t,n);o.forEach(this.points,(function(e){e.transform(a)}))}},{key:"transform",value:function(e){o.forEach(this.points,(function(t){t.transform(e)}))}},{key:"setPoints",value:function(e){this.points=e}},{key:"getPoints",value:function(){return this.points}},{key:"rotate",value:function(e){this.transform(i.Point.createRotateMatrix(e/(180/Math.PI),this.getOrigin()))}},{key:"translate",value:function(e,t){o.forEach(this.points,(function(n){n.translate(e,t)}))}},{key:"doClone",value:function(e){this.points=o.map(e.points,(function(e){return e.clone()}))}},{key:"clone",value:function(){var e=Object.create(this);return e.doClone(this),e}},{key:"getOrigin",value:function(){if(0===this.points.length)return null;var e=this.getBoundingBox();return i.Point.middlePoint(e.getTopLeft(),e.getBottomRight())}},{key:"getBoundingBox",value:function(){for(var e=this.points[0].x,t=this.points[0].x,n=this.points[0].y,a=this.points[0].y,r=1;rt&&(t=this.points[r].x),this.points[r].ya&&(a=this.points[r].y);return new u.Rectangle(new i.Point(e,n),new i.Point(t,n),new i.Point(t,a),new i.Point(e,a))}}],[{key:"boundingBoxFromPolygons",value:function(t){return e.boundingBoxFromPoints(o.flatMap(t,(function(e){return e.getPoints()})))}},{key:"boundingBoxFromPoints",value:function(e){if(0===e.length)return new u.Rectangle(0,0,0,0);for(var t=e[0].x,n=e[0].x,a=e[0].y,r=e[0].y,o=1;on&&(n=e[o].x),e[o].yr&&(r=e[o].y);return new u.Rectangle(new i.Point(t,a),new i.Point(n,a),new i.Point(n,r),new i.Point(t,r))}}]),e}();t.Polygon=s;var u=n(441)},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasModel=void 0;var d=n(29),c=function(e){u(n,e);var t=s(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,Object.assign({zoom:100,gridSize:0,offsetX:0,offsetY:0},r))).layers=[],e}return r(n,[{key:"getSelectionEntities",value:function(){return d.flatMap(this.layers,(function(e){return e.getSelectionEntities()}))}},{key:"getSelectedEntities",value:function(){return d.filter(this.getSelectionEntities(),(function(e){return e.isSelected()}))}},{key:"clearSelection",value:function(){d.forEach(this.getSelectedEntities(),(function(e){e.setSelected(!1)}))}},{key:"getModels",value:function(){return d.flatMap(this.layers,(function(e){return d.values(e.getModels())}))}},{key:"addLayer",value:function(e){e.setParent(this),e.registerListener({entityRemoved:function(e){}}),this.layers.push(e)}},{key:"removeLayer",value:function(e){var t=this.layers.indexOf(e);return-1!==t&&(this.layers.splice(t,1),!0)}},{key:"getLayers",value:function(){return this.layers}},{key:"setGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.options.gridSize=e,this.fireEvent({size:e},"gridUpdated")}},{key:"getGridPosition",value:function(e){return 0===this.options.gridSize?e:this.options.gridSize*Math.floor((e+this.options.gridSize/2)/this.options.gridSize)}},{key:"deserializeModel",value:function(e,t){var n={},a={},r={},i={data:e,engine:t,registerModel:function(e){n[e.getID()]=e,r[e.getID()]&&r[e.getID()](e)},getModel:function(e){return n[e]?Promise.resolve(n[e]):(a[e]||(a[e]=new Promise((function(t){r[e]=t}))),a[e])}};this.deserialize(i)}},{key:"deserialize",value:function(e){var t=this;o(i(n.prototype),"deserialize",this).call(this,e),this.options.offsetX=e.data.offsetX,this.options.offsetY=e.data.offsetY,this.options.zoom=e.data.zoom,this.options.gridSize=e.data.gridSize,d.forEach(e.data.layers,(function(n){var a=e.engine.getFactoryForLayer(n.type).generateModel({initialConfig:n});a.deserialize(Object.assign(Object.assign({},e),{data:n})),t.addLayer(a)}))}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{offsetX:this.options.offsetX,offsetY:this.options.offsetY,zoom:this.options.zoom,gridSize:this.options.gridSize,layers:d.map(this.layers,(function(e){return e.serialize()}))})}},{key:"setZoomLevel",value:function(e){this.options.zoom=e,this.fireEvent({zoom:e},"zoomUpdated")}},{key:"setOffset",value:function(e,t){this.options.offsetX=e,this.options.offsetY=t,this.fireEvent({offsetX:e,offsetY:t},"offsetUpdated")}},{key:"setOffsetX",value:function(e){this.setOffset(e,this.options.offsetY)}},{key:"setOffsetY",value:function(e){this.setOffset(this.options.offsetX,e)}},{key:"getOffsetY",value:function(){return this.options.offsetY}},{key:"getOffsetX",value:function(){return this.options.offsetX}},{key:"getZoomLevel",value:function(){return this.options.zoom}}]),n}(n(321).BaseEntity);t.CanvasModel=c},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseEntity=void 0;var d=n(214),c=n(29),l=function(e){u(n,e);var t=s(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this)).options=Object.assign({id:d.Toolkit.UID()},r),e}return r(n,[{key:"getOptions",value:function(){return this.options}},{key:"getID",value:function(){return this.options.id}},{key:"doClone",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&arguments[1]}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e[this.options.id])return e[this.options.id];var t=c.cloneDeep(this);return t.options=Object.assign(Object.assign({},this.options),{id:d.Toolkit.UID()}),t.clearListeners(),e[this.options.id]=t,this.doClone(e,t),t}},{key:"clearListeners",value:function(){this.listeners={}}},{key:"deserialize",value:function(e){this.options.id=e.data.id,this.options.locked=e.data.locked}},{key:"serialize",value:function(){return{id:this.options.id,locked:this.options.locked}}},{key:"fireEvent",value:function(e,t){o(i(n.prototype),"fireEvent",this).call(this,Object.assign({entity:this},e),t)}},{key:"isLocked",value:function(){return this.options.locked}},{key:"setLocked",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.locked=e,this.fireEvent({locked:e},"lockChanged")}}]),n}(n(173).BaseObserver);t.BaseEntity=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.BaseModel=void 0;var d=n(321),c=n(320),l=function(e){u(n,e);var t=s(n);function n(e){return a(this,n),t.call(this,e)}return r(n,[{key:"performanceTune",value:function(){return!0}},{key:"getParentCanvasModel",value:function(){return this.parent?this.parent instanceof c.CanvasModel?this.parent:this.parent instanceof n?this.parent.getParentCanvasModel():null:null}},{key:"getParent",value:function(){return this.parent}},{key:"setParent",value:function(e){this.parent=e}},{key:"getSelectionEntities",value:function(){return[this]}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{type:this.options.type,selected:this.options.selected,extras:this.options.extras})}},{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.options.extras=e.data.extras,this.options.selected=e.data.selected}},{key:"getType",value:function(){return this.options.type}},{key:"isSelected",value:function(){return this.options.selected}},{key:"isLocked",value:function(){return!!o(i(n.prototype),"isLocked",this).call(this)||!!this.parent&&this.parent.isLocked()}},{key:"setSelected",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.selected!==e&&(this.options.selected=e,this.fireEvent({isSelected:e},"selectionChanged"))}},{key:"remove",value:function(){this.fireEvent({},"entityRemoved")}}]),n}(d.BaseEntity);t.BaseModel=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionLayerModel=void 0;var s=function(e){o(n,e);var t=i(n);function n(){return a(this,n),t.call(this,{transformed:!1,isSvg:!1,type:"selection"})}return r(n,[{key:"setBox",value:function(e){this.box=e}},{key:"getChildModelFactoryBank",value:function(){return null}}]),n}(n(452).LayerModel);t.SelectionLayerModel=s},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.NodeLayerModel=void 0;var d=n(22),c=n(218),l=function(e){u(n,e);var t=s(n);function n(){return a(this,n),t.call(this,{type:"diagram-nodes",isSvg:!1,transformed:!0})}return r(n,[{key:"addModel",value:function(e){var t=this;if(!(e instanceof c.NodeModel))throw new Error("Can only add nodes to this layer");e.registerListener({entityRemoved:function(){t.getParent().removeNode(e)}}),o(i(n.prototype),"addModel",this).call(this,e)}},{key:"getChildModelFactoryBank",value:function(e){return e.getNodeFactories()}},{key:"getNodes",value:function(){return this.getModels()}}]),n}(d.LayerModel);t.NodeLayerModel=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.LinkLayerModel=void 0;var d=n(22),c=n(317),l=function(e){u(n,e);var t=s(n);function n(){return a(this,n),t.call(this,{type:"diagram-links",isSvg:!0,transformed:!0})}return r(n,[{key:"addModel",value:function(e){var t=this;if(!(e instanceof c.LinkModel))throw new Error("Can only add links to this layer");e.registerListener({entityRemoved:function(){t.getParent().removeLink(e)}}),o(i(n.prototype),"addModel",this).call(this,e)}},{key:"getLinks",value:function(){return this.getModels()}},{key:"getChildModelFactoryBank",value:function(e){return e.getLinkFactories()}}]),n}(d.LayerModel);t.LinkLayerModel=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLabelModel=void 0;var d=function(e){u(n,e);var t=s(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,Object.assign({offsetY:null==e.offsetY?-23:e.offsetY,type:"default"},e))}return r(n,[{key:"setLabel",value:function(e){this.options.label=e}},{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.options.label=e.data.label}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{label:this.options.label})}}]),n}(n(61).LabelModel);t.DefaultLabelModel=d},function(e,t,n){"use strict";var a=n(465),r=n(13),i=n(14),o=n(25),s=n(30),u=n(15),d=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLinkModel=void 0;var c=n(61),l=n(326),f=n(85),g=function(e){d(n,e);var t=u(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,Object.assign({type:"default",width:e.width||3,color:e.color||"gray",selectedColor:e.selectedColor||"rgb(0,192,255)",curvyness:50},e))}return i(n,[{key:"calculateControlOffset",value:function(e){return e.getOptions().alignment===c.PortModelAlignment.RIGHT?[this.options.curvyness,0]:e.getOptions().alignment===c.PortModelAlignment.LEFT?[-this.options.curvyness,0]:e.getOptions().alignment===c.PortModelAlignment.TOP?[0,-this.options.curvyness]:[0,this.options.curvyness]}},{key:"getSVGPath",value:function(){if(2==this.points.length){var e,t,n=new f.BezierCurve;return n.setSource(this.getFirstPoint().getPosition()),n.setTarget(this.getLastPoint().getPosition()),n.setSourceControl(this.getFirstPoint().getPosition().clone()),n.setTargetControl(this.getLastPoint().getPosition().clone()),this.sourcePort&&(e=n.getSourceControl()).translate.apply(e,a(this.calculateControlOffset(this.getSourcePort()))),this.targetPort&&(t=n.getTargetControl()).translate.apply(t,a(this.calculateControlOffset(this.getTargetPort()))),n.getSVGCurve()}}},{key:"serialize",value:function(){return Object.assign(Object.assign({},s(o(n.prototype),"serialize",this).call(this)),{width:this.options.width,color:this.options.color,curvyness:this.options.curvyness,selectedColor:this.options.selectedColor})}},{key:"deserialize",value:function(e){s(o(n.prototype),"deserialize",this).call(this,e),this.options.color=e.data.color,this.options.width=e.data.width,this.options.curvyness=e.data.curvyness,this.options.selectedColor=e.data.selectedColor}},{key:"addLabel",value:function(e){if(e instanceof c.LabelModel)return s(o(n.prototype),"addLabel",this).call(this,e);var t=new l.DefaultLabelModel;return t.setLabel(e),s(o(n.prototype),"addLabel",this).call(this,t)}},{key:"setWidth",value:function(e){this.options.width=e,this.fireEvent({width:e},"widthChanged")}},{key:"setColor",value:function(e){this.options.color=e,this.fireEvent({color:e},"colorChanged")}}]),n}(c.LinkModel);t.DefaultLinkModel=g},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPortModel=void 0;var d=n(61),c=n(327),l=function(e){u(n,e);var t=s(n);function n(e,r,i){return a(this,n),r&&(e={in:!!e,name:r,label:i}),e=e,t.call(this,Object.assign({label:e.label||e.name,alignment:e.in?d.PortModelAlignment.LEFT:d.PortModelAlignment.RIGHT,type:"default"},e))}return r(n,[{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.options.in=e.data.in,this.options.label=e.data.label}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{in:this.options.in,label:this.options.label})}},{key:"link",value:function(e,t){var n=this.createLinkModel(t);return n.setSourcePort(this),n.setTargetPort(e),n}},{key:"canLinkToPort",value:function(e){return!(e instanceof n)||this.options.in!==e.getOptions().in}},{key:"createLinkModel",value:function(e){var t=o(i(n.prototype),"createLinkModel",this).call(this);return!t&&e?e.generateModel({}):t||new c.DefaultLinkModel}}]),n}(d.PortModel);t.DefaultPortModel=l},function(e,t){e.exports=function(e,t,n){this.x=e,this.y=t,this.walkable=void 0===n||n}},function(e,t,n){var a=n(220),r=n(123),i=n(174),o=n(60);function s(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||i.manhattan,this.weight=e.weight||1,this.diagonalMovement=e.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=o.OnlyWhenNoObstacles:this.diagonalMovement=o.IfAtMostOneObstacle:this.diagonalMovement=o.Never),this.diagonalMovement===o.Never?this.heuristic=e.heuristic||i.manhattan:this.heuristic=e.heuristic||i.octile}s.prototype.findPath=function(e,t,n,i,o){var s,u,d,c,l,f,g,h,p=new a((function(e,t){return e.f-t.f})),A=o.getNodeAt(e,t),v=o.getNodeAt(n,i),m=this.heuristic,y=this.diagonalMovement,R=this.weight,b=Math.abs,w=Math.SQRT2;for(A.g=0,A.f=0,p.push(A),A.opened=!0;!p.empty();){if((s=p.pop()).closed=!0,s===v)return r.backtrace(v);for(c=0,l=(u=o.getNeighbors(s,y)).length;co){var s=i;i=o,o=s}return i+"\x01"+o+"\x01"+(a.isUndefined(r)?"\0":r)}function u(e,t,n,a){var r=""+t,i=""+n;if(!e&&r>i){var o=r;r=i,i=o}var s={v:r,w:i};return a&&(s.name=a),s}function d(e,t){return s(e,t.v,t.w,t.name)}e.exports=r,r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(e){return this._label=e,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(e){return a.isFunction(e)||(e=a.constant(e)),this._defaultNodeLabelFn=e,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return a.keys(this._nodes)},r.prototype.sources=function(){var e=this;return a.filter(this.nodes(),(function(t){return a.isEmpty(e._in[t])}))},r.prototype.sinks=function(){var e=this;return a.filter(this.nodes(),(function(t){return a.isEmpty(e._out[t])}))},r.prototype.setNodes=function(e,t){var n=arguments,r=this;return a.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},r.prototype.setNode=function(e,t){return a.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},r.prototype.node=function(e){return this._nodes[e]},r.prototype.hasNode=function(e){return a.has(this._nodes,e)},r.prototype.removeNode=function(e){var t=this;if(a.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],a.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),a.each(a.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],a.each(a.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},r.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(a.isUndefined(t))t="\0";else{for(var n=t+="";!a.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},r.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},r.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}},r.prototype.children=function(e){if(a.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return a.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}},r.prototype.predecessors=function(e){var t=this._preds[e];if(t)return a.keys(t)},r.prototype.successors=function(e){var t=this._sucs[e];if(t)return a.keys(t)},r.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return a.union(t,this.successors(e))},r.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},r.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;a.each(this._nodes,(function(n,a){e(a)&&t.setNode(a,n)})),a.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&a.each(t.nodes(),(function(e){t.setParent(e,function e(a){var i=n.parent(a);return void 0===i||t.hasNode(i)?(r[a]=i,i):i in r?r[i]:e(i)}(e))})),t},r.prototype.setDefaultEdgeLabel=function(e){return a.isFunction(e)||(e=a.constant(e)),this._defaultEdgeLabelFn=e,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return a.values(this._edgeObjs)},r.prototype.setPath=function(e,t){var n=this,r=arguments;return a.reduce(e,(function(e,a){return r.length>1?n.setEdge(e,a,t):n.setEdge(e,a),a})),this},r.prototype.setEdge=function(){var e,t,n,r,o=!1,d=arguments[0];"object"==typeof d&&null!==d&&"v"in d?(e=d.v,t=d.w,n=d.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=d,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,t=""+t,a.isUndefined(n)||(n=""+n);var c=s(this._isDirected,e,t,n);if(a.has(this._edgeLabels,c))return o&&(this._edgeLabels[c]=r),this;if(!a.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=o?r:this._defaultEdgeLabelFn(e,t,n);var l=u(this._isDirected,e,t,n);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[c]=l,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][c]=l,this._out[e][c]=l,this._edgeCount++,this},r.prototype.edge=function(e,t,n){var a=1===arguments.length?d(this._isDirected,arguments[0]):s(this._isDirected,e,t,n);return this._edgeLabels[a]},r.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?d(this._isDirected,arguments[0]):s(this._isDirected,e,t,n);return a.has(this._edgeLabels,r)},r.prototype.removeEdge=function(e,t,n){var a=1===arguments.length?d(this._isDirected,arguments[0]):s(this._isDirected,e,t,n),r=this._edgeObjs[a];return r&&(e=r.v,t=r.w,delete this._edgeLabels[a],delete this._edgeObjs[a],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][a],delete this._out[e][a],this._edgeCount--),this},r.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=a.values(n);return t?a.filter(r,(function(e){return e.v===t})):r}},r.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=a.values(n);return t?a.filter(r,(function(e){return e.w===t})):r}},r.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var a=n(222),r=n(1250),i=n(1251),o=n(1252),s=n(1253),u=n(1254);function d(e){var t=this.__data__=new a(e);this.size=t.size}d.prototype.clear=r,d.prototype.delete=i,d.prototype.get=o,d.prototype.has=s,d.prototype.set=u,e.exports=d},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var a=n(124)(n(86),"Map");e.exports=a},function(e,t,n){var a=n(1261),r=n(1268),i=n(1270),o=n(1271),s=n(1272);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var a=n(480),r=t&&!t.nodeType&&t,i=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===r&&a.process,s=function(){try{return i&&i.require&&i.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s}).call(this,n(59)(e))},function(e,t,n){var a=n(230),r=n(1278),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!a(e))return r(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var a=n(489),r=n(490),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),a(o(e),(function(t){return i.call(e,t)})))}:r;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,a=t.length,r=e.length;++n-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var a=n(514),r=t&&!t.nodeType&&t,i=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===r&&a.process,s=function(){try{return i&&i.require&&i.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s}).call(this,n(59)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var a=n(522),r=n(523),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),a(o(e),(function(t){return i.call(e,t)})))}:r;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,a=t.length,r=e.length;++n=0}},function(e,t,n){var a=n(78);e.exports=function(e,t,n){return a(e,t,n)<=0}},function(e,t,n){var a=n(48),r=n(255),i=r.ANY,o=n(79),s=n(256),u=n(254),d=n(369),c=n(371),l=n(370);e.exports=function(e,t,n,f){var g,h,p,A,v;switch(e=new a(e,f),t=new o(t,f),n){case">":g=u,h=c,p=d,A=">",v=">=";break;case"<":g=d,h=l,p=u,A="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(var m=function(n){var a=t.set[n],o=null,s=null;return a.forEach((function(e){e.semver===i&&(e=new r(">=0.0.0")),o=o||e,s=s||e,g(e.semver,o.semver,f)?o=e:p(e.semver,s.semver,f)&&(s=e)})),o.operator===A||o.operator===v?{v:!1}:s.operator&&s.operator!==A||!h(e,s.semver)?s.operator===v&&p(e,s.semver)?{v:!1}:void 0:{v:!1}},y=0;y=c.reach);x+=w.value.length,w=w.next){var _=w.value;if(n.length>t.length)return;if(!(_ instanceof r)){var E=1;if(v&&w!=n.tail.prev){if(b.lastIndex=x,!(S=b.exec(t)))break;var k=S.index+(A&&S[1]?S[1].length:0),C=S.index+S[0].length,O=x;for(O+=w.value.length;k>=O;)O+=(w=w.next).value.length;if(x=O-=w.value.length,w.value instanceof r)continue;for(var B=w;B!==n.tail&&(Oc.reach&&(c.reach=T);var M=w.prev;j&&(M=o(n,M,j),x+=j.length),s(n,M,E),w=o(n,M,new r(l,p?a.tokenize(F,p):F,y,F)),D&&o(n,w,D),E>1&&e(t,n,i,w.prev,x,{cause:l+","+g,reach:T})}}}}}}(e,d,t,d.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(d)},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:r};function r(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function i(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function o(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}function s(e,t,n){for(var a=t.next,r=0;r"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,o=n.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),o&&e.close()}),!1),a):a;var u=a.util.currentScript();function d(){a.manual||a.highlightAll()}if(u&&(a.filename=u.src,u.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var c=document.readyState;"loading"===c||"interactive"===c&&u&&u.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return a}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n),n.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var a={};a["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[t]},a.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:a}};r["language-"+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},n.languages.insertBefore("markup","cdata",i)}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.markup.tag.addInlined("script","javascript"),n.languages.js=n.languages.javascript,function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e=window.Prism,t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n='pre[data-src]:not([data-src-status="loaded"]):not([data-src-status="loading"])',a=/\blang(?:uage)?-([\w-]+)\b/i;e.hooks.add("before-highlightall",(function(e){e.selector+=", "+n})),e.hooks.add("before-sanity-check",(function(a){var r=a.element;if(r.matches(n)){a.code="",r.setAttribute("data-src-status","loading");var o=r.appendChild(document.createElement("CODE"));o.textContent="Loading\u2026";var s=r.getAttribute("data-src"),u=a.language;if("none"===u){var d=(/\.(\w+)$/.exec(s)||[,"none"])[1];u=t[d]||d}i(o,u),i(r,u);var c=e.plugins.autoloader;c&&c.loadLanguages(u);var l=new XMLHttpRequest;l.open("GET",s,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(r.setAttribute("data-src-status","loaded"),o.textContent=l.responseText,e.highlightElement(o)):(r.setAttribute("data-src-status","failed"),l.status>=400?o.textContent=function(e,t){return"\u2716 Error "+e+" while fetching file: "+t}(l.status,l.statusText):o.textContent="\u2716 Error: File does not exist or is empty"))},l.send(null)}})),e.plugins.fileHighlight={highlight:function(t){for(var a,r=(t||document).querySelectorAll(n),i=0;a=r[i++];)e.highlightElement(a)}};var r=!1;e.fileHighlight=function(){r||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),r=!0),e.plugins.fileHighlight.highlight.apply(this,arguments)}}function i(e,t){var n=e.className;n=n.replace(a," ")+" language-"+t,e.className=n.replace(/\s+/g," ").trim()}}()}).call(this,n(54))},function(e,t,n){var a=n(1167);e.exports=function(e){return a(e)&&e!=+e}},function(e,t,n){"use strict";var a=n(376),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return a.isMemo(e)?o:s[e.$$typeof]||r}s[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[a.Memo]=o;var d=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,a){if("string"!=typeof n){if(h){var r=g(n);r&&r!==h&&e(t,r,a)}var o=c(n);l&&(o=o.concat(l(n)));for(var s=u(t),p=u(n),A=0;A1)for(var n=1;nu;)a(s,n=t[u++])&&(~i(d,n)||d.push(n));return d}},function(e,t,n){var a=n(138),r=n(140),i=n(603),o=function(e){return function(t,n,o){var s,u=a(t),d=r(u.length),c=i(o,d);if(e&&n!=n){for(;d>c;)if((s=u[c++])!=s)return!0}else for(;d>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,n){var a=n(36),r=/#|\.prototype\./,i=function(e,t){var n=s[o(e)];return n==d||n!=u&&("function"==typeof t?a(t):!!t)},o=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=i.data={},u=i.NATIVE="N",d=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=o(e),d=1;d=74)&&(a=o.match(/Chrome\/(\d+)/))&&(r=a[1]),e.exports=r&&+r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(54))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var a=n(305),r=n(167);e.exports=function(e,t,n){(void 0!==n&&!r(e[t],n)||void 0===n&&!(t in e))&&a(e,t,n)}},function(e,t,n){var a=n(121),r=function(){try{var e=a(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},function(e,t,n){var a=n(645)();e.exports=a},function(e,t,n){var a=n(67).Uint8Array;e.exports=a},function(e,t,n){var a=n(411)(Object.getPrototypeOf,Object);e.exports=a},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){var a=n(414),r=n(664),i=n(111);e.exports=function(e){return i(e)?a(e,!0):r(e)}},function(e,t,n){var a=n(663),r=n(206),i=n(72),o=n(207),s=n(307),u=n(208),d=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&r(e),l=!n&&!c&&o(e),f=!n&&!c&&!l&&u(e),g=n||c||l||f,h=g?a(e.length,String):[],p=h.length;for(var A in e)!t&&!d.call(e,A)||g&&("length"==A||l&&("offset"==A||"parent"==A)||f&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||s(A,p))||h.push(A);return h}},function(e,t,n){var a=n(58);t.f=a},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t){e.exports=function(e,t){for(var n=-1,a=null==e?0:e.length,r=Array(a);++nc))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var g=-1,h=!0,p=2&n?new a:void 0;for(u.set(e,t),u.set(t,e);++g-1)&&(t=t.replace(/y/g,""));var s=o(b?new v(e,t):v(e,t),a?this:m,x);return w&&n&&h(s,{sticky:n}),s},_=function(e){e in x||s(x,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},E=u(v),k=0;E.length>k;)_(E[k++]);m.constructor=x,x.prototype=m,f(r,"RegExp",x)}p("RegExp")},function(e,t,n){var a=n(55),r=n(164),i=n(58)("match");e.exports=function(e){var t;return a(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){var a=n(84),r=n(212),i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||u.test(e)?d(e.slice(2),n?2:8):o.test(e)?NaN:+e}},function(e,t,n){"use strict";var a=n(197),r=n(56),i=n(140),o=n(90),s=n(300),u=n(198);a("match",1,(function(e,t,n){return[function(t){var n=o(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,n):new RegExp(t)[e](String(n))},function(e){var a=n(t,e,this);if(a.done)return a.value;var o=r(e),d=String(this);if(!o.global)return u(o,d);var c=o.unicode;o.lastIndex=0;for(var l,f=[],g=0;null!==(l=u(o,d));){var h=String(l[0]);f[g]=h,""===h&&(o.lastIndex=s(d,i(o.lastIndex),c)),g++}return 0===g?null:f}]}))},function(e,t,n){"use strict";var a=n(43),r=n(734).trim;a({target:"String",proto:!0,forced:n(735)("trim")},{trim:function(){return r(this)}})},function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n1?arguments[1]:void 0)}},function(e,t,n){var a=n(36);e.exports=!a((function(){return Object.isExtensible(Object.preventExtensions({}))}))},,,,function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.FactoryBank=void 0;var s=n(173),u=n(29),d=function(e){o(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.call(this)).factories={},e}return r(n,[{key:"getFactories",value:function(){return u.values(this.factories)}},{key:"clearFactories",value:function(){for(var e in this.factories)this.deregisterFactory(e)}},{key:"getFactory",value:function(e){if(!this.factories[e])throw new Error("Cannot find factory with type [".concat(e,"]"));return this.factories[e]}},{key:"registerFactory",value:function(e){e.setFactoryBank(this),this.factories[e.getType()]=e,this.fireEvent({factory:e},"factoryAdded")}},{key:"deregisterFactory",value:function(e){var t=this.factories[e];t.setFactoryBank(null),delete this.factories[e],this.fireEvent({factory:t},"factoryRemoved")}}]),n}(s.BaseObserver);t.FactoryBank=d},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(434),o=n(25),s=n(30),u=n(15),d=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.Rectangle=void 0;var c=n(215),l=function(e){d(n,e);var t=u(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return a(this,n),e=r instanceof c.Point&&o instanceof c.Point&&s instanceof c.Point&&u instanceof c.Point?t.call(this,[r,o,s,u]):r instanceof c.Point?t.call(this,[r,new c.Point(r.x+o,r.y),new c.Point(r.x+o,r.y+s),new c.Point(r.x,r.y+s)]):t.call(this,n.pointsFromBounds(r,o,s,u)),i(e)}return r(n,[{key:"updateDimensions",value:function(e,t,a,r){this.points=n.pointsFromBounds(e,t,a,r)}},{key:"setPoints",value:function(e){if(4!==e.length)throw"Rectangles must always have 4 points";s(o(n.prototype),"setPoints",this).call(this,e)}},{key:"containsPoint",value:function(e){var t=this.getTopLeft(),n=this.getBottomRight();return e.x>=t.x&&e.x<=n.x&&e.y>=t.y&&e.y<=n.y}},{key:"getWidth",value:function(){return Math.sqrt(Math.pow(this.getTopLeft().x-this.getTopRight().x,2)+Math.pow(this.getTopLeft().y-this.getTopRight().y,2))}},{key:"getHeight",value:function(){return Math.sqrt(Math.pow(this.getBottomLeft().x-this.getTopLeft().x,2)+Math.pow(this.getBottomLeft().y-this.getTopLeft().y,2))}},{key:"getTopMiddle",value:function(){return c.Point.middlePoint(this.getTopLeft(),this.getTopRight())}},{key:"getBottomMiddle",value:function(){return c.Point.middlePoint(this.getBottomLeft(),this.getBottomRight())}},{key:"getLeftMiddle",value:function(){return c.Point.middlePoint(this.getBottomLeft(),this.getTopLeft())}},{key:"getRightMiddle",value:function(){return c.Point.middlePoint(this.getBottomRight(),this.getTopRight())}},{key:"getTopLeft",value:function(){return this.points[0]}},{key:"getTopRight",value:function(){return this.points[1]}},{key:"getBottomRight",value:function(){return this.points[2]}},{key:"getBottomLeft",value:function(){return this.points[3]}}],[{key:"pointsFromBounds",value:function(e,t,n,a){return[new c.Point(e,t),new c.Point(e+n,t),new c.Point(e+n,t+a),new c.Point(e,t+a)]}}]),n}(n(319).Polygon);t.Rectangle=l},function(e,t,n){"use strict";var a=n(74),r=n(13),i=n(14);Object.defineProperty(t,"__esModule",{value:!0}),t.ActionEventBus=void 0;var o=n(95),s=n(29),u=function(){function e(t){r(this,e),this.actions={},this.engine=t,this.keys={}}return i(e,[{key:"getKeys",value:function(){return s.keys(this.keys)}},{key:"registerAction",value:function(e){var t=this;return e.setEngine(this.engine),this.actions[e.id]=e,function(){t.deregisterAction(e)}}},{key:"deregisterAction",value:function(e){e.setEngine(null),delete this.actions[e.id]}},{key:"getActionsForType",value:function(e){return s.filter(this.actions,(function(t){return t.options.type===e}))}},{key:"getModelForEvent",value:function(e){return e.model?e.model:this.engine.getMouseElement(e.event)}},{key:"getActionsForEvent",value:function(e){var t=e.event;return"mousedown"===t.type?this.getActionsForType(o.InputType.MOUSE_DOWN):"mouseup"===t.type?this.getActionsForType(o.InputType.MOUSE_UP):"keydown"===t.type?(this.keys[t.key.toLowerCase()]=!0,this.getActionsForType(o.InputType.KEY_DOWN)):"keyup"===t.type?(delete this.keys[t.key.toLowerCase()],this.getActionsForType(o.InputType.KEY_UP)):"mousemove"===t.type?this.getActionsForType(o.InputType.MOUSE_MOVE):"wheel"===t.type?this.getActionsForType(o.InputType.MOUSE_WHEEL):[]}},{key:"fireAction",value:function(e){var t,n=this.getActionsForEvent(e),r=a(n);try{for(r.s();!(t=r.n()).done;)t.value.options.fire(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.ActionEventBus=u},function(e,t,n){"use strict";var a=n(74),r=n(13),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.ZoomCanvasAction=void 0;var s=n(95),u=function(e){o(n,e);var t=i(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e=t.call(this,{type:s.InputType.MOUSE_WHEEL,fire:function(t){var n,r=t.event,o=a(e.engine.getModel().getLayers());try{for(o.s();!(n=o.n()).done;)n.value.allowRepaint(!1)}catch(e){o.e(e)}finally{o.f()}var s=e.engine.getModel();r.stopPropagation();var u=e.engine.getModel().getZoomLevel()/100,d=i.inverseZoom?-r.deltaY:r.deltaY;r.ctrlKey&&d%1!=0?d/=3:d/=60,s.getZoomLevel()+d>10&&s.setZoomLevel(s.getZoomLevel()+d);var c=s.getZoomLevel()/100,l=r.currentTarget.getBoundingClientRect(),f=l.width,g=l.height,h=f*c-f*u,p=g*c-g*u,A=r.clientX-l.left,v=r.clientY-l.top,m=(A-s.getOffsetX())/u/f,y=(v-s.getOffsetY())/u/g;s.setOffset(s.getOffsetX()-h*m,s.getOffsetY()-p*y),e.engine.repaintCanvas();var R,b=a(e.engine.getModel().getLayers());try{for(b.s();!(R=b.n()).done;)R.value.allowRepaint(!0)}catch(e){b.e(e)}finally{b.f()}}})}return n}(s.Action);t.ZoomCanvasAction=u},function(e,t,n){"use strict";var a=n(13),r=n(15),i=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteItemsAction=void 0;var o=n(95),s=n(29),u=function(e){i(n,e);var t=r(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n);var i=r.keyCodes||[46,8],u=Object.assign({ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1},r.modifiers);return e=t.call(this,{type:o.InputType.KEY_DOWN,fire:function(t){var n=t.event,a=n.keyCode,r=n.ctrlKey,o=n.shiftKey,d=n.altKey,c=n.metaKey;-1!==i.indexOf(a)&&s.isEqual({ctrlKey:r,shiftKey:o,altKey:d,metaKey:c},u)&&(s.forEach(e.engine.getModel().getSelectedEntities(),(function(e){e.isLocked()||e.remove()})),e.engine.repaintCanvas())}})}return n}(o.Action);t.DeleteItemsAction=u},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.StateMachine=void 0;var s=n(29),u=function(e){o(n,e);var t=i(n);function n(e){var r;return a(this,n),(r=t.call(this)).engine=e,r.stateStack=[],r}return r(n,[{key:"getCurrentState",value:function(){return this.currentState}},{key:"pushState",value:function(e){this.stateStack.push(e),this.setState(e)}},{key:"popState",value:function(){this.stateStack.pop(),this.setState(s.last(this.stateStack))}},{key:"setState",value:function(e){e.setEngine(this.engine),this.currentState&&this.currentState.deactivated(e);var t=this.currentState;this.currentState=e,this.currentState&&(this.currentState.activated(t),this.fireEvent({newState:e},"stateChanged"))}}]),n}(n(173).BaseObserver);t.StateMachine=u},function(e,t,n){"use strict";var a=n(13),r=n(14);Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractFactory=void 0;var i=function(){function e(t){a(this,e),this.type=t}return r(e,[{key:"setDiagramEngine",value:function(e){this.engine=e}},{key:"setFactoryBank",value:function(e){this.bank=e}},{key:"getType",value:function(){return this.type}}]),e}();t.AbstractFactory=i},function(e,t,n){"use strict";var a=n(13),r=n(15),i=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractModelFactory=void 0;var o=function(e){i(n,e);var t=r(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(446).AbstractFactory);t.AbstractModelFactory=o},function(e,t,n){"use strict";var a=n(13),r=n(15),i=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractReactFactory=void 0;var o=function(e){i(n,e);var t=r(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(447).AbstractModelFactory);t.AbstractReactFactory=o},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.BasePositionModel=void 0;var d=n(322),c=n(85),l=function(e){u(n,e);var t=s(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).position=e.position||new c.Point(0,0),r}return r(n,[{key:"setPosition",value:function(e,t){this.position="object"==typeof e?e:new c.Point(e,t),this.fireEvent({},"positionChanged")}},{key:"getBoundingBox",value:function(){return new c.Rectangle(this.position,0,0)}},{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.position=new c.Point(e.data.x,e.data.y)}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{x:this.position.x,y:this.position.y})}},{key:"getPosition",value:function(){return this.position}},{key:"getX",value:function(){return this.position.x}},{key:"getY",value:function(){return this.position.y}}]),n}(d.BaseModel);t.BasePositionModel=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16),s=n(68);function u(){var e=s(["\n\t\t","\n\t"]);return u=function(){return e},e}function d(){var e=s(["\n\t\t","\n\t"]);return d=function(){return e},e}function c(){var e=s(["\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tposition: absolute;\n\t\tpointer-events: none;\n\t\ttransform-origin: 0 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: visible;\n\t"]);return c=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.TransformLayerWidget=void 0;var l,f=n(1),g=n(70),h=n(180);!function(e){var t=h.css(c());e.DivLayer=g.default.div(d(),t),e.SvgLayer=g.default.svg(u(),t)}(l||(l={}));var p=function(e){o(n,e);var t=i(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).state={},r}return r(n,[{key:"getTransform",value:function(){var e=this.props.layer.getParent();return"\n\t\t\ttranslate(\n\t\t\t\t".concat(e.getOffsetX(),"px,\n\t\t\t\t").concat(e.getOffsetY(),"px)\n\t\t\tscale(\n\t\t\t\t").concat(e.getZoomLevel()/100,"\n\t\t\t)\n \t")}},{key:"getTransformStyle",value:function(){return this.props.layer.getOptions().transformed?{transform:this.getTransform()}:{}}},{key:"render",value:function(){return this.props.layer.getOptions().isSvg?f.createElement(l.SvgLayer,{style:this.getTransformStyle()},this.props.children):f.createElement(l.DivLayer,{style:this.getTransformStyle()},this.props.children)}}]),n}(f.Component);t.TransformLayerWidget=p},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.SmartLayerWidget=void 0;var s=function(e){o(n,e);var t=i(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"shouldComponentUpdate",value:function(){return this.props.layer.isRepaintEnabled()}},{key:"render",value:function(){return this.props.engine.getFactoryForLayer(this.props.layer).generateReactWidget({model:this.props.layer})}}]),n}(n(1).Component);t.SmartLayerWidget=s},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.LayerModel=void 0;var d=n(322),c=n(29),l=function(e){u(n,e);var t=s(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,r)).models={},e.repaintEnabled=!0,e}return r(n,[{key:"deserialize",value:function(e){var t=this;o(i(n.prototype),"deserialize",this).call(this,e),this.options.isSvg=!!e.data.isSvg,this.options.transformed=!!e.data.transformed,c.forEach(e.data.models,(function(n){var a=t.getChildModelFactoryBank(e.engine).getFactory(n.type).generateModel({initialConfig:n});a.deserialize(Object.assign(Object.assign({},e),{data:n})),t.addModel(a)}))}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{isSvg:this.options.isSvg,transformed:this.options.transformed,models:c.mapValues(this.models,(function(e){return e.serialize()}))})}},{key:"isRepaintEnabled",value:function(){return this.repaintEnabled}},{key:"allowRepaint",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.repaintEnabled=e}},{key:"remove",value:function(){this.parent&&this.parent.removeLayer(this),o(i(n.prototype),"remove",this).call(this)}},{key:"addModel",value:function(e){e.setParent(this),this.models[e.getID()]=e}},{key:"getSelectionEntities",value:function(){return c.flatMap(this.models,(function(e){return e.getSelectionEntities()}))}},{key:"getModels",value:function(){return this.models}},{key:"getModel",value:function(e){return this.models[e]}},{key:"removeModel",value:function(e){var t="string"==typeof e?e:e.getID();return!!this.models[t]&&(delete this.models[t],!0)}}]),n}(d.BaseModel);t.LayerModel=l},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16),s=n(68);function u(){var e=s(["\n\t\tposition: absolute;\n\t\tbackground-color: rgba(0, 192, 255, 0.2);\n\t\tborder: solid 2px rgb(0, 192, 255);\n\t"]);return u=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionBoxWidget=void 0;var d,c=n(1),l=n(70);!function(e){e.Container=l.default.div(u())}(d||(d={}));var f=function(e){o(n,e);var t=i(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"render",value:function(){var e=this.props.rect;return c.createElement(d.Container,{style:{top:e.top,left:e.left,width:e.width,height:e.height}})}}]),n}(c.Component);t.SelectionBoxWidget=f},function(e,t,n){"use strict";var a=n(11),r=n(74),i=n(13),o=n(14),s=n(25),u=n(30),d=n(15),c=n(16),l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{u(a.next(e))}catch(e){i(e)}}function s(e){try{u(a.throw(e))}catch(e){i(e)}}function u(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,s)}u((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DragCanvasState=void 0;var f=function(e){c(n,e);var t=d(n);function n(){return i(this,n),t.call(this,{name:"drag-canvas"})}return o(n,[{key:"activated",value:function(e){var t=this,i=Object.create(null,{activated:{get:function(){return u(s(n.prototype),"activated",t)}}});return l(this,void 0,void 0,a.mark((function t(){var n,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.activated.call(this,e),this.engine.getModel().clearSelection(),t.next=4,this.engine.repaintCanvas(!0);case 4:n=r(this.engine.getModel().getLayers());try{for(n.s();!(o=n.n()).done;)o.value.allowRepaint(!1)}catch(e){n.e(e)}finally{n.f()}this.initialCanvasX=this.engine.getModel().getOffsetX(),this.initialCanvasY=this.engine.getModel().getOffsetY();case 8:case"end":return t.stop()}}),t,this)})))}},{key:"deactivated",value:function(e){u(s(n.prototype),"deactivated",this).call(this,e);var t,a=r(this.engine.getModel().getLayers());try{for(a.s();!(t=a.n()).done;)t.value.allowRepaint(!0)}catch(e){a.e(e)}finally{a.f()}}},{key:"fireMouseMoved",value:function(e){this.engine.getModel().setOffset(this.initialCanvasX+e.displacementX,this.initialCanvasY+e.displacementY),this.engine.repaintCanvas()}}]),n}(n(216).AbstractDisplacementState);t.DragCanvasState=f},function(e,t,n){"use strict";var a=n(13),r=n(15),i=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.SelectingState=void 0;var o=n(217),s=n(95),u=n(456),d=function(e){i(n,e);var t=r(n);function n(){var e;return a(this,n),(e=t.call(this,{name:"selecting"})).keys=["shift"],e.registerAction(new s.Action({type:s.InputType.MOUSE_DOWN,fire:function(t){var n=e.engine.getActionEventBus().getModelForEvent(t);n?(n.setSelected(!0),e.engine.repaintCanvas()):e.transitionWithEvent(new u.SelectionBoxState,t)}})),e}return n}(o.State);t.SelectingState=d},function(e,t,n){"use strict";var a=n(74),r=n(13),i=n(14),o=n(25),s=n(30),u=n(15),d=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionBoxState=void 0;var c=n(216),l=n(323),f=n(85),g=function(e){d(n,e);var t=u(n);function n(){return r(this,n),t.call(this,{name:"selection-box"})}return i(n,[{key:"activated",value:function(e){s(o(n.prototype),"activated",this).call(this,e),this.layer=new l.SelectionLayerModel,this.engine.getModel().addLayer(this.layer)}},{key:"deactivated",value:function(e){s(o(n.prototype),"deactivated",this).call(this,e),this.layer.remove(),this.engine.repaintCanvas()}},{key:"getBoxDimensions",value:function(e){var t=this.engine.getRelativePoint(e.event.clientX,e.event.clientY);return{left:t.x>this.initialXRelative?this.initialXRelative:t.x,top:t.y>this.initialYRelative?this.initialYRelative:t.y,width:Math.abs(t.x-this.initialXRelative),height:Math.abs(t.y-this.initialYRelative),right:t.x0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,{name:"drag-new-link"})).config=Object.assign({allowLooseLinks:!0,allowLinksFromLockedPorts:!1},r),e.registerAction(new s.Action({type:s.InputType.MOUSE_DOWN,fire:function(t){e.port=e.engine.getMouseElement(t.event),e.config.allowLinksFromLockedPorts||!e.port.isLocked()?(e.link=e.port.createLinkModel(),e.link?(e.link.setSelected(!0),e.link.setSourcePort(e.port),e.engine.getModel().addLink(e.link),e.port.reportPosition()):e.eject()):e.eject()}})),e.registerAction(new s.Action({type:s.InputType.MOUSE_UP,fire:function(t){var n=e.engine.getMouseElement(t.event);if(n instanceof u.PortModel)return e.port.canLinkToPort(n)?(e.link.setTargetPort(n),n.reportPosition(),void e.engine.repaintCanvas()):(e.link.remove(),void e.engine.repaintCanvas());e.config.allowLooseLinks||(e.link.remove(),e.engine.repaintCanvas())}})),e}return r(n,[{key:"fireMouseMoved",value:function(e){var t=this.port.getPosition(),n=this.engine.getModel().getZoomLevel()/100,a=this.engine.getModel().getOffsetX()/n,r=this.engine.getModel().getOffsetY()/n,i=this.initialXRelative/n,o=this.initialYRelative/n,s=t.x-a+(i-t.x)+e.virtualDisplacementX,u=t.y-r+(o-t.y)+e.virtualDisplacementY;this.link.getLastPoint().setPosition(s,u),this.engine.repaintCanvas()}}]),n}(s.AbstractDisplacementState);t.DragNewLinkState=d},function(e,t,n){"use strict";var a=n(13),r=n(15),i=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DragDiagramItemsState=void 0;var o=n(22),s=n(29),u=n(318),d=n(219),c=function(e){i(n,e);var t=r(n);function n(){var e;return a(this,n),(e=t.call(this)).registerAction(new o.Action({type:o.InputType.MOUSE_UP,fire:function(t){var n=e.engine.getMouseElement(t.event);n instanceof d.PortModel&&s.forEach(e.initialPositions,(function(t){if(t.item instanceof u.PointModel){var a=t.item.getParent();if(a.getLastPoint()!==t.item)return;a.getSourcePort().canLinkToPort(n)&&(a.setTargetPort(n),n.reportPosition(),e.engine.repaintCanvas())}}))}})),e}return n}(o.MoveItemsState);t.DragDiagramItemsState=c},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16),s=n(68);function u(){var e=s(["\n\t\tbackground: rgba(0, 0, 0, 0.8);\n\t\tborder-radius: 5px;\n\t\tcolor: white;\n\t\tfont-size: 12px;\n\t\tpadding: 4px 8px;\n\t\tfont-family: sans-serif;\n\t\tuser-select: none;\n\t"]);return u=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLabelWidget=void 0;var d,c=n(1),l=n(70);!function(e){e.Label=l.default.div(u())}(d||(d={}));var f=function(e){o(n,e);var t=i(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"render",value:function(){return c.createElement(d.Label,null,this.props.model.getOptions().label)}}]),n}(c.Component);t.DefaultLabelWidget=f},function(e,t,n){var a=n(1215),r=n(1216),i=n(313),o=n(1217);e.exports=function(e){return a(e)||r(e)||i(e)||o()}},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLinkWidget=void 0;var s=n(1),u=n(61),d=n(467),c=n(468),l=function(e){o(n,e);var t=i(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).refPaths=[],r.state={selected:!1},r}return r(n,[{key:"componentDidUpdate",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentDidMount",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentWillUnmount",value:function(){this.props.link.setRenderedPaths([])}},{key:"addPointToLink",value:function(e,t){var n=this;if(!e.shiftKey&&!this.props.link.isLocked()&&this.props.link.getPoints().length-1<=this.props.diagramEngine.getMaxNumberPointsPerLink()){var a=new u.PointModel({link:this.props.link,position:this.props.diagramEngine.getRelativeMousePoint(e)});this.props.link.addPoint(a,t),e.persist(),e.stopPropagation(),this.forceUpdate((function(){n.props.diagramEngine.getActionEventBus().fireAction({event:e,model:a})}))}}},{key:"generatePoint",value:function(e){return s.createElement(d.DefaultLinkPointWidget,{key:e.getID(),point:e,colorSelected:this.props.link.getOptions().selectedColor,color:this.props.link.getOptions().color})}},{key:"generateLink",value:function(e,t,n){var a=this,r=s.createRef();return this.refPaths.push(r),s.createElement(c.DefaultLinkSegmentWidget,{key:"link-".concat(n),path:e,selected:this.state.selected,diagramEngine:this.props.diagramEngine,factory:this.props.diagramEngine.getFactoryForLink(this.props.link),link:this.props.link,forwardRef:r,onSelection:function(e){a.setState({selected:e})},extras:t})}},{key:"render",value:function(){var e=this,t=this.props.link.getPoints(),n=[];if(this.refPaths=[],2===t.length)n.push(this.generateLink(this.props.link.getSVGPath(),{onMouseDown:function(t){e.addPointToLink(t,1)}},"0")),null==this.props.link.getTargetPort()&&n.push(this.generatePoint(t[1]));else{for(var a=function(a){n.push(e.generateLink(u.LinkWidget.generateLinePath(t[a],t[a+1]),{"data-linkid":e.props.link.getID(),"data-point":a,onMouseDown:function(t){e.addPointToLink(t,a+1)}},a))},r=0;r0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return a(this,n),"string"==typeof r&&(r={name:r,color:i}),(e=t.call(this,Object.assign({type:"default",name:"Untitled",color:"rgb(0,192,255)"},r))).portsOut=[],e.portsIn=[],e}return r(n,[{key:"doClone",value:function(e,t){t.portsIn=[],t.portsOut=[],o(i(n.prototype),"doClone",this).call(this,e,t)}},{key:"removePort",value:function(e){o(i(n.prototype),"removePort",this).call(this,e),e.getOptions().in?this.portsIn.splice(this.portsIn.indexOf(e),1):this.portsOut.splice(this.portsOut.indexOf(e),1)}},{key:"addPort",value:function(e){return o(i(n.prototype),"addPort",this).call(this,e),e.getOptions().in?-1===this.portsIn.indexOf(e)&&this.portsIn.push(e):-1===this.portsOut.indexOf(e)&&this.portsOut.push(e),e}},{key:"addInPort",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new l.DefaultPortModel({in:!0,name:e,label:e,alignment:c.PortModelAlignment.LEFT});return t||this.portsIn.splice(0,0,n),this.addPort(n)}},{key:"addOutPort",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new l.DefaultPortModel({in:!1,name:e,label:e,alignment:c.PortModelAlignment.RIGHT});return t||this.portsOut.splice(0,0,n),this.addPort(n)}},{key:"deserialize",value:function(e){var t=this;o(i(n.prototype),"deserialize",this).call(this,e),this.options.name=e.data.name,this.options.color=e.data.color,this.portsIn=d.map(e.data.portsInOrder,(function(e){return t.getPortFromID(e)})),this.portsOut=d.map(e.data.portsOutOrder,(function(e){return t.getPortFromID(e)}))}},{key:"serialize",value:function(){return Object.assign(Object.assign({},o(i(n.prototype),"serialize",this).call(this)),{name:this.options.name,color:this.options.color,portsInOrder:d.map(this.portsIn,(function(e){return e.getID()})),portsOutOrder:d.map(this.portsOut,(function(e){return e.getID()}))})}},{key:"getInPorts",value:function(){return this.portsIn}},{key:"getOutPorts",value:function(){return this.portsOut}}]),n}(c.NodeModel);t.DefaultNodeModel=f},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16),s=n(68);function u(){var e=s(["\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&:first-of-type {\n\t\t\tmargin-right: 10px;\n\t\t}\n\n\t\t&:only-child {\n\t\t\tmargin-right: 0px;\n\t\t}\n\t"]);return u=function(){return e},e}function d(){var e=s(["\n\t\tdisplay: flex;\n\t\tbackground-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));\n\t"]);return d=function(){return e},e}function c(){var e=s(["\n\t\tflex-grow: 1;\n\t\tpadding: 5px 5px;\n\t"]);return c=function(){return e},e}function l(){var e=s(["\n\t\tbackground: rgba(0, 0, 0, 0.3);\n\t\tdisplay: flex;\n\t\twhite-space: nowrap;\n\t\tjustify-items: center;\n\t"]);return l=function(){return e},e}function f(){var e=s(["\n\t\tbackground-color: ",";\n\t\tborder-radius: 5px;\n\t\tfont-family: sans-serif;\n\t\tcolor: white;\n\t\tborder: solid 2px black;\n\t\toverflow: visible;\n\t\tfont-size: 11px;\n\t\tborder: solid 2px ",";\n\t"]);return f=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultNodeWidget=void 0;var g,h=n(1),p=n(29),A=n(471),v=n(70);!function(e){e.Node=v.default.div(f(),(function(e){return e.background}),(function(e){return e.selected?"rgb(0,192,255)":"black"})),e.Title=v.default.div(l()),e.TitleName=v.default.div(c()),e.Ports=v.default.div(d()),e.PortsContainer=v.default.div(u())}(g||(g={}));var m=function(e){o(n,e);var t=i(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).generatePort=function(t){return h.createElement(A.DefaultPortLabel,{engine:e.props.engine,port:t,key:t.getID()})},e}return r(n,[{key:"render",value:function(){return h.createElement(g.Node,{"data-default-node-name":this.props.node.getOptions().name,selected:this.props.node.isSelected(),background:this.props.node.getOptions().color},h.createElement(g.Title,null,h.createElement(g.TitleName,null,this.props.node.getOptions().name)),h.createElement(g.Ports,null,h.createElement(g.PortsContainer,null,p.map(this.props.node.getInPorts(),this.generatePort)),h.createElement(g.PortsContainer,null,p.map(this.props.node.getOutPorts(),this.generatePort))))}}]),n}(h.Component);t.DefaultNodeWidget=m},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16),s=n(68);function u(){var e=s(["\n\t\twidth: 15px;\n\t\theight: 15px;\n\t\tbackground: rgba(white, 0.1);\n\n\t\t&:hover {\n\t\t\tbackground: rgb(192, 255, 0);\n\t\t}\n\t"]);return u=function(){return e},e}function d(){var e=s(["\n\t\tpadding: 0 5px;\n\t\tflex-grow: 1;\n\t"]);return d=function(){return e},e}function c(){var e=s(["\n\t\tdisplay: flex;\n\t\tmargin-top: 1px;\n\t\talign-items: center;\n\t"]);return c=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultPortLabel=void 0;var l,f=n(1),g=n(61),h=n(70);!function(e){e.PortLabel=h.default.div(c()),e.Label=h.default.div(d()),e.Port=h.default.div(u())}(l||(l={}));var p=function(e){o(n,e);var t=i(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"render",value:function(){var e=f.createElement(g.PortWidget,{engine:this.props.engine,port:this.props.port},f.createElement(l.Port,null)),t=f.createElement(l.Label,null,this.props.port.getOptions().label);return f.createElement(l.PortLabel,null,this.props.port.getOptions().in?e:t,this.props.port.getOptions().in?t:e)}}]),n}(f.Component);t.DefaultPortLabel=p},function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||a(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(473),t),r(n(474),t),r(n(475),t),r(n(477),t),r(n(478),t),r(n(479),t),r(n(476),t),r(n(1239),t)},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.PathFindingLinkFactory=void 0;var d=n(1),c=n(474),l=n(475),f=n(29),g=n(1236),h=n(112),p=n(22),A=function(){var e=function(e){u(n,e);var t=s(n);function n(){var e;return a(this,n),(e=t.call(this,n.NAME)).ROUTING_SCALING_FACTOR=5,e.canvasMatrix=[],e.routingMatrix=[],e.hAdjustmentFactor=0,e.vAdjustmentFactor=0,e.calculateMatrixDimensions=function(){var t=f.values(e.engine.getModel().getNodes()).map((function(e){return{x:e.getX(),width:e.width,y:e.getY(),height:e.height}})),n=f.values(e.engine.getModel().getLinks()),a=f.flatMap(n.map((function(e){return[e.getSourcePort(),e.getTargetPort()]}))).filter((function(e){return null!==e})).map((function(e){return{x:e.getX(),width:e.width,y:e.getY(),height:e.height}})),r=f.flatMap(n.map((function(e){return e.getPoints()}))).map((function(e){return{x:e.getX(),width:0,y:e.getY(),height:0}})),i=function(e,t){return f.reduce(t,(function(t,n){return t+f.get(e,n,0)}),0)},o=e.engine.getCanvas(),s=f.concat(t,a,r),u=Math.floor(Math.min(f.get(f.minBy(s,"x"),"x",0),0)/e.ROUTING_SCALING_FACTOR)*e.ROUTING_SCALING_FACTOR,d=f.maxBy(s,(function(e){return i(e,["x","width"])})),c=Math.max(i(d,["x","width"]),o.offsetWidth),l=f.minBy(s,"y"),g=Math.floor(Math.min(f.get(l,"y",0),0)/e.ROUTING_SCALING_FACTOR)*e.ROUTING_SCALING_FACTOR,h=f.maxBy(s,(function(e){return i(e,["y","height"])})),p=Math.max(i(h,["y","height"]),o.offsetHeight);return{width:Math.ceil(Math.abs(u)+c),hAdjustmentFactor:Math.abs(u)/e.ROUTING_SCALING_FACTOR+1,height:Math.ceil(Math.abs(g)+p),vAdjustmentFactor:Math.abs(g)/e.ROUTING_SCALING_FACTOR+1}},e.markNodes=function(t){f.values(e.engine.getModel().getNodes()).forEach((function(n){for(var a=Math.floor(n.getX()/e.ROUTING_SCALING_FACTOR),r=Math.ceil((n.getX()+n.width)/e.ROUTING_SCALING_FACTOR),i=Math.floor(n.getY()/e.ROUTING_SCALING_FACTOR),o=Math.ceil((n.getY()+n.height)/e.ROUTING_SCALING_FACTOR),s=a-1;s<=r+1;s++)for(var u=i-1;u1&&void 0!==arguments[1]&&arguments[1];return e+this.hAdjustmentFactor*(t?-1:1)}},{key:"translateRoutingY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e+this.vAdjustmentFactor*(t?-1:1)}},{key:"generateDynamicPath",value:function(e){var t=this,n=g();return n=n.moveto(e[0][0]*this.ROUTING_SCALING_FACTOR,e[0][1]*this.ROUTING_SCALING_FACTOR),e.slice(1).forEach((function(e){n=n.lineto(e[0]*t.ROUTING_SCALING_FACTOR,e[1]*t.ROUTING_SCALING_FACTOR)})),n.print()}}]),n}(h.DefaultLinkFactory);return e.NAME="pathfinding",e}();t.PathFindingLinkFactory=A},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.PathFindingLinkModel=void 0;var s=n(473),u=function(e){o(n,e);var t=i(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,Object.assign({type:s.PathFindingLinkFactory.NAME},e))}return r(n,[{key:"performanceTune",value:function(){return!1}}]),n}(n(112).DefaultLinkModel);t.PathFindingLinkModel=u},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(15),o=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.PathFindingLinkWidget=void 0;var s=n(1),u=n(29),d=n(476),c=n(112),l=function(e){o(n,e);var t=i(n);function n(e){var r;return a(this,n),(r=t.call(this,e)).refPaths=[],r.state={selected:!1},r.pathFinding=new d.default(r.props.factory),r}return r(n,[{key:"componentDidUpdate",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentDidMount",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentWillUnmount",value:function(){this.props.link.setRenderedPaths([])}},{key:"generateLink",value:function(e,t){var n=this,a=s.createRef();return this.refPaths.push(a),s.createElement(c.DefaultLinkSegmentWidget,{key:"link-".concat(t),path:e,selected:this.state.selected,diagramEngine:this.props.diagramEngine,factory:this.props.diagramEngine.getFactoryForLink(this.props.link),link:this.props.link,forwardRef:a,onSelection:function(e){n.setState({selected:e})},extras:{}})}},{key:"render",value:function(){this.refPaths=[];var e=this.props.link.getPoints(),t=[],n=this.pathFinding.calculateDirectPath(u.first(e),u.last(e)),a=this.props.factory.getRoutingMatrix(),r=this.pathFinding.calculateLinkStartEndCoords(a,n);if(r){var i=r.start,o=r.end,d=r.pathToStart,c=r.pathToEnd,l=this.pathFinding.calculateDynamicPath(a,i,o,d,c);t.push(this.generateLink(this.props.factory.generateDynamicPath(l),"0"))}return s.createElement(s.Fragment,null,t)}}]),n}(s.Component);t.PathFindingLinkWidget=l},function(e,t,n){"use strict";var a=n(13),r=n(14);Object.defineProperty(t,"__esModule",{value:!0});var i=n(1220),o=new i.JumpPointFinder({heuristic:i.Heuristic.manhattan,diagonalMovement:i.DiagonalMovement.Never}),s=function(){function e(t){a(this,e),this.instance=o,this.factory=t}return r(e,[{key:"calculateDirectPath",value:function(e,t){var n=this.factory.getCanvasMatrix(),a=new i.Grid(n);return o.findPath(this.factory.translateRoutingX(Math.floor(e.getX()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingY(Math.floor(e.getY()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingX(Math.floor(t.getX()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingY(Math.floor(t.getY()/this.factory.ROUTING_SCALING_FACTOR)),a)}},{key:"calculateLinkStartEndCoords",value:function(e,t){var n=t.findIndex((function(t){return!!e[t[1]]&&0===e[t[1]][t[0]]})),a=t.length-1-t.slice().reverse().findIndex((function(t){return!!e[t[1]]&&0===e[t[1]][t[0]]}));if(-1!==n&&-1!==a){var r=t.slice(0,n),i=t.slice(a);return{start:{x:t[n][0],y:t[n][1]},end:{x:t[a][0],y:t[a][1]},pathToStart:r,pathToEnd:i}}}},{key:"calculateDynamicPath",value:function(e,t,n,a,r){var s=this,u=new i.Grid(e),d=o.findPath(t.x,t.y,n.x,n.y,u),c=a.concat(d,r).map((function(e){return[s.factory.translateRoutingX(e[0],!0),s.factory.translateRoutingY(e[1],!0)]}));return i.Util.compressPath(c)}}]),e}();t.default=s},function(e,t,n){"use strict";var a=n(465),r=n(1238),i=n(13),o=n(14),s=n(172),u=n(15),d=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.RightAngleLinkWidget=void 0;var c=n(1),l=n(61),f=n(112),g=n(85),h=function(){var e=function(e){d(n,e);var t=u(n);function n(e){var a;return i(this,n),(a=t.call(this,e)).handleMove=function(e){this.draggingEvent(e,this.dragging_index)}.bind(s(a)),a.handleUp=function(e){this.setState({canDrag:!1,selected:!1}),window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.handleUp)}.bind(s(a)),a.refPaths=[],a.state={selected:!1,canDrag:!1},a.dragging_index=0,a}return o(n,[{key:"componentDidUpdate",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentDidMount",value:function(){this.props.link.setRenderedPaths(this.refPaths.map((function(e){return e.current})))}},{key:"componentWillUnmount",value:function(){this.props.link.setRenderedPaths([])}},{key:"generateLink",value:function(e,t,n){var a=this,r=c.createRef();return this.refPaths.push(r),c.createElement(f.DefaultLinkSegmentWidget,{key:"link-".concat(n),path:e,selected:this.state.selected,diagramEngine:this.props.diagramEngine,factory:this.props.diagramEngine.getFactoryForLink(this.props.link),link:this.props.link,forwardRef:r,onSelection:function(e){a.setState({selected:e})},extras:t})}},{key:"calculatePositions",value:function(e,t,n,a){var i;if(0===n){var o=new l.PointModel({link:this.props.link,position:new g.Point(e[n].getX(),e[n].getY())});return this.props.link.addPoint(o,n),void this.dragging_index++}if(n!==e.length-2){if(n-2>0){var s,u=(r(s={},n-2,e[n-2].getPosition()),r(s,n+1,e[n+1].getPosition()),r(s,n-1,e[n-1].getPosition()),s);if(Math.abs(u[n-1][a]-u[n+1][a])<5)return u[n-2][a]=this.props.diagramEngine.getRelativeMousePoint(t)[a],u[n+1][a]=this.props.diagramEngine.getRelativeMousePoint(t)[a],e[n-2].setPosition(u[n-2]),e[n+1].setPosition(u[n+1]),e[n-1].remove(),e[n-1].remove(),this.dragging_index--,void this.dragging_index--}if(n+2i.getX()&&(r=t[t.length-1],i=t[0],o=!0);var s=Math.abs(t[0].getY()-t[t.length-1].getY());if(null===this.props.link.getTargetPort()&&2===t.length)a(Array(2)).forEach((function(t){e.props.link.addPoint(new l.PointModel({link:e.props.link,position:new g.Point(r.getX(),i.getY())}),1)})),this.props.link.setManuallyFirstAndLastPathsDirection(!0,!0);else if(null===this.props.link.getTargetPort()&&null!==this.props.link.getSourcePort())t[1].setPosition(i.getX()+(r.getX()-i.getX())/2,o?i.getY():r.getY()),t[2].setPosition(i.getX()+(r.getX()-i.getX())/2,o?r.getY():i.getY());else if(!this.state.canDrag&&t.length>2)for(var u=1;u0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,Object.assign({type:c.RightAngleLinkFactory.NAME},r))).lastHoverIndexOfPath=0,e._lastPathXdirection=!1,e._firstPathXdirection=!1,e}return r(n,[{key:"setFirstAndLastPathsDirection",value:function(){for(var e=this.getPoints(),t=1;ta:this._lastPathXdirection=n>a}}},{key:"addPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return o(i(n.prototype),"addPoint",this).call(this,e,t),this.setFirstAndLastPathsDirection(),e}},{key:"deserialize",value:function(e){o(i(n.prototype),"deserialize",this).call(this,e),this.setFirstAndLastPathsDirection()}},{key:"setManuallyFirstAndLastPathsDirection",value:function(e,t){this._firstPathXdirection=e,this._lastPathXdirection=t}},{key:"getLastPathXdirection",value:function(){return this._lastPathXdirection}},{key:"getFirstPathXdirection",value:function(){return this._firstPathXdirection}},{key:"setWidth",value:function(e){this.options.width=e,this.fireEvent({width:e},"widthChanged")}},{key:"setColor",value:function(e){this.options.color=e,this.fireEvent({color:e},"colorChanged")}}]),n}(d.DefaultLinkModel);t.RightAngleLinkModel=l},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(54))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var a=n(483),r=n(334),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];i.call(e,t)&&r(o,n)&&(void 0!==n||t in e)||a(e,t,n)}},function(e,t,n){var a=n(484);e.exports=function(e,t,n){"__proto__"==t&&a?a(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var a=n(124),r=function(){try{var e=a(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},function(e,t,n){var a=n(1274),r=n(228),i=n(40),o=n(175),s=n(486),u=n(229),d=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&r(e),l=!n&&!c&&o(e),f=!n&&!c&&!l&&u(e),g=n||c||l||f,h=g?a(e.length,String):[],p=h.length;for(var A in e)!t&&!d.call(e,A)||g&&("length"==A||l&&("offset"==A||"parent"==A)||f&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||s(A,p))||h.push(A);return h}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var a=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==a||"symbol"!=a&&n.test(e))&&e>-1&&e%1==0&&ec))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var g=-1,h=!0,p=2&n?new a:void 0;for(u.set(e,t),u.set(t,e);++g0&&(i=u.removeMin(),(o=s[i]).distance!==Number.POSITIVE_INFINITY);)a(i).forEach(d);return s}(e,String(t),n||i,a||function(t){return e.outEdges(t)})};var i=a.constant(1)},function(e,t,n){var a=n(69);function r(){this._arr=[],this._keyIndices={}}e.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},r.prototype.has=function(e){return a.has(this._keyIndices,e)},r.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!a.has(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},r.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},r.prototype._heapify=function(e){var t=this._arr,n=2*e,a=n+1,r=e;n>1].priorityc))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var g=-1,h=!0,p=2&n?new a:void 0;for(u.set(e,t),u.set(t,e);++g0&&i(c)?n>1?e(c,n-1,i,o,s):a(s,c):o||(s[s.length]=c)}return s}},function(e,t,n){var a=n(248),r=n(130);e.exports=function(e,t){var n=-1,i=r(e)?Array(e.length):[];return a(e,(function(e,a,r){i[++n]=t(e,a,r)})),i}},function(e,t,n){var a=n(241),r=n(146);e.exports=function(e,t,n){(void 0!==n&&!r(e[t],n)||void 0===n&&!(t in e))&&a(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t){e.exports=function(e,t){return e":return i(e,n,d);case">=":return o(e,n,d);case"<":return s(e,n,d);case"<=":return u(e,n,d);default:throw new TypeError("Invalid operator: ".concat(t))}}},function(e){e.exports=JSON.parse('{"a":"5.10.1"}')},,,,,,,,function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=r._history,i=n.stack,o=n.offset;if(i.length&&o>-1){r._history.stack=i.slice(0,o+1);var s=r._history.stack.length;if(s>100){var u=s-100;r._history.stack=i.slice(u,s),r._history.offset=Math.max(r._history.offset-u,0)}}var d=Date.now();if(t){var c=r._history.stack[r._history.offset];if(c&&d-c.timestamp<3e3){var l=/[^a-z0-9]([a-z0-9]+)$/i,f=r._getLines(c.value,c.selectionStart).pop().match(l),g=r._getLines(e.value,e.selectionStart).pop().match(l);if(f&&g&&g[1].startsWith(f[1]))return void(r._history.stack[r._history.offset]=a({},e,{timestamp:d}))}}r._history.stack.push(a({},e,{timestamp:d})),r._history.offset++},r._updateInput=function(e){var t=r._input;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,r.props.onValueChange(e.value))},r._applyEdits=function(e){var t=r._input,n=r._history.stack[r._history.offset];n&&t&&(r._history.stack[r._history.offset]=a({},n,{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),r._recordChange(e),r._updateInput(e)},r._undoEdit=function(){var e=r._history,t=e.stack,n=e.offset,a=t[n-1];a&&(r._updateInput(a),r._history.offset=Math.max(n-1,0))},r._redoEdit=function(){var e=r._history,t=e.stack,n=e.offset,a=t[n+1];a&&(r._updateInput(a),r._history.offset=Math.min(n+1,t.length-1))},r._handleKeyDown=function(e){var t=r.props,n=t.tabSize,a=t.insertSpaces,i=t.ignoreTabKey,o=t.onKeyDown;if(!o||(o(e),!e.defaultPrevented)){27===e.keyCode&&e.target.blur();var s=e.target,c=s.value,l=s.selectionStart,f=s.selectionEnd,g=(a?" ":"\t").repeat(n);if(9===e.keyCode&&!i&&r.state.capture)if(e.preventDefault(),e.shiftKey){var h=r._getLines(c,l),p=h.length-1,A=r._getLines(c,f).length-1,v=c.split("\n").map((function(e,t){return t>=p&&t<=A&&e.startsWith(g)?e.substring(g.length):e})).join("\n");if(c!==v){var m=h[p];r._applyEdits({value:v,selectionStart:m.startsWith(g)?l-g.length:l,selectionEnd:f-(c.length-v.length)})}}else if(l!==f){var y=r._getLines(c,l),R=y.length-1,b=r._getLines(c,f).length-1,w=y[R];r._applyEdits({value:c.split("\n").map((function(e,t){return t>=R&&t<=b?g+e:e})).join("\n"),selectionStart:/\S/.test(w)?l+g.length:l,selectionEnd:f+g.length*(b-R+1)})}else{var x=l+g.length;r._applyEdits({value:c.substring(0,l)+g+c.substring(f),selectionStart:x,selectionEnd:x})}else if(8===e.keyCode){var _=l!==f;if(c.substring(0,l).endsWith(g)&&!_){e.preventDefault();var E=l-g.length;r._applyEdits({value:c.substring(0,l-g.length)+c.substring(f),selectionStart:E,selectionEnd:E})}}else if(13===e.keyCode){if(l===f){var k=r._getLines(c,l).pop().match(/^\s+/);if(k&&k[0]){e.preventDefault();var C="\n"+k[0],O=l+C.length;r._applyEdits({value:c.substring(0,l)+C+c.substring(f),selectionStart:O,selectionEnd:O})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var B=void 0;57===e.keyCode&&e.shiftKey?B=["(",")"]:219===e.keyCode?B=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?B=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(B=["`","`"]),l!==f&&B&&(e.preventDefault(),r._applyEdits({value:c.substring(0,l)+B[0]+c.substring(l,f)+B[1]+c.substring(f),selectionStart:l,selectionEnd:f+2}))}else!(d?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(d?e.metaKey&&90===e.keyCode&&e.shiftKey:u?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),r._redoEdit()):77!==e.keyCode||!e.ctrlKey||d&&!e.shiftKey||(e.preventDefault(),r.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),r._undoEdit())}},r._handleChange=function(e){var t=e.target,n=t.value,a=t.selectionStart,i=t.selectionEnd;r._recordChange({value:n,selectionStart:a,selectionEnd:i},!0),r.props.onValueChange(n)},r._history={stack:[],offset:-1},s(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this._recordCurrentState()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.style,o=t.padding,s=t.highlight,u=t.textareaId,d=t.autoFocus,c=t.disabled,f=t.form,g=t.maxLength,h=t.minLength,p=t.name,A=t.placeholder,v=t.readOnly,m=t.required,y=t.onClick,R=t.onFocus,b=t.onBlur,w=t.onKeyUp,x=(t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["value","style","padding","highlight","textareaId","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey"])),_={paddingTop:o,paddingRight:o,paddingBottom:o,paddingLeft:o},E=s(n);return i.createElement("div",a({},x,{style:a({},l.container,r)}),i.createElement("textarea",{ref:function(t){return e._input=t},style:a({},l.editor,l.textarea,_),className:"npm__react-simple-code-editor__textarea",id:u,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:y,onKeyUp:w,onFocus:R,onBlur:b,disabled:c,form:f,maxLength:g,minLength:h,name:p,placeholder:A,readOnly:v,required:m,autoFocus:d,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),i.createElement("pre",a({"aria-hidden":"true",style:a({},l.editor,l.highlight,_)},"string"==typeof E?{dangerouslySetInnerHTML:{__html:E+"
"}}:{children:E})),i.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.npm__react-simple-code-editor__textarea:empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .npm__react-simple-code-editor__textarea {\n color: transparent !important;\n }\n\n .npm__react-simple-code-editor__textarea::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n"}}))}},{key:"session",get:function(){return{history:this._history}},set:function(e){this._history=e.history}}]),t}(i.Component);c.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t.default=c;var l={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}}).call(this,n(54))},function(e,t){var n=/[\'\"]/;e.exports=function(e){return e?(n.test(e.charAt(0))&&(e=e.substr(1)),n.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},function(e,t,n){"use strict";e.exports=function(e){if("string"!=typeof e)throw new TypeError("strip-html-comments expected a string");return e.replace(/)/g,"")}},function(e,t,n){var a=n(417),r=n(310),i=n(722),o=n(72);e.exports=function(e,t){return(o(e)?a:i)(e,r(t,3))}},function(e,t,n){var a=n(426),r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source);e.exports=function(e){return(e=a(e))&&i.test(e)?e.replace(r,"\\$&"):e}},function(e,t,n){var a=n(84),r=n(733),i=n(429),o=Math.max,s=Math.min;e.exports=function(e,t,n){var u,d,c,l,f,g,h=0,p=!1,A=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=u,a=d;return u=d=void 0,h=t,l=e.apply(a,n)}function y(e){return h=e,f=setTimeout(b,t),p?m(e):l}function R(e){var n=e-g;return void 0===g||n>=t||n<0||A&&e-h>=c}function b(){var e=r();if(R(e))return w(e);f=setTimeout(b,function(e){var n=t-(e-g);return A?s(n,c-(e-h)):n}(e))}function w(e){return f=void 0,v&&u?m(e):(u=d=void 0,l)}function x(){var e=r(),n=R(e);if(u=arguments,d=this,g=e,n){if(void 0===f)return y(g);if(A)return clearTimeout(f),f=setTimeout(b,t),m(g)}return void 0===f&&(f=setTimeout(b,t)),l}return t=i(t)||0,a(n)&&(p=!!n.leading,c=(A="maxWait"in n)?o(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=g=d=f=void 0},x.flush=function(){return void 0===f?l:w(r())},x}},function(e,t,n){"use strict";var a=n(74),r=n(736).generate,i=n(737).parse,o=n(2),s=n(738),u=n(741),d=n(743),c=n(744),l=o().addRange(0,1114111),f=o().addRange(0,65535),g=l.clone().remove(10,13,8232,8233),h=function(e,t,n){return t?n?c.UNICODE_IGNORE_CASE.get(e):c.UNICODE.get(e):c.REGULAR.get(e)},p=function(e,t){var a=t?"".concat(e,"/").concat(t):"Binary_Property/".concat(e);try{return n(745)("./".concat(a,".js"))}catch(n){throw new Error("Failed to recognize value `".concat(t,"` for property ")+"`".concat(e,"`."))}},A=function(e,t){var n,a=e.split("="),r=a[0];if(1==a.length)n=function(e){try{var t=u("General_Category",e);return p("General_Category",t)}catch(e){}var n=s(e);return p(n)}(r);else{var i=s(r),o=u(i,a[1]);n=p(i,o)}return t?l.clone().remove(n):n.clone()};o.prototype.iuAddRange=function(e,t){do{var n=y(e);n&&this.add(n)}while(++e<=t);return this};var v=function(e,t){var n=i(t,w.useUnicodeFlag?"u":"");switch(n.type){case"characterClass":case"group":case"value":break;default:n=m(n,t)}Object.assign(e,n)},m=function(e,t){return{type:"group",behavior:"ignore",body:[e],raw:"(?:".concat(t,")")}},y=function(e){return d.get(e)||!1},R=function(e,t){delete e.name,e.matchIndex=t},b=function e(t,n,r){switch(t.type){case"dot":w.unicode?v(t,function(e){return e?l:g}(w.dotAll).toString(n)):w.dotAll&&v(t,"[\\s\\S]");break;case"characterClass":t=function(e,t){var n,r=o(),i=a(e.body);try{for(i.s();!(n=i.n()).done;){var s=n.value;switch(s.type){case"value":if(r.add(s.codePoint),w.ignoreCase&&w.unicode&&!w.useUnicodeFlag){var u=y(s.codePoint);u&&r.add(u)}break;case"characterClassRange":var d=s.min.codePoint,c=s.max.codePoint;r.addRange(d,c),w.ignoreCase&&w.unicode&&!w.useUnicodeFlag&&r.iuAddRange(d,c);break;case"characterClassEscape":r.add(h(s.value,w.unicode,w.ignoreCase));break;case"unicodePropertyEscape":r.add(A(s.value,s.negative));break;default:throw new Error("Unknown term type: ".concat(s.type))}}}catch(e){i.e(e)}finally{i.f()}return e.negative&&(r=(w.unicode?l:f).clone().remove(r)),v(e,r.toString(t)),e}(t,n);break;case"unicodePropertyEscape":w.unicodePropertyEscape&&v(t,A(t.value,t.negative).toString(n));break;case"characterClassEscape":v(t,h(t.value,w.unicode,w.ignoreCase).toString(n));break;case"group":if("normal"==t.behavior&&r.lastIndex++,t.name&&w.namedGroup){var i=t.name.value;if(r.names[i])throw new Error("Multiple groups with the same name (".concat(i,") are not allowed."));var s=r.lastIndex;delete t.name,r.names[i]=s,r.onNamedGroup&&r.onNamedGroup.call(null,i,s),r.unmatchedReferences[i]&&(r.unmatchedReferences[i].forEach((function(e){R(e,s)})),delete r.unmatchedReferences[i])}case"alternative":case"disjunction":case"quantifier":t.body=t.body.map((function(t){return e(t,n,r)}));break;case"value":var u=t.codePoint,d=o(u);if(w.ignoreCase&&w.unicode&&!w.useUnicodeFlag){var c=y(u);c&&d.add(c)}v(t,d.toString(n));break;case"reference":if(t.name){var p=t.name.value,m=r.names[p];if(m){R(t,m);break}r.unmatchedReferences[p]||(r.unmatchedReferences[p]=[]),r.unmatchedReferences[p].push(t)}break;case"anchor":case"empty":case"group":break;default:throw new Error("Unknown term type: ".concat(t.type))}return t},w={ignoreCase:!1,unicode:!1,dotAll:!1,useUnicodeFlag:!1,unicodePropertyEscape:!1,namedGroup:!1};e.exports=function(e,t,n){w.unicode=t&&t.includes("u");var a={unicodePropertyEscape:w.unicode,namedGroups:!0,lookbehind:n&&n.lookbehind};w.ignoreCase=t&&t.includes("i");var o=n&&n.dotAllFlag;w.dotAll=o&&t&&t.includes("s"),w.namedGroup=n&&n.namedGroup,w.useUnicodeFlag=n&&n.useUnicodeFlag,w.unicodePropertyEscape=n&&n.unicodePropertyEscape;var s={hasUnicodeFlag:w.useUnicodeFlag,bmpOnly:!w.unicode},u={onNamedGroup:n&&n.onNamedGroup,lastIndex:0,names:Object.create(null),unmatchedReferences:Object.create(null)},d=i(e,t,a);return b(d,s,u),function(e){var t=Object.keys(e.unmatchedReferences);if(t.length>0)throw new Error("Unknown group names: ".concat(t))}(u),r(d)}},function(e,t,n){"use strict";(function(e){var a=n(570),r=function e(t){this.bits=t instanceof e?t.bits.slice():[]};r.prototype.add=function(e){this.bits[e>>5]|=1<<(31&e)},r.prototype.has=function(e){return!!(this.bits[e>>5]&1<<(31&e))};var i=function(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};i.prototype.appendLeft=function(e){this.outro+=e},i.prototype.appendRight=function(e){this.intro=this.intro+e},i.prototype.clone=function(){var e=new i(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},i.prototype.contains=function(e){return this.start=a.length)return"\t";var r=a.reduce((function(e,t){var n=/^ +/.exec(t)[0].length;return Math.min(n,e)}),1/0);return new Array(r+1).join(" ")}function d(e,t){var n=e.split(/[/\\]/),a=t.split(/[/\\]/);for(n.pop();n[0]===a[0];)n.shift(),a.shift();if(n.length)for(var r=n.length;r--;)n[r]="..";return n.concat(a).join("/")}s.prototype.toString=function(){return JSON.stringify(this)},s.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+o(this.toString())};var c=Object.prototype.toString;function l(e){return"[object Object]"===c.call(e)}function f(e){for(var t=e.split("\n"),n=[],a=0,r=0;a>1;e=0&&r.push(a),this.rawSegments.push(r)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},g.prototype.addUneditedChunk=function(e,t,n,a,r){for(var i=t.start,o=!0;i1){for(var n=0;n=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);var a=this.byStart[e],r=this.byEnd[t],i=a.previous,o=r.next,s=this.byStart[n];if(!s&&r===this.lastChunk)return this;var u=s?s.previous:this.lastChunk;return i&&(i.next=o),o&&(o.previous=i),u&&(u.next=a),s&&(s.previous=r),a.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=a.previous,this.lastChunk.next=null),a.previous=u,r.next=s||null,u||(this.firstChunk=a),s||(this.lastChunk=r),this},p.prototype.overwrite=function(e,t,n,a){if("string"!=typeof n)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(t),!0===a&&(h.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),h.storeName=!0),a={storeName:!0});var r=void 0!==a&&a.storeName,o=void 0!==a&&a.contentOnly;if(r){var s=this.original.slice(e,t);this.storedNames[s]=!0}var u=this.byStart[e],d=this.byEnd[t];if(u){if(t>u.end&&u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");if(u.edit(n,r,o),u!==d){for(var c=u.next;c!==d;)c.edit("",!1),c=c.next;c.edit("",!1)}}else{var l=new i(e,t,"").edit(n,r);d.next=l,l.previous=d}return this},p.prototype.prepend=function(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this},p.prototype.prependLeft=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this},p.prototype.prependRight=function(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);var n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this},p.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);for(var n=this.byStart[e];n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this},p.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""},p.prototype.lastLine=function(){var e=this.outro.lastIndexOf("\n");if(-1!==e)return this.outro.substr(e+1);var t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(-1!==(e=n.outro.lastIndexOf("\n")))return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(-1!==(e=n.content.lastIndexOf("\n")))return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(-1!==(e=n.intro.lastIndexOf("\n")))return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return-1!==(e=this.intro.lastIndexOf("\n"))?this.intro.substr(e+1)+t:this.intro+t},p.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var n="",a=this.firstChunk;a&&(a.start>e||a.end<=e);){if(a.start=t)return n;a=a.next}if(a&&a.edited&&a.start!==e)throw new Error("Cannot use replaced character "+e+" as slice start anchor.");for(var r=a;a;){!a.intro||r===a&&a.start!==e||(n+=a.intro);var i=a.start=t;if(i&&a.edited&&a.end!==t)throw new Error("Cannot use replaced character "+t+" as slice end anchor.");var o=r===a?e-a.start:0,s=i?a.content.length+t-a.end:a.content.length;if(n+=a.content.slice(o,s),!a.outro||i&&a.end!==t||(n+=a.outro),i)break;a=a.next}return n},p.prototype.snip=function(e,t){var n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n},p.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,n=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}},p.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var n=f(this.original)(t);throw new Error("Cannot split a chunk that has already been edited ("+n.line+":"+n.column+' \u2013 "'+e.original+'")')}var a=e.split(t);return this.byEnd[t]=e,this.byStart[t]=a,this.byEnd[a.end]=a,e===this.lastChunk&&(this.lastChunk=a),this.lastSearchedChunk=e,!0},p.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},p.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},p.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},p.prototype.trimLines=function(){return this.trim("[\\r\\n]")},p.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},p.prototype.trimEndAborted=function(e){var t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var n=this.lastChunk;do{var a=n.end,r=n.trimEnd(t);if(n.end!==a&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),r)return!0;n=n.previous}while(n);return!1},p.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},p.prototype.trimStartAborted=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var n=this.firstChunk;do{var a=n.end,r=n.trimStart(t);if(n.end!==a&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),r)return!0;n=n.next}while(n);return!1},p.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var A=Object.prototype.hasOwnProperty,v=function(e){void 0===e&&(e={}),this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};v.prototype.addSource=function(e){if(e instanceof p)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!l(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach((function(t){A.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(A.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error("Illegal source: same filename ("+e.filename+"), different contents")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},v.prototype.append=function(e,t){return this.addSource({content:new p(e),separator:t&&t.separator||""}),this},v.prototype.clone=function(){var e=new v({intro:this.intro,separator:this.separator});return this.sources.forEach((function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})})),e},v.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var n=[];this.sources.forEach((function(e){Object.keys(e.content.storedNames).forEach((function(e){~n.indexOf(e)||n.push(e)}))}));var a=new g(e.hires);return this.intro&&a.advance(this.intro),this.sources.forEach((function(e,r){r>0&&a.advance(t.separator);var i=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,s=f(o.original);o.intro&&a.advance(o.intro),o.firstChunk.eachNext((function(t){var r=s(t.start);t.intro.length&&a.advance(t.intro),e.filename?t.edited?a.addEdit(i,t.content,r,t.storeName?n.indexOf(t.original):-1):a.addUneditedChunk(i,t,o.original,r,o.sourcemapLocations):a.advance(t.content),t.outro.length&&a.advance(t.outro)})),o.outro&&a.advance(o.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():null,sources:this.uniqueSources.map((function(t){return e.file?d(e.file,t.filename):t.filename})),sourcesContent:this.uniqueSources.map((function(t){return e.includeContent?t.content:null})),names:n,mappings:a.raw}},v.prototype.generateMap=function(e){return new s(this.generateDecodedMap(e))},v.prototype.getIndentString=function(){var e={};return this.sources.forEach((function(t){var n=t.content.indentStr;null!==n&&(e[n]||(e[n]=0),e[n]+=1)})),Object.keys(e).sort((function(t,n){return e[t]-e[n]}))[0]||"\t"},v.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),""===e)return this;var n=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach((function(a,r){var i=void 0!==a.separator?a.separator:t.separator,o=n||r>0&&/\r?\n$/.test(i);a.content.indent(e,{exclude:a.indentExclusionRanges,indentStart:o}),n="\n"===a.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(function(t,n){return n>0?e+t:t}))),this},v.prototype.prepend=function(e){return this.intro=e+this.intro,this},v.prototype.toString=function(){var e=this,t=this.sources.map((function(t,n){var a=void 0!==t.separator?t.separator:e.separator;return(n>0?a:"")+t.content.toString()})).join("");return this.intro+t},v.prototype.isEmpty=function(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some((function(e){return!e.content.isEmpty()}))},v.prototype.length=function(){return this.sources.reduce((function(e,t){return e+t.content.length()}),this.intro.length)},v.prototype.trimLines=function(){return this.trim("[\\r\\n]")},v.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},v.prototype.trimStart=function(e){var t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){var n,a=0;do{if(!(n=this.sources[a++]))break}while(!n.content.trimStartAborted(e))}return this},v.prototype.trimEnd=function(e){var t,n=new RegExp((e||"\\s")+"+$"),a=this.sources.length-1;do{if(!(t=this.sources[a--])){this.intro=this.intro.replace(n,"");break}}while(!t.content.trimEndAborted(e));return this},t.a=p}).call(this,n(171).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));for(var a={},r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=0;i0&&(i+=";"),0!==u.length){for(var d=0,c=[],l=0,f=u;l1&&(h+=s(g[1]-t)+s(g[2]-n)+s(g[3]-a),t=g[1],n=g[2],a=g[3]),5===g.length&&(h+=s(g[4]-r),r=g[4]),c.push(h)}i+=c.join(",")}}return i}function s(e){var t="";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>>=5)>0&&(n|=32),t+=r[n]}while(e>0);return t}},function(e,t,n){"use strict";var a=n(13),r=n(14),i=n(25),o=n(30),s=n(15),u=n(16),d=n(1158),c=/^[\da-fA-F]+$/,l=/^\d+$/,f=new WeakMap;function g(e){e=e.Parser.acorn||e;var t=f.get(e);if(!t){var n=e.tokTypes,a=e.TokContext,r=e.TokenType,i=new a("...",!0,!0),u={tc_oTag:i,tc_cTag:o,tc_expr:s},d={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart"),jsxTagEnd:new r("jsxTagEnd")};d.jsxTagStart.updateContext=function(){this.context.push(s),this.context.push(i),this.exprAllowed=!1},d.jsxTagEnd.updateContext=function(e){var t=this.context.pop();t===i&&e===n.slash||t===o?(this.context.pop(),this.exprAllowed=this.curContext()===s):this.exprAllowed=!0},t={tokContexts:u,tokTypes:d},f.set(e,t)}return t}function h(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?h(e.object)+"."+h(e.property):void 0:e}e.exports=function(e){return e=e||{},function(t){return function(e,t){var f=t.acorn||n(132),p=g(f),A=f.tokTypes,v=p.tokTypes,m=f.tokContexts,y=p.tokContexts.tc_oTag,R=p.tokContexts.tc_cTag,b=p.tokContexts.tc_expr,w=f.isNewLine,x=f.isIdentifierStart,_=f.isIdentifierChar;return function(t){u(f,t);var n=s(f);function f(){return a(this,f),n.apply(this,arguments)}return r(f,[{key:"jsx_readToken",value:function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");var n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:return this.pos===this.start?60===n&&this.exprAllowed?(++this.pos,this.finishToken(v.jsxTagStart)):this.getTokenFromCode(n):(e+=this.input.slice(t,this.pos),this.finishToken(v.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===n?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:w(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}},{key:"jsx_readNewLine",value:function(e){var t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}},{key:"jsx_readString",value:function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;38===a?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):w(a)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(A.string,t)}},{key:"jsx_readEntity",value:function(){var e,t="",n=0,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");for(var r=++this.pos;this.pos")}var o=r.name?"Element":"Fragment";return n["opening"+o]=r,n["closing"+o]=i,n.children=a,this.type===A.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSX"+o)}},{key:"jsx_parseText",value:function(){var e=this.parseLiteral(this.value);return e.type="JSXText",e}},{key:"jsx_parseElement",value:function(){var e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}},{key:"parseExprAtom",value:function(e){return this.type===v.jsxText?this.jsx_parseText():this.type===v.jsxTagStart?this.jsx_parseElement():o(i(f.prototype),"parseExprAtom",this).call(this,e)}},{key:"readToken",value:function(e){var t=this.curContext();if(t===b)return this.jsx_readToken();if(t===y||t===R){if(x(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(v.jsxTagEnd);if((34===e||39===e)&&t==y)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(v.jsxTagStart)):o(i(f.prototype),"readToken",this).call(this,e)}},{key:"updateContext",value:function(e){if(this.type==A.braceL){var t=this.curContext();t==y?this.context.push(m.b_expr):t==b?this.context.push(m.b_tmpl):o(i(f.prototype),"updateContext",this).call(this,e),this.exprAllowed=!0}else{if(this.type!==A.slash||e!==v.jsxTagStart)return o(i(f.prototype),"updateContext",this).call(this,e);this.context.length-=2,this.context.push(R),this.exprAllowed=!1}}}],[{key:"acornJsx",get:function(){return p}}]),f}(t)}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return g(n(132)).tokTypes},configurable:!0,enumerable:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicImportKey=void 0;var a=function(){function e(e,t){for(var n=0;n0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=55296&&r<=56319&&n>10),o%1024+56320)),(r+1===n||a.length>16384)&&(i+=String.fromCharCode.apply(String,a),a.length=0)}return i},d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),l=0;l=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),p=10,A=13,v=15,m=17,y=18,R=19,b=20,w=21,x=22,_=24,E=25,k=26,C=27,O=28,B=30,S=32,F=33,j=34,D=35,T=37,M=38,N=39,U=40,P=42,L=function(e){var t=function(e){var t,n,a,r,i,o=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var d="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),l=Array.isArray(d)?d:new Uint8Array(d);for(t=0;t>4,l[u++]=(15&a)<<4|r>>2,l[u++]=(3&r)<<6|63&i;return d}(e),n=Array.isArray(t)?function(e){for(var t=e.length,n=[],a=0;a0;){var o=a[--i];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var s=n;s<=a.length;){var u;if((u=a[++s])===t)return!0;if(u!==p)break}if(o!==p)break}return!1},G=function(e,t){for(var n=e;n>=0;){var a=t[n];if(a!==p)return a;n--}return 0},X=function(e,t,n,a,r){if(0===n[a])return"\xd7";var i=a-1;if(Array.isArray(r)&&!0===r[i])return"\xd7";var o=i-1,s=i+1,u=t[i],d=o>=0?t[o]:0,c=t[s];if(2===u&&3===c)return"\xd7";if(-1!==Q.indexOf(u))return"!";if(-1!==Q.indexOf(c))return"\xd7";if(-1!==H.indexOf(c))return"\xd7";if(8===G(i,t))return"\xf7";if(11===L.get(e[i])&&(c===T||c===S||c===F))return"\xd7";if(7===u||7===c)return"\xd7";if(9===u)return"\xd7";if(-1===[p,A,v].indexOf(u)&&9===c)return"\xd7";if(-1!==[m,y,R,_,O].indexOf(c))return"\xd7";if(G(i,t)===x)return"\xd7";if(q(23,x,i,t))return"\xd7";if(q([m,y],w,i,t))return"\xd7";if(q(12,12,i,t))return"\xd7";if(u===p)return"\xf7";if(23===u||23===c)return"\xd7";if(16===c||16===u)return"\xf7";if(-1!==[A,v,w].indexOf(c)||14===u)return"\xd7";if(36===d&&-1!==W.indexOf(u))return"\xd7";if(u===O&&36===c)return"\xd7";if(c===b&&-1!==I.concat(b,R,E,T,S,F).indexOf(u))return"\xd7";if(-1!==I.indexOf(c)&&u===E||-1!==I.indexOf(u)&&c===E)return"\xd7";if(u===C&&-1!==[T,S,F].indexOf(c)||-1!==[T,S,F].indexOf(u)&&c===k)return"\xd7";if(-1!==I.indexOf(u)&&-1!==z.indexOf(c)||-1!==z.indexOf(u)&&-1!==I.indexOf(c))return"\xd7";if(-1!==[C,k].indexOf(u)&&(c===E||-1!==[x,v].indexOf(c)&&t[s+1]===E)||-1!==[x,v].indexOf(u)&&c===E||u===E&&-1!==[E,O,_].indexOf(c))return"\xd7";if(-1!==[E,O,_,m,y].indexOf(c))for(var l=i;l>=0;){if((f=t[l])===E)return"\xd7";if(-1===[O,_].indexOf(f))break;l--}if(-1!==[C,k].indexOf(c))for(l=-1!==[m,y].indexOf(u)?o:i;l>=0;){var f;if((f=t[l])===E)return"\xd7";if(-1===[O,_].indexOf(f))break;l--}if(M===u&&-1!==[M,N,j,D].indexOf(c)||-1!==[N,j].indexOf(u)&&-1!==[N,U].indexOf(c)||-1!==[U,D].indexOf(u)&&c===U)return"\xd7";if(-1!==V.indexOf(u)&&-1!==[b,k].indexOf(c)||-1!==V.indexOf(c)&&u===C)return"\xd7";if(-1!==I.indexOf(u)&&-1!==I.indexOf(c))return"\xd7";if(u===_&&-1!==I.indexOf(c))return"\xd7";if(-1!==I.concat(E).indexOf(u)&&c===x||-1!==I.concat(E).indexOf(c)&&u===y)return"\xd7";if(41===u&&41===c){for(var g=n[i],h=1;g>0&&41===t[--g];)h++;if(h%2!=0)return"\xd7"}return u===S&&c===F?"\xd7":"\xf7"},Y=function(){function e(e,t,n,a){this.codePoints=e,this.required="!"===t,this.start=n,this.end=a}return e.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},e}();!function(e){e[e.STRING_TOKEN=0]="STRING_TOKEN",e[e.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",e[e.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",e[e.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",e[e.COMMA_TOKEN=4]="COMMA_TOKEN",e[e.HASH_TOKEN=5]="HASH_TOKEN",e[e.DELIM_TOKEN=6]="DELIM_TOKEN",e[e.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",e[e.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",e[e.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",e[e.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",e[e.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",e[e.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",e[e.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",e[e.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",e[e.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",e[e.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",e[e.NUMBER_TOKEN=17]="NUMBER_TOKEN",e[e.FUNCTION=18]="FUNCTION",e[e.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",e[e.IDENT_TOKEN=20]="IDENT_TOKEN",e[e.COLUMN_TOKEN=21]="COLUMN_TOKEN",e[e.URL_TOKEN=22]="URL_TOKEN",e[e.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",e[e.CDC_TOKEN=24]="CDC_TOKEN",e[e.CDO_TOKEN=25]="CDO_TOKEN",e[e.COLON_TOKEN=26]="COLON_TOKEN",e[e.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",e[e.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",e[e.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",e[e.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",e[e.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",e[e.EOF_TOKEN=32]="EOF_TOKEN"}(f||(f={}));var J=function(e){return e>=48&&e<=57},$=function(e){return J(e)||e>=65&&e<=70||e>=97&&e<=102},Z=function(e){return 10===e||9===e||32===e},ee=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},te=function(e){return ee(e)||J(e)||45===e},ne=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},ae=function(e,t){return 92===e&&10!==t},re=function(e,t,n){return 45===e?ee(t)||ae(t,n):!!ee(e)||!(92!==e||!ae(e,t))},ie=function(e,t,n){return 43===e||45===e?!!J(t)||46===t&&J(n):J(46===e?t:e)},oe=function(e){var t=0,n=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(n=-1),t++);for(var a=[];J(e[t]);)a.push(e[t++]);var r=a.length?parseInt(u.apply(void 0,a),10):0;46===e[t]&&t++;for(var i=[];J(e[t]);)i.push(e[t++]);var o=i.length,s=o?parseInt(u.apply(void 0,i),10):0;69!==e[t]&&101!==e[t]||t++;var d=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(d=-1),t++);for(var c=[];J(e[t]);)c.push(e[t++]);var l=c.length?parseInt(u.apply(void 0,c),10):0;return n*(r+s*Math.pow(10,-o))*Math.pow(10,d*l)},se={type:f.LEFT_PARENTHESIS_TOKEN},ue={type:f.RIGHT_PARENTHESIS_TOKEN},de={type:f.COMMA_TOKEN},ce={type:f.SUFFIX_MATCH_TOKEN},le={type:f.PREFIX_MATCH_TOKEN},fe={type:f.COLUMN_TOKEN},ge={type:f.DASH_MATCH_TOKEN},he={type:f.INCLUDE_MATCH_TOKEN},pe={type:f.LEFT_CURLY_BRACKET_TOKEN},Ae={type:f.RIGHT_CURLY_BRACKET_TOKEN},ve={type:f.SUBSTRING_MATCH_TOKEN},me={type:f.BAD_URL_TOKEN},ye={type:f.BAD_STRING_TOKEN},Re={type:f.CDO_TOKEN},be={type:f.CDC_TOKEN},we={type:f.COLON_TOKEN},xe={type:f.SEMICOLON_TOKEN},_e={type:f.LEFT_SQUARE_BRACKET_TOKEN},Ee={type:f.RIGHT_SQUARE_BRACKET_TOKEN},ke={type:f.WHITESPACE_TOKEN},Ce={type:f.EOF_TOKEN},Oe=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(s(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Ce;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),a=this.peekCodePoint(2);if(te(t)||ae(n,a)){var r=re(t,n,a)?2:1,i=this.consumeName();return{type:f.HASH_TOKEN,value:i,flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ce;break;case 39:return this.consumeStringToken(39);case 40:return se;case 41:return ue;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ve;break;case 43:if(ie(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return de;case 45:var o=e,s=this.peekCodePoint(0),d=this.peekCodePoint(1);if(ie(o,s,d))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(re(o,s,d))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===s&&62===d)return this.consumeCodePoint(),this.consumeCodePoint(),be;break;case 46:if(ie(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(42===c&&47===(c=this.consumeCodePoint()))return this.consumeToken();if(-1===c)return this.consumeToken()}break;case 58:return we;case 59:return xe;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),Re;break;case 64:var l=this.peekCodePoint(0),g=this.peekCodePoint(1),h=this.peekCodePoint(2);if(re(l,g,h))return i=this.consumeName(),{type:f.AT_KEYWORD_TOKEN,value:i};break;case 91:return _e;case 92:if(ae(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Ee;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),le;break;case 123:return pe;case 125:return Ae;case 117:case 85:var p=this.peekCodePoint(0),A=this.peekCodePoint(1);return 43!==p||!$(A)&&63!==A||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ge;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),fe;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),he;break;case-1:return Ce}return Z(e)?(this.consumeWhiteSpace(),ke):J(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):ee(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:f.DELIM_TOKEN,value:u(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();$(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var a=parseInt(u.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),r=parseInt(u.apply(void 0,e.map((function(e){return 63===e?70:e}))),16);return{type:f.UNICODE_RANGE_TOKEN,start:a,end:r}}var i=parseInt(u.apply(void 0,e),16);if(45===this.peekCodePoint(0)&&$(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];$(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();return r=parseInt(u.apply(void 0,o),16),{type:f.UNICODE_RANGE_TOKEN,start:i,end:r}}return{type:f.UNICODE_RANGE_TOKEN,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:f.FUNCTION_TOKEN,value:e}):{type:f.IDENT_TOKEN,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:f.URL_TOKEN,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===f.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:f.URL_TOKEN,value:n.value}):(this.consumeBadUrlRemnants(),me)}for(;;){var a=this.consumeCodePoint();if(-1===a||41===a)return{type:f.URL_TOKEN,value:u.apply(void 0,e)};if(Z(a))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:f.URL_TOKEN,value:u.apply(void 0,e)}):(this.consumeBadUrlRemnants(),me);if(34===a||39===a||40===a||ne(a))return this.consumeBadUrlRemnants(),me;if(92===a){if(!ae(a,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),me;e.push(this.consumeEscapedCodePoint())}else e.push(a)}},e.prototype.consumeWhiteSpace=function(){for(;Z(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||-1===e)return;ae(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var n=Math.min(6e4,e);t+=u.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var a=this._value[n];if(-1===a||void 0===a||a===e)return t+=this.consumeStringSlice(n),{type:f.STRING_TOKEN,value:t};if(10===a)return this._value.splice(0,n),ye;if(92===a){var r=this._value[n+1];-1!==r&&void 0!==r&&(10===r?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):ae(a,r)&&(t+=this.consumeStringSlice(n),t+=u(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=4,n=this.peekCodePoint(0);for(43!==n&&45!==n||e.push(this.consumeCodePoint());J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var a=this.peekCodePoint(1);if(46===n&&J(a))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),a=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===n||101===n)&&((43===a||45===a)&&J(r)||J(a)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;J(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[oe(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],a=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);if(re(a,r,i)){var o=this.consumeName();return{type:f.DIMENSION_TOKEN,number:t,flags:n,unit:o}}return 37===a?(this.consumeCodePoint(),{type:f.PERCENTAGE_TOKEN,number:t,flags:n}):{type:f.NUMBER_TOKEN,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if($(e)){for(var t=u(e);$(this.peekCodePoint(0))&&t.length<6;)t+=u(this.consumeCodePoint());Z(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||function(e){return e>=55296&&e<=57343}(n)||n>1114111?65533:n}return-1===e?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(te(t))e+=u(t);else{if(!ae(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=u(this.consumeEscapedCodePoint())}}},e}(),Be=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Oe;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===f.WHITESPACE_TOKEN;)e=this.consumeToken();if(e.type===f.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(e.type===f.WHITESPACE_TOKEN);if(e.type===f.EOF_TOKEN)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===f.EOF_TOKEN)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case f.LEFT_CURLY_BRACKET_TOKEN:case f.LEFT_SQUARE_BRACKET_TOKEN:case f.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(e.type);case f.FUNCTION_TOKEN:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===f.EOF_TOKEN||Pe(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:f.FUNCTION};;){var n=this.consumeToken();if(n.type===f.EOF_TOKEN||n.type===f.RIGHT_PARENTHESIS_TOKEN)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?Ce:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Se=function(e){return e.type===f.DIMENSION_TOKEN},Fe=function(e){return e.type===f.NUMBER_TOKEN},je=function(e){return e.type===f.IDENT_TOKEN},De=function(e){return e.type===f.STRING_TOKEN},Te=function(e,t){return je(e)&&e.value===t},Me=function(e){return e.type!==f.WHITESPACE_TOKEN},Ne=function(e){return e.type!==f.WHITESPACE_TOKEN&&e.type!==f.COMMA_TOKEN},Ue=function(e){var t=[],n=[];return e.forEach((function(e){if(e.type===f.COMMA_TOKEN){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}e.type!==f.WHITESPACE_TOKEN&&n.push(e)})),n.length&&t.push(n),t},Pe=function(e,t){return t===f.LEFT_CURLY_BRACKET_TOKEN&&e.type===f.RIGHT_CURLY_BRACKET_TOKEN||t===f.LEFT_SQUARE_BRACKET_TOKEN&&e.type===f.RIGHT_SQUARE_BRACKET_TOKEN||t===f.LEFT_PARENTHESIS_TOKEN&&e.type===f.RIGHT_PARENTHESIS_TOKEN},Le=function(e){return e.type===f.NUMBER_TOKEN||e.type===f.DIMENSION_TOKEN},Ie=function(e){return e.type===f.PERCENTAGE_TOKEN||Le(e)},Qe=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},He={type:f.NUMBER_TOKEN,number:0,flags:4},ze={type:f.PERCENTAGE_TOKEN,number:50,flags:4},Ke={type:f.PERCENTAGE_TOKEN,number:100,flags:4},Ve=function(e,t,n){var a=e[0],r=e[1];return[We(a,t),We(void 0!==r?r:a,n)]},We=function(e,t){if(e.type===f.PERCENTAGE_TOKEN)return e.number/100*t;if(Se(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},qe=function(e){if(e.type===f.DIMENSION_TOKEN)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},Ge=function(e){return e.type===f.DIMENSION_TOKEN&&("deg"===e.unit||"grad"===e.unit||"rad"===e.unit||"turn"===e.unit)},Xe=function(e){switch(e.filter(je).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[He,He];case"to top":case"bottom":return Ye(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[He,Ke];case"to right":case"left":return Ye(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ke,Ke];case"to bottom":case"top":return Ye(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ke,He];case"to left":case"right":return Ye(270)}return 0},Ye=function(e){return Math.PI*e/180},Je=function(e){if(e.type===f.FUNCTION){var t=st[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(e.values)}if(e.type===f.HASH_TOKEN){if(3===e.value.length){var n=e.value.substring(0,1),a=e.value.substring(1,2),r=e.value.substring(2,3);return et(parseInt(n+n,16),parseInt(a+a,16),parseInt(r+r,16),1)}if(4===e.value.length){n=e.value.substring(0,1),a=e.value.substring(1,2),r=e.value.substring(2,3);var i=e.value.substring(3,4);return et(parseInt(n+n,16),parseInt(a+a,16),parseInt(r+r,16),parseInt(i+i,16)/255)}if(6===e.value.length)return n=e.value.substring(0,2),a=e.value.substring(2,4),r=e.value.substring(4,6),et(parseInt(n,16),parseInt(a,16),parseInt(r,16),1);if(8===e.value.length)return n=e.value.substring(0,2),a=e.value.substring(2,4),r=e.value.substring(4,6),i=e.value.substring(6,8),et(parseInt(n,16),parseInt(a,16),parseInt(r,16),parseInt(i,16)/255)}if(e.type===f.IDENT_TOKEN){var o=ut[e.value.toUpperCase()];if(void 0!==o)return o}return ut.TRANSPARENT},$e=function(e){return 0==(255&e)},Ze=function(e){var t=255&e,n=255&e>>8,a=255&e>>16,r=255&e>>24;return t<255?"rgba("+r+","+a+","+n+","+t/255+")":"rgb("+r+","+a+","+n+")"},et=function(e,t,n,a){return(e<<24|t<<16|n<<8|Math.round(255*a)<<0)>>>0},tt=function(e,t){if(e.type===f.NUMBER_TOKEN)return e.number;if(e.type===f.PERCENTAGE_TOKEN){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},nt=function(e){var t=e.filter(Ne);if(3===t.length){var n=t.map(tt),a=n[0],r=n[1],i=n[2];return et(a,r,i,1)}if(4===t.length){var o=t.map(tt),s=(a=o[0],r=o[1],i=o[2],o[3]);return et(a,r,i,s)}return 0};function at(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var rt,it,ot=function(e){var t=e.filter(Ne),n=t[0],a=t[1],r=t[2],i=t[3],o=(n.type===f.NUMBER_TOKEN?Ye(n.number):qe(n))/(2*Math.PI),s=Ie(a)?a.number/100:0,u=Ie(r)?r.number/100:0,d=void 0!==i&&Ie(i)?We(i,1):1;if(0===s)return et(255*u,255*u,255*u,1);var c=u<=.5?u*(s+1):u+s-u*s,l=2*u-c,g=at(l,c,o+1/3),h=at(l,c,o),p=at(l,c,o-1/3);return et(255*g,255*h,255*p,d)},st={hsl:ot,hsla:ot,rgb:nt,rgba:nt},ut={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};(function(e){e[e.VALUE=0]="VALUE",e[e.LIST=1]="LIST",e[e.IDENT_VALUE=2]="IDENT_VALUE",e[e.TYPE_VALUE=3]="TYPE_VALUE",e[e.TOKEN_VALUE=4]="TOKEN_VALUE"})(rt||(rt={})),function(e){e[e.BORDER_BOX=0]="BORDER_BOX",e[e.PADDING_BOX=1]="PADDING_BOX",e[e.CONTENT_BOX=2]="CONTENT_BOX"}(it||(it={}));var dt,ct,lt,ft={name:"background-clip",initialValue:"border-box",prefix:!1,type:rt.LIST,parse:function(e){return e.map((function(e){if(je(e))switch(e.value){case"padding-box":return it.PADDING_BOX;case"content-box":return it.CONTENT_BOX}return it.BORDER_BOX}))}},gt={name:"background-color",initialValue:"transparent",prefix:!1,type:rt.TYPE_VALUE,format:"color"},ht=function(e){var t=Je(e[0]),n=e[1];return n&&Ie(n)?{color:t,stop:n}:{color:t,stop:null}},pt=function(e,t){var n=e[0],a=e[e.length-1];null===n.stop&&(n.stop=He),null===a.stop&&(a.stop=Ke);for(var r=[],i=0,o=0;oi?r.push(u):r.push(i),i=u}else r.push(null)}var d=null;for(o=0;oe.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},mt=function(e){var t=Ye(180),n=[];return Ue(e).forEach((function(e,a){if(0===a){var r=e[0];if(r.type===f.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(r.value))return void(t=Xe(e));if(Ge(r))return void(t=(qe(r)+Ye(270))%Ye(360))}var i=ht(e);n.push(i)})),{angle:t,stops:n,type:dt.LINEAR_GRADIENT}},yt=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Rt=function(e,t,n,a,r){var i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),s=document.createElementNS(i,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",a.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(r),o},bt=function(e){return new Promise((function(t,n){var a=new Image;a.onload=function(){return t(a)},a.onerror=n,a.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},wt={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var a=t.getBoundingClientRect(),r=Math.round(a.height);if(e.body.removeChild(n),123===r)return!0}}return!1}(document);return Object.defineProperty(wt,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),a=n.getContext("2d");if(!a)return!1;t.src="data:image/svg+xml,";try{a.drawImage(t,0,0),n.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(wt,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas");t.width=100,t.height=100;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,100,100);var a=new Image,r=t.toDataURL();a.src=r;var i=Rt(100,100,0,0,a);return n.fillStyle="red",n.fillRect(0,0,100,100),bt(i).then((function(t){n.drawImage(t,0,0);var a=n.getImageData(0,0,100,100).data;n.fillStyle="red",n.fillRect(0,0,100,100);var i=e.createElement("div");return i.style.backgroundImage="url("+r+")",i.style.height="100px",yt(a)?bt(Rt(100,100,0,0,i)):Promise.reject(!1)})).then((function(e){return n.drawImage(e,0,0),yt(n.getImageData(0,0,100,100).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(wt,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(wt,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(wt,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(wt,"SUPPORT_CORS_XHR",{value:e}),e}},xt=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,r.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var a=e.substring(0,256);return new Promise((function(r,i){var o=wt.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;if(s.onload=function(){if(200===s.status)if("text"===o)r(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return r(e.result)}),!1),e.addEventListener("error",(function(e){return i(e)}),!1),e.readAsDataURL(s.response)}else i("Failed to proxy resource "+a+" with status code "+s.status)},s.onerror=i,s.open("GET",n+"?url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var u=t._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+a)}}s.send()}))},e}(),kt=/^data:image\/svg\+xml/i,Ct=/^data:image\/.*;base64,/i,Ot=/^data:image\/.*/i,Bt=function(e){return wt.SUPPORT_SVG_DRAWING||!Dt(e)},St=function(e){return Ot.test(e)},Ft=function(e){return Ct.test(e)},jt=function(e){return"blob"===e.substr(0,4)},Dt=function(e){return"svg"===e.substr(-3).toLowerCase()||kt.test(e)},Tt=function(e){var t=ct.CIRCLE,n=lt.FARTHEST_CORNER,a=[],r=[];return Ue(e).forEach((function(e,i){var o=!0;if(0===i?o=e.reduce((function(e,t){if(je(t))switch(t.value){case"center":return r.push(ze),!1;case"top":case"left":return r.push(He),!1;case"right":case"bottom":return r.push(Ke),!1}else if(Ie(t)||Le(t))return r.push(t),!1;return e}),o):1===i&&(o=e.reduce((function(e,a){if(je(a))switch(a.value){case"circle":return t=ct.CIRCLE,!1;case"ellipse":return t=ct.ELLIPSE,!1;case"contain":case"closest-side":return n=lt.CLOSEST_SIDE,!1;case"farthest-side":return n=lt.FARTHEST_SIDE,!1;case"closest-corner":return n=lt.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return n=lt.FARTHEST_CORNER,!1}else if(Le(a)||Ie(a))return Array.isArray(n)||(n=[]),n.push(a),!1;return e}),o)),o){var s=ht(e);a.push(s)}})),{size:n,shape:t,stops:a,position:r,type:dt.RADIAL_GRADIENT}};!function(e){e[e.URL=0]="URL",e[e.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",e[e.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(dt||(dt={})),function(e){e[e.CIRCLE=0]="CIRCLE",e[e.ELLIPSE=1]="ELLIPSE"}(ct||(ct={})),function(e){e[e.CLOSEST_SIDE=0]="CLOSEST_SIDE",e[e.FARTHEST_SIDE=1]="FARTHEST_SIDE",e[e.CLOSEST_CORNER=2]="CLOSEST_CORNER",e[e.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(lt||(lt={}));var Mt,Nt=function(e){if(e.type===f.URL_TOKEN){var t={url:e.value,type:dt.URL};return _t.getInstance().addImage(e.value),t}if(e.type===f.FUNCTION){var n=Ut[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(e.values)}throw new Error("Unsupported image type")},Ut={"linear-gradient":function(e){var t=Ye(180),n=[];return Ue(e).forEach((function(e,a){if(0===a){var r=e[0];if(r.type===f.IDENT_TOKEN&&"to"===r.value)return void(t=Xe(e));if(Ge(r))return void(t=qe(r))}var i=ht(e);n.push(i)})),{angle:t,stops:n,type:dt.LINEAR_GRADIENT}},"-moz-linear-gradient":mt,"-ms-linear-gradient":mt,"-o-linear-gradient":mt,"-webkit-linear-gradient":mt,"radial-gradient":function(e){var t=ct.CIRCLE,n=lt.FARTHEST_CORNER,a=[],r=[];return Ue(e).forEach((function(e,i){var o=!0;if(0===i){var s=!1;o=e.reduce((function(e,a){if(s)if(je(a))switch(a.value){case"center":return r.push(ze),e;case"top":case"left":return r.push(He),e;case"right":case"bottom":return r.push(Ke),e}else(Ie(a)||Le(a))&&r.push(a);else if(je(a))switch(a.value){case"circle":return t=ct.CIRCLE,!1;case"ellipse":return t=ct.ELLIPSE,!1;case"at":return s=!0,!1;case"closest-side":return n=lt.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return n=lt.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return n=lt.CLOSEST_CORNER,!1;case"farthest-corner":return n=lt.FARTHEST_CORNER,!1}else if(Le(a)||Ie(a))return Array.isArray(n)||(n=[]),n.push(a),!1;return e}),o)}if(o){var u=ht(e);a.push(u)}})),{size:n,shape:t,stops:a,position:r,type:dt.RADIAL_GRADIENT}},"-moz-radial-gradient":Tt,"-ms-radial-gradient":Tt,"-o-radial-gradient":Tt,"-webkit-radial-gradient":Tt,"-webkit-gradient":function(e){var t=Ye(180),n=[],a=dt.LINEAR_GRADIENT,r=ct.CIRCLE,i=lt.FARTHEST_CORNER;return Ue(e).forEach((function(e,t){var r=e[0];if(0===t){if(je(r)&&"linear"===r.value)return void(a=dt.LINEAR_GRADIENT);if(je(r)&&"radial"===r.value)return void(a=dt.RADIAL_GRADIENT)}if(r.type===f.FUNCTION)if("from"===r.name){var i=Je(r.values[0]);n.push({stop:He,color:i})}else if("to"===r.name)i=Je(r.values[0]),n.push({stop:Ke,color:i});else if("color-stop"===r.name){var o=r.values.filter(Ne);if(2===o.length){i=Je(o[1]);var s=o[0];Fe(s)&&n.push({stop:{type:f.PERCENTAGE_TOKEN,number:100*s.number,flags:s.flags},color:i})}}})),a===dt.LINEAR_GRADIENT?{angle:(t+Ye(180))%Ye(360),stops:n,type:a}:{size:i,shape:r,stops:n,position:[],type:a}}},Pt={name:"background-image",initialValue:"none",type:rt.LIST,prefix:!1,parse:function(e){if(0===e.length)return[];var t=e[0];return t.type===f.IDENT_TOKEN&&"none"===t.value?[]:e.filter((function(e){return Ne(e)&&function(e){return e.type!==f.FUNCTION||Ut[e.name]}(e)})).map(Nt)}},Lt={name:"background-origin",initialValue:"border-box",prefix:!1,type:rt.LIST,parse:function(e){return e.map((function(e){if(je(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},It={name:"background-position",initialValue:"0% 0%",type:rt.LIST,prefix:!1,parse:function(e){return Ue(e).map((function(e){return e.filter(Ie)})).map(Qe)}};!function(e){e[e.REPEAT=0]="REPEAT",e[e.NO_REPEAT=1]="NO_REPEAT",e[e.REPEAT_X=2]="REPEAT_X",e[e.REPEAT_Y=3]="REPEAT_Y"}(Mt||(Mt={}));var Qt,Ht={name:"background-repeat",initialValue:"repeat",prefix:!1,type:rt.LIST,parse:function(e){return Ue(e).map((function(e){return e.filter(je).map((function(e){return e.value})).join(" ")})).map(zt)}},zt=function(e){switch(e){case"no-repeat":return Mt.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return Mt.REPEAT_X;case"repeat-y":case"no-repeat repeat":return Mt.REPEAT_Y;case"repeat":default:return Mt.REPEAT}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Qt||(Qt={}));var Kt,Vt={name:"background-size",initialValue:"0",prefix:!1,type:rt.LIST,parse:function(e){return Ue(e).map((function(e){return e.filter(Wt)}))}},Wt=function(e){return je(e)||Ie(e)},qt=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:rt.TYPE_VALUE,format:"color"}},Gt=qt("top"),Xt=qt("right"),Yt=qt("bottom"),Jt=qt("left"),$t=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:rt.LIST,parse:function(e){return Qe(e.filter(Ie))}}},Zt=$t("top-left"),en=$t("top-right"),tn=$t("bottom-right"),nn=$t("bottom-left");!function(e){e[e.NONE=0]="NONE",e[e.SOLID=1]="SOLID"}(Kt||(Kt={}));var an,rn=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"none":return Kt.NONE}return Kt.SOLID}}},on=rn("top"),sn=rn("right"),un=rn("bottom"),dn=rn("left"),cn=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:rt.VALUE,prefix:!1,parse:function(e){return Se(e)?e.number:0}}},ln=cn("top"),fn=cn("right"),gn=cn("bottom"),hn=cn("left"),pn={name:"color",initialValue:"transparent",prefix:!1,type:rt.TYPE_VALUE,format:"color"},An={name:"display",initialValue:"inline-block",prefix:!1,type:rt.LIST,parse:function(e){return e.filter(je).reduce((function(e,t){return e|vn(t.value)}),0)}},vn=function(e){switch(e){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(e){e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.INLINE_START=3]="INLINE_START",e[e.INLINE_END=4]="INLINE_END"}(an||(an={}));var mn,yn={name:"float",initialValue:"none",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"left":return an.LEFT;case"right":return an.RIGHT;case"inline-start":return an.INLINE_START;case"inline-end":return an.INLINE_END}return an.NONE}},Rn={name:"letter-spacing",initialValue:"0",prefix:!1,type:rt.VALUE,parse:function(e){return e.type===f.IDENT_TOKEN&&"normal"===e.value?0:e.type===f.NUMBER_TOKEN||e.type===f.DIMENSION_TOKEN?e.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(mn||(mn={}));var bn,wn={name:"line-break",initialValue:"normal",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"strict":return mn.STRICT;case"normal":default:return mn.NORMAL}}},xn={name:"line-height",initialValue:"normal",prefix:!1,type:rt.TOKEN_VALUE},_n={name:"list-style-image",initialValue:"none",type:rt.VALUE,prefix:!1,parse:function(e){return e.type===f.IDENT_TOKEN&&"none"===e.value?null:Nt(e)}};!function(e){e[e.INSIDE=0]="INSIDE",e[e.OUTSIDE=1]="OUTSIDE"}(bn||(bn={}));var En,kn={name:"list-style-position",initialValue:"outside",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"inside":return bn.INSIDE;case"outside":default:return bn.OUTSIDE}}};!function(e){e[e.NONE=-1]="NONE",e[e.DISC=0]="DISC",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e[e.DECIMAL=3]="DECIMAL",e[e.CJK_DECIMAL=4]="CJK_DECIMAL",e[e.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",e[e.LOWER_ROMAN=6]="LOWER_ROMAN",e[e.UPPER_ROMAN=7]="UPPER_ROMAN",e[e.LOWER_GREEK=8]="LOWER_GREEK",e[e.LOWER_ALPHA=9]="LOWER_ALPHA",e[e.UPPER_ALPHA=10]="UPPER_ALPHA",e[e.ARABIC_INDIC=11]="ARABIC_INDIC",e[e.ARMENIAN=12]="ARMENIAN",e[e.BENGALI=13]="BENGALI",e[e.CAMBODIAN=14]="CAMBODIAN",e[e.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",e[e.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",e[e.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",e[e.DEVANAGARI=18]="DEVANAGARI",e[e.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",e[e.GEORGIAN=20]="GEORGIAN",e[e.GUJARATI=21]="GUJARATI",e[e.GURMUKHI=22]="GURMUKHI",e[e.HEBREW=22]="HEBREW",e[e.HIRAGANA=23]="HIRAGANA",e[e.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",e[e.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",e[e.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",e[e.KANNADA=27]="KANNADA",e[e.KATAKANA=28]="KATAKANA",e[e.KATAKANA_IROHA=29]="KATAKANA_IROHA",e[e.KHMER=30]="KHMER",e[e.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",e[e.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",e[e.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",e[e.LAO=34]="LAO",e[e.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",e[e.MALAYALAM=36]="MALAYALAM",e[e.MONGOLIAN=37]="MONGOLIAN",e[e.MYANMAR=38]="MYANMAR",e[e.ORIYA=39]="ORIYA",e[e.PERSIAN=40]="PERSIAN",e[e.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",e[e.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",e[e.TAMIL=43]="TAMIL",e[e.TELUGU=44]="TELUGU",e[e.THAI=45]="THAI",e[e.TIBETAN=46]="TIBETAN",e[e.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",e[e.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",e[e.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",e[e.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",e[e.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(En||(En={}));var Cn,On={name:"list-style-type",initialValue:"none",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"disc":return En.DISC;case"circle":return En.CIRCLE;case"square":return En.SQUARE;case"decimal":return En.DECIMAL;case"cjk-decimal":return En.CJK_DECIMAL;case"decimal-leading-zero":return En.DECIMAL_LEADING_ZERO;case"lower-roman":return En.LOWER_ROMAN;case"upper-roman":return En.UPPER_ROMAN;case"lower-greek":return En.LOWER_GREEK;case"lower-alpha":return En.LOWER_ALPHA;case"upper-alpha":return En.UPPER_ALPHA;case"arabic-indic":return En.ARABIC_INDIC;case"armenian":return En.ARMENIAN;case"bengali":return En.BENGALI;case"cambodian":return En.CAMBODIAN;case"cjk-earthly-branch":return En.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return En.CJK_HEAVENLY_STEM;case"cjk-ideographic":return En.CJK_IDEOGRAPHIC;case"devanagari":return En.DEVANAGARI;case"ethiopic-numeric":return En.ETHIOPIC_NUMERIC;case"georgian":return En.GEORGIAN;case"gujarati":return En.GUJARATI;case"gurmukhi":return En.GURMUKHI;case"hebrew":return En.HEBREW;case"hiragana":return En.HIRAGANA;case"hiragana-iroha":return En.HIRAGANA_IROHA;case"japanese-formal":return En.JAPANESE_FORMAL;case"japanese-informal":return En.JAPANESE_INFORMAL;case"kannada":return En.KANNADA;case"katakana":return En.KATAKANA;case"katakana-iroha":return En.KATAKANA_IROHA;case"khmer":return En.KHMER;case"korean-hangul-formal":return En.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return En.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return En.KOREAN_HANJA_INFORMAL;case"lao":return En.LAO;case"lower-armenian":return En.LOWER_ARMENIAN;case"malayalam":return En.MALAYALAM;case"mongolian":return En.MONGOLIAN;case"myanmar":return En.MYANMAR;case"oriya":return En.ORIYA;case"persian":return En.PERSIAN;case"simp-chinese-formal":return En.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return En.SIMP_CHINESE_INFORMAL;case"tamil":return En.TAMIL;case"telugu":return En.TELUGU;case"thai":return En.THAI;case"tibetan":return En.TIBETAN;case"trad-chinese-formal":return En.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return En.TRAD_CHINESE_INFORMAL;case"upper-armenian":return En.UPPER_ARMENIAN;case"disclosure-open":return En.DISCLOSURE_OPEN;case"disclosure-closed":return En.DISCLOSURE_CLOSED;case"none":default:return En.NONE}}},Bn=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:rt.TOKEN_VALUE}},Sn=Bn("top"),Fn=Bn("right"),jn=Bn("bottom"),Dn=Bn("left");!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.SCROLL=2]="SCROLL",e[e.AUTO=3]="AUTO"}(Cn||(Cn={}));var Tn,Mn={name:"overflow",initialValue:"visible",prefix:!1,type:rt.LIST,parse:function(e){return e.filter(je).map((function(e){switch(e.value){case"hidden":return Cn.HIDDEN;case"scroll":return Cn.SCROLL;case"auto":return Cn.AUTO;case"visible":default:return Cn.VISIBLE}}))}};!function(e){e.NORMAL="normal",e.BREAK_WORD="break-word"}(Tn||(Tn={}));var Nn,Un={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"break-word":return Tn.BREAK_WORD;case"normal":default:return Tn.NORMAL}}},Pn=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:rt.TYPE_VALUE,format:"length-percentage"}},Ln=Pn("top"),In=Pn("right"),Qn=Pn("bottom"),Hn=Pn("left");!function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(Nn||(Nn={}));var zn,Kn={name:"text-align",initialValue:"left",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"right":return Nn.RIGHT;case"center":case"justify":return Nn.CENTER;case"left":default:return Nn.LEFT}}};!function(e){e[e.STATIC=0]="STATIC",e[e.RELATIVE=1]="RELATIVE",e[e.ABSOLUTE=2]="ABSOLUTE",e[e.FIXED=3]="FIXED",e[e.STICKY=4]="STICKY"}(zn||(zn={}));var Vn,Wn={name:"position",initialValue:"static",prefix:!1,type:rt.IDENT_VALUE,parse:function(e){switch(e){case"relative":return zn.RELATIVE;case"absolute":return zn.ABSOLUTE;case"fixed":return zn.FIXED;case"sticky":return zn.STICKY}return zn.STATIC}},qn={name:"text-shadow",initialValue:"none",type:rt.LIST,prefix:!1,parse:function(e){return 1===e.length&&Te(e[0],"none")?[]:Ue(e).map((function(e){for(var t={color:ut.TRANSPARENT,offsetX:He,offsetY:He,blur:He},n=0,a=0;a1?1:0],this.overflowWrap=ka(Un,e.overflowWrap),this.paddingTop=ka(Ln,e.paddingTop),this.paddingRight=ka(In,e.paddingRight),this.paddingBottom=ka(Qn,e.paddingBottom),this.paddingLeft=ka(Hn,e.paddingLeft),this.position=ka(Wn,e.position),this.textAlign=ka(Kn,e.textAlign),this.textDecorationColor=ka(sa,e.textDecorationColor||e.color),this.textDecorationLine=ka(ua,e.textDecorationLine),this.textShadow=ka(qn,e.textShadow),this.textTransform=ka(Xn,e.textTransform),this.transform=ka(Yn,e.transform),this.transformOrigin=ka(ea,e.transformOrigin),this.visibility=ka(na,e.visibility),this.wordBreak=ka(ra,e.wordBreak),this.zIndex=ka(ia,e.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Gn.VISIBLE},e.prototype.isTransparent=function(){return $e(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return this.position!==zn.STATIC},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==an.NONE},e.prototype.isInlineLevel=function(){return Aa(this.display,4)||Aa(this.display,33554432)||Aa(this.display,268435456)||Aa(this.display,536870912)||Aa(this.display,67108864)||Aa(this.display,134217728)},e}(),_a=function(e){this.content=ka(va,e.content),this.quotes=ka(Ra,e.quotes)},Ea=function(e){this.counterIncrement=ka(ma,e.counterIncrement),this.counterReset=ka(ya,e.counterReset)},ka=function(e,t){var n=new Oe,a=null!=t?t.toString():e.initialValue;n.write(a);var r=new Be(n.read());switch(e.type){case rt.IDENT_VALUE:var i=r.parseComponentValue();return e.parse(je(i)?i.value:e.initialValue);case rt.VALUE:return e.parse(r.parseComponentValue());case rt.LIST:return e.parse(r.parseComponentValues());case rt.TOKEN_VALUE:return r.parseComponentValue();case rt.TYPE_VALUE:switch(e.format){case"angle":return qe(r.parseComponentValue());case"color":return Je(r.parseComponentValue());case"image":return Nt(r.parseComponentValue());case"length":var o=r.parseComponentValue();return Le(o)?o:He;case"length-percentage":var s=r.parseComponentValue();return Ie(s)?s:He}}throw new Error("Attempting to parse unsupported css format type "+e.format)},Ca=function(e){this.styles=new xa(window.getComputedStyle(e,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&nr(e)&&(e.style.transform="none"),this.bounds=o(e),this.flags=0},Oa=function(e,t){this.text=e,this.bounds=t},Ba=function(e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(n,e);var r=o(n);return n.firstChild&&a.replaceChild(n.firstChild,n),r}}return new i(0,0,0,0)},Sa=function(e,t,n){var a=e.ownerDocument;if(!a)throw new Error("Node has no owner document");var r=a.createRange();return r.setStart(e,t),r.setEnd(e,t+n),i.fromClientRect(r.getBoundingClientRect())},Fa=function(e,t){return 0!==t.letterSpacing?s(e).map((function(e){return u(e)})):ja(e,t)},ja=function(e,t){for(var n,a=function(e,t){var n=s(e),a=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=function(e,t){void 0===t&&(t="strict");var n=[],a=[],r=[];return e.forEach((function(e,i){var o=L.get(e);if(o>50?(r.push(!0),o-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return a.push(i),n.push(16);if(4===o||11===o){if(0===i)return a.push(i),n.push(B);var s=n[i-1];return-1===K.indexOf(s)?(a.push(a[i-1]),n.push(s)):(a.push(i),n.push(B))}return a.push(i),31===o?n.push("strict"===t?w:T):o===P||29===o?n.push(B):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(T):n.push(B):void n.push(o)})),[a,n,r]}(e,t.lineBreak),a=n[0],r=n[1],i=n[2];return"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map((function(e){return-1!==[E,B,P].indexOf(e)?T:e}))),[a,r,"keep-all"===t.wordBreak?i.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0]}(n,t),r=a[0],i=a[1],o=a[2],u=n.length,d=0,c=0;return{next:function(){if(c>=u)return{done:!0,value:null};for(var e="\xd7";c0)if(wt.SUPPORT_RANGE_BOUNDS)r.push(new Oa(e,Sa(n,i,e.length)));else{var a=n.splitText(e.length);r.push(new Oa(e,Ba(n))),n=a}else wt.SUPPORT_RANGE_BOUNDS||(n=n.splitText(e.length));i+=e.length})),r}(this.text,t,e)},Ta=function(e,t){switch(t){case Vn.LOWERCASE:return e.toLowerCase();case Vn.CAPITALIZE:return e.replace(Ma,Na);case Vn.UPPERCASE:return e.toUpperCase();default:return e}},Ma=/(^|\s|:|-|\(|\))([a-z])/g,Na=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Ua=function(e){function n(t){var n=e.call(this,t)||this;return n.src=t.currentSrc||t.src,n.intrinsicWidth=t.naturalWidth,n.intrinsicHeight=t.naturalHeight,_t.getInstance().addImage(n.src),n}return t(n,e),n}(Ca),Pa=function(e){function n(t){var n=e.call(this,t)||this;return n.canvas=t,n.intrinsicWidth=t.width,n.intrinsicHeight=t.height,n}return t(n,e),n}(Ca),La=function(e){function n(t){var n=e.call(this,t)||this,a=new XMLSerializer;return n.svg="data:image/svg+xml,"+encodeURIComponent(a.serializeToString(t)),n.intrinsicWidth=t.width.baseVal.value,n.intrinsicHeight=t.height.baseVal.value,_t.getInstance().addImage(n.svg),n}return t(n,e),n}(Ca),Ia=function(e){function n(t){var n=e.call(this,t)||this;return n.value=t.value,n}return t(n,e),n}(Ca),Qa=function(e){function n(t){var n=e.call(this,t)||this;return n.start=t.start,n.reversed="boolean"==typeof t.reversed&&!0===t.reversed,n}return t(n,e),n}(Ca),Ha=[{type:f.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],za=[{type:f.PERCENTAGE_TOKEN,flags:0,number:50}],Ka=function(e){function n(t){var n=e.call(this,t)||this;switch(n.type=t.type.toLowerCase(),n.checked=t.checked,n.value=function(e){var t="password"===e.type?new Array(e.value.length+1).join("\u2022"):e.value;return 0===t.length?e.placeholder||"":t}(t),"checkbox"!==n.type&&"radio"!==n.type||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=Kt.SOLID,n.styles.backgroundClip=[it.BORDER_BOX],n.styles.backgroundOrigin=[0],n.bounds=function(e){return e.width>e.height?new i(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)n.textNodes.push(new Da(r,n.styles));else if(tr(r)){var o=Ya(r);o.styles.isVisible()&&($a(r,o,a)?o.flags|=4:Za(o.styles)&&(o.flags|=2),-1!==Xa.indexOf(r.tagName)&&(o.flags|=8),n.elements.push(o),gr(r)||or(r)||hr(r)||e(r,o,a))}}(e,t,t),t},$a=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||sr(e)&&n.styles.isTransparent()},Za=function(e){return e.isPositioned()||e.isFloating()},er=function(e){return e.nodeType===Node.TEXT_NODE},tr=function(e){return e.nodeType===Node.ELEMENT_NODE},nr=function(e){return void 0!==e.style},ar=function(e){return"LI"===e.tagName},rr=function(e){return"OL"===e.tagName},ir=function(e){return"INPUT"===e.tagName},or=function(e){return"svg"===e.tagName},sr=function(e){return"BODY"===e.tagName},ur=function(e){return"CANVAS"===e.tagName},dr=function(e){return"IMG"===e.tagName},cr=function(e){return"IFRAME"===e.tagName},lr=function(e){return"STYLE"===e.tagName},fr=function(e){return"SCRIPT"===e.tagName},gr=function(e){return"TEXTAREA"===e.tagName},hr=function(e){return"SELECT"===e.tagName},pr=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){return this.counters[e]||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,a=e.counterReset,r=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(r=!1,n[Math.max(0,n.length-1)]+=e.increment)}));var i=[];return r&&a.forEach((function(e){var n=t.counters[e.counter];i.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),i},e}(),Ar={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},vr={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054f","\u054e","\u054d","\u054c","\u054b","\u054a","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053f","\u053e","\u053d","\u053c","\u053b","\u053a","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},mr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05d9\u05f3","\u05d8\u05f3","\u05d7\u05f3","\u05d6\u05f3","\u05d5\u05f3","\u05d4\u05f3","\u05d3\u05f3","\u05d2\u05f3","\u05d1\u05f3","\u05d0\u05f3","\u05ea","\u05e9","\u05e8","\u05e7","\u05e6","\u05e4","\u05e2","\u05e1","\u05e0","\u05de","\u05dc","\u05db","\u05d9\u05d8","\u05d9\u05d7","\u05d9\u05d6","\u05d8\u05d6","\u05d8\u05d5","\u05d9","\u05d8","\u05d7","\u05d6","\u05d5","\u05d4","\u05d3","\u05d2","\u05d1","\u05d0"]},yr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10f5","\u10f0","\u10ef","\u10f4","\u10ee","\u10ed","\u10ec","\u10eb","\u10ea","\u10e9","\u10e8","\u10e7","\u10e6","\u10e5","\u10e4","\u10f3","\u10e2","\u10e1","\u10e0","\u10df","\u10de","\u10dd","\u10f2","\u10dc","\u10db","\u10da","\u10d9","\u10d8","\u10d7","\u10f1","\u10d6","\u10d5","\u10d4","\u10d3","\u10d2","\u10d1","\u10d0"]},Rr=function(e,t,n,a,r,i){return en?Er(e,r,i.length>0):a.integers.reduce((function(t,n,r){for(;e>=n;)e-=n,t+=a.values[r];return t}),"")+i},br=function(e,t,n,a){var r="";do{n||e--,r=a(e)+r,e/=t}while(e*t>=t);return r},wr=function(e,t,n,a,r){var i=n-t+1;return(e<0?"-":"")+(br(Math.abs(e),i,a,(function(e){return u(Math.floor(e%i)+t)}))+r)},xr=function(e,t,n){void 0===n&&(n=". ");var a=t.length;return br(Math.abs(e),a,!1,(function(e){return t[Math.floor(e%a)]}))+n},_r=function(e,t,n,a,r,i){if(e<-9999||e>9999)return Er(e,En.CJK_DECIMAL,r.length>0);var o=Math.abs(e),s=r;if(0===o)return t[0]+s;for(var u=0;o>0&&u<=4;u++){var d=o%10;0===d&&Aa(i,1)&&""!==s?s=t[d]+s:d>1||1===d&&0===u||1===d&&1===u&&Aa(i,2)||1===d&&1===u&&Aa(i,4)&&e>100||1===d&&u>1&&Aa(i,8)?s=t[d]+(u>0?n[u-1]:"")+s:1===d&&u>0&&(s=n[u-1]+s),o=Math.floor(o/10)}return(e<0?a:"")+s},Er=function(e,t,n){var a=n?". ":"",r=n?"\u3001":"",i=n?", ":"",o=n?" ":"";switch(t){case En.DISC:return"\u2022"+o;case En.CIRCLE:return"\u25e6"+o;case En.SQUARE:return"\u25fe"+o;case En.DECIMAL_LEADING_ZERO:var s=wr(e,48,57,!0,a);return s.length<4?"0"+s:s;case En.CJK_DECIMAL:return xr(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d",r);case En.LOWER_ROMAN:return Rr(e,1,3999,Ar,En.DECIMAL,a).toLowerCase();case En.UPPER_ROMAN:return Rr(e,1,3999,Ar,En.DECIMAL,a);case En.LOWER_GREEK:return wr(e,945,969,!1,a);case En.LOWER_ALPHA:return wr(e,97,122,!1,a);case En.UPPER_ALPHA:return wr(e,65,90,!1,a);case En.ARABIC_INDIC:return wr(e,1632,1641,!0,a);case En.ARMENIAN:case En.UPPER_ARMENIAN:return Rr(e,1,9999,vr,En.DECIMAL,a);case En.LOWER_ARMENIAN:return Rr(e,1,9999,vr,En.DECIMAL,a).toLowerCase();case En.BENGALI:return wr(e,2534,2543,!0,a);case En.CAMBODIAN:case En.KHMER:return wr(e,6112,6121,!0,a);case En.CJK_EARTHLY_BRANCH:return xr(e,"\u5b50\u4e11\u5bc5\u536f\u8fb0\u5df3\u5348\u672a\u7533\u9149\u620c\u4ea5",r);case En.CJK_HEAVENLY_STEM:return xr(e,"\u7532\u4e59\u4e19\u4e01\u620a\u5df1\u5e9a\u8f9b\u58ec\u7678",r);case En.CJK_IDEOGRAPHIC:case En.TRAD_CHINESE_INFORMAL:return _r(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c","\u8ca0",r,14);case En.TRAD_CHINESE_FORMAL:return _r(e,"\u96f6\u58f9\u8cb3\u53c3\u8086\u4f0d\u9678\u67d2\u634c\u7396","\u62fe\u4f70\u4edf\u842c","\u8ca0",r,15);case En.SIMP_CHINESE_INFORMAL:return _r(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c","\u8d1f",r,14);case En.SIMP_CHINESE_FORMAL:return _r(e,"\u96f6\u58f9\u8d30\u53c1\u8086\u4f0d\u9646\u67d2\u634c\u7396","\u62fe\u4f70\u4edf\u842c","\u8d1f",r,15);case En.JAPANESE_INFORMAL:return _r(e,"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u4e07","\u30de\u30a4\u30ca\u30b9",r,0);case En.JAPANESE_FORMAL:return _r(e,"\u96f6\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343\u4e07","\u30de\u30a4\u30ca\u30b9",r,7);case En.KOREAN_HANGUL_FORMAL:return _r(e,"\uc601\uc77c\uc774\uc0bc\uc0ac\uc624\uc721\uce60\ud314\uad6c","\uc2ed\ubc31\ucc9c\ub9cc","\ub9c8\uc774\ub108\uc2a4",i,7);case En.KOREAN_HANJA_INFORMAL:return _r(e,"\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u5341\u767e\u5343\u842c","\ub9c8\uc774\ub108\uc2a4",i,0);case En.KOREAN_HANJA_FORMAL:return _r(e,"\u96f6\u58f9\u8cb3\u53c3\u56db\u4e94\u516d\u4e03\u516b\u4e5d","\u62fe\u767e\u5343","\ub9c8\uc774\ub108\uc2a4",i,7);case En.DEVANAGARI:return wr(e,2406,2415,!0,a);case En.GEORGIAN:return Rr(e,1,19999,yr,En.DECIMAL,a);case En.GUJARATI:return wr(e,2790,2799,!0,a);case En.GURMUKHI:return wr(e,2662,2671,!0,a);case En.HEBREW:return Rr(e,1,10999,mr,En.DECIMAL,a);case En.HIRAGANA:return xr(e,"\u3042\u3044\u3046\u3048\u304a\u304b\u304d\u304f\u3051\u3053\u3055\u3057\u3059\u305b\u305d\u305f\u3061\u3064\u3066\u3068\u306a\u306b\u306c\u306d\u306e\u306f\u3072\u3075\u3078\u307b\u307e\u307f\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308a\u308b\u308c\u308d\u308f\u3090\u3091\u3092\u3093");case En.HIRAGANA_IROHA:return xr(e,"\u3044\u308d\u306f\u306b\u307b\u3078\u3068\u3061\u308a\u306c\u308b\u3092\u308f\u304b\u3088\u305f\u308c\u305d\u3064\u306d\u306a\u3089\u3080\u3046\u3090\u306e\u304a\u304f\u3084\u307e\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304d\u3086\u3081\u307f\u3057\u3091\u3072\u3082\u305b\u3059");case En.KANNADA:return wr(e,3302,3311,!0,a);case En.KATAKANA:return xr(e,"\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f0\u30f1\u30f2\u30f3",r);case En.KATAKANA_IROHA:return xr(e,"\u30a4\u30ed\u30cf\u30cb\u30db\u30d8\u30c8\u30c1\u30ea\u30cc\u30eb\u30f2\u30ef\u30ab\u30e8\u30bf\u30ec\u30bd\u30c4\u30cd\u30ca\u30e9\u30e0\u30a6\u30f0\u30ce\u30aa\u30af\u30e4\u30de\u30b1\u30d5\u30b3\u30a8\u30c6\u30a2\u30b5\u30ad\u30e6\u30e1\u30df\u30b7\u30f1\u30d2\u30e2\u30bb\u30b9",r);case En.LAO:return wr(e,3792,3801,!0,a);case En.MONGOLIAN:return wr(e,6160,6169,!0,a);case En.MYANMAR:return wr(e,4160,4169,!0,a);case En.ORIYA:return wr(e,2918,2927,!0,a);case En.PERSIAN:return wr(e,1776,1785,!0,a);case En.TAMIL:return wr(e,3046,3055,!0,a);case En.TELUGU:return wr(e,3174,3183,!0,a);case En.THAI:return wr(e,3664,3673,!0,a);case En.TIBETAN:return wr(e,3872,3881,!0,a);case En.DECIMAL:default:return wr(e,48,57,!0,a)}},kr=function(){function e(e,t){if(this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new pr,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement)}return e.prototype.toIFrame=function(e,t){var n=this,i=Or(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,u=i.contentWindow,d=u.document,c=Br(i).then((function(){return a(n,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(Dr),u&&(u.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||u.scrollY===t.top&&u.scrollX===t.left||(d.documentElement.style.top=-t.top+"px",d.documentElement.style.left=-t.left+"px",d.documentElement.style.position="absolute")),e=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:d.fonts&&d.fonts.ready?[4,d.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(d)})).then((function(){return i}))]:[2,i]}}))}))}));return d.open(),d.write(Fr(document.doctype)+""),jr(this.referenceElement.ownerDocument,o,s),d.replaceChild(d.adoptNode(this.documentElement),d.documentElement),d.close(),c},e.prototype.createElementClone=function(e){return ur(e)?this.createCanvasClone(e):lr(e)?this.createStyleClone(e):e.cloneNode(!1)},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),a=e.cloneNode(!1);return a.textContent=n,a}}catch(e){if(xt.getInstance(this.options.id).error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){if(this.options.inlineImages&&e.ownerDocument){var t=e.ownerDocument.createElement("img");try{return t.src=e.toDataURL(),t}catch(e){xt.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var a=e.getContext("2d"),r=n.getContext("2d");return r&&(a?r.putImageData(a.getImageData(0,0,e.width,e.height),0,0):r.drawImage(e,0,0)),n}catch(e){}return n},e.prototype.cloneNode=function(e){if(er(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var t=e.ownerDocument.defaultView;if(nr(e)&&t){var n=this.createElementClone(e),a=t.getComputedStyle(e),r=t.getComputedStyle(e,":before"),i=t.getComputedStyle(e,":after");this.referenceElement===e&&(this.clonedReferenceElement=n),sr(n)&&Nr(n);for(var o=this.counters.parse(new Ea(a)),s=this.resolvePseudoContent(e,n,r,ha.BEFORE),u=e.firstChild;u;u=u.nextSibling)tr(u)&&(fr(u)||u.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(u))||this.options.copyStyles&&tr(u)&&lr(u)||n.appendChild(this.cloneNode(u));s&&n.insertBefore(s,n.firstChild);var d=this.resolvePseudoContent(e,n,i,ha.AFTER);return d&&n.appendChild(d),this.counters.pop(o),a&&this.options.copyStyles&&!cr(e)&&Sr(a,n),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(gr(e)||hr(e))&&(gr(n)||hr(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,a){var r=this;if(n){var i=n.content,o=t.ownerDocument;if(o&&i&&"none"!==i&&"-moz-alt-content"!==i&&"none"!==n.display){this.counters.parse(new Ea(n));var s=new _a(n),u=o.createElement("html2canvaspseudoelement");return Sr(n,u),s.content.forEach((function(t){if(t.type===f.STRING_TOKEN)u.appendChild(o.createTextNode(t.value));else if(t.type===f.URL_TOKEN){var n=o.createElement("img");n.src=t.value,n.style.opacity="1",u.appendChild(n)}else if(t.type===f.FUNCTION){if("attr"===t.name){var a=t.values.filter(je);a.length&&u.appendChild(o.createTextNode(e.getAttribute(a[0].value)||""))}else if("counter"===t.name){var i=t.values.filter(Ne),d=i[0],c=i[1];if(d&&je(d)){var l=r.counters.getCounterValue(d.value),g=c&&je(c)?On.parse(c.value):En.DECIMAL;u.appendChild(o.createTextNode(Er(l,g,!1)))}}else if("counters"===t.name){var h=t.values.filter(Ne),p=(d=h[0],h[1]);if(c=h[2],d&&je(d)){var A=r.counters.getCounterValues(d.value),v=c&&je(c)?On.parse(c.value):En.DECIMAL,m=p&&p.type===f.STRING_TOKEN?p.value:"",y=A.map((function(e){return Er(e,v,!1)})).join(m);u.appendChild(o.createTextNode(y))}}}else if(t.type===f.IDENT_TOKEN)switch(t.value){case"open-quote":u.appendChild(o.createTextNode(ba(s.quotes,r.quoteDepth++,!0)));break;case"close-quote":u.appendChild(o.createTextNode(ba(s.quotes,--r.quoteDepth,!1)));break;default:u.appendChild(o.createTextNode(t.value))}})),u.className=Tr+" "+Mr,t.className+=a===ha.BEFORE?" "+Tr:" "+Mr,u}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(ha||(ha={}));var Cr,Or=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute("data-html2canvas-ignore","true"),e.body.appendChild(n),n},Br=function(e){return new Promise((function(t,n){var a=e.contentWindow;if(!a)return n("No window assigned for iframe");var r=a.document;a.onload=e.onload=r.onreadystatechange=function(){a.onload=e.onload=r.onreadystatechange=null;var n=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(n),t(e))}),50)}}))},Sr=function(e,t){for(var n=e.length-1;n>=0;n--){var a=e.item(n);"content"!==a&&t.style.setProperty(a,e.getPropertyValue(a))}return t},Fr=function(e){var t="";return e&&(t+=""),t},jr=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},Dr=function(e){var t=e[0],n=e[1],a=e[2];t.scrollLeft=n,t.scrollTop=a},Tr="___html2canvas___pseudoelement_before",Mr="___html2canvas___pseudoelement_after",Nr=function(e){Ur(e,"."+Tr+':before{\n content: "" !important;\n display: none !important;\n}\n .'+Mr+':after{\n content: "" !important;\n display: none !important;\n}')},Ur=function(e,t){var n=e.ownerDocument;if(n){var a=n.createElement("style");a.textContent=t,e.appendChild(a)}};!function(e){e[e.VECTOR=0]="VECTOR",e[e.BEZIER_CURVE=1]="BEZIER_CURVE"}(Cr||(Cr={}));var Pr,Lr=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},Ir=function(){function e(e,t){this.type=Cr.VECTOR,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Qr=function(e,t,n){return new Ir(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Hr=function(){function e(e,t,n,a){this.type=Cr.BEZIER_CURVE,this.start=e,this.startControl=t,this.endControl=n,this.end=a}return e.prototype.subdivide=function(t,n){var a=Qr(this.start,this.startControl,t),r=Qr(this.startControl,this.endControl,t),i=Qr(this.endControl,this.end,t),o=Qr(a,r,t),s=Qr(r,i,t),u=Qr(o,s,t);return n?new e(this.start,a,o,u):new e(u,s,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),zr=function(e){return e.type===Cr.BEZIER_CURVE},Kr=function(e){var t=e.styles,n=e.bounds,a=Ve(t.borderTopLeftRadius,n.width,n.height),r=a[0],i=a[1],o=Ve(t.borderTopRightRadius,n.width,n.height),s=o[0],u=o[1],d=Ve(t.borderBottomRightRadius,n.width,n.height),c=d[0],l=d[1],f=Ve(t.borderBottomLeftRadius,n.width,n.height),g=f[0],h=f[1],p=[];p.push((r+s)/n.width),p.push((g+c)/n.width),p.push((i+h)/n.height),p.push((u+l)/n.height);var A=Math.max.apply(Math,p);A>1&&(r/=A,i/=A,s/=A,u/=A,c/=A,l/=A,g/=A,h/=A);var v=n.width-s,m=n.height-l,y=n.width-c,R=n.height-h,b=t.borderTopWidth,w=t.borderRightWidth,x=t.borderBottomWidth,_=t.borderLeftWidth,E=We(t.paddingTop,e.bounds.width),k=We(t.paddingRight,e.bounds.width),C=We(t.paddingBottom,e.bounds.width),O=We(t.paddingLeft,e.bounds.width);this.topLeftBorderBox=r>0||i>0?Vr(n.left,n.top,r,i,Pr.TOP_LEFT):new Ir(n.left,n.top),this.topRightBorderBox=s>0||u>0?Vr(n.left+v,n.top,s,u,Pr.TOP_RIGHT):new Ir(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||l>0?Vr(n.left+y,n.top+m,c,l,Pr.BOTTOM_RIGHT):new Ir(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=g>0||h>0?Vr(n.left,n.top+R,g,h,Pr.BOTTOM_LEFT):new Ir(n.left,n.top+n.height),this.topLeftPaddingBox=r>0||i>0?Vr(n.left+_,n.top+b,Math.max(0,r-_),Math.max(0,i-b),Pr.TOP_LEFT):new Ir(n.left+_,n.top+b),this.topRightPaddingBox=s>0||u>0?Vr(n.left+Math.min(v,n.width+_),n.top+b,v>n.width+_?0:s-_,u-b,Pr.TOP_RIGHT):new Ir(n.left+n.width-w,n.top+b),this.bottomRightPaddingBox=c>0||l>0?Vr(n.left+Math.min(y,n.width-_),n.top+Math.min(m,n.height+b),Math.max(0,c-w),l-x,Pr.BOTTOM_RIGHT):new Ir(n.left+n.width-w,n.top+n.height-x),this.bottomLeftPaddingBox=g>0||h>0?Vr(n.left+_,n.top+R,Math.max(0,g-_),h-x,Pr.BOTTOM_LEFT):new Ir(n.left+_,n.top+n.height-x),this.topLeftContentBox=r>0||i>0?Vr(n.left+_+O,n.top+b+E,Math.max(0,r-(_+O)),Math.max(0,i-(b+E)),Pr.TOP_LEFT):new Ir(n.left+_+O,n.top+b+E),this.topRightContentBox=s>0||u>0?Vr(n.left+Math.min(v,n.width+_+O),n.top+b+E,v>n.width+_+O?0:s-_+O,u-(b+E),Pr.TOP_RIGHT):new Ir(n.left+n.width-(w+k),n.top+b+E),this.bottomRightContentBox=c>0||l>0?Vr(n.left+Math.min(y,n.width-(_+O)),n.top+Math.min(m,n.height+b+E),Math.max(0,c-(w+k)),l-(x+C),Pr.BOTTOM_RIGHT):new Ir(n.left+n.width-(w+k),n.top+n.height-(x+C)),this.bottomLeftContentBox=g>0||h>0?Vr(n.left+_+O,n.top+R,Math.max(0,g-(_+O)),h-(x+C),Pr.BOTTOM_LEFT):new Ir(n.left+_+O,n.top+n.height-(x+C))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Pr||(Pr={}));var Vr=function(e,t,n,a,r){var i=(Math.sqrt(2)-1)/3*4,o=n*i,s=a*i,u=e+n,d=t+a;switch(r){case Pr.TOP_LEFT:return new Hr(new Ir(e,d),new Ir(e,d-s),new Ir(u-o,t),new Ir(u,t));case Pr.TOP_RIGHT:return new Hr(new Ir(e,t),new Ir(e+o,t),new Ir(u,d-s),new Ir(u,d));case Pr.BOTTOM_RIGHT:return new Hr(new Ir(u,t),new Ir(u,t+s),new Ir(e+o,d),new Ir(e,d));case Pr.BOTTOM_LEFT:default:return new Hr(new Ir(u,d),new Ir(u-o,d),new Ir(e,t+s),new Ir(e,t))}},Wr=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},qr=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Gr=function(e,t,n){this.type=0,this.offsetX=e,this.offsetY=t,this.matrix=n,this.target=6},Xr=function(e,t){this.type=1,this.target=t,this.path=e},Yr=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Jr=function(){function e(e,t){if(this.container=e,this.effects=t.slice(0),this.curves=new Kr(e),null!==e.styles.transform){var n=e.bounds.left+e.styles.transformOrigin[0].number,a=e.bounds.top+e.styles.transformOrigin[1].number,r=e.styles.transform;this.effects.push(new Gr(n,a,r))}if(e.styles.overflowX!==Cn.VISIBLE){var i=Wr(this.curves),o=qr(this.curves);Lr(i,o)?this.effects.push(new Xr(i,6)):(this.effects.push(new Xr(i,2)),this.effects.push(new Xr(o,4)))}}return e.prototype.getParentEffects=function(){var e=this.effects.slice(0);if(this.container.styles.overflowX!==Cn.VISIBLE){var t=Wr(this.curves),n=qr(this.curves);Lr(t,n)||e.push(new Xr(n,6))}return e},e}(),$r=function(e,t){for(var n=e instanceof Qa?e.start:1,a=e instanceof Qa&&e.reversed,r=0;r0&&e.intrinsicHeight>0){var a=ti(e),r=qr(t);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return a(this,void 0,void 0,(function(){var n,a,o,s,u,d,c,l,g,h,p,A,v,m;return r(this,(function(r){switch(r.label){case 0:this.applyEffects(t.effects,4),n=t.container,a=t.curves,o=n.styles,s=0,u=n.textNodes,r.label=1;case 1:return s0&&B>0&&(F=a.ctx.createRadialGradient(b+k,w+C,0,b+k,w+C,B),pt(n.stops,2*B).forEach((function(e){return F.addColorStop(e.stop,Ze(e.color))})),a.path(R),a.ctx.fillStyle=F,B!==S?(j=e.bounds.left+.5*e.bounds.width,D=e.bounds.top+.5*e.bounds.height,M=1/(T=S/B),a.ctx.save(),a.ctx.translate(j,D),a.ctx.transform(1,0,0,T,0,0),a.ctx.translate(-j,-D),a.ctx.fillRect(b,M*(w-D)+D,x,_*M),a.ctx.restore()):a.ctx.fill())):(u=ni(e,t,[null,null,null]),R=u[0],k=u[1],C=u[2],x=u[3],_=u[4],d=function(e,t,n){var a="number"==typeof e?e:function(e,t,n){var a=t/2,r=n/2,i=We(e[0],t)-a,o=r-We(e[1],n);return(Math.atan2(o,i)+2*Math.PI)%(2*Math.PI)}(e,t,n),r=Math.abs(t*Math.sin(a))+Math.abs(n*Math.cos(a)),i=t/2,o=n/2,s=r/2,u=Math.sin(a-Math.PI/2)*s,d=Math.cos(a-Math.PI/2)*s;return[r,i-d,i+d,o-u,o+u]}(n.angle,x,_),c=d[0],l=d[1],f=d[2],g=d[3],h=d[4],(p=document.createElement("canvas")).width=x,p.height=_,A=p.getContext("2d"),v=A.createLinearGradient(l,g,f,h),pt(n.stops,c).forEach((function(e){return v.addColorStop(e.stop,Ze(e.color))})),A.fillStyle=v,A.fillRect(0,0,x,_),x>0&&_>0&&(m=a.ctx.createPattern(p,"repeat"),a.renderRepeat(R,m,k,C))),r.label=6;case 6:return t--,[2]}}))},a=this,i=0,o=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return ie.element.container.styles.zIndex.order?(g=t,!1):g>0})),c.negativeZIndex.splice(g,0,l)}else if(f>0){var h=0;c.positiveZIndex.some((function(e,t){return f>e.element.container.styles.zIndex.order?(h=t+1,!1):h>0})),c.positiveZIndex.splice(h,0,l)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else i.styles.isFloating()?c.nonPositionedFloats.push(l):c.nonPositionedInlineLevel.push(l);e(u,l,o?l:a,d)}else i.styles.isInlineLevel()?n.inlineLevel.push(u):n.nonInlineLevel.push(u),e(u,n,a,d);Aa(i.flags,8)&&$r(i,d)}))}(t,n,n,a),$r(t.container,a),n}(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([],2),[2,this.canvas]}}))}))},e}(),ci=function(e){return e instanceof Wa||e instanceof Va||e instanceof Ka&&"radio"!==e.type&&"checkbox"!==e.type},li=function(e,t){switch(e){case it.BORDER_BOX:return Wr(t);case it.CONTENT_BOX:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);case it.PADDING_BOX:default:return qr(t)}},fi=function(e){switch(e){case Nn.CENTER:return"center";case Nn.RIGHT:return"right";case Nn.LEFT:default:return"left"}},gi=function(){function e(e){this.canvas=e.canvas?e.canvas:document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options=e,this.canvas.width=Math.floor(e.width*e.scale),this.canvas.height=Math.floor(e.height*e.scale),this.canvas.style.width=e.width+"px",this.canvas.style.height=e.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-e.x+e.scrollX,-e.y+e.scrollY),xt.getInstance(e.id).debug("EXPERIMENTAL ForeignObject renderer initialized ("+e.width+"x"+e.height+" at "+e.x+","+e.y+") with scale "+e.scale)}return e.prototype.render=function(e){return a(this,void 0,void 0,(function(){var t,n;return r(this,(function(a){switch(a.label){case 0:return t=Rt(Math.max(this.options.windowWidth,this.options.width)*this.options.scale,Math.max(this.options.windowHeight,this.options.height)*this.options.scale,this.options.scrollX*this.options.scale,this.options.scrollY*this.options.scale,e),[4,hi(t)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ze(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},e}(),hi=function(e){return new Promise((function(t,n){var a=new Image;a.onload=function(){t(a)},a.onerror=n,a.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},pi=function(e){return Je(Be.create(e).parseComponentValue())};_t.setContext(window);var Ai=function(e,t){return a(void 0,void 0,void 0,(function(){var a,s,u,d,c,l,f,g,h,p,A,v,m,y,R,b,w,x,_,E,k,C,O;return r(this,(function(r){switch(r.label){case 0:if(!(a=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(s=a.defaultView))throw new Error("Document is not attached to a Window");return u=(Math.round(1e3*Math.random())+Date.now()).toString(16),d=sr(e)||function(e){return"HTML"===e.tagName}(e)?function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var a=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),r=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new i(0,0,a,r)}(a):o(e),c=d.width,l=d.height,f=d.left,g=d.top,h=n({},{allowTaint:!1,imageTimeout:15e3,proxy:void 0,useCORS:!1},t),p={backgroundColor:"#ffffff",cache:t.cache?t.cache:_t.create(u,h),logging:!0,removeContainer:!0,foreignObjectRendering:!1,scale:s.devicePixelRatio||1,windowWidth:s.innerWidth,windowHeight:s.innerHeight,scrollX:s.pageXOffset,scrollY:s.pageYOffset,x:f,y:g,width:Math.ceil(c),height:Math.ceil(l),id:u},A=n({},p,h,t),v=new i(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),xt.create({id:u,enabled:A.logging}),xt.getInstance(u).debug("Starting document clone"),m=new kr(e,{id:u,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:A.foreignObjectRendering,copyStyles:A.foreignObjectRendering}),(y=m.clonedReferenceElement)?[4,m.toIFrame(a,v)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return R=r.sent(),b=a.documentElement?pi(getComputedStyle(a.documentElement).backgroundColor):ut.TRANSPARENT,w=a.body?pi(getComputedStyle(a.body).backgroundColor):ut.TRANSPARENT,x=t.backgroundColor,_="string"==typeof x?pi(x):null===x?ut.TRANSPARENT:4294967295,E=e===a.documentElement?$e(b)?$e(w)?_:w:b:_,k={id:u,cache:A.cache,canvas:A.canvas,backgroundColor:E,scale:A.scale,x:A.x,y:A.y,scrollX:A.scrollX,scrollY:A.scrollY,width:A.width,height:A.height,windowWidth:A.windowWidth,windowHeight:A.windowHeight},A.foreignObjectRendering?(xt.getInstance(u).debug("Document cloned, using foreign object rendering"),[4,new gi(k).render(y)]):[3,3];case 2:return C=r.sent(),[3,5];case 3:return xt.getInstance(u).debug("Document cloned, using computed rendering"),_t.attachInstance(A.cache),xt.getInstance(u).debug("Starting DOM parsing"),O=Ja(y),_t.detachInstance(),E===O.styles.backgroundColor&&(O.styles.backgroundColor=ut.TRANSPARENT),xt.getInstance(u).debug("Starting renderer"),[4,new di(k).render(O)];case 4:C=r.sent(),r.label=5;case 5:return!0===A.removeContainer&&(kr.destroy(R)||xt.getInstance(u).error("Cannot detach cloned iframe as it is not in the DOM anymore")),xt.getInstance(u).debug("Finished rendering"),xt.destroy(u),_t.destroy(u),[2,C]}}))}))};return function(e,t){return void 0===t&&(t={}),Ai(e,t)}}()},,,,function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=function(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return function(){return e},e}();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=a?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}(n(1)),r=o(n(114)),i=o(n(1546));function o(e){return e&&e.__esModule?e:{default:e}}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})(e)}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/","renameschema":"scripts/rename-schema.sh","presite":"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh","site":"pushd site && bundle exec jekyll serve -I -l && popd","tsc:src":"tsc -b src/tsconfig.src.json","tsc:site":"tsc -b site/tsconfig.site.json","prettierbase":"prettier \'**/*.{md,css,yml}\'","eslintbase":"eslint --ext .ts .","format":"yarn eslintbase --fix && yarn prettierbase --write","lint":"yarn eslintbase && yarn prettierbase --check","test":"jest test/ && yarn lint && yarn schema && jest examples/ && yarn test:runtime","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles jest test-runtime/","test:runtime:generate":"yarn build:only && rm -Rf test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime","watch:build":"yarn build:only && concurrently --kill-others -n Typescript,Rollup \'yarn tsc:src -w\' \'rollup -c -w\'","watch:site":"concurrently --kill-others -n Typescript,Rollup \'yarn tsc:site -w\' \'rollup -c site/rollup.config.js -w\'","watch:test":"jest --watch"},"repository":{"type":"git","url":"https://github.com/vega/vega-lite.git"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-lite/issues"},"devDependencies":{"@commitlint/cli":"^8.3.5","@commitlint/config-conventional":"^8.3.4","@rollup/plugin-commonjs":"11.0.2","@rollup/plugin-json":"^4.0.2","@rollup/plugin-node-resolve":"^7.1.1","@types/chai":"^4.2.11","@types/d3":"^5.7.2","@types/jest":"^25.1.4","@types/jest-environment-puppeteer":"^4.3.1","@types/mkdirp":"^1.0.0","@types/puppeteer":"^2.0.1","@typescript-eslint/eslint-plugin":"^2.25.0","@typescript-eslint/parser":"^2.25.0","ajv":"^6.12.0","chai":"^4.2.0","cheerio":"^1.0.0-rc.3","codecov":"^3.6.5","concurrently":"^5.1.0","conventional-changelog-cli":"^2.0.31","d3":"^5.15.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.2","gh-pages":"^2.2.0","highlight.js":"^9.18.1","http-server":"^0.12.1","husky":"^4.2.3","jest":"^25.2.4","jest-puppeteer":"^4.4.0","lint-staged":"^10.1.0","mkdirp":"^1.0.3","prettier":"^2.0.2","puppeteer":"^2.1.1","rollup":"^2.3.0","rollup-plugin-sourcemaps":"^0.5.0","rollup-plugin-terser":"^5.3.0","svg2png-many":"^0.0.7","terser":"^4.6.7","ts-jest":"^25.3.0","ts-json-schema-generator":"^0.65.0","typescript":"~3.8.3","vega-cli":"^5.10.1","vega-datasets":"^1.30.2","vega-embed":"^6.5.2","vega-tooltip":"^0.22.1","vega-typings":"~0.15.0","yaml-front-matter":"^4.1.0"},"dependencies":{"@types/clone":"~0.1.30","@types/fast-json-stable-stringify":"^2.0.0","array-flat-polyfill":"^1.0.1","clone":"~2.1.2","fast-deep-equal":"~3.1.1","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~2.0.0","tslib":"~1.11.1","vega-event-selector":"~2.0.2","vega-expression":"~2.6.3","vega-util":"~1.13.1","yargs":"~15.3.1"},"peerDependencies":{"vega":"^5.9.2"},"husky":{"hooks":{"pre-commit":"lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"*.ts":["eslint --fix","git add"],"*.{md,css,yml}":["prettier --write","git add"]},"jest":{"preset":"jest-puppeteer","transform":{"^.+\\\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testPathIgnorePatterns":["/node_modules","/build","/_site","/src"],"coverageDirectory":"./coverage/","collectCoverage":false}}')},function(e,t,n){(function(t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var n,a,r;try{n=Map}catch(t){n=function(){}}try{a=Set}catch(n){a=function(){}}try{r=Promise}catch(n){r=function(){}}function i(o,u,d,c,l){"object"==typeof u&&(d=u.depth,c=u.prototype,l=u.includeNonEnumerable,u=u.circular);var f=[],g=[],h=void 0!==t;return void 0===u&&(u=!0),void 0===d&&(d=1/0),function o(d,p){if(null===d)return null;if(0===p)return d;var A,v;if("object"!=typeof d)return d;if(e(d,n))A=new n;else if(e(d,a))A=new a;else if(e(d,r))A=new r((function(e,t){d.then((function(t){e(o(t,p-1))}),(function(e){t(o(e,p-1))}))}));else if(i.__isArray(d))A=[];else if(i.__isRegExp(d))A=new RegExp(d.source,s(d)),d.lastIndex&&(A.lastIndex=d.lastIndex);else if(i.__isDate(d))A=new Date(d.getTime());else{if(h&&t.isBuffer(d))return A=t.allocUnsafe?t.allocUnsafe(d.length):new t(d.length),d.copy(A),A;e(d,Error)?A=Object.create(d):void 0===c?(v=Object.getPrototypeOf(d),A=Object.create(v)):(A=Object.create(c),v=c)}if(u){var m=f.indexOf(d);if(-1!=m)return g[m];f.push(d),g.push(A)}for(var y in e(d,n)&&d.forEach((function(e,t){var n=o(t,p-1),a=o(e,p-1);A.set(n,a)})),e(d,a)&&d.forEach((function(e){var t=o(e,p-1);A.add(t)})),d){var R;v&&(R=Object.getOwnPropertyDescriptor(v,y)),R&&null==R.set||(A[y]=o(d[y],p-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);for(y=0;y build/vega-themes.min.js","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples","prepublishOnly":"yarn clean && yarn build","preversion":"yarn lint","serve":"browser-sync start -s -f build examples --serveStatic examples","start":"yarn build && concurrently --kill-others -n Server,Typescript,Rollup \'yarn serve\' \'tsc -w\' \'rollup -c -w\'"},"devDependencies":{"@rollup/plugin-json":"^4.0.2","browser-sync":"^2.26.7","concurrently":"^5.1.0","gh-pages":"^2.2.0","rollup":"^2.1.0","terser":"^4.6.7","typescript":"^3.8.3","vega":"^5.10.0","vega-lite":"^4.8.1","vega-lite-dev-config":"^0.5.0"},"peerDependencies":{"vega":"*","vega-lite":"*"},"beemo":{"module":"vega-lite-dev-config","drivers":["prettier","eslint"]}}')},function(e){e.exports=JSON.parse('{"name":"vega-tooltip","version":"0.23.0","description":"A tooltip plugin for Vega-Lite and Vega visualizations.","main":"build/vega-tooltip.js","module":"build/src/index.js","unpkg":"build/vega-tooltip.min.js","jsdelivr":"build/vega-tooltip.min.js","typings":"build/src/index.d.ts","repository":{"type":"git","url":"https://github.com/vega/vega-tooltip.git"},"keywords":["vega-lite","vega","tooltip"],"author":{"name":"UW Interactive Data Lab","url":"https://idl.cs.washington.edu"},"collaborators":["Dominik Moritz","Sira Horradarn","Zening Qu","Kanit Wongsuphasawat","Yuri Astrakhan","Jeffrey Heer"],"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-tooltip/issues"},"homepage":"https://github.com/vega/vega-tooltip#readme","scripts":{"prepare":"beemo create-config --silent","tsc:src":"tsc -b tsconfig.src.json","build":"yarn tsc:src && rollup -c","clean":"rm -rf build examples/data && rm -f src/style.ts","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && yarn copy:build && gh-pages -d examples && yarn clean","prettierbase":"beemo prettier \'examples/*.{html,scss,css}\'","eslintbase":"beemo eslint .","format":"yarn eslintbase --fix && yarn prettierbase --write","lint":"yarn eslintbase && yarn prettierbase --check","postbuild":"terser build/vega-tooltip.js -c -m -o build/vega-tooltip.min.js","prebuild":"mkdir -p build && yarn copy:data && ./build-style.sh","prepublishOnly":"yarn clean && yarn build","preversion":"yarn lint","start":"yarn build && concurrently --kill-others -n Server,Typescript,Rollup \'browser-sync start -s -f build examples --serveStatic examples\' \'yarn tsc:src -w\' \'rollup -c -w\'","pretest":"./build-style.sh","test":"jest"},"devDependencies":{"@rollup/plugin-commonjs":"11.1.0","@rollup/plugin-json":"^4.0.3","@rollup/plugin-node-resolve":"^7.1.3","@types/jest":"^25.2.1","browser-sync":"^2.26.7","concurrently":"^5.2.0","gh-pages":"^2.2.0","jest":"^26.0.1","node-sass":"^4.14.1","path":"^0.12.7","rollup":"^2.8.2","terser":"^4.6.13","ts-jest":"^25.5.0","typescript":"^3.8.3","vega-datasets":"^1.30.2","vega-lite-dev-config":"^0.10.0","vega-typings":"^0.16.0"},"dependencies":{"vega-util":"^1.13.2"},"beemo":{"module":"vega-lite-dev-config","drivers":["prettier","eslint"]},"jest":{"testURL":"http://localhost/","transform":{"^.+\\\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testPathIgnorePatterns":["node_modules","/build","src"]}}')},function(e,t,n){"use strict";var a={};n.r(a),n.d(a,"JsonPatchError",(function(){return W})),n.d(a,"deepClone",(function(){return q})),n.d(a,"getValueByPointer",(function(){return Y})),n.d(a,"applyOperation",(function(){return J})),n.d(a,"applyPatch",(function(){return $})),n.d(a,"applyReducer",(function(){return Z})),n.d(a,"validator",(function(){return ee})),n.d(a,"validate",(function(){return te})),n.d(a,"_areEquals",(function(){return ne}));var r={};n.r(r),n.d(r,"unobserve",(function(){return oe})),n.d(r,"observe",(function(){return se})),n.d(r,"generate",(function(){return ue})),n.d(r,"compare",(function(){return ce}));var i={};n.r(i),n.d(i,"aggregate",(function(){return hi})),n.d(i,"bin",(function(){return Ai})),n.d(i,"collect",(function(){return yi})),n.d(i,"compare",(function(){return Ri})),n.d(i,"countpattern",(function(){return wi})),n.d(i,"cross",(function(){return _i})),n.d(i,"density",(function(){return ki})),n.d(i,"dotbin",(function(){return Fi})),n.d(i,"expression",(function(){return ji})),n.d(i,"extent",(function(){return Ti})),n.d(i,"facet",(function(){return Ui})),n.d(i,"field",(function(){return Li})),n.d(i,"filter",(function(){return Qi})),n.d(i,"flatten",(function(){return Hi})),n.d(i,"fold",(function(){return zi})),n.d(i,"formula",(function(){return Ki})),n.d(i,"generate",(function(){return Vi})),n.d(i,"impute",(function(){return Gi})),n.d(i,"joinaggregate",(function(){return Xi})),n.d(i,"kde",(function(){return Ji})),n.d(i,"key",(function(){return $i})),n.d(i,"load",(function(){return eo})),n.d(i,"lookup",(function(){return no})),n.d(i,"multiextent",(function(){return ao})),n.d(i,"multivalues",(function(){return io})),n.d(i,"params",(function(){return so})),n.d(i,"pivot",(function(){return uo})),n.d(i,"prefacet",(function(){return lo})),n.d(i,"project",(function(){return fo})),n.d(i,"proxy",(function(){return go})),n.d(i,"quantile",(function(){return po})),n.d(i,"relay",(function(){return Ao})),n.d(i,"sample",(function(){return vo})),n.d(i,"sequence",(function(){return mo})),n.d(i,"sieve",(function(){return yo})),n.d(i,"subflow",(function(){return Mi})),n.d(i,"timeunit",(function(){return Vs})),n.d(i,"tupleindex",(function(){return Gs})),n.d(i,"values",(function(){return Xs})),n.d(i,"window",(function(){return eu}));var o={};n.r(o),n.d(o,"bound",(function(){return lh})),n.d(o,"identifier",(function(){return gh})),n.d(o,"mark",(function(){return hh})),n.d(o,"overlap",(function(){return ph})),n.d(o,"render",(function(){return xh})),n.d(o,"viewlayout",(function(){return Vh}));var s={};n.r(s),n.d(s,"interpolate",(function(){return bA})),n.d(s,"interpolateArray",(function(){return gA})),n.d(s,"interpolateBasis",(function(){return tA})),n.d(s,"interpolateBasisClosed",(function(){return nA})),n.d(s,"interpolateDate",(function(){return pA})),n.d(s,"interpolateDiscrete",(function(){return Rv})),n.d(s,"interpolateHue",(function(){return bv})),n.d(s,"interpolateNumber",(function(){return AA})),n.d(s,"interpolateNumberArray",(function(){return lA})),n.d(s,"interpolateObject",(function(){return vA})),n.d(s,"interpolateRound",(function(){return wA})),n.d(s,"interpolateString",(function(){return RA})),n.d(s,"interpolateTransformCss",(function(){return kv})),n.d(s,"interpolateTransformSvg",(function(){return Cv})),n.d(s,"interpolateZoom",(function(){return Sv})),n.d(s,"interpolateRgb",(function(){return sA})),n.d(s,"interpolateRgbBasis",(function(){return dA})),n.d(s,"interpolateRgbBasisClosed",(function(){return cA})),n.d(s,"interpolateHsl",(function(){return jv})),n.d(s,"interpolateHslLong",(function(){return Dv})),n.d(s,"interpolateLab",(function(){return qv})),n.d(s,"interpolateHcl",(function(){return Xv})),n.d(s,"interpolateHclLong",(function(){return Yv})),n.d(s,"interpolateCubehelix",(function(){return im})),n.d(s,"interpolateCubehelixLong",(function(){return om})),n.d(s,"piecewise",(function(){return nv})),n.d(s,"quantize",(function(){return sm}));var u={};n.r(u),n.d(u,"axisticks",(function(){return xm})),n.d(u,"datajoin",(function(){return _m})),n.d(u,"encode",(function(){return Cm})),n.d(u,"legendentries",(function(){return Tm})),n.d(u,"linkpath",(function(){return Im})),n.d(u,"pie",(function(){return Vm})),n.d(u,"scale",(function(){return Gm})),n.d(u,"sortitems",(function(){return $m})),n.d(u,"stack",(function(){return ey})),n.d(u,"validTicks",(function(){return Rm}));var d={};n.r(d),n.d(d,"contour",(function(){return wy})),n.d(d,"geojson",(function(){return xy})),n.d(d,"geopath",(function(){return Pw})),n.d(d,"geopoint",(function(){return Lw})),n.d(d,"geoshape",(function(){return Iw})),n.d(d,"graticule",(function(){return zw})),n.d(d,"heatmap",(function(){return Kw})),n.d(d,"isocontour",(function(){return ly})),n.d(d,"kde2d",(function(){return my})),n.d(d,"projection",(function(){return Ww}));var c={};n.r(c),n.d(c,"force",(function(){return Lx}));var l={};n.r(l),n.d(l,"nest",(function(){return $x})),n.d(l,"pack",(function(){return E_})),n.d(l,"partition",(function(){return S_})),n.d(l,"stratify",(function(){return U_})),n.d(l,"tree",(function(){return X_})),n.d(l,"treelinks",(function(){return J_})),n.d(l,"treemap",(function(){return iE}));var f={};n.r(f),n.d(f,"loess",(function(){return uE})),n.d(f,"regression",(function(){return cE}));var g={};n.r(g),n.d(g,"voronoi",(function(){return DE}));var h={};n.r(h),n.d(h,"wordcloud",(function(){return WE}));var p={};n.r(p),n.d(p,"crossfilter",(function(){return ZE})),n.d(p,"resolvefilter",(function(){return tk}));var A={};n.r(A),n.d(A,"version",(function(){return nk.a})),n.d(A,"bandwidthNRD",(function(){return Rr})),n.d(A,"bin",(function(){return br})),n.d(A,"bootstrapCI",(function(){return _r})),n.d(A,"dotbin",(function(){return Er})),n.d(A,"quantiles",(function(){return mr})),n.d(A,"quartiles",(function(){return yr})),n.d(A,"random",(function(){return wr})),n.d(A,"setRandom",(function(){return xr})),n.d(A,"randomLCG",(function(){return kr})),n.d(A,"randomInteger",(function(){return Cr})),n.d(A,"randomKDE",(function(){return Nr})),n.d(A,"randomLogNormal",(function(){return Qr})),n.d(A,"sampleLogNormal",(function(){return Ur})),n.d(A,"densityLogNormal",(function(){return Pr})),n.d(A,"cumulativeLogNormal",(function(){return Lr})),n.d(A,"quantileLogNormal",(function(){return Ir})),n.d(A,"randomMixture",(function(){return Hr})),n.d(A,"randomNormal",(function(){return Mr})),n.d(A,"sampleNormal",(function(){return Fr})),n.d(A,"densityNormal",(function(){return jr})),n.d(A,"cumulativeNormal",(function(){return Dr})),n.d(A,"quantileNormal",(function(){return Tr})),n.d(A,"randomUniform",(function(){return qr})),n.d(A,"sampleUniform",(function(){return zr})),n.d(A,"densityUniform",(function(){return Kr})),n.d(A,"cumulativeUniform",(function(){return Vr})),n.d(A,"quantileUniform",(function(){return Wr})),n.d(A,"regressionLinear",(function(){return $r})),n.d(A,"regressionLog",(function(){return Zr})),n.d(A,"regressionExp",(function(){return ti})),n.d(A,"regressionPow",(function(){return ni})),n.d(A,"regressionQuad",(function(){return ai})),n.d(A,"regressionPoly",(function(){return ri})),n.d(A,"regressionLoess",(function(){return si})),n.d(A,"sampleCurve",(function(){return li})),n.d(A,"timeUnits",(function(){return Fo})),n.d(A,"timeFloor",(function(){return zo})),n.d(A,"utcFloor",(function(){return Go})),n.d(A,"timeUnitSpecifier",(function(){return Es})),n.d(A,"timeFormat",(function(){return ks})),n.d(A,"utcFormat",(function(){return Cs})),n.d(A,"timeInterval",(function(){return As})),n.d(A,"timeOffset",(function(){return ys})),n.d(A,"timeSequence",(function(){return ws})),n.d(A,"utcInterval",(function(){return vs})),n.d(A,"utcOffset",(function(){return Rs})),n.d(A,"utcSequence",(function(){return xs})),n.d(A,"timeBin",(function(){return Ks})),n.d(A,"accessor",(function(){return he.f})),n.d(A,"accessorName",(function(){return he.h})),n.d(A,"accessorFields",(function(){return he.g})),n.d(A,"id",(function(){return he.w})),n.d(A,"identity",(function(){return he.x})),n.d(A,"zero",(function(){return he.kb})),n.d(A,"one",(function(){return he.O})),n.d(A,"truthy",(function(){return he.gb})),n.d(A,"falsy",(function(){return he.r})),n.d(A,"logger",(function(){return he.K})),n.d(A,"None",(function(){return he.d})),n.d(A,"Error",(function(){return he.b})),n.d(A,"Warn",(function(){return he.e})),n.d(A,"Info",(function(){return he.c})),n.d(A,"Debug",(function(){return he.a})),n.d(A,"mergeConfig",(function(){return he.N})),n.d(A,"writeConfig",(function(){return he.jb})),n.d(A,"panLinear",(function(){return he.Q})),n.d(A,"panLog",(function(){return he.R})),n.d(A,"panPow",(function(){return he.S})),n.d(A,"panSymlog",(function(){return he.T})),n.d(A,"zoomLinear",(function(){return he.lb})),n.d(A,"zoomLog",(function(){return he.mb})),n.d(A,"zoomPow",(function(){return he.nb})),n.d(A,"zoomSymlog",(function(){return he.ob})),n.d(A,"quarter",(function(){return he.V})),n.d(A,"utcquarter",(function(){return he.hb})),n.d(A,"array",(function(){return he.i})),n.d(A,"clampRange",(function(){return he.j})),n.d(A,"compare",(function(){return he.k})),n.d(A,"constant",(function(){return he.l})),n.d(A,"debounce",(function(){return he.m})),n.d(A,"error",(function(){return he.n})),n.d(A,"extend",(function(){return he.o})),n.d(A,"extent",(function(){return he.p})),n.d(A,"extentIndex",(function(){return he.q})),n.d(A,"fastmap",(function(){return he.s})),n.d(A,"field",(function(){return he.t})),n.d(A,"flush",(function(){return he.u})),n.d(A,"hasOwnProperty",(function(){return he.v})),n.d(A,"inherits",(function(){return he.y})),n.d(A,"inrange",(function(){return he.z})),n.d(A,"isArray",(function(){return he.A})),n.d(A,"isBoolean",(function(){return he.B})),n.d(A,"isDate",(function(){return he.C})),n.d(A,"isFunction",(function(){return he.D})),n.d(A,"isNumber",(function(){return he.E})),n.d(A,"isObject",(function(){return he.F})),n.d(A,"isRegExp",(function(){return he.G})),n.d(A,"isString",(function(){return he.H})),n.d(A,"key",(function(){return he.I})),n.d(A,"lerp",(function(){return he.J})),n.d(A,"lruCache",(function(){return he.L})),n.d(A,"merge",(function(){return he.M})),n.d(A,"pad",(function(){return he.P})),n.d(A,"peek",(function(){return he.U})),n.d(A,"repeat",(function(){return he.W})),n.d(A,"span",(function(){return he.X})),n.d(A,"splitAccessPath",(function(){return he.Y})),n.d(A,"stringValue",(function(){return he.Z})),n.d(A,"toBoolean",(function(){return he.ab})),n.d(A,"toDate",(function(){return he.bb})),n.d(A,"toNumber",(function(){return he.cb})),n.d(A,"toString",(function(){return he.eb})),n.d(A,"toSet",(function(){return he.db})),n.d(A,"truncate",(function(){return he.fb})),n.d(A,"visitArray",(function(){return he.ib})),n.d(A,"loader",(function(){return Xu})),n.d(A,"read",(function(){return Gu})),n.d(A,"inferType",(function(){return Uu})),n.d(A,"inferTypes",(function(){return Pu})),n.d(A,"typeParsers",(function(){return Tu})),n.d(A,"format",(function(){return Vu})),n.d(A,"formats",(function(){return Wu})),n.d(A,"responseType",(function(){return qu})),n.d(A,"Bounds",(function(){return cu})),n.d(A,"Gradient",(function(){return Au})),n.d(A,"GroupItem",(function(){return mu})),n.d(A,"ResourceLoader",(function(){return Yu})),n.d(A,"Item",(function(){return vu})),n.d(A,"Scenegraph",(function(){return tg})),n.d(A,"Handler",(function(){return cg})),n.d(A,"Renderer",(function(){return gg})),n.d(A,"CanvasHandler",(function(){return pg})),n.d(A,"CanvasRenderer",(function(){return Rg})),n.d(A,"SVGHandler",(function(){return Eg})),n.d(A,"SVGRenderer",(function(){return Tg})),n.d(A,"SVGStringRenderer",(function(){return qg})),n.d(A,"RenderType",(function(){return eh})),n.d(A,"renderModule",(function(){return nh})),n.d(A,"intersect",(function(){return ah})),n.d(A,"Marks",(function(){return Gf})),n.d(A,"boundClip",(function(){return uh})),n.d(A,"boundContext",(function(){return vl})),n.d(A,"boundStroke",(function(){return pl})),n.d(A,"boundItem",(function(){return Xf})),n.d(A,"boundMark",(function(){return Jf})),n.d(A,"pathCurves",(function(){return ac})),n.d(A,"pathSymbols",(function(){return bc})),n.d(A,"pathRectangle",(function(){return Nc})),n.d(A,"pathTrail",(function(){return Uc})),n.d(A,"pathParse",(function(){return oc})),n.d(A,"pathRender",(function(){return vc})),n.d(A,"point",(function(){return dg})),n.d(A,"domCreate",(function(){return rg})),n.d(A,"domFind",(function(){return ig})),n.d(A,"domChild",(function(){return og})),n.d(A,"domClear",(function(){return sg})),n.d(A,"openTag",(function(){return Og})),n.d(A,"closeTag",(function(){return Bg})),n.d(A,"font",(function(){return Hf})),n.d(A,"fontFamily",(function(){return Qf})),n.d(A,"fontSize",(function(){return Nf})),n.d(A,"lineHeight",(function(){return Uf})),n.d(A,"multiLineOffset",(function(){return Lf})),n.d(A,"textMetrics",(function(){return Sf})),n.d(A,"resetSVGClipId",(function(){return of})),n.d(A,"sceneEqual",(function(){return dh})),n.d(A,"pathEqual",(function(){return ch})),n.d(A,"sceneToJSON",(function(){return Zf})),n.d(A,"sceneFromJSON",(function(){return eg})),n.d(A,"intersectPath",(function(){return Ol})),n.d(A,"intersectPoint",(function(){return Bl})),n.d(A,"intersectRule",(function(){return Fl})),n.d(A,"intersectBoxLine",(function(){return jl})),n.d(A,"sceneZOrder",(function(){return Ql})),n.d(A,"sceneVisit",(function(){return Hl})),n.d(A,"scenePickVisit",(function(){return zl})),n.d(A,"Dataflow",(function(){return Ka})),n.d(A,"EventStream",(function(){return Qe})),n.d(A,"Parameters",(function(){return De})),n.d(A,"Pulse",(function(){return ja})),n.d(A,"MultiPulse",(function(){return Ua})),n.d(A,"Operator",(function(){return Ue})),n.d(A,"Transform",(function(){return qa})),n.d(A,"changeset",(function(){return Fe})),n.d(A,"ingest",(function(){return Ee})),n.d(A,"isTuple",(function(){return we})),n.d(A,"definition",(function(){return Ya})),n.d(A,"transform",(function(){return Ja})),n.d(A,"transforms",(function(){return Xa})),n.d(A,"tupleid",(function(){return xe})),n.d(A,"scale",(function(){return sv})),n.d(A,"scheme",(function(){return vm})),n.d(A,"interpolate",(function(){return gm})),n.d(A,"interpolateColors",(function(){return cm})),n.d(A,"interpolateRange",(function(){return dm})),n.d(A,"quantizeInterpolator",(function(){return lm})),n.d(A,"projection",(function(){return Tw})),n.d(A,"View",(function(){return MD})),n.d(A,"expressionFunction",(function(){return fD})),n.d(A,"formatLocale",(function(){return yp})),n.d(A,"timeFormatLocale",(function(){return wa})),n.d(A,"parse",(function(){return PN})),n.d(A,"runtime",(function(){return wD})),n.d(A,"runtimeContext",(function(){return _D}));var v={};n.r(v),n.d(v,"invalidSpec",(function(){return lL})),n.d(v,"FIT_NON_SINGLE",(function(){return fL})),n.d(v,"containerSizeNonSingle",(function(){return gL})),n.d(v,"containerSizeNotCompatibleWithAutosize",(function(){return hL})),n.d(v,"droppingFit",(function(){return pL})),n.d(v,"cannotProjectOnChannelWithoutField",(function(){return AL})),n.d(v,"cannotProjectAggregate",(function(){return vL})),n.d(v,"nearestNotSupportForContinuous",(function(){return mL})),n.d(v,"selectionNotSupported",(function(){return yL})),n.d(v,"selectionNotFound",(function(){return RL})),n.d(v,"SCALE_BINDINGS_CONTINUOUS",(function(){return bL})),n.d(v,"LEGEND_BINDINGS_PROJECT_LENGTH",(function(){return wL})),n.d(v,"noSameUnitLookup",(function(){return xL})),n.d(v,"noSuchRepeatedValue",(function(){return _L})),n.d(v,"columnsNotSupportByRowCol",(function(){return EL})),n.d(v,"CONCAT_CANNOT_SHARE_AXIS",(function(){return kL})),n.d(v,"unrecognizedParse",(function(){return CL})),n.d(v,"differentParse",(function(){return OL})),n.d(v,"invalidTransformIgnored",(function(){return BL})),n.d(v,"NO_FIELDS_NEEDS_AS",(function(){return SL})),n.d(v,"encodingOverridden",(function(){return FL})),n.d(v,"projectionOverridden",(function(){return jL})),n.d(v,"primitiveChannelDef",(function(){return DL})),n.d(v,"invalidFieldType",(function(){return TL})),n.d(v,"invalidFieldTypeForCountAggregate",(function(){return ML})),n.d(v,"invalidAggregate",(function(){return NL})),n.d(v,"missingFieldType",(function(){return UL})),n.d(v,"droppingColor",(function(){return PL})),n.d(v,"emptyFieldDef",(function(){return LL})),n.d(v,"latLongDeprecated",(function(){return IL})),n.d(v,"LINE_WITH_VARYING_SIZE",(function(){return QL})),n.d(v,"incompatibleChannel",(function(){return HL})),n.d(v,"invalidEncodingChannel",(function(){return zL})),n.d(v,"facetChannelShouldBeDiscrete",(function(){return KL})),n.d(v,"facetChannelDropped",(function(){return VL})),n.d(v,"discreteChannelCannotEncode",(function(){return WL})),n.d(v,"lineWithRange",(function(){return qL})),n.d(v,"orientOverridden",(function(){return GL})),n.d(v,"CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN",(function(){return XL})),n.d(v,"RANGE_STEP_DEPRECATED",(function(){return YL})),n.d(v,"cannotUseScalePropertyWithNonColor",(function(){return JL})),n.d(v,"unaggregateDomainHasNoEffectForRawField",(function(){return $L})),n.d(v,"unaggregateDomainWithNonSharedDomainOp",(function(){return ZL})),n.d(v,"unaggregatedDomainWithLogScale",(function(){return eI})),n.d(v,"cannotApplySizeToNonOrientedMark",(function(){return tI})),n.d(v,"scaleTypeNotWorkWithChannel",(function(){return nI})),n.d(v,"scaleTypeNotWorkWithFieldDef",(function(){return aI})),n.d(v,"scalePropertyNotWorkWithScaleType",(function(){return rI})),n.d(v,"scaleTypeNotWorkWithMark",(function(){return iI})),n.d(v,"stepDropped",(function(){return oI})),n.d(v,"mergeConflictingProperty",(function(){return sI})),n.d(v,"mergeConflictingDomainProperty",(function(){return uI})),n.d(v,"independentScaleMeansIndependentGuide",(function(){return dI})),n.d(v,"domainSortDropped",(function(){return cI})),n.d(v,"UNABLE_TO_MERGE_DOMAINS",(function(){return lI})),n.d(v,"MORE_THAN_ONE_SORT",(function(){return fI})),n.d(v,"INVALID_CHANNEL_FOR_AXIS",(function(){return gI})),n.d(v,"cannotStackRangedMark",(function(){return hI})),n.d(v,"cannotStackNonLinearScale",(function(){return pI})),n.d(v,"stackNonSummativeAggregate",(function(){return AI})),n.d(v,"invalidTimeUnit",(function(){return vI})),n.d(v,"dayReplacedWithDate",(function(){return mI})),n.d(v,"droppedDay",(function(){return yI})),n.d(v,"errorBarCenterAndExtentAreNotNeeded",(function(){return RI})),n.d(v,"errorBarCenterIsUsedWithWrongExtent",(function(){return bI})),n.d(v,"errorBarContinuousAxisHasCustomizedAggregate",(function(){return wI})),n.d(v,"errorBarCenterIsNotNeeded",(function(){return xI})),n.d(v,"errorBand1DNotSupport",(function(){return _I})),n.d(v,"channelRequiredForBinned",(function(){return EI})),n.d(v,"domainRequiredForThresholdScale",(function(){return kI}));var m={};n.r(m),n.d(m,"symbols",(function(){return Nq})),n.d(m,"gradient",(function(){return Uq})),n.d(m,"labels",(function(){return Pq})),n.d(m,"entries",(function(){return Lq})),n.d(m,"getFirstConditionValue",(function(){return Qq}));var y={};n.r(y),n.d(y,"compile",(function(){return vY})),n.d(y,"extractTransforms",(function(){return bY})),n.d(y,"normalize",(function(){return KK})),n.d(y,"version",(function(){return wY}));var R={};n.r(R),n.d(R,"dark",(function(){return kY})),n.d(R,"excel",(function(){return CY})),n.d(R,"fivethirtyeight",(function(){return OY})),n.d(R,"ggplot2",(function(){return BY})),n.d(R,"latimes",(function(){return jY})),n.d(R,"quartz",(function(){return DY})),n.d(R,"vox",(function(){return TY})),n.d(R,"urbaninstitute",(function(){return NY})),n.d(R,"googlecharts",(function(){return UY})),n.d(R,"version",(function(){return PY}));var b=n(1),w=n.n(b),x=n(4),_=n(5),E=n(34),k=n(6),C=n(7),O=n(3),B=n.n(O),S={};function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S,n=Object.keys(e),a=Object.keys(t);return e===t||n.length===a.length&&n.every((function(n){return e[n]===t[n]}))}var j=n(11),D=n.n(j);function T(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r=48&&t<=57))return!1;n++}return!0}function H(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function z(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function K(e,t){var n=[e];for(var a in t){var r="object"==typeof t[a]?JSON.stringify(t[a],null,2):t[a];void 0!==r&&n.push(a+": "+r)}return n.join("\n")}var V=function(e){function t(t,n,a,r,i){var o=this.constructor,s=e.call(this,K(t,{name:n,index:a,operation:r,tree:i}))||this;return s.name=n,s.index=a,s.operation=r,s.tree=i,Object.setPrototypeOf(s,o.prototype),s.message=K(t,{name:n,index:a,operation:r,tree:i}),s}return N(t,e),t}(Error),W=V,q=I,G={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var a=e[t];return delete e[t],{newDocument:n,removed:a}},replace:function(e,t,n){var a=e[t];return e[t]=this.value,{newDocument:n,removed:a}},move:function(e,t,n){var a=Y(n,this.path);a&&(a=I(a));var r=J(n,{op:"remove",path:this.from}).removed;return J(n,{op:"add",path:this.path,value:r}),{newDocument:n,removed:a}},copy:function(e,t,n){var a=Y(n,this.from);return J(n,{op:"add",path:this.path,value:I(a)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:ne(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},X={add:function(e,t,n){return Q(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var a=e[t];return e[t]=this.value,{newDocument:n,removed:a}},move:G.move,copy:G.copy,test:G.test,_get:G._get};function Y(e,t){if(""==t)return e;var n={op:"_get",path:t};return J(e,n),n.value}function J(e,t,n,a,r,i){if(void 0===n&&(n=!1),void 0===a&&(a=!0),void 0===r&&(r=!0),void 0===i&&(i=0),n&&("function"==typeof n?n(t,0,e,t.path):ee(t,0)),""===t.path){var o={newDocument:e};if("add"===t.op)return o.newDocument=t.value,o;if("replace"===t.op)return o.newDocument=t.value,o.removed=e,o;if("move"===t.op||"copy"===t.op)return o.newDocument=Y(e,t.from),"move"===t.op&&(o.removed=e),o;if("test"===t.op){if(o.test=ne(e,t.value),!1===o.test)throw new W("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o.newDocument=e,o}if("remove"===t.op)return o.removed=e,o.newDocument=null,o;if("_get"===t.op)return t.value=e,o;if(n)throw new W("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return o}a||(e=I(e));var s=(t.path||"").split("/"),u=e,d=1,c=s.length,l=void 0,f=void 0,g=void 0;for(g="function"==typeof n?n:ee;;){if(f=s[d],r&&"__proto__"==f)throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===l&&(void 0===u[f]?l=s.slice(0,d).join("/"):d==c-1&&(l=t.path),void 0!==l&&g(t,0,e,l)),d++,Array.isArray(u)){if("-"===f)f=u.length;else{if(n&&!Q(f))throw new W("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);Q(f)&&(f=~~f)}if(d>=c){if(n&&"add"===t.op&&f>u.length)throw new W("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);if(!1===(o=X[t.op].call(t,u,f,e)).test)throw new W("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o}}else if(f&&-1!=f.indexOf("~")&&(f=z(f)),d>=c){if(!1===(o=G[t.op].call(t,u,f,e)).test)throw new W("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o}u=u[f]}}function $(e,t,n,a,r){if(void 0===a&&(a=!0),void 0===r&&(r=!0),n&&!Array.isArray(t))throw new W("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");a||(e=I(e));for(var i=new Array(t.length),o=0,s=t.length;o0)throw new W('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new W("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new W("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,a=t.length;n0&&(e.patches=[],e.callback&&e.callback(a)),a}function de(e,t,n,a,r){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=L(t),o=L(e),s=!1,u=o.length-1;u>=0;u--){var d=e[l=o[u]];if(!P(t,l)||void 0===t[l]&&void 0!==d&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:a+"/"+H(l),value:I(d)}),n.push({op:"remove",path:a+"/"+H(l)}),s=!0):(r&&n.push({op:"test",path:a,value:e}),n.push({op:"replace",path:a,value:t}));else{var c=t[l];"object"==typeof d&&null!=d&&"object"==typeof c&&null!=c?de(d,c,n,a+"/"+H(l),r):d!==c&&(r&&n.push({op:"test",path:a+"/"+H(l),value:I(d)}),n.push({op:"replace",path:a+"/"+H(l),value:I(c)}))}}if(s||i.length!=o.length)for(u=0;u=0&&n.splice(r,1)),n},n}function Ae(e,t,n,a,r,i,o){try{var s=e[i](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(a,r)}function ve(e){return function(){var t=this,n=arguments;return new Promise((function(a,r){var i=e.apply(t,n);function o(e){Ae(i,a,r,o,s,"next",e)}function s(e){Ae(i,a,r,o,s,"throw",e)}o(void 0)}))}}var me=function(e,t){return ye.apply(this,arguments)};function ye(){return(ye=ve(D.a.mark((function e(t,n){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n(t);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),t.error(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))).apply(this,arguments)}var Re=Symbol("vega_id"),be=1;function we(e){return!(!e||!xe(e))}function xe(e){return e[Re]}function _e(e,t){return e[Re]=t,e}function Ee(e){var t=e===Object(e)?e:{data:e};return xe(t)?t:_e(t,be++)}function ke(e){return Ce(e,Ee({}))}function Ce(e,t){for(var n in e)t[n]=e[n];return t}function Oe(e,t){return _e(t,xe(e))}function Be(e,t){return e?t?function(n,a){return e(n,a)||xe(t(n))-xe(t(a))}:function(t,n){return e(t,n)||xe(t)-xe(n)}:null}function Se(e){return e&&e.constructor===Fe}function Fe(){var e=[],t=[],n=[],a=[],r=[],i=!1;return{constructor:Fe,insert:function(t){for(var n=Object(he.i)(t),a=0,r=n.length;a0&&(A(f,l,c.value),o.modifies(l));for(u=0,d=r.length;u0&&A(e,c.field,c.value)})),o.modifies(c.field);if(i)o.mod=t.length||a.length?s.filter((function(e){return h[xe(e)]>0})):s.slice();else for(g in p)o.mod.push(p[g]);return o}}}var je="_:mod:_";function De(){Object.defineProperty(this,je,{writable:!0,value:{}})}var Te=De.prototype;Te.set=function(e,t,n,a){var r=this[e],i=this[je];return null!=t&&t>=0?(r[t]!==n||a)&&(r[t]=n,i[t+":"+e]=-1,i[e]=-1):(r!==n||a)&&(this[e]=n,i[e]=Object(he.A)(n)?1+n.length:-1),this},Te.modified=function(e,t){var n,a=this[je];if(!arguments.length){for(n in a)if(a[n])return!0;return!1}if(Object(he.A)(e)){for(n=0;n=0?t+1e?(t=n,1):0}))},ze.debounce=function(e){var t=He();return this.targets().add(He(null,null,Object(he.m)(e,(function(e){var n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},ze.between=function(e,t){var n=!1;return e.targets().add(He(null,null,(function(){n=!0}))),t.targets().add(He(null,null,(function(){n=!1}))),this.filter((function(){return n}))};var Ke=/^([A-Za-z]+:)?\/\//,Ve=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,We=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;function qe(e,t){return Ge.apply(this,arguments)}function Ge(){return(Ge=ve(D.a.mark((function e(t,n){var a,r;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sanitize(t,n);case 2:return a=e.sent,r=a.href,e.abrupt("return",a.localFile?this.file(r):this.http(r,n));case 5:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function Xe(e,t){return Ye.apply(this,arguments)}function Ye(){return(Ye=ve(D.a.mark((function e(t,n){var a,r,i,o,s,u,d;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(he.o)({},this.options,n),a=this.fileAccess,r={href:null},u=Ve.test(t.replace(We,"")),null!=t&&"string"==typeof t&&u||Object(he.n)("Sanitize failure, invalid URI: "+Object(he.Z)(t)),d=Ke.test(t),(s=n.baseURL)&&!d&&(t.startsWith("/")||"/"===s[s.length-1]||(t="/"+t),t=s+t),o=(i=t.startsWith("file://"))||"file"===n.mode||"http"!==n.mode&&!d&&a,i?t=t.slice("file://".length):t.startsWith("//")&&("file"===n.defaultProtocol?(t=t.slice(2),o=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(r,"localFile",{value:!!o}),r.href=t,n.target&&(r.target=n.target+""),n.rel&&(r.rel=n.rel+""),"image"===n.context&&n.crossOrigin&&(r.crossOrigin=n.crossOrigin+""),e.abrupt("return",r);case 14:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function Je(e){return e?function(t){return new Promise((function(n,a){e.readFile(t,(function(e,t){e?a(e):n(t)}))}))}:$e}function $e(){return Ze.apply(this,arguments)}function Ze(){return(Ze=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No file system access.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function et(e){return e?function(){var t=ve(D.a.mark((function t(n,a){var r,i,o;return D.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(he.o)({},this.options.http,a),i=a&&a.response,t.next=4,e(n,r);case 4:return o=t.sent,t.abrupt("return",o.ok?Object(he.D)(o[i])?o[i]():o.text():Object(he.n)(o.status+""+o.statusText));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}():tt}function tt(){return nt.apply(this,arguments)}function nt(){return(nt=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No HTTP fetch method available.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var at={boolean:he.ab,integer:he.cb,number:he.cb,date:he.bb,string:he.eb,unknown:he.x},rt=[function(e){return"true"===e||"false"===e||!0===e||!1===e},function(e){return ot(e)&&Number.isInteger(+e)},ot,function(e){return!Number.isNaN(Date.parse(e))}],it=["boolean","integer","number","date"];function ot(e){return!(Number.isNaN(+e)||e instanceof Date)}var st={},ut={};function dt(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function ct(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var a in e)a in t||n.push(t[a]=a)})),n}function lt(e,t){var n=e+"",a=n.length;return a=i?u=!0:10===(a=e.charCodeAt(o++))?d=!0:13===a&&(d=!0,10===e.charCodeAt(o)&&++o),e.slice(r+1,t-1).replace(/""/g,'"')}for(;o9999?"+"+lt(e,6):lt(e,4)}(e.getUTCFullYear())+"-"+lt(e.getUTCMonth()+1,2)+"-"+lt(e.getUTCDate(),2)+(r?"T"+lt(t,2)+":"+lt(n,2)+":"+lt(a,2)+"."+lt(r,3)+"Z":a?"T"+lt(t,2)+":"+lt(n,2)+":"+lt(a,2)+"Z":n||t?"T"+lt(t,2)+":"+lt(n,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,r,i=a(e,(function(e,a){if(n)return n(e,a-1);r=e,n=t?function(e,t){var n=dt(e);return function(a,r){return t(n(a),r,e)}}(e,t):dt(e)}));return i.columns=r||[],i},parseRows:a,format:function(t,n){return null==n&&(n=ct(t)),[n.map(o).join(e)].concat(r(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=ct(e)),r(e,t).join("\n")},formatRows:function(e){return e.map(i).join("\n")},formatRow:i,formatValue:o}};function gt(e){var t=function(t,n){var a={delimiter:e};return ht(t,n?Object(he.o)(n,a):a)};return t.responseType="text",t}function ht(e,t){return t.header&&(e=t.header.map(he.Z).join(t.delimiter)+"\n"+e),ft(t.delimiter).parse(e+"")}ht.responseType="text";var pt=n(269),At=function(e){return e},vt=function(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return mt(e,t)}))}:mt(e,t)};function mt(e,t){var n=t.id,a=t.bbox,r=null==t.properties?{}:t.properties,i=yt(e,t);return null==n&&null==a?{type:"Feature",properties:r,geometry:i}:null==a?{type:"Feature",id:n,properties:r,geometry:i}:{type:"Feature",id:n,bbox:a,properties:r,geometry:i}}function yt(e,t){var n=function(e){if(null==e)return At;var t,n,a=e.scale[0],r=e.scale[1],i=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var u=2,d=e.length,c=new Array(d);for(c[0]=(t+=e[0])*a+i,c[1]=(n+=e[1])*r+o;u1)a=xt(e,t,n);else for(r=0,a=new Array(i=e.arcs.length);r1?(kt[e]=t,this):Object(he.v)(kt,e)?kt[e]:null}function Ot(e){var t=Ct(e);return t&&t.responseType||"text"}var Bt=new Date,St=new Date;function Ft(e,t,n,a){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t0))return s;do{s.push(o=new Date(+n)),t(n,i),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,a){if(e>=e)if(a<0)for(;++a<=0;)for(;t(e,-1),!n(e););else for(;--a>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,a){return Bt.setTime(+t),St.setTime(+a),e(Bt),e(St),Math.floor(n(Bt,St))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(a?function(t){return a(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}function jt(e){return Ft((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)/6048e5}))}var Dt=jt(0),Tt=jt(1),Mt=jt(2),Nt=jt(3),Ut=jt(4),Pt=jt(5),Lt=jt(6),It=(Dt.range,Tt.range,Mt.range,Nt.range,Ut.range,Pt.range,Lt.range,Ft((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),Qt=It;function Ht(e){return Ft((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-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}It.range;var zt=Ht(0),Kt=Ht(1),Vt=Ht(2),Wt=Ht(3),qt=Ht(4),Gt=Ht(5),Xt=Ht(6),Yt=(zt.range,Kt.range,Vt.range,Wt.range,qt.range,Gt.range,Xt.range,Ft((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}))),Jt=Yt,$t=(Yt.range,Ft((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()})));$t.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ft((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Zt=$t,en=($t.range,Ft((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()})));en.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ft((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var tn=en;function nn(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 an(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 rn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}en.range;var on,sn,un,dn,cn,ln={"-":"",_:" ",0:"0"},fn=/^\s*\d+/,gn=/^%/,hn=/[\\^$*+?|[\]().{}]/g;function pn(e,t,n){var a=e<0?"-":"",r=(a?-e:e)+"",i=r.length;return a+(i68?1900:2e3),n+a[0].length):-1}function kn(e,t,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return a?(e.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function Cn(e,t,n){var a=fn.exec(t.slice(n,n+1));return a?(e.q=3*a[0]-3,n+a[0].length):-1}function On(e,t,n){var a=fn.exec(t.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function Bn(e,t,n){var a=fn.exec(t.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function Sn(e,t,n){var a=fn.exec(t.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function Fn(e,t,n){var a=fn.exec(t.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function jn(e,t,n){var a=fn.exec(t.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function Dn(e,t,n){var a=fn.exec(t.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function Tn(e,t,n){var a=fn.exec(t.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function Mn(e,t,n){var a=fn.exec(t.slice(n,n+6));return a?(e.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function Nn(e,t,n){var a=gn.exec(t.slice(n,n+1));return a?n+a[0].length:-1}function Un(e,t,n){var a=fn.exec(t.slice(n));return a?(e.Q=+a[0],n+a[0].length):-1}function Pn(e,t,n){var a=fn.exec(t.slice(n));return a?(e.s=+a[0],n+a[0].length):-1}function Ln(e,t){return pn(e.getDate(),t,2)}function In(e,t){return pn(e.getHours(),t,2)}function Qn(e,t){return pn(e.getHours()%12||12,t,2)}function Hn(e,t){return pn(1+Jt.count(Zt(e),e),t,3)}function zn(e,t){return pn(e.getMilliseconds(),t,3)}function Kn(e,t){return zn(e,t)+"000"}function Vn(e,t){return pn(e.getMonth()+1,t,2)}function Wn(e,t){return pn(e.getMinutes(),t,2)}function qn(e,t){return pn(e.getSeconds(),t,2)}function Gn(e){var t=e.getDay();return 0===t?7:t}function Xn(e,t){return pn(zt.count(Zt(e)-1,e),t,2)}function Yn(e,t){var n=e.getDay();return e=n>=4||0===n?qt(e):qt.ceil(e),pn(qt.count(Zt(e),e)+(4===Zt(e).getDay()),t,2)}function Jn(e){return e.getDay()}function $n(e,t){return pn(Kt.count(Zt(e)-1,e),t,2)}function Zn(e,t){return pn(e.getFullYear()%100,t,2)}function ea(e,t){return pn(e.getFullYear()%1e4,t,4)}function ta(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pn(t/60|0,"0",2)+pn(t%60,"0",2)}function na(e,t){return pn(e.getUTCDate(),t,2)}function aa(e,t){return pn(e.getUTCHours(),t,2)}function ra(e,t){return pn(e.getUTCHours()%12||12,t,2)}function ia(e,t){return pn(1+Qt.count(tn(e),e),t,3)}function oa(e,t){return pn(e.getUTCMilliseconds(),t,3)}function sa(e,t){return oa(e,t)+"000"}function ua(e,t){return pn(e.getUTCMonth()+1,t,2)}function da(e,t){return pn(e.getUTCMinutes(),t,2)}function ca(e,t){return pn(e.getUTCSeconds(),t,2)}function la(e){var t=e.getUTCDay();return 0===t?7:t}function fa(e,t){return pn(Dt.count(tn(e)-1,e),t,2)}function ga(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Ut(e):Ut.ceil(e),pn(Ut.count(tn(e),e)+(4===tn(e).getUTCDay()),t,2)}function ha(e){return e.getUTCDay()}function pa(e,t){return pn(Tt.count(tn(e)-1,e),t,2)}function Aa(e,t){return pn(e.getUTCFullYear()%100,t,2)}function va(e,t){return pn(e.getUTCFullYear()%1e4,t,4)}function ma(){return"+0000"}function ya(){return"%"}function Ra(e){return+e}function ba(e){return Math.floor(+e/1e3)}function wa(e){return on=function(e){var t=e.dateTime,n=e.date,a=e.time,r=e.periods,i=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,d=vn(r),c=mn(r),l=vn(i),f=mn(i),g=vn(o),h=mn(o),p=vn(s),A=mn(s),v=vn(u),m=mn(u),y={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Ln,e:Ln,f:Kn,H:In,I:Qn,j:Hn,L:zn,m:Vn,M:Wn,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Ra,s:ba,S:qn,u:Gn,U:Xn,V:Yn,w:Jn,W:$n,x:null,X:null,y:Zn,Y:ea,Z:ta,"%":ya},R={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:na,e:na,f:sa,H:aa,I:ra,j:ia,L:oa,m:ua,M:da,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Ra,s:ba,S:ca,u:la,U:fa,V:ga,w:ha,W:pa,x:null,X:null,y:Aa,Y:va,Z:ma,"%":ya},b={a:function(e,t,n){var a=g.exec(t.slice(n));return a?(e.w=h[a[0].toLowerCase()],n+a[0].length):-1},A:function(e,t,n){var a=l.exec(t.slice(n));return a?(e.w=f[a[0].toLowerCase()],n+a[0].length):-1},b:function(e,t,n){var a=v.exec(t.slice(n));return a?(e.m=m[a[0].toLowerCase()],n+a[0].length):-1},B:function(e,t,n){var a=p.exec(t.slice(n));return a?(e.m=A[a[0].toLowerCase()],n+a[0].length):-1},c:function(e,n,a){return _(e,t,n,a)},d:Bn,e:Bn,f:Mn,H:Fn,I:Fn,j:Sn,L:Tn,m:On,M:jn,p:function(e,t,n){var a=d.exec(t.slice(n));return a?(e.p=c[a[0].toLowerCase()],n+a[0].length):-1},q:Cn,Q:Un,s:Pn,S:Dn,u:Rn,U:bn,V:wn,w:yn,W:xn,x:function(e,t,a){return _(e,n,t,a)},X:function(e,t,n){return _(e,a,t,n)},y:En,Y:_n,Z:kn,"%":Nn};function w(e,t){return function(n){var a,r,i,o=[],s=-1,u=0,d=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in i||(i.w=1),"Z"in i?(r=(a=an(rn(i.y,0,1))).getUTCDay(),a=r>4||0===r?Tt.ceil(a):Tt(a),a=Qt.offset(a,7*(i.V-1)),i.y=a.getUTCFullYear(),i.m=a.getUTCMonth(),i.d=a.getUTCDate()+(i.w+6)%7):(r=(a=nn(rn(i.y,0,1))).getDay(),a=r>4||0===r?Kt.ceil(a):Kt(a),a=Jt.offset(a,7*(i.V-1)),i.y=a.getFullYear(),i.m=a.getMonth(),i.d=a.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?an(rn(i.y,0,1)).getUTCDay():nn(rn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,an(i)):nn(i)}}function _(e,t,n,a){for(var r,i,o=0,s=t.length,u=n.length;o=u)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(i=b[r in ln?t.charAt(o++):r])||(a=i(e,n,a))<0)return-1}else if(r!=n.charCodeAt(a++))return-1}return a}return y.x=w(n,y),y.X=w(a,y),y.c=w(t,y),R.x=w(n,R),R.X=w(a,R),R.c=w(t,R),{format:function(e){var t=w(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",R);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}(e),sn=on.format,un=on.parse,dn=on.utcFormat,cn=on.utcParse,on}wa({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xa=function(e,t){return function(t){return{options:t||{},sanitize:Xe,load:qe,fileAccess:!1,file:Je(null),http:et(e)}}}("undefined"!=typeof fetch&&fetch),_a=function(e,t,n){var a=Ct((t=t||{}).type||"json");return a||Object(he.n)("Unknown data format type: "+t.type),e=a(e,t),t.parse&&function(e,t,n){if(e.length){n=n||un;var a,r,i,o,s,u,d,c=e.columns||Object.keys(e[0]);for("auto"===t&&(t=function(e,t){return t.reduce((function(t,n){return t[n]=function(e,t){if(!e||!e.length)return"unknown";var n,a,r,i,o=0,s=e.length,u=rt.length,d=rt.map((function(e,t){return t+1}));for(a=0,s=e.length;a=he.c&&(l=Date.now(),r.debug("-- START PROPAGATION ("+s+") -----")),r._touched.forEach((function(e){return r._enqueue(e,!0)})),r._touched=pe(he.w),e.prev=17;case 18:if(!(r._heap.size()>0)){e.next=36;break}if((d=r._heap.pop()).rank===d.qrank){e.next=23;break}return r._enqueue(d,!0),e.abrupt("continue",18);case 23:if(!(c=d.run(r._getPulse(d,t))).then){e.next=30;break}return e.next=27,c;case 27:c=e.sent,e.next=31;break;case 30:c.async&&(o.push(c.async),c=Fa);case 31:i>=he.a&&r.debug(d.id,c===Fa?"STOP":c,d),c!==Fa&&d._targets&&d._targets.forEach((function(e){return r._enqueue(e)})),++u,e.next=18;break;case 36:e.next=42;break;case 38:e.prev=38,e.t0=e.catch(17),r._heap.clear(),f=e.t0;case 42:if(r._input={},r._pulse=null,i>=he.c&&(l=Date.now()-l,r.info("> Pulse "+s+": "+u+" operators; "+l+"ms")),f&&(r._postrun=[],r.error(f)),!r._postrun.length){e.next=56;break}g=r._postrun.sort((function(e,t){return t.priority-e.priority})),r._postrun=[],h=0;case 50:if(!(ht&&a(r,i=e[o=n-1>>1])<0;)e[n]=i,n=o;return e[n]=r}function Ka(){this.logger(Object(he.K)()),this.logLevel(he.b),this._clock=0,this._rank=0;try{this._loader=xa()}catch(e){}this._touched=pe(he.w),this._input={},this._pulse=null,this._heap=function(e){var t=[];return{clear:function(){return t=[]},size:function(){return t.length},peek:function(){return t[0]},push:function(n){return t.push(n),za(t,0,t.length-1,e)},pop:function(){var n,a=t.pop();return t.length?(n=t[0],t[0]=a,function(e,t,n){for(var a,r=t,i=e.length,o=e[t],s=1+(t<<1);s=0&&(s=a),e[t]=e[s],s=1+((t=s)<<1);e[t]=o,za(e,r,t,n)}(t,0,e)):n=a,n}}}((function(e,t){return e.qrank-t.qrank})),this._postrun=[]}var Va=Ka.prototype;function Wa(e){return function(){return this._log[e].apply(this,arguments)}}function qa(e,t){Ue.call(this,e,null,t)}Va.stamp=function(){return this._clock},Va.loader=function(e){return arguments.length?(this._loader=e,this):this._loader},Va.cleanThreshold=1e4,Va.add=function(e,t,n,a){var r,i=1;return e instanceof Ue?r=e:e&&e.prototype instanceof Ue?r=new e:Object(he.D)(e)?r=new Ue(null,e):(i=0,r=new Ue(e,t)),this.rank(r),i&&(a=n,n=t),n&&this.connect(r,r.parameters(n,a)),this.touch(r),r},Va.connect=function(e,t){var n,a,r=e.rank;for(n=0,a=t.length;n=0;)r.push(t=n[a]),t===e&&Object(he.n)("Cycle detected in dataflow graph.")},Va.pulse=function(e,t,n){this.touch(e,n||Ha);var a=new ja(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return a.target=e,this._input[e.id]=t.pulse(a,r),this},Va.touch=function(e,t){var n=t||Ha;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},Va.update=function(e,t,n){var a=n||Ha;return(e.set(t)||a.force)&&this.touch(e,a),this},Va.changeset=Fe,Va.ingest=function(e,t,n){return this.pulse(e,this.changeset().insert(_a(t,n)))},Va.parse=_a,Va.preload=function(e,t,n){return ka.apply(this,arguments)},Va.request=function(e,t){return Ea.apply(this,arguments)},Va.events=function(e,t,n,a){for(var r,i=this,o=He(n,a),s=function(e){e.dataflow=i;try{o.receive(e)}catch(e){i.error(e)}finally{i.run()}},u=0,d=(r="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):Object(he.i)(e)).length;u 1 ? this.dev / (this.valid-1) : undefined",req:["mean"],idx:1}),variancep:ar({name:"variancep",set:"this.valid > 1 ? this.dev / this.valid : undefined",req:["variance"],idx:2}),stdev:ar({name:"stdev",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid-1)) : undefined",req:["variance"],idx:2}),stdevp:ar({name:"stdevp",set:"this.valid > 1 ? Math.sqrt(this.dev / this.valid) : undefined",req:["variance"],idx:2}),stderr:ar({name:"stderr",set:"this.valid > 1 ? Math.sqrt(this.dev / (this.valid * (this.valid-1))) : undefined",req:["variance"],idx:2}),distinct:ar({name:"distinct",set:"cell.data.distinct(this.get)",req:["values"],idx:3}),ci0:ar({name:"ci0",set:"cell.data.ci0(this.get)",req:["values"],idx:3}),ci1:ar({name:"ci1",set:"cell.data.ci1(this.get)",req:["values"],idx:3}),median:ar({name:"median",set:"cell.data.q2(this.get)",req:["values"],idx:3}),q1:ar({name:"q1",set:"cell.data.q1(this.get)",req:["values"],idx:3}),q3:ar({name:"q3",set:"cell.data.q3(this.get)",req:["values"],idx:3}),argmin:ar({name:"argmin",init:"this.argmin = undefined;",add:"if (v < this.min) this.argmin = t;",rem:"if (v <= this.min) this.argmin = undefined;",set:"this.argmin || cell.data.argmin(this.get)",req:["min"],str:["values"],idx:3}),argmax:ar({name:"argmax",init:"this.argmax = undefined;",add:"if (v > this.max) this.argmax = t;",rem:"if (v >= this.max) this.argmax = undefined;",set:"this.argmax || cell.data.argmax(this.get)",req:["max"],str:["values"],idx:3}),min:ar({name:"min",init:"this.min = undefined;",add:"if (v < this.min || this.min === undefined) this.min = v;",rem:"if (v <= this.min) this.min = NaN;",set:"this.min = (Number.isNaN(this.min) ? cell.data.min(this.get) : this.min)",str:["values"],idx:4}),max:ar({name:"max",init:"this.max = undefined;",add:"if (v > this.max || this.max === undefined) this.max = v;",rem:"if (v >= this.max) this.max = NaN;",set:"this.max = (Number.isNaN(this.max) ? cell.data.max(this.get) : this.max)",str:["values"],idx:4})},tr=Object.keys(er);function nr(e,t){return er[e](t)}function ar(e){return function(t){var n=Object(he.o)({init:"",add:"",rem:"",idx:0},e);return n.out=t||e.name,n}}function rr(e,t){return e.idx-t.idx}function ir(e,t){var n=t||he.x,a=function(e,t){var n,a=e.reduce((function e(n,a){function r(t){n[t]||e(n,n[t]=er[t]())}return a.req&&a.req.forEach(r),t&&a.str&&a.str.forEach(r),n}),e.reduce((function(e,t){return e[t.name]=t,e}),{})),r=[];for(n in a)r.push(a[n]);return r.sort(rr)}(e,!0),r="var cell = this.cell; this.valid = 0; this.missing = 0;",i="this.cell = cell; this.init();",o="if(v==null){++this.missing; return;} if(v!==v) return; ++this.valid;",s="if(v==null){--this.missing; return;} if(v!==v) return; --this.valid;",u="var cell = this.cell;";return a.forEach((function(e){r+=e.init,o+=e.add,s+=e.rem})),e.slice().sort(rr).forEach((function(e){u+="t["+Object(he.Z)(e.out)+"]="+e.set+";"})),u+="return t;",(i=Function("cell",i)).prototype.init=Function(r),i.prototype.add=Function("v","t",o),i.prototype.rem=Function("v","t",s),i.prototype.set=Function("t",u),i.prototype.get=n,i.fields=e.map((function(e){return e.out})),i}var or=n(115);function sr(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(or.a)(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 a,r,i=!0,o=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return i=e.done,e},e:function(e){o=!0,r=e},f:function(){try{i||null==a.return||a.return()}finally{if(o)throw r}}}}var ur=D.a.mark(dr);function dr(e,t){var n,a,r,i,o,s,u;return D.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(void 0!==t){d.next=21;break}n=sr(e),d.prev=2,n.s();case 4:if((a=n.n()).done){d.next=11;break}if(!(null!=(r=a.value)&&(r=+r)>=r)){d.next=9;break}return d.next=9,r;case 9:d.next=4;break;case 11:d.next=16;break;case 13:d.prev=13,d.t0=d.catch(2),n.e(d.t0);case 16:return d.prev=16,n.f(),d.finish(16);case 19:d.next=40;break;case 21:i=-1,o=sr(e),d.prev=23,o.s();case 25:if((s=o.n()).done){d.next=32;break}if(u=s.value,!(null!=(u=t(u,++i,e))&&(u=+u)>=u)){d.next=30;break}return d.next=30,u;case 30:d.next=25;break;case 32:d.next=37;break;case 34:d.prev=34,d.t1=d.catch(23),o.e(d.t1);case 37:return d.prev=37,o.f(),d.finish(37);case 40:case"end":return d.stop()}}),ur,null,[[2,13,16,19],[23,34,37,40]])}var cr=function(e,t){return et?1:e>=t?0:NaN};function lr(e,t){var n;if(void 0===t){var a,r=sr(e);try{for(r.s();!(a=r.n()).done;){var i=a.value;null!=i&&(n=i)&&(n=i)}}catch(e){r.e(e)}finally{r.f()}}else{var o,s=-1,u=sr(e);try{for(u.s();!(o=u.n()).done;){var d=o.value;null!=(d=t(d,++s,e))&&(n=d)&&(n=d)}}catch(e){u.e(e)}finally{u.f()}}return n}function fr(e,t){var n;if(void 0===t){var a,r=sr(e);try{for(r.s();!(a=r.n()).done;){var i=a.value;null!=i&&(n>i||void 0===n&&i>=i)&&(n=i)}}catch(e){r.e(e)}finally{r.f()}}else{var o,s=-1,u=sr(e);try{for(u.s();!(o=u.n()).done;){var d=o.value;null!=(d=t(d,++s,e))&&(n>d||void 0===n&&d>=d)&&(n=d)}}catch(e){u.e(e)}finally{u.f()}}return n}function gr(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}var hr=D.a.mark(Ar),pr=function(e){return null===e?NaN:+e};function Ar(e,t){var n,a,r,i,o,s,u;return D.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(void 0!==t){d.next=21;break}n=sr(e),d.prev=2,n.s();case 4:if((a=n.n()).done){d.next=11;break}if(!(null!=(r=a.value)&&(r=+r)>=r)){d.next=9;break}return d.next=9,r;case 9:d.next=4;break;case 11:d.next=16;break;case 13:d.prev=13,d.t0=d.catch(2),n.e(d.t0);case 16:return d.prev=16,n.f(),d.finish(16);case 19:d.next=40;break;case 21:i=-1,o=sr(e),d.prev=23,o.s();case 25:if((s=o.n()).done){d.next=32;break}if(u=s.value,!(null!=(u=t(u,++i,e))&&(u=+u)>=u)){d.next=30;break}return d.next=30,u;case 30:d.next=25;break;case 32:d.next=37;break;case 34:d.prev=34,d.t1=d.catch(23),o.e(d.t1);case 37:return d.prev=37,o.f(),d.finish(37);case 40:case"end":return d.stop()}}),hr,null,[[2,13,16,19],[23,34,37,40]])}function vr(e,t,n){if(a=(e=Float64Array.from(Ar(e,n))).length){if((t=+t)<=0||a<2)return fr(e);if(t>=1)return lr(e);var a,r=(a-1)*t,i=Math.floor(r),o=lr(function e(t,n){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:cr;r>a;){if(r-a>600){var o=r-a+1,s=n-a+1,u=Math.log(o),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(o-d)/o)*(s-o/2<0?-1:1),l=Math.max(a,Math.floor(n-s*d/o+c)),f=Math.min(r,Math.floor(n+(o-s)*d/o+c));e(t,n,l,f,i)}var g=t[n],h=a,p=r;for(gr(t,a,n),i(t[r],g)>0&&gr(t,a,r);h0;)--p}0===i(t[a],g)?gr(t,a,p):gr(t,++p,r),p<=n&&(a=p+1),n<=p&&(r=p-1)}return t}(e,i).subarray(0,i+1));return o+(fr(e.subarray(i+1))-o)*(r-i)}}var mr=function(e,t,n){var a=Float64Array.from(dr(e,n));return a.sort(cr),t.map((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pr;if(a=e.length){if((t=+t)<=0||a<2)return+n(e[0],0,e);if(t>=1)return+n(e[a-1],a-1,e);var a,r=(a-1)*t,i=Math.floor(r),o=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return o+(s-o)*(r-i)}}(a,e)}))},yr=function(e,t){return mr(e,[.25,.5,.75],t)};var Rr=function(e,t){var n=e.length,a=function(e,t){var n=function(e,t){var n,a=0,r=0,i=0;if(void 0===t){var o,s=sr(e);try{for(s.s();!(o=s.n()).done;){var u=o.value;null!=u&&(u=+u)>=u&&(i+=(n=u-r)*(u-(r+=n/++a)))}}catch(e){s.e(e)}finally{s.f()}}else{var d,c=-1,l=sr(e);try{for(l.s();!(d=l.n()).done;){var f=d.value;null!=(f=t(f,++c,e))&&(f=+f)>=f&&(i+=(n=f-r)*(f-(r+=n/++a)))}}catch(e){l.e(e)}finally{l.f()}}if(a>1)return i/(a-1)}(e,t);return n?Math.sqrt(n):n}(e,t),r=yr(e,t),i=(r[2]-r[0])/1.34;return 1.06*(a=Math.min(a,i)||a||Math.abs(r[0])||1)*Math.pow(n,-.2)},br=function(e){var t,n,a,r,i,o,s,u,d=e.maxbins||20,c=e.base||10,l=Math.log(c),f=e.divide||[5,2],g=e.extent[0],h=e.extent[1],p=e.span||h-g||Math.abs(g)||1;if(e.step)t=e.step;else if(e.steps){for(i=p/d,o=0,s=e.steps.length;od;)t*=c;for(o=0,s=f.length;o=a&&p/i<=d&&(t=i)}return r=(i=Math.log(t))>=0?0:1+~~(-i/l),u=Math.pow(c,-r-1),(e.nice||void 0===e.nice)&&(g=g<(i=Math.floor(g/t+u)*t)?i-t:i,h=Math.ceil(h/t)*t),{start:g,stop:h===g?g+t:h,step:t}},wr=Math.random;function xr(e){wr=e}var _r=function(e,t,n,a){if(!e.length)return[void 0,void 0];var r,i,o,s,u=Float64Array.from(dr(e,a)),d=u.length,c=t;for(o=0,s=Array(c);o=l){for(c=(d+c)/2;i>1);ao;)e[a--]=e[i]}i=o,o=n}return e}(u,t+t/4):u},kr=function(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}},Cr=function(e,t){null==t&&(t=e,e=0);var n,a,r,i={min:function(e){return arguments.length?(r=a-(n=e||0),i):n},max:function(e){return arguments.length?(r=(a=e||0)-n,i):a},sample:function(){return n+Math.floor(r*wr())},pdf:function(e){return e===Math.floor(e)&&e>=n&&e=a?1:(t-n+1)/r},icdf:function(e){return e>=0&&e<=1?n-1+Math.floor(e*r):NaN}};return i.min(e).max(t)},Or=Math.sqrt(2*Math.PI),Br=Math.SQRT2,Sr=NaN;function Fr(e,t){e=e||0,t=null==t?1:t;var n,a,r=0,i=0;if(Sr==Sr)r=Sr,Sr=NaN;else{do{n=(r=2*wr()-1)*r+(i=2*wr()-1)*i}while(0===n||n>1);r*=a=Math.sqrt(-2*Math.log(n)/n),Sr=i*a}return e+r*t}function jr(e,t,n){var a=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*a*a)/(n*Or)}function Dr(e,t,n){var a,r=(e-(t=t||0))/(n=null==n?1:n),i=Math.abs(r);if(i>37)a=0;else{var o=Math.exp(-i*i/2);i<7.07106781186547?(a=o*((((((.0352624965998911*i+.700383064443688)*i+6.37396220353165)*i+33.912866078383)*i+112.079291497871)*i+221.213596169931)*i+220.206867912376),a/=((((((.0883883476483184*i+1.75566716318264)*i+16.064177579207)*i+86.7807322029461)*i+296.564248779674)*i+637.333633378831)*i+793.826512519948)*i+440.413735824752):a=o/(i+1/(i+2/(i+3/(i+4/(i+.65)))))/2.506628274631}return r>0?1-a:a}function Tr(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*Br*function(e){var t,n=-Math.log((1-e)*(1+e));return n<6.25?t=1.6536545626831027+(t=.24015818242558962+(t=(t=(t=.00018673420803405714+(t=(t=(t=4.2347877827932404e-7+(t=(t=(t=1.0512122733215323e-9+(t=(t=(t=26335093153082323e-28+(t=(t=(t=6637638134358324e-30+(t=20972767875968562e-33+(t=(t=11157877678025181e-33+(t=128584807152564e-32+(t=(t=-364441206401782e-35)*(n-=3.125)-16850591381820166e-35)*n)*n)*n-1333171662854621e-31)*n)*n)*n-4054566272975207e-29)*n-8151934197605472e-29)*n)*n-12975133253453532e-27)*n-5415412054294628e-26)*n)*n-4.112633980346984e-9)*n-2.9070369957882005e-8)*n)*n-13654692000834679e-22)*n-13882523362786469e-21)*n)*n-.000740702534166267)*n-.006033670871430149)*n)*n:n<16?t=3.0838856104922208+(t=1.0052589676941592+(t=.005370914553590064+(t=(t=.002491442096107851+(t=(t=.0009532893797373805+(t=(t=24031110387097894e-21+(t=6828485145957318e-20+(t=(t=12475304481671779e-21+(t=29234449089955446e-22+(t=(t=15027403968909828e-22+(t=1.8239629214389228e-8+(t=(t=9.075656193888539e-8+(t=2.2137376921775787e-9)*(n=Math.sqrt(n)-3.25))*n-2.7517406297064545e-7)*n)*n)*n-4013867526981546e-21)*n)*n)*n-47318229009055734e-21)*n)*n)*n-.0003550375203628475)*n)*n-.0016882755560235047)*n)*n-.003751208507569241)*n)*n)*n:Number.isFinite(n)?t=4.849906401408584+(t=1.0103004648645344+(t=(t=(t=7599527703001776e-20+(t=(t=4526062597223154e-21+(t=(t=2.2900482228026655e-7+(t=(t=2.914795345090108e-8+(t=(t=7.61570120807834e-9+(t=(t=1.5076572693500548e-9+(t=(t=-27109920616438573e-27)*(n=Math.sqrt(n)-5)-2.555641816996525e-10)*n)*n-3.789465440126737e-9)*n)*n-1.496002662714924e-8)*n)*n-6.771199775845234e-8)*n)*n-9.9298272942317e-7)*n)*n-1968177810553167e-20)*n)*n-.00021503011930044477)*n-.00013871931833623122)*n)*n:t=1/0,t*e}(2*e-1)}var Mr=function(e,t){var n,a,r={mean:function(e){return arguments.length?(n=e||0,r):n},stdev:function(e){return arguments.length?(a=null==e?1:e,r):a},sample:function(){return Fr(n,a)},pdf:function(e){return jr(e,n,a)},cdf:function(e){return Dr(e,n,a)},icdf:function(e){return Tr(e,n,a)}};return r.mean(e).stdev(t)},Nr=function(e,t){var n=Mr(),a={},r=0;return a.data=function(n){return arguments.length?(e=n,r=n?n.length:0,a.bandwidth(t)):e},a.bandwidth=function(n){return arguments.length?(!(t=n)&&e&&(t=Rr(e)),a):t},a.sample=function(){return e[~~(wr()*r)]+t*n.sample()},a.pdf=function(a){for(var i=0,o=0;o=t&&e<=n?1/(n-t):0}function Vr(e,t,n){return null==n&&(n=null==t?1:t,t=0),en?1:(e-t)/(n-t)}function Wr(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}var qr=function(e,t){var n,a,r={min:function(e){return arguments.length?(n=e||0,r):n},max:function(e){return arguments.length?(a=null==e?1:e,r):a},sample:function(){return zr(n,a)},pdf:function(e){return Kr(e,n,a)},cdf:function(e){return Vr(e,n,a)},icdf:function(e){return Wr(e,n,a)}};return null==t&&(t=null==e?1:e,e=0),r.min(e).max(t)},Gr=function(e,t,n,a){var r=a-e*e,i=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-i*e,i]};function Xr(e,t,n,a){e=e.filter((function(e){var a=t(e),r=n(e);return null!=a&&(a=+a)>=a&&null!=r&&(r=+r)>=r})),a&&e.sort((function(e,n){return t(e)-t(n)}));var r,i,o,s,u=e.length,d=new Float64Array(u),c=new Float64Array(u),l=0,f=0,g=0,h=sr(e);try{for(h.s();!(s=h.n()).done;)o=s.value,d[l]=r=+t(o),c[l]=i=+n(o),f+=(r-f)/++l,g+=(i-g)/l}catch(e){h.e(e)}finally{h.f()}for(l=0;l=r&&null!=i&&(i=+i)>=i&&a(r,i,++s)}}catch(e){u.e(e)}finally{u.f()}}var Jr=function(e,t,n,a,r){var i=0,o=0;return Yr(e,t,n,(function(e,t){var n=t-r(e),s=t-a;i+=n*n,o+=s*s})),1-i/o},$r=function(e,t,n){var a=0,r=0,i=0,o=0,s=0;Yr(e,t,n,(function(e,t){++s,a+=(e-a)/s,r+=(t-r)/s,i+=(e*t-i)/s,o+=(e*e-o)/s}));var u=Gr(a,r,i,o),d=function(e){return u[0]+u[1]*e};return{coef:u,predict:d,rSquared:Jr(e,t,n,r,d)}},Zr=function(e,t,n){var a=0,r=0,i=0,o=0,s=0;Yr(e,t,n,(function(e,t){++s,e=Math.log(e),a+=(e-a)/s,r+=(t-r)/s,i+=(e*t-i)/s,o+=(e*e-o)/s}));var u=Gr(a,r,i,o),d=function(e){return u[0]+u[1]*Math.log(e)};return{coef:u,predict:d,rSquared:Jr(e,t,n,r,d)}},ei=n(18),ti=function(e,t,n){var a,r,i,o=Xr(e,t,n),s=Object(ei.a)(o,4),u=s[0],d=(s[1],s[2]),c=s[3],l=0,f=0,g=0,h=0,p=0;Yr(e,t,n,(function(e,t){a=u[p++],r=Math.log(t),l+=(t*r-l)/p,f+=((i=a*t)-f)/p,g+=(i*r-g)/p,h+=(a*i-h)/p}));var A=Gr(f/c,l/c,g/c,h/c),v=Object(ei.a)(A,2),m=v[0],y=v[1],R=function(e){return Math.exp(m+y*(e-d))};return{coef:[Math.exp(m-y*d),y],predict:R,rSquared:Jr(e,t,n,c,R)}},ni=function(e,t,n){var a=0,r=0,i=0,o=0,s=0,u=0;Yr(e,t,n,(function(e,t){var n=Math.log(e),d=Math.log(t);++u,a+=(n-a)/u,r+=(d-r)/u,i+=(n*d-i)/u,o+=(n*n-o)/u,s+=(t-s)/u}));var d=Gr(a,r,i,o),c=function(e){return d[0]*Math.pow(e,d[1])};return d[0]=Math.exp(d[0]),{coef:d,predict:c,rSquared:Jr(e,t,n,s,c)}},ai=function(e,t,n){var a,r,i,o,s=Xr(e,t,n),u=Object(ei.a)(s,4),d=u[0],c=u[1],l=u[2],f=u[3],g=d.length,h=0,p=0,A=0,v=0,m=0;for(a=0;aMath.abs(e[t][r])&&(r=n);for(a=t;a=t;a--)e[a][n]-=e[a][t]*e[t][n]/e[t][t]}for(n=o-1;n>=0;--n){for(i=0,a=n+1;a=0;--r)for(o=t[r],s=1,u[r]+=o,i=1;i<=r;++i)s*=(r+1-i)/i,u[r-i]+=o*Math.pow(n,i)*s;return u[0]+=a,u}var oi=function(e,t){return vr(e,.5,t)},si=function(e,t,n,a){for(var r=Xr(e,t,n,!0),i=Object(ei.a)(r,4),o=i[0],s=i[1],u=i[2],d=i[3],c=o.length,l=Math.max(2,~~(a*c)),f=new Float64Array(c),g=new Float64Array(c),h=new Float64Array(c).fill(1),p=-1;++p<=2;){for(var A=[0,l-1],v=0;vo[R]-m?y:R,w=0,x=0,_=0,E=0,k=0,C=1/Math.abs(o[b]-m||1),O=y;O<=R;++O){var B=o[O],S=s[O],F=ui(Math.abs(m-B)*C)*h[O],j=B*F;w+=F,x+=j,_+=S*F,E+=S*j,k+=B*j}var D=Gr(x/w,_/w,E/w,k/w),T=Object(ei.a)(D,2),M=T[0],N=T[1];f[v]=M+N*m,g[v]=Math.abs(s[v]-f[v]),di(o,v+1,A)}if(2===p)break;var U=oi(g);if(Math.abs(U)<1e-12)break;for(var P,L,I=0;I=1?1e-12:(L=1-P*P)*L}return function(e,t,n,a){for(var r,i=e.length,o=[],s=0,u=0,d=[];s=e.length))for(;t>r&&e[i]-a<=a-e[r];)n[0]=++r,n[1]=i,++i}var ci=.1*Math.PI/180,li=function(e,t,n,a){n=n||25,a=Math.max(n,a||200);var r=function(t){return[t,e(t)]},i=t[0],o=t[1],s=o-i,u=s/a,d=[r(i)],c=[];if(n===a){for(var l=1;l0;)c.push(r(i+f/n*s));for(var g,h,p,A,v,m=d[0],y=c[c.length-1];y;){var R=r((m[0]+y[0])/2);R[0]-m[0]>=u&&(g=m,h=R,p=y,void 0,void 0,A=Math.atan2(p[1]-g[1],p[0]-g[0]),v=Math.atan2(h[1]-g[1],h[0]-g[0]),Math.abs(A-v)>ci)?c.push(R):(m=y,d.push(y),c.pop()),y=c[c.length-1]}return d};function fi(e){this._key=e?Object(he.t)(e):xe,this.reset()}var gi=fi.prototype;function hi(e){qa.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}gi.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},gi.add=function(e){this._add.push(e)},gi.rem=function(e){this._rem.push(e)},gi.values=function(){if(this._get=null,0===this._rem.length)return this._add;var e,t,n,a=this._add,r=this._rem,i=this._key,o=a.length,s=r.length,u=Array(o-s),d={};for(e=0;e=0;)t=e(n[a])+"",Object(he.v)(r,t)||(r[t]=1,++i);return i},gi.extent=function(e){if(this._get!==e||!this._ext){var t=this.values(),n=Object(he.q)(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},gi.argmin=function(e){return this.extent(e)[0]||{}},gi.argmax=function(e){return this.extent(e)[1]||{}},gi.min=function(e){var t=this.extent(e)[0];return null!=t?e(t):void 0},gi.max=function(e){var t=this.extent(e)[1];return null!=t?e(t):void 0},gi.quartile=function(e){return this._get===e&&this._q||(this._q=yr(this.values(),e),this._get=e),this._q},gi.q1=function(e){return this.quartile(e)[0]},gi.q2=function(e){return this.quartile(e)[1]},gi.q3=function(e){return this.quartile(e)[2]},gi.ci=function(e){return this._get===e&&this._ci||(this._ci=_r(this.values(),1e3,.05,e),this._get=e),this._ci},gi.ci0=function(e){return this.ci(e)[0]},gi.ci1=function(e){return this.ci(e)[1]},hi.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:tr},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};var pi=Object(he.y)(hi,qa);function Ai(e){qa.call(this,null,e)}pi.transform=function(e,t){var n=this,a=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=a.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):{},t.visit(t.SOURCE,(function(e){return n.add(e)}))):(n.value=n.value||n.init(e),t.visit(t.REM,(function(e){return n.rem(e)})),t.visit(t.ADD,(function(e){return n.add(e)}))),a.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),n.changes(a)},pi.cross=function(){var e=this,t=e.value,n=e._dnames,a=n.map((function(){return{}})),r=n.length;function i(e){var t,i,o,s;for(t in e)for(o=e[t].tuple,i=0;is?1/0:(t=Math.max(o,Math.min(+t,s-i)),o+i*Math.floor(1e-14+(t-o)/i))};return u.start=o,u.stop=r.stop,u.step=i,this.value=Object(he.f)(u,Object(he.g)(a),e.name||"bin_"+Object(he.h)(a))};var mi=function(e,t,n){var a=e,r=t||[],i=n||[],o={},s=0;return{add:function(e){i.push(e)},remove:function(e){o[a(e)]=++s},size:function(){return r.length},data:function(e,t){return s&&(r=r.filter((function(e){return!o[a(e)]})),o={},s=0),t&&e&&r.sort(e),i.length&&(r=e?Object(he.M)(e,r,i.sort(e)):r.concat(i),i=[]),r}}};function yi(e){qa.call(this,[],e)}function Ri(e){Ue.call(this,null,bi,e)}function bi(e){return this.value&&!e.modified()?this.value:Object(he.k)(e.fields,e.orders)}function wi(e){qa.call(this,null,e)}yi.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},Object(he.y)(yi,qa).transform=function(e,t){var n=t.fork(t.ALL),a=mi(xe,this.value,n.materialize(n.ADD).add),r=e.sort,i=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,a.remove),this.modified(i),this.value=n.source=a.data(Be(r),i),t.source&&t.source.root&&(this.value.root=t.source.root),n},Object(he.y)(Ri,Ue),wi.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};var xi=Object(he.y)(wi,qa);function _i(e){qa.call(this,null,e)}xi.transform=function(e,t){function n(t){return function(n){for(var a,r=function(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(s(n),e.case,i)||[],u=0,d=r.length;uf&&(f=v),h[++n][d]=v}}catch(e){A.e(e)}finally{A.f()}}return this.value={start:l,stop:f,step:s},t.reflow(!0).modifies(d)},Object(he.y)(ji,Ue),Ti.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},Object(he.y)(Ti,qa).transform=function(e,t){var n,a=this.value,r=e.field,i=a[0],o=a[1];if(((n=t.changed()||t.modified(r.fields)||e.modified("field"))||null==i)&&(i=1/0,o=-1/0),t.visit(n?t.SOURCE:t.ADD,(function(e){var t=r(e);null!=t&&((t=+t)o&&(o=t))})),!Number.isFinite(i)||!Number.isFinite(o)){var s=Object(he.h)(r);s&&(s=' for field "'.concat(s,'"')),t.dataflow.warn("Infinite extent".concat(s,": [").concat(i,", ").concat(o,"]")),i=o=void 0}this.value=[i,o]};var Ni=Object(he.y)(Mi,Ue);function Ui(e){qa.call(this,{},e),this._keys=Object(he.s)();var t=this._targets=[];t.active=0,t.forEach=function(e){for(var n=0,a=t.active;nn.cleanThreshold&&n.runAfter(o.clean),t},Object(he.y)(Li,Ue),Qi.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},Object(he.y)(Qi,qa).transform=function(e,t){var n=t.dataflow,a=this.value,r=t.fork(),i=r.add,o=r.rem,s=r.mod,u=e.expr,d=!0;function c(t){var n=xe(t),r=u(t,e),c=a.get(n);r&&c?(a.delete(n),i.push(t)):r||c?d&&r&&!c&&s.push(t):(a.set(n,1),o.push(t))}return t.visit(t.REM,(function(e){var t=xe(e);a.has(t)?a.delete(t):o.push(e)})),t.visit(t.ADD,(function(t){u(t,e)?i.push(t):a.set(xe(t),1)})),t.visit(t.MOD,c),e.modified()&&(d=!1,t.visit(t.REFLOW,c)),a.empty>n.cleanThreshold&&n.runAfter(a.clean),r},Hi.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},Object(he.y)(Hi,qa).transform=function(e,t){var n=t.fork(t.NO_SOURCE),a=e.fields,r=Bi(a,e.as||[]),i=e.index||null,o=r.length;return n.rem=this.value,t.visit(t.SOURCE,(function(e){for(var t,s,u,d=a.map((function(t){return t(e)})),c=d.reduce((function(e,t){return Math.max(e,t.length)}),0),l=0;l0){for(n=[];--s>=0;)n.push(r=Ee(u(e))),i.push(r);o.add=o.add.length?o.materialize(o.ADD).add.concat(n):n}else a=i.slice(0,-s),o.rem=o.rem.length?o.materialize(o.REM).rem.concat(a):a,i=i.slice(-s);return o.source=this.value=i,o};var Wi={value:"value",median:oi,mean:function(e,t){var n=0,a=0;if(void 0===t){var r,i=sr(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(o=+o)>=o&&(++n,a+=o)}}catch(e){i.e(e)}finally{i.f()}}else{var s,u=-1,d=sr(e);try{for(d.s();!(s=d.n()).done;){var c=s.value;null!=(c=t(c,++u,e))&&(c=+c)>=c&&(++n,a+=c)}}catch(e){d.e(e)}finally{d.f()}}if(n)return a/n},min:fr,max:lr},qi=[];function Gi(e){qa.call(this,[],e)}function Xi(e){hi.call(this,e)}Gi.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},Object(he.y)(Gi,qa).transform=function(e,t){var n,a,r,i,o,s,u,d,c,l,f=t.fork(t.ALL),g=function(e){var t,n=e.method||Wi.value;if(null!=Wi[n])return n===Wi.value?(t=void 0!==e.value?e.value:0,function(){return t}):Wi[n];Object(he.n)("Unrecognized imputation method: "+n)}(e),h=function(e){var t=e.field;return function(e){return e?t(e):NaN}}(e),p=Object(he.h)(e.field),A=Object(he.h)(e.key),v=(e.groupby||[]).map(he.h),m=function(e,t,n,a){var r,i,o,s,u,d,c,l,f=function(e){return e(l)},g=[],h=a?a.slice():[],p={},A={};for(h.forEach((function(e,t){p[e]=t+1})),s=0,c=e.length;si&&(i=a[1]);return[r,i]}function io(e){Ue.call(this,null,oo,e)}function oo(e){return this.value&&!e.modified()?this.value:e.values.reduce((function(e,t){return e.concat(t)}),[])}function so(e){qa.call(this,null,e)}function uo(e){hi.call(this,e)}Yi.transform=function(e,t){var n,a=this,r=e.modified();return a.value&&(r||t.modified(a._inputs,!0))?(n=a.value=r?a.init(e):{},t.visit(t.SOURCE,(function(e){a.add(e)}))):(n=a.value=a.value||this.init(e),t.visit(t.REM,(function(e){a.rem(e)})),t.visit(t.ADD,(function(e){a.add(e)}))),a.changes(),t.visit(t.SOURCE,(function(e){Object(he.o)(e,n[a.cellkey(e)].tuple)})),t.reflow(r).modifies(this._outputs)},Yi.changes=function(){var e,t,n=this._adds,a=this._mods;for(e=0,t=this._alen;e1&&!i&&Object(he.n)('Multi-field lookup requires explicit "as" parameter.'),i&&i.length!==f*a&&Object(he.n)('The "as" parameter has too few output field names.'),i=i||u.map(he.h),n=function(e){for(var t,n,r=0,c=0;rt||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0)})),t?r.slice(0,t):r}(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:o.map((function(){return r})),fields:o.map((function(e){return function(e,t,n,a){return Object(he.f)((function(a){return t(a)===e?n(a):NaN}),a,e+"")}(e,n,a,i)})),as:o.map((function(e){return e+""})),modified:e.modified.bind(e)}}(e,t),t)},Object(he.y)(lo,Ui).transform=function(e,t){var n=this,a=e.subflow,r=e.field;return(e.modified("field")||r&&t.modified(Object(he.g)(r)))&&Object(he.n)("PreFacet does not support field modification."),this._targets.active=0,t.visit(t.MOD,(function(e){var i=n.subflow(xe(e),a,t,e);r?r(e).forEach((function(e){i.mod(e)})):i.mod(e)})),t.visit(t.ADD,(function(e){var i=n.subflow(xe(e),a,t,e);r?r(e).forEach((function(e){i.add(Ee(e))})):i.add(e)})),t.visit(t.REM,(function(e){var i=n.subflow(xe(e),a,t,e);r?r(e).forEach((function(e){i.rem(e)})):i.rem(e)})),t},fo.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},Object(he.y)(fo,qa).transform=function(e,t){var n,a,r=e.fields,i=Bi(e.fields,e.as||[]),o=r?function(e,t){return function(e,t,n,a){for(var r=0,i=n.length;r=s&&(t=i[a],u[xe(t)]&&n.rem.push(t),i[a]=e),++o}if(t.rem.length&&(t.visit(t.REM,(function(e){var t=xe(e);u[t]&&(u[t]=-1,n.rem.push(e)),--o})),i=i.filter((function(e){return-1!==u[xe(e)]}))),(t.rem.length||a)&&i.lengthr){for(var c=0,l=i.length-r;c0?e>1?Ft((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):as:null};var rs,is,os,ss=as,us=(as.range,Ft((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()}))),ds=us,cs=(us.range,Ft((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}))),ls=cs,fs=(cs.range,Ft((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()}))),gs=fs,hs=(fs.range,rs={},Object(To.a)(rs,Ro,Zt),Object(To.a)(rs,bo,Yo.every(3)),Object(To.a)(rs,wo,Yo),Object(To.a)(rs,xo,zt),Object(To.a)(rs,_o,Jt),Object(To.a)(rs,Eo,Jt),Object(To.a)(rs,ko,$o),Object(To.a)(rs,Co,es),Object(To.a)(rs,Oo,ns),Object(To.a)(rs,Bo,ss),rs),ps=(is={},Object(To.a)(is,Ro,tn),Object(To.a)(is,bo,ds.every(3)),Object(To.a)(is,wo,ds),Object(To.a)(is,xo,Dt),Object(To.a)(is,_o,Qt),Object(To.a)(is,Eo,Qt),Object(To.a)(is,ko,ls),Object(To.a)(is,Co,gs),Object(To.a)(is,Oo,ns),Object(To.a)(is,Bo,ss),is);function As(e){return hs[e]}function vs(e){return ps[e]}function ms(e,t,n){return e?e.offset(t,n):void 0}function ys(e,t,n){return ms(As(e),t,n)}function Rs(e,t,n){return ms(vs(e),t,n)}function bs(e,t,n,a){return e?e.range(t,n,a):void 0}function ws(e,t,n,a){return bs(As(e),t,n,a)}function xs(e,t,n,a){return bs(vs(e),t,n,a)}var _s=(os={},Object(To.a)(os,Ro,"%Y "),Object(To.a)(os,bo,"Q%q "),Object(To.a)(os,wo,"%b "),Object(To.a)(os,_o,"%d "),Object(To.a)(os,xo,"W%U "),Object(To.a)(os,Eo,"%a "),Object(To.a)(os,ko,"%H:00"),Object(To.a)(os,Co,"00:%M"),Object(To.a)(os,Oo,":%S"),Object(To.a)(os,Bo,".%L"),Object(To.a)(os,"".concat(Ro,"-").concat(wo),"%Y-%m "),Object(To.a)(os,"".concat(Ro,"-").concat(wo,"-").concat(_o),"%Y-%m-%d "),Object(To.a)(os,"".concat(ko,"-").concat(Co),"%H:%M"),os);function Es(e,t){var n,a,r=Object(he.o)({},_s,t),i=Fo(e),o=i.length,s="",u=0;for(u=0;uu;--n)if(null!=r[a=i.slice(u,n).join("-")]){s+=r[a],u=n;break}return s.trim()}function ks(e){return Os(sn,As,e)}function Cs(e){return Os(dn,vs,e)}function Os(e,t,n){return Object(he.H)(n)?e(n):function(e,t,n){n=n||{},Object(he.F)(n)||Object(he.n)("Invalid time multi-format specifier: ".concat(n));var a=t(Oo),r=t(Co),i=t(ko),o=t(_o),s=t(xo),u=t(wo),d=t(bo),c=t(Ro),l=e(n[Bo]||".%L"),f=e(n[Oo]||":%S"),g=e(n[Co]||"%I:%M"),h=e(n[ko]||"%I %p"),p=e(n[_o]||n[Eo]||"%a %d"),A=e(n[xo]||"%b %d"),v=e(n[wo]||"%B"),m=e(n[bo]||"%B"),y=e(n[Ro]||"%Y");return function(e){return(a(e)>>1;e(t[i],n)<0?a=i+1:r=i}return a},right:function(t,n,a,r){for(null==a&&(a=0),null==r&&(r=t.length);a>>1;e(t[i],n)>0?r=i:a=i+1}return a}}},Ss=Math.sqrt(50),Fs=Math.sqrt(10),js=Math.sqrt(2),Ds=function(e,t,n){var a,r,i,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((a=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(r=Math.ceil(t-e+1));++s=0?(i>=Ss?10:i>=Fs?5:i>=js?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(i>=Ss?10:i>=Fs?5:i>=js?2:1)}function Ms(e,t,n){var a=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(a)/Math.LN10)),i=a/r;return i>=Ss?r*=10:i>=Fs?r*=5:i>=js&&(r*=2),tl&&(l=r))})),i.start=c,i.stop=l,t.modifies(a?s:u)},qs._floor=function(e,t){var n="utc"===e.timezone,a=e.units?{units:e.units,step:e.step||1}:Ks({extent:e.extent||Object(he.p)(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),r=a.units,i=a.step;r=Fo(r);var o=this.value||{},s=(n?Go:zo)(r,i);return s.unit=Object(he.U)(r),s.units=r,s.step=i,s.start=o.start,s.stop=o.stop,this.value=s},Object(he.y)(Gs,qa).transform=function(e,t){var n=t.dataflow,a=e.field,r=this.value,i=!0;function o(e){r.set(a(e),e)}return e.modified("field")||t.modified(a.fields)?(r.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,(function(e){r.delete(a(e))})),t.visit(t.ADD,o)):i=!1,this.modified(i),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()},Object(he.y)(Xs,qa).transform=function(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Be(e.sort)):t.source).map(e.field))};var Ys={row_number:function(){return{next:function(e){return e.index+1}}},rank:function(){var e;return{init:function(){return e=1},next:function(t){var n=t.index,a=t.data;return n&&t.compare(a[n-1],a[n])?e=n+1:e}}},dense_rank:function(){var e;return{init:function(){return e=1},next:function(t){var n=t.index,a=t.data;return n&&t.compare(a[n-1],a[n])?++e:e}}},percent_rank:function(){var e=Ys.rank(),t=e.next;return{init:e.init,next:function(e){return(t(e)-1)/(e.data.length-1)}}},cume_dist:function(){var e;return{init:function(){return e=0},next:function(t){var n=t.index,a=t.data,r=t.compare;if(e0||Object(he.n)("ntile num must be greater than zero.");var n=Ys.cume_dist(),a=n.next;return{init:n.init,next:function(e){return Math.ceil(t*a(e))}}},lag:function(e,t){return t=+t||1,{next:function(n){var a=n.index-t;return a>=0?e(n.data[a]):null}}},lead:function(e,t){return t=+t||1,{next:function(n){var a=n.index+t,r=n.data;return a0||Object(he.n)("nth_value nth must be greater than zero."),{next:function(n){var a=n.i0+(t-1);return a0&&!r(i[n],i[n-1])&&(e.i0=t.left(i,i[n])),athis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},lu.expand=function(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},lu.round=function(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},lu.scale=function(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},lu.translate=function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},lu.rotate=function(e,t,n){var a=this.rotatedPoints(e,t,n);return this.clear().add(a[0],a[1]).add(a[2],a[3]).add(a[4],a[5]).add(a[6],a[7])},lu.rotatedPoints=function(e,t,n){var a=this.x1,r=this.y1,i=this.x2,o=this.y2,s=Math.cos(e),u=Math.sin(e),d=t-t*s+n*u,c=n-t*u-n*s;return[s*a-u*r+d,u*a+s*r+c,s*a-u*o+d,u*a+s*o+c,s*i-u*r+d,u*i+s*r+c,s*i-u*o+d,u*i+s*o+c]},lu.union=function(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},lu.intersect=function(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},lu.alignsWith=function(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},lu.intersects=function(e){return e&&!(this.x2e.x2||this.y2e.y2)},lu.contains=function(e,t){return!(ethis.x2||tthis.y2)},lu.width=function(){return this.x2-this.x1},lu.height=function(){return this.y2-this.y1};var fu=0;function gu(e){return e&&e.gradient}function hu(e,t,n){var a=e.id,r=e.gradient,i="radial"===r?"p_":"";return a||(a=e.id="gradient_"+fu++,"radial"===r?(e.x1=pu(e.x1,.5),e.y1=pu(e.y1,.5),e.r1=pu(e.r1,0),e.x2=pu(e.x2,.5),e.y2=pu(e.y2,.5),e.r2=pu(e.r2,.5),i="p_"):(e.x1=pu(e.x1,0),e.y1=pu(e.y1,0),e.x2=pu(e.x2,1),e.y2=pu(e.y2,0))),t[a]=e,"url("+(n||"")+"#"+i+a+")"}function pu(e,t){return null!=e?e:t}var Au=function(e,t){var n,a=[];return n={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:a,stop:function(e,t){return a.push({offset:e,color:t}),n}}};function vu(e){this.mark=e,this.bounds=this.bounds||new cu}function mu(e){vu.call(this,e),this.items=this.items||[]}function yu(e,t){if("undefined"!=typeof document&&document.createElement){var n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}function Ru(){return"undefined"!=typeof Image?Image:null}Object(he.y)(mu,vu);var bu=/^([A-Za-z]+:)?\/\//,wu=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,xu=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;function _u(e,t){return Eu.apply(this,arguments)}function Eu(){return(Eu=ve(D.a.mark((function e(t,n){var a,r;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sanitize(t,n);case 2:return a=e.sent,r=a.href,e.abrupt("return",a.localFile?this.file(r):this.http(r,n));case 5:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function ku(e,t){return Cu.apply(this,arguments)}function Cu(){return(Cu=ve(D.a.mark((function e(t,n){var a,r,i,o,s,u,d;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(he.o)({},this.options,n),a=this.fileAccess,r={href:null},u=wu.test(t.replace(xu,"")),null!=t&&"string"==typeof t&&u||Object(he.n)("Sanitize failure, invalid URI: "+Object(he.Z)(t)),d=bu.test(t),(s=n.baseURL)&&!d&&(t.startsWith("/")||"/"===s[s.length-1]||(t="/"+t),t=s+t),o=(i=t.startsWith("file://"))||"file"===n.mode||"http"!==n.mode&&!d&&a,i?t=t.slice("file://".length):t.startsWith("//")&&("file"===n.defaultProtocol?(t=t.slice(2),o=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(r,"localFile",{value:!!o}),r.href=t,n.target&&(r.target=n.target+""),n.rel&&(r.rel=n.rel+""),"image"===n.context&&n.crossOrigin&&(r.crossOrigin=n.crossOrigin+""),e.abrupt("return",r);case 14:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function Ou(e){return e?function(t){return new Promise((function(n,a){e.readFile(t,(function(e,t){e?a(e):n(t)}))}))}:Bu}function Bu(){return Su.apply(this,arguments)}function Su(){return(Su=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No file system access.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fu(e){return e?function(){var t=ve(D.a.mark((function t(n,a){var r,i,o;return D.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(he.o)({},this.options.http,a),i=a&&a.response,t.next=4,e(n,r);case 4:return o=t.sent,t.abrupt("return",o.ok?Object(he.D)(o[i])?o[i]():o.text():Object(he.n)(o.status+""+o.statusText));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}():ju}function ju(){return Du.apply(this,arguments)}function Du(){return(Du=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No HTTP fetch method available.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Tu={boolean:he.ab,integer:he.cb,number:he.cb,date:he.bb,string:he.eb,unknown:he.x},Mu=[function(e){return"true"===e||"false"===e||!0===e||!1===e},function(e){return Lu(e)&&Number.isInteger(+e)},Lu,function(e){return!Number.isNaN(Date.parse(e))}],Nu=["boolean","integer","number","date"];function Uu(e,t){if(!e||!e.length)return"unknown";var n,a,r,i,o=0,s=e.length,u=Mu.length,d=Mu.map((function(e,t){return t+1}));for(a=0,s=e.length;a1?(Vu[e]=t,this):Object(he.v)(Vu,e)?Vu[e]:null}function qu(e){var t=Wu(e);return t&&t.responseType||"text"}var Gu=function(e,t,n){var a=Wu((t=t||{}).type||"json");return a||Object(he.n)("Unknown data format type: "+t.type),e=a(e,t),t.parse&&function(e,t,n){if(e.length){n=n||un;var a,r,i,o,s,u,d,c=e.columns||Object.keys(e[0]);for("auto"===t&&(t=Pu(e,c)),a=(c=Object.keys(t)).map((function(e){var a,r,i=t[e];if(i&&(i.startsWith("date:")||i.startsWith("utc:")))return("'"===(r=(a=i.split(/:(.+)?/,2))[1])[0]&&"'"===r[r.length-1]||'"'===r[0]&&'"'===r[r.length-1])&&(r=r.slice(1,-1)),"utc"===a[0]?cn(r):n(r);if(!Tu[i])throw Error("Illegal format pattern: "+e+":"+i);return Tu[i]})),o=0,u=e.length,d=c.length;o0)for(var a,r=e[0],i=t[0],o=e[n]-r,s=t[n]-i,u=-1;++u<=n;)a=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(r+a*o),this._beta*t[u]+(1-this._beta)*(i+a*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var dd=function e(t){function n(e){return 1===t?new td(e):new ud(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function cd(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function ld(e,t){this._context=e,this._k=(1-t)/6}ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:cd(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:cd(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fd=function e(t){function n(e){return new ld(e,t)}return n.tension=function(t){return e(+t)},n}(0);function gd(e,t){this._context=e,this._k=(1-t)/6}gd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cd(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var hd=function e(t){function n(e){return new gd(e,t)}return n.tension=function(t){return e(+t)},n}(0);function pd(e,t){this._context=e,this._k=(1-t)/6}pd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cd(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ad=function e(t){function n(e){return new pd(e,t)}return n.tension=function(t){return e(+t)},n}(0),vd=Math.abs,md=Math.atan2,yd=Math.cos,Rd=Math.max,bd=Math.min,wd=Math.sin,xd=Math.sqrt,_d=Math.PI,Ed=_d/2,kd=2*_d;function Cd(e){return e>1?0:e<-1?_d:Math.acos(e)}function Od(e){return e>=1?Ed:e<=-1?-Ed:Math.asin(e)}function Bd(e,t,n){var a=e._x1,r=e._y1,i=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,r=(r*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var d=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*d+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*d+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(a,r,i,o,e._x2,e._y2)}function Sd(e,t){this._context=e,this._alpha=t}Sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Bd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Fd=function e(t){function n(e){return t?new Sd(e,t):new ld(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function jd(e,t){this._context=e,this._alpha=t}jd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Dd=function e(t){function n(e){return t?new jd(e,t):new pd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Td(e,t){this._context=e,this._alpha=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Md=function e(t){function n(e){return t?new Td(e,t):new gd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Nd(e){this._context=e}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Ud=function(e){return new Nd(e)};function Pd(e){this._context=e}Pd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var Ld=function(e){return new Pd(e)};function Id(e){return e<0?-1:1}function Qd(e,t,n){var a=e._x1-e._x0,r=t-e._x1,i=(e._y1-e._y0)/(a||r<0&&-0),o=(n-e._y1)/(r||a<0&&-0),s=(i*r+o*a)/(a+r);return(Id(i)+Id(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Hd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function zd(e,t,n){var a=e._x0,r=e._y0,i=e._x1,o=e._y1,s=(i-a)/3;e._context.bezierCurveTo(a+s,r+s*t,i-s,o-s*n,i,o)}function Kd(e){this._context=e}function Vd(e){this._context=new Wd(e)}function Wd(e){this._context=e}function qd(e){return new Kd(e)}function Gd(e){return new Vd(e)}function Xd(e){this._context=e}function Yd(e){var t,n,a=e.length-1,r=new Array(a),i=new Array(a),o=new Array(a);for(r[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)r[t]=(o[t]-r[t+1])/i[t];for(i[a-1]=(e[a]+r[a-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Zd=function(e){return new $d(e,.5)};function ec(e){return new $d(e,0)}function tc(e){return new $d(e,1)}var nc={basis:{curve:nd},"basis-closed":{curve:id},"basis-open":{curve:sd},bundle:{curve:dd,tension:"beta",value:.85},cardinal:{curve:fd,tension:"tension",value:0},"cardinal-open":{curve:hd,tension:"tension",value:0},"cardinal-closed":{curve:Ad,tension:"tension",value:0},"catmull-rom":{curve:Fd,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Dd,tension:"alpha",value:.5},"catmull-rom-open":{curve:Md,tension:"alpha",value:.5},linear:{curve:Ud},"linear-closed":{curve:Ld},monotone:{horizontal:Gd,vertical:qd},natural:{curve:Jd},step:{curve:Zd},"step-after":{curve:tc},"step-before":{curve:ec}};function ac(e,t,n){var a=Object(he.v)(nc,e)&&nc[e],r=null;return a&&(r=a.curve||a[t||"vertical"],a.tension&&null!=n&&(r=r[a.tension](n))),r}var rc={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},ic=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/],oc=function(e){var t,n,a,r,i,o,s,u,d,c,l,f=[];for(u=0,c=(t=e.slice().replace(ic[0],"###$1").split(ic[1]).slice(1)).length;us)for(d=1,l=r.length;d1&&(n*=p=Math.sqrt(p),a*=p);var A=f/n,v=l/n,m=-l/a,y=f/a,R=A*s+v*u,b=m*s+y*u,w=A*e+v*t,x=m*e+y*t,_=(w-R)*(w-R)+(x-b)*(x-b),E=1/_-.25;E<0&&(E=0);var k=Math.sqrt(E);i==r&&(k=-k);var C=.5*(R+w)-k*(x-b),O=.5*(b+x)+k*(w-R),B=Math.atan2(b-O,R-C),S=Math.atan2(x-O,w-C),F=S-B;F<0&&1===i?F+=dc:F>0&&0===i&&(F-=dc);for(var j=Math.ceil(Math.abs(F/(uc+.001))),D=[],T=0;T1e-6)if(Math.abs(c*s-u*d)>1e-6&&r){var f=n-i,g=a-o,h=s*s+u*u,p=f*f+g*g,A=Math.sqrt(h),v=Math.sqrt(l),m=r*Math.tan((xc-Math.acos((h+l-p)/(2*A*v)))/2),y=m/v,R=m/A;Math.abs(y-1)>1e-6&&(this._+="L"+(e+y*d)+","+(t+y*c)),this._+="A"+r+","+r+",0,0,"+ +(c*f>d*g)+","+(this._x1=e+R*s)+","+(this._y1=t+R*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,a,r,i){e=+e,t=+t,i=!!i;var o=(n=+n)*Math.cos(a),s=n*Math.sin(a),u=e+o,d=t+s,c=1^i,l=i?a-r:r-a;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+d:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+u+","+d),n&&(l<0&&(l=l%_c+_c),l>Ec?this._+="A"+n+","+n+",0,1,"+c+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=d):l>1e-6&&(this._+="A"+n+","+n+",0,"+ +(l>=xc)+","+c+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,a){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +a+"h"+-n+"Z"},toString:function(){return this._}};var Oc=Cc,Bc=.448084975506;function Sc(e){return e.x}function Fc(e){return e.y}function jc(e){return e.width}function Dc(e){return e.height}function Tc(e){return"function"==typeof e?e:function(){return+e}}function Mc(e,t,n){return Math.max(t,Math.min(e,n))}var Nc=function(){var e=Sc,t=Fc,n=jc,a=Dc,r=Tc(0),i=r,o=r,s=r,u=null;function d(d,c,l){var f,g=null!=c?c:+e.call(this,d),h=null!=l?l:+t.call(this,d),p=+n.call(this,d),A=+a.call(this,d),v=Math.min(p,A)/2,m=Mc(+r.call(this,d),0,v),y=Mc(+i.call(this,d),0,v),R=Mc(+o.call(this,d),0,v),b=Mc(+s.call(this,d),0,v);if(u||(u=f=Oc()),m<=0&&y<=0&&R<=0&&b<=0)u.rect(g,h,p,A);else{var w=g+p,x=h+A;u.moveTo(g+m,h),u.lineTo(w-y,h),u.bezierCurveTo(w-Bc*y,h,w,h+Bc*y,w,h+y),u.lineTo(w,x-b),u.bezierCurveTo(w,x-Bc*b,w-Bc*b,x,w-b,x),u.lineTo(g+R,x),u.bezierCurveTo(g+Bc*R,x,g,x-Bc*R,g,x-R),u.lineTo(g,h+m),u.bezierCurveTo(g,h+Bc*m,g+Bc*m,h,g+m,h),u.closePath()}if(f)return u=null,f+""||null}return d.x=function(t){return arguments.length?(e=Tc(t),d):e},d.y=function(e){return arguments.length?(t=Tc(e),d):t},d.width=function(e){return arguments.length?(n=Tc(e),d):n},d.height=function(e){return arguments.length?(a=Tc(e),d):a},d.cornerRadius=function(e,t,n,a){return arguments.length?(r=Tc(e),i=null!=t?Tc(t):r,s=null!=n?Tc(n):r,o=null!=a?Tc(a):i,d):r},d.context=function(e){return arguments.length?(u=null==e?null:e,d):u},d},Uc=function(){var e,t,n,a,r,i,o,s,u=null;function d(e,t,n){var a=n/2;if(r){var d=o-t,c=e-i;if(d||c){var l=Math.sqrt(d*d+c*c),f=(d/=l)*s,g=(c/=l)*s,h=Math.atan2(c,d);u.moveTo(i-f,o-g),u.lineTo(e-d*a,t-c*a),u.arc(e,t,a,h-Math.PI,h),u.lineTo(i+f,o+g),u.arc(i,o,s,h,h+Math.PI)}else u.arc(e,t,a,0,dc);u.closePath()}else r=1;i=e,o=t,s=a}function c(i){var o,s,c,l=i.length,f=!1;for(null==u&&(u=c=Oc()),o=0;o<=l;++o)!(oS*S+F*F&&(_=k,E=C),{cx:_,cy:E,x01:-c,y01:-l,x11:_*(r/b-1),y11:E*(r/b-1)}}var Wc=function(){var e=Lc,t=Ic,n=Pc(0),a=null,r=Qc,i=Hc,o=zc,s=null;function u(){var u,d,c=+e.apply(this,arguments),l=+t.apply(this,arguments),f=r.apply(this,arguments)-Ed,g=i.apply(this,arguments)-Ed,h=vd(g-f),p=g>f;if(s||(s=u=Oc()),l1e-12)if(h>kd-1e-12)s.moveTo(l*yd(f),l*wd(f)),s.arc(0,0,l,f,g,!p),c>1e-12&&(s.moveTo(c*yd(g),c*wd(g)),s.arc(0,0,c,g,f,p));else{var A,v,m=f,y=g,R=f,b=g,w=h,x=h,_=o.apply(this,arguments)/2,E=_>1e-12&&(a?+a.apply(this,arguments):xd(c*c+l*l)),k=bd(vd(l-c)/2,+n.apply(this,arguments)),C=k,O=k;if(E>1e-12){var B=Od(E/c*wd(_)),S=Od(E/l*wd(_));(w-=2*B)>1e-12?(R+=B*=p?1:-1,b-=B):(w=0,R=b=(f+g)/2),(x-=2*S)>1e-12?(m+=S*=p?1:-1,y-=S):(x=0,m=y=(f+g)/2)}var F=l*yd(m),j=l*wd(m),D=c*yd(b),T=c*wd(b);if(k>1e-12){var M,N=l*yd(y),U=l*wd(y),P=c*yd(R),L=c*wd(R);if(h<_d&&(M=Kc(F,j,P,L,N,U,D,T))){var I=F-M[0],Q=j-M[1],H=N-M[0],z=U-M[1],K=1/wd(Cd((I*H+Q*z)/(xd(I*I+Q*Q)*xd(H*H+z*z)))/2),V=xd(M[0]*M[0]+M[1]*M[1]);C=bd(k,(c-V)/(K-1)),O=bd(k,(l-V)/(K+1))}}x>1e-12?O>1e-12?(A=Vc(P,L,F,j,l,O,p),v=Vc(N,U,D,T,l,O,p),s.moveTo(A.cx+A.x01,A.cy+A.y01),O1e-12&&w>1e-12?C>1e-12?(A=Vc(D,T,N,U,c,-C,p),v=Vc(F,j,P,L,c,-C,p),s.lineTo(A.cx+A.x01,A.cy+A.y01),C=c;--l)s.point(A[l],v[l]);s.lineEnd(),s.areaEnd()}p&&(A[d]=+e(f,d,u),v[d]=+n(f,d,u),s.point(t?+t(f,d,u):A[d],a?+a(f,d,u):v[d]))}if(g)return s=null,g+""||null}function d(){return Xc().defined(r).curve(o).context(i)}return u.x=function(n){return arguments.length?(e="function"==typeof n?n:Pc(+n),t=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:Pc(+t),u):e},u.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:Pc(+e),u):t},u.y=function(e){return arguments.length?(n="function"==typeof e?e:Pc(+e),a=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:Pc(+e),u):n},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:Pc(+e),u):a},u.lineX0=u.lineY0=function(){return d().x(e).y(n)},u.lineY1=function(){return d().x(e).y(a)},u.lineX1=function(){return d().x(t).y(n)},u.defined=function(e){return arguments.length?(r="function"==typeof e?e:Pc(!!e),u):r},u.curve=function(e){return arguments.length?(o=e,null!=i&&(s=o(i)),u):o},u.context=function(e){return arguments.length?(null==e?i=s=null:s=o(i=e),u):i},u},Jc={draw:function(e,t){var n=Math.sqrt(t/_d);e.moveTo(n,0),e.arc(0,0,n,0,kd)}},$c=(Math.sqrt(1/3),Math.sin(_d/10),Math.sin(7*_d/10),Math.sin(kd/10),Math.cos(kd/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){var e=Pc(Jc),t=Pc(64),n=null;function a(){var a;if(n||(n=a=Oc()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return a.type=function(t){return arguments.length?(e="function"==typeof t?t:Pc(t),a):e},a.size=function(e){return arguments.length?(t="function"==typeof e?e:Pc(+e),a):t},a.context=function(e){return arguments.length?(n=null==e?null:e,a):n},a});function Zc(e,t){return null!=e?e:t}var el=function(e){return e.x||0},tl=function(e){return e.y||0},nl=function(e){return!(!1===e.defined)},al=Wc().startAngle((function(e){return e.startAngle||0})).endAngle((function(e){return e.endAngle||0})).padAngle((function(e){return e.padAngle||0})).innerRadius((function(e){return e.innerRadius||0})).outerRadius((function(e){return e.outerRadius||0})).cornerRadius((function(e){return e.cornerRadius||0})),rl=Yc().x(el).y1(tl).y0((function(e){return(e.y||0)+(e.height||0)})).defined(nl),il=Yc().y(tl).x1(el).x0((function(e){return(e.x||0)+(e.width||0)})).defined(nl),ol=Xc().x(el).y(tl).defined(nl),sl=Nc().x(el).y(tl).width((function(e){return e.width||0})).height((function(e){return e.height||0})).cornerRadius((function(e){return Zc(e.cornerRadiusTopLeft,e.cornerRadius)||0}),(function(e){return Zc(e.cornerRadiusTopRight,e.cornerRadius)||0}),(function(e){return Zc(e.cornerRadiusBottomRight,e.cornerRadius)||0}),(function(e){return Zc(e.cornerRadiusBottomLeft,e.cornerRadius)||0})),ul=$c().type((function(e){return bc(e.shape||"circle")})).size((function(e){return Zc(e.size,64)})),dl=Uc().x(el).y(tl).defined(nl).size((function(e){return e.size||1}));function cl(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function ll(e,t,n,a){return sl.context(e)(t,n,a)}var fl,gl,hl,pl=function(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){var a=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(a+(n?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,a):0))}return e},Al=dc-1e-8;function vl(e){return fl=e,vl}function ml(){}function yl(e,t){fl.add(e,t)}function Rl(e,t){yl(gl=e,hl=t)}function bl(e){yl(e,fl.y1)}function wl(e){yl(fl.x1,e)}function xl(e,t,n,a){var r=(e-t)/(e+n-2*t);01e-14?(i=s*s+u*o)>=0&&(d=(-s+(i=Math.sqrt(i)))/o,c=(-s-i)/o):d=.5*u/s,0Al)yl(e-n,t-n),yl(e+n,t+n);else{var o,s,u=function(a){return yl(n*Math.cos(a)+e,n*Math.sin(a)+t)};if(u(a),u(r),r!==a)if((a%=dc)<0&&(a+=dc),(r%=dc)<0&&(r+=dc),rr;++s,o-=uc)u(o);else for(o=a-a%uc+uc,s=0;s<4&&oA)return!1;s>p&&(p=s)}else if(i>0){if(s0&&(e.globalAlpha=n,e.fillStyle=Nl(e,t,t.fill),!0)},Pl=[],Ll=function(e,t,n){var a=null!=(a=t.strokeWidth)?a:1;return!(a<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Nl(e,t,t.stroke),e.lineWidth=a,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||Pl),e.lineDashOffset=t.strokeDashOffset||0),!0)};function Il(e,t){return e.zindex-t.zindex||e.index-t.index}function Ql(e){if(!e.zdirty)return e.zitems;var t,n,a,r=e.items,i=[];for(n=0,a=r.length;n=0;)if(n=t(r[a]))return n;if(r===i)for(a=(r=e.items).length;--a>=0;)if(!r[a].zindex&&(n=t(r[a])))return n;return null}function Kl(e){return function(t,n,a){Hl(n,(function(n){a&&!a.intersects(n.bounds)||Vl(e,t,n,n)}))}}function Vl(e,t,n,a){var r=null==n.opacity?1:n.opacity;0!==r&&(e(t,a)||(Dl(t,n),n.fill&&Ul(t,n,r)&&t.fill(),n.stroke&&Ll(t,n,r)&&t.stroke()))}function Wl(e){return e=e||he.gb,function(t,n,a,r,i,o){return a*=t.pixelRatio,r*=t.pixelRatio,zl(n,(function(n){var s=n.bounds;if((!s||s.contains(i,o))&&s)return e(t,n,a,r,i,o)?n:void 0}))}}function ql(e,t){return function(n,a,r,i){var o,s,u=Array.isArray(a)?a[0]:a,d=null==t?u.fill:t,c=u.stroke&&n.isPointInStroke;return c&&(o=u.strokeWidth,s=u.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,a)&&(d&&n.isPointInPath(r,i)||c&&n.isPointInStroke(r,i))}}function Gl(e){return Wl(ql(e))}function Xl(e,t){return"translate("+e+","+t+")"}function Yl(e){return"rotate("+e+")"}function Jl(e){return Xl(e.x||0,e.y||0)}function $l(e){return Xl(e.x||0,e.y||0)+(e.angle?" "+Yl(e.angle):"")+(e.scaleX||e.scaleY?" "+function(e,t){return"scale("+e+","+t+")"}(e.scaleX||1,e.scaleY||1):"")}var Zl=function(e,t,n){function a(e,n){var a=n.x||0,r=n.y||0,i=n.angle||0;e.translate(a,r),i&&e.rotate(i*=sc),e.beginPath(),t(e,n),i&&e.rotate(-i),e.translate(-a,-r)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",$l(n)),e("d",t(null,n))},bound:function(e,n){var a=n.x||0,r=n.y||0;return t(vl(e),n),pl(e,n).translate(a,r),n.angle&&e.rotate(n.angle*sc,a,r),e},draw:Kl(a),pick:Gl(a),isect:n||Ol(a)}},ef=Zl("arc",(function(e,t){return al.context(e)(t)})),tf=function(e,t,n){function a(e,n){e.beginPath(),t(e,n)}var r,i=ql(a);return{type:e,tag:"path",nested:!0,attr:function(e,n){var a=n.mark.items;a.length&&e("d",t(null,a))},bound:function(e,n){var a=n.items;return 0===a.length?e:(t(vl(e),a),pl(e,a[0]))},draw:(r=a,function(e,t,n){!t.items.length||n&&!n.intersects(t.bounds)||Vl(r,e,t.items[0],t.items)}),pick:function(e,t,n,a,r,o){var s=t.items,u=t.bounds;return!s||!s.length||u&&!u.contains(r,o)?null:(n*=e.pixelRatio,a*=e.pixelRatio,i(e,s,n,a)?s[0]:null)},isect:Bl,tip:n}},nf=tf("area",(function(e,t){var n=t[0],a=n.interpolate||"linear";return("horizontal"===n.orient?il:rl).curve(ac(a,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,a,r="horizontal"===e[0].orient?t[1]:t[0],i="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(a=Math.abs(e[o][i]-r)).5&&t<1.5?.5-Math.abs(t-1):0}function df(e,t){var n=uf(t);e("d",ll(null,t,n,n))}function cf(e,t,n,a){var r=uf(t);e.beginPath(),ll(e,t,(n||0)+r,(a||0)+r)}var lf=ql(cf),ff=ql(cf,!1),gf={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",Jl(t))},bound:function(e,t){if(!t.clip&&t.items)for(var n=t.items,a=0,r=n.length;ap||iA)))return e.save(),e.translate(g,h),g=r-g,h=i-h,m&&cl(d)&&!lf(e,d,s,u)?(e.restore(),null):(l=d.strokeForeground,(f=!1!==t.interactive)&&l&&d.stroke&&ff(e,d,s,u)?(e.restore(),d):(!(c=zl(d,(function(e){return function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,g,h)?o.pick(e,n,a,g,h):null})))&&f&&(d.fill||!l&&d.stroke)&&lf(e,d,s,u)&&(c=d),e.restore(),c||null))}))},isect:Sl,content:function(e,t,n){e("clip-path",t.clip?sf(n,t,t):null)},background:function(e,t){e("class","background"),df(e,t)},foreground:function(e,t){e("class","foreground"),t.strokeForeground?df(e,t):e("d","")}};function hf(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((function(t){e.image=t,e.image.url=e.url}))),n}function pf(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function Af(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function vf(e,t){return"center"===e?t/2:"right"===e?t:0}function mf(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var yf={type:"image",tag:"image",nested:!1,attr:function(e,t,n){var a=hf(t,n),r=t.x||0,i=t.y||0,o=pf(t,a),s=Af(t,a),u=!1===t.aspect?"none":"xMidYMid";r-=vf(t.align,o),i-=mf(t.baseline,s),!a.src&&a.toDataURL?e("href",a.toDataURL(),"http://www.w3.org/1999/xlink","xlink:href"):e("href",a.src||"","http://www.w3.org/1999/xlink","xlink:href"),e("transform",Xl(r,i)),e("width",o),e("height",s),e("preserveAspectRatio",u)},bound:function(e,t){var n=t.image,a=t.x||0,r=t.y||0,i=pf(t,n),o=Af(t,n);return a-=vf(t.align,i),r-=mf(t.baseline,o),e.set(a,r,a+i,r+o)},draw:function(e,t,n){var a=this;Hl(t,(function(t){if(!n||n.intersects(t.bounds)){var r,i,o,s,u=hf(t,a),d=t.x||0,c=t.y||0,l=pf(t,u),f=Af(t,u);d-=vf(t.align,l),c-=mf(t.baseline,f),!1!==t.aspect&&(i=u.width/u.height,o=t.width/t.height,i==i&&o==o&&i!==o&&(o=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(a=e[i].y-t[1])*a1?e:e[0]:e}(e.lineBreak&&e.text&&!Object(he.A)(e.text)?e.text.split(e.lineBreak):e.text)}function Lf(e){var t=Pf(e);return(Object(he.A)(t)?t.length-1:0)*Uf(e)}function If(e,t){var n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,a=function(e){if(Sf.width===Tf){var t=Hf(e);return function(e){return Mf(e,t)}}var n=Nf(e);return function(e){return Df(e,n)}}(e);if(a(t)>>1,a(t.slice(r))>n?s=r+1:u=r;return i+t.slice(s)}for(;s>>1),a(t.slice(0,r))=0;)if(!1!==e[r].defined&&(n=e[r].x-t[0])*n+(a=e[r].y-t[1])*a<(n=e[r].size||1)*n)return e[r];return null}))},Xf=function(e,t,n){var a=Gf[e.mark.marktype],r=t||a.bound;return a.nested&&(e=e.mark),r(e.bounds||(e.bounds=new cu),e,n)},Yf={mark:null},Jf=function(e,t,n){var a,r,i,o,s=Gf[e.marktype],u=s.bound,d=e.items,c=d&&d.length;if(s.nested)return c?i=d[0]:(Yf.mark=e,i=Yf),o=Xf(i,u,n),t&&t.union(o)||o;if(t=t||e.bounds&&e.bounds.clear()||new cu,c)for(a=0,r=d.length;at;)e.removeChild(n[--a]);return e}function ug(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}ng.toJSON=function(e){return Zf(this.root,e||0)},ng.mark=function(e,t,n){var a=ag(e,t=t||this.root.items[0]);return t.items[n]=a,a.zindex&&(a.group.zdirty=!0),a};var dg=function(e,t){var n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]};function cg(e,t){this._active=null,this._handlers={},this._loader=e||Xu(),this._tooltip=t||lg}function lg(e,t,n,a){e.element().setAttribute("title",a||"")}var fg=cg.prototype;function gg(e){this._el=null,this._bgcolor=null,this._loader=new Yu(e)}fg.initialize=function(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},fg.element=function(){return this._el},fg.canvas=function(){return this._el&&this._el.firstChild},fg.origin=function(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},fg.scene=function(e){return arguments.length?(this._scene=e,this):this._scene},fg.on=function(){},fg.off=function(){},fg._handlerIndex=function(e,t,n){for(var a=e?e.length:0;--a>=0;)if(e[a].type===t&&(!n||e[a].handler===n))return a;return-1},fg.handlers=function(e){var t,n=this._handlers,a=[];if(e)a.push.apply(a,n[this.eventName(e)]);else for(t in n)a.push.apply(a,n[t]);return a},fg.eventName=function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},fg.handleHref=function(e,t,n){this._loader.sanitize(n,{context:"href"}).then((function(t){var n=new MouseEvent(e.type,e),a=rg(null,"a");for(var r in t)a.setAttribute(r,t[r]);a.dispatchEvent(n)})).catch((function(){}))},fg.handleTooltip=function(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,a){var r,i,o=e&&e.mark;if(o&&(r=Gf[o.marktype]).tip){for((i=dg(t,n))[0]-=a[0],i[1]-=a[1];e=e.mark.group;)i[0]-=e.x||0,i[1]-=e.y||0;e=r.tip(o.items,i)}return e}(t,e,this.canvas(),this._origin);var a=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,a)}},fg.getItemBoundingClientRect=function(e){if(t=this.canvas()){for(var t,n=t.getBoundingClientRect(),a=this._origin,r=e.bounds,i=r.x1+a[0]+n.left,o=r.y1+a[1]+n.top,s=r.width(),u=r.height();e.mark&&(e=e.mark.group);)i+=e.x||0,o+=e.y||0;return{x:i,y:o,width:s,height:u,left:i,top:o,right:i+s,bottom:o+u}}};var hg=gg.prototype;function pg(e,t){cg.call(this,e,t),this._down=null,this._touch=null,this._first=!0}hg.initialize=function(e,t,n,a,r){return this._el=e,this.resize(t,n,a,r)},hg.element=function(){return this._el},hg.canvas=function(){return this._el&&this._el.firstChild},hg.background=function(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},hg.resize=function(e,t,n,a){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=a||1,this},hg.dirty=function(){},hg.render=function(e){var t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},hg._render=function(){},hg.renderAsync=function(e){var t=this.render(e);return this._ready?this._ready.then((function(){return t})):Promise.resolve(t)},hg._load=function(e,t){var n=this,a=n._loader[e](t);if(!n._ready){var r=n._call;n._ready=n._loader.ready().then((function(e){e&&r(),n._ready=null}))}return a},hg.sanitizeURL=function(e){return this._load("sanitizeURL",e)},hg.loadImage=function(e){return this._load("loadImage",e)};var Ag=Object(he.y)(pg,cg);function vg(e,t,n){return function(a){var r=this._active,i=this.pickEvent(a);i===r||(r&&r.exit||this.fire(n,a),this._active=i,this.fire(t,a)),this.fire(e,a)}}function mg(e){return function(t){this.fire(e,t),this._active=null}}Ag.initialize=function(e,t,n){var a=this._canvas=e&&ig(e,"canvas");if(a){var r=this;this.events.forEach((function(e){a.addEventListener(e,(function(t){Ag[e]?Ag[e].call(r,t):r.fire(e,t)}))}))}return cg.prototype.initialize.call(this,e,t,n)},Ag.canvas=function(){return this._canvas},Ag.context=function(){return this._canvas.getContext("2d")},Ag.events=["keydown","keypress","keyup","dragenter","dragleave","dragover","mousedown","mouseup","mousemove","mouseout","mouseover","click","dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],Ag.DOMMouseScroll=function(e){this.fire("mousewheel",e)},Ag.mousemove=vg("mousemove","mouseover","mouseout"),Ag.dragover=vg("dragover","dragenter","dragleave"),Ag.mouseout=mg("mouseout"),Ag.dragleave=mg("dragleave"),Ag.mousedown=function(e){this._down=this._active,this.fire("mousedown",e)},Ag.click=function(e){this._down===this._active&&(this.fire("click",e),this._down=null)},Ag.touchstart=function(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",e,!0)},Ag.touchmove=function(e){this.fire("touchmove",e,!0)},Ag.touchend=function(e){this.fire("touchend",e,!0),this._touch=null},Ag.fire=function(e,t,n){var a,r,i=n?this._touch:this._active,o=this._handlers[e];if(t.vegaType=e,"click"===e&&i&&i.href?this.handleHref(t,i,i.href):"mousemove"!==e&&"mouseout"!==e||this.handleTooltip(t,i,"mouseout"!==e),o)for(a=0,r=o.length;a=0&&a.splice(r,1),this},Ag.pickEvent=function(e){var t=dg(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},Ag.pick=function(e,t,n,a,r){var i=this.context();return Gf[e.marktype].pick.call(this,i,e,t,n,a,r)};var yg="undefined"!=typeof window&&window.devicePixelRatio||1;function Rg(e){gg.call(this,e),this._redraw=!1,this._dirty=new cu}var bg=Object(he.y)(Rg,gg),wg=gg.prototype,xg=new cu;function _g(e,t,n){return xg.set(0,0,t,n).translate(-e[0],-e[1])}function Eg(e,t){cg.call(this,e,t);var n=this;n._hrefHandler=Cg(n,(function(e,t){t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=Cg(n,(function(e,t){n.handleTooltip(e,t,"mouseout"!==e.type)}))}bg.initialize=function(e,t,n,a,r,i){return this._options=i,this._canvas=yu(1,1,i&&i.type),e&&(sg(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),wg.initialize.call(this,e,t,n,a,r)},bg.resize=function(e,t,n,a){return wg.resize.call(this,e,t,n,a),function(e,t,n,a,r,i){var o="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),u=o?yg:r;for(var d in e.width=t*u,e.height=n*u,i)s[d]=i[d];o&&1!==u&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=u,s.setTransform(u,0,0,u,u*a[0],u*a[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options&&this._options.context),this._redraw=!0,this},bg.canvas=function(){return this._canvas},bg.context=function(){return this._canvas?this._canvas.getContext("2d"):null},bg.dirty=function(e){var t=function(e,t){if(null==t)return e;for(var n=xg.clear().union(e);null!=t;t=t.mark.group)n.translate(t.x||0,t.y||0);return n}(e.bounds,e.mark.group);this._dirty.union(t)},bg._render=function(e){var t=this.context(),n=this._origin,a=this._width,r=this._height,i=this._dirty;return t.save(),this._redraw||i.empty()?(this._redraw=!1,i=_g(n,a,r).expand(1)):i=function(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,i.intersect(_g(n,a,r)),n),this.clear(-n[0],-n[1],a,r),this.draw(t,e,i),t.restore(),this._dirty.clear(),this},bg.draw=function(e,t,n){var a=Gf[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),Object(he.D)(n)?(e.beginPath(),n(e),e.clip()):af(e,t.group)}(e,t),a.draw.call(this,e,t,n),t.clip&&e.restore()},bg.clear=function(e,t,n,a){var r=this.context();r.clearRect(e,t,n,a),null!=this._bgcolor&&(r.fillStyle=this._bgcolor,r.fillRect(e,t,n,a))};var kg=Object(he.y)(Eg,cg);function Cg(e,t){return function(n){var a=n.target.__data__;n.vegaType=n.type,a=Array.isArray(a)?a[0]:a,t.call(e._obj,n,a)}}function Og(e,t,n){var a,r,i="<"+e;if(t)for(a in t)null!=(r=t[a])&&(i+=" "+a+'="'+r+'"');return n&&(i+=" "+n),i+">"}function Bg(e){return""}kg.initialize=function(e,t,n){var a=this._svg;return a&&(a.removeEventListener("click",this._hrefHandler),a.removeEventListener("mousemove",this._tooltipHandler),a.removeEventListener("mouseout",this._tooltipHandler)),this._svg=a=e&&ig(e,"svg"),a&&(a.addEventListener("click",this._hrefHandler),a.addEventListener("mousemove",this._tooltipHandler),a.addEventListener("mouseout",this._tooltipHandler)),cg.prototype.initialize.call(this,e,t,n)},kg.canvas=function(){return this._svg},kg.on=function(e,t){var n=this.eventName(e),a=this._handlers;if(this._handlerIndex(a[n],e,t)<0){var r={type:e,handler:t,listener:Cg(this,t)};(a[n]||(a[n]=[])).push(r),this._svg&&this._svg.addEventListener(n,r.listener)}return this},kg.off=function(e,t){var n=this.eventName(e),a=this._handlers[n],r=this._handlerIndex(a,e,t);return r>=0&&(this._svg&&this._svg.removeEventListener(n,a[r].listener),a.splice(r,1)),this};var Sg={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},Fg={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity",blend:"mix-blend-mode"},jg=Object.keys(Fg),Dg=Sg.xmlns;function Tg(e){gg.call(this,e),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var Mg=Object(he.y)(Tg,gg),Ng=gg.prototype;function Ug(e,t,n){var a,r,i;if("radial"===t.gradient){var o=og(e,n++,"pattern",Dg);o.setAttribute("id","p_"+t.id),o.setAttribute("viewBox","0,0,1,1"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("preserveAspectRatio","xMidYMid slice"),(o=og(o,0,"rect",Dg)).setAttribute("width","1"),o.setAttribute("height","1"),o.setAttribute("fill","url("+Wg()+"#"+t.id+")"),(e=og(e,n++,"radialGradient",Dg)).setAttribute("id",t.id),e.setAttribute("fx",t.x1),e.setAttribute("fy",t.y1),e.setAttribute("fr",t.r1),e.setAttribute("cx",t.x2),e.setAttribute("cy",t.y2),e.setAttribute("r",t.r2)}else(e=og(e,n++,"linearGradient",Dg)).setAttribute("id",t.id),e.setAttribute("x1",t.x1),e.setAttribute("x2",t.x2),e.setAttribute("y1",t.y1),e.setAttribute("y2",t.y2);for(a=0,r=t.stops.length;a1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}Mg.initialize=function(e,t,n,a){return e&&(this._svg=og(e,0,"svg",Dg),this._svg.setAttribute("class","marks"),sg(e,1),this._root=og(this._svg,0,"g",Dg),sg(this._svg,1)),this._defs={gradient:{},clipping:{}},this.background(this._bgcolor),Ng.initialize.call(this,e,t,n,a)},Mg.background=function(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),Ng.background.apply(this,arguments)},Mg.resize=function(e,t,n,a){return Ng.resize.call(this,e,t,n,a),this._svg&&(this._svg.setAttribute("width",this._width*this._scale),this._svg.setAttribute("height",this._height*this._scale),this._svg.setAttribute("viewBox","0 0 "+this._width+" "+this._height),this._root.setAttribute("transform","translate("+this._origin+")")),this._dirty=[],this},Mg.canvas=function(){return this._svg},Mg.svg=function(){if(!this._svg)return null;var e={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var t in Sg)e[t]=Sg[t];var n=this._bgcolor?Og("rect",{width:this._width,height:this._height,style:"fill: "+this._bgcolor+";"})+Bg("rect"):"";return Og("svg",e)+n+this._svg.innerHTML+Bg("svg")},Mg._render=function(e){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,e),sg(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},Mg.updateDefs=function(){var e,t=this._svg,n=this._defs,a=n.el,r=0;for(e in n.gradient)a||(n.el=a=og(t,0,"defs",Dg)),r=Ug(a,n.gradient[e],r);for(e in n.clipping)a||(n.el=a=og(t,0,"defs",Dg)),r=Pg(a,n.clipping[e],r);a&&(0===r?(t.removeChild(a),n.el=null):sg(a,r))},Mg._resetDefs=function(){var e=this._defs;e.gradient={},e.clipping={}},Mg.dirty=function(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},Mg.isDirty=function(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},Mg._dirtyCheck=function(){this._dirtyAll=!0;var e=this._dirty;if(!e.length||!this._dirtyID)return!0;var t,n,a,r,i,o,s,u=++this._dirtyID;for(i=0,o=e.length;i/g,">")}Xg.resize=function(e,t,n,a){Yg.resize.call(this,e,t,n,a);var r=this._origin,i=this._text,o={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var s in Sg)o[s]=Sg[s];i.head=Og("svg",o);var u=this._bgcolor;return"transparent"!==u&&"none"!==u||(u=null),i.bg=u?Og("rect",{width:this._width,height:this._height,style:"fill: "+u+";"})+Bg("rect"):"",i.root=Og("g",{transform:"translate("+r+")"}),i.foot=Bg("g")+Bg("svg"),this},Xg.background=function(){var e=Yg.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),e},Xg.svg=function(){var e=this._text;return e.head+e.bg+e.defs+e.root+e.body+e.foot},Xg._render=function(e){return this._text.body=this.mark(e),this._text.defs=this.buildDefs(),this},Xg.buildDefs=function(){var e,t,n,a,r,i=this._defs,o="";for(t in i.gradient){for(r=(n=i.gradient[t]).stops,"radial"===n.gradient?(o+=Og(a="pattern",{id:"p_"+t,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),o+=Og("rect",{width:"1",height:"1",fill:"url(#"+t+")"})+Bg("rect"),o+=Bg(a),o+=Og(a="radialGradient",{id:t,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):o+=Og(a="linearGradient",{id:t,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2}),e=0;e0?Og("defs")+o+Bg("defs"):""},Xg.attributes=function(e,t){return Gg={},e(Jg,t,this),Gg},Xg.href=function(e){var t,n=this,a=e.href;if(a){if(t=n._hrefs&&n._hrefs[a])return t;n.sanitizeURL(a).then((function(e){e["xlink:href"]=e.href,e.href=null,(n._hrefs||(n._hrefs={}))[a]=e}))}return null},Xg.mark=function(e){var t,n=this,a=Gf[e.marktype],r=a.tag,i=this._defs,o="";function s(s){var u=n.href(s);if(u&&(o+=Og("a",u)),t="g"!==r?$g(s,e,r,i):null,o+=Og(r,n.attributes(a.attr,s),t),"text"===r){var d=Pf(s);if(Object(he.A)(d))for(var c={x:0,dy:Uf(s)},l=0;l1?(th[e]=t,this):th[e]}function ah(e,t,n){var a=[],r=(new cu).union(t),i=e.marktype;return i?rh(e,r,n,a):"group"===i?ih(e,r,n,a):Object(he.n)("Intersect scene must be mark node or group item.")}function rh(e,t,n,a){if(function(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){var r=e.items,i=e.marktype,o=r.length,s=0;if("group"===i)for(;s=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(!dh(e[n=r[a]],t[n],n))return!1;return typeof e==typeof t}(e,t):e==t)}function ch(e,t){return dh(oc(e),oc(t))}function lh(e){qa.call(this,null,e)}function fh(e,t,n){return t(e.bounds.clear(),e,n)}function gh(e){qa.call(this,0,e)}function hh(e){qa.call(this,null,e)}function ph(e){qa.call(this,null,e)}Object(he.y)(lh,qa).transform=function(e,t){var n,a=t.dataflow,r=e.mark,i=r.marktype,o=Gf[i],s=o.bound,u=r.bounds;if(o.nested)r.items.length&&a.dirty(r.items[0]),u=fh(r,s),r.items.forEach((function(e){e.bounds.clear().union(u)}));else if("group"===i||e.modified())switch(t.visit(t.MOD,(function(e){a.dirty(e)})),u.clear(),r.items.forEach((function(e){u.union(fh(e,s))})),r.role){case"axis":case"legend":case"title":t.reflow()}else n=t.changed(t.REM),t.visit(t.ADD,(function(e){u.union(fh(e,s))})),t.visit(t.MOD,(function(e){n=n||u.alignsWith(e.bounds),a.dirty(e),u.union(fh(e,s))})),n&&(u.clear(),r.items.forEach((function(e){u.union(e.bounds)})));return uh(r),t.modifies("bounds")},gh.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},Object(he.y)(gh,qa).transform=function(e,t){var n=function(e){var t=e._signals[":vega_identifier:"];return t||(e._signals[":vega_identifier:"]=t=e.add(0)),t}(t.dataflow),a=n.value,r=e.as;return t.visit(t.ADD,(function(e){e[r]||(e[r]=++a)})),n.set(this.value=a),t},Object(he.y)(hh,qa).transform=function(e,t){var n=this.value;n||((n=t.dataflow.scenegraph().mark(e.markdef,function(e){var t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index)).group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);var a="group"===n.marktype?mu:vu;return t.visit(t.ADD,(function(e){a.call(e,n)})),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t};var Ah=Object(he.y)(ph,qa),vh={parity:function(e){return e.filter((function(e,t){return t%2?e.opacity=0:1}))},greedy:function(e,t){var n;return e.filter((function(e,a){return a&&mh(n.bounds,e.bounds,t)?e.opacity=0:(n=e,1)}))}};function mh(e,t,n){return n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2)}function yh(e,t){for(var n,a=1,r=e.length,i=e[0].bounds;a1&&t.height()>1}function bh(e){return e.forEach((function(e){return e.opacity=1})),e}function wh(e,t){return e.reflow(t.modified()).modifies("opacity")}function xh(e){qa.call(this,null,e)}Ah.transform=function(e,t){var n,a,r,i=vh[e.method]||vh.parity,o=t.materialize(t.SOURCE).source,s=e.separation||0;if(o&&o.length){if(!e.method)return e.modified("method")&&(bh(o),t=wh(t,e)),t;if((o=o.filter(Rh)).length){if(e.sort&&(o=o.slice().sort(e.sort)),n=bh(o),t=wh(t,e),n.length>=3&&yh(n,s)){do{n=i(n,s)}while(n.length>=3&&yh(n,s));n.length<3&&!Object(he.U)(o).opacity&&(n.length>1&&(Object(he.U)(n).opacity=0),Object(he.U)(o).opacity=1)}return e.boundScale&&e.boundTolerance>=0&&(a=function(e,t,n){var a=e.range(),r=new cu;return t===iu||"bottom"===t?r.set(a[0],-1/0,a[1],1/0):r.set(-1/0,a[0],1/0,a[1]),r.expand(n||1),function(e){return r.encloses(e.bounds)}}(e.boundScale,e.boundOrient,+e.boundTolerance),o.forEach((function(e){a(e)||(e.opacity=0)}))),r=n[0].mark.bounds.clear(),o.forEach((function(e){e.opacity&&r.union(e.bounds)})),t}}},Object(he.y)(xh,qa).transform=function(e,t){var n=t.dataflow;if(t.visit(t.ALL,(function(e){n.dirty(e)})),t.fields&&t.fields.zindex){var a=t.source&&t.source[0];a&&(a.mark.zdirty=!0)}};var _h=new cu;function Eh(e,t,n){return e[t]===n?0:(e[t]=n,1)}function kh(e){var t=e.items[0].datum.orient;return t===ou||t===su}function Ch(e,t,n,a){var r,i,o=t.items[0],s=o.datum,u=s.orient,d=null!=s.translate?s.translate:.5,c=function(e){var t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(s),l=o.range,f=o.offset,g=o.position,h=o.minExtent,p=o.maxExtent,A=s.title&&o.items[c[2]].items[0],v=o.titlePadding,m=o.bounds,y=A&&Lf(A),R=0,b=0;switch(_h.clear().union(m),m.clear(),(r=c[0])>-1&&m.union(o.items[r].bounds),(r=c[1])>-1&&m.union(o.items[r].bounds),u){case iu:R=g||0,b=-f,i=Math.max(h,Math.min(p,-m.y1)),m.add(0,-i).add(l,0),A&&Oh(e,A,i,v,y,0,-1,m);break;case ou:R=-f,b=g||0,i=Math.max(h,Math.min(p,-m.x1)),m.add(-i,0).add(0,l),A&&Oh(e,A,i,v,y,1,-1,m);break;case su:R=n+f,b=g||0,i=Math.max(h,Math.min(p,m.x2)),m.add(0,0).add(i,l),A&&Oh(e,A,i,v,y,1,1,m);break;case"bottom":R=g||0,b=a+f,i=Math.max(h,Math.min(p,m.y2)),m.add(0,0).add(l,i),A&&Oh(e,A,i,v,0,0,1,m);break;default:R=o.x,b=o.y}return pl(m.translate(R,b),o),Eh(o,"x",R+d)|Eh(o,"y",b+d)&&(o.bounds=_h,e.dirty(o),o.bounds=m,e.dirty(o)),o.mark.bounds.clear().union(m)}function Oh(e,t,n,a,r,i,o,s){var u=t.bounds;if(t.auto){var d=o*(n+r+a),c=0,l=0;e.dirty(t),i?c=(t.x||0)-(t.x=d):l=(t.y||0)-(t.y=d),t.mark.bounds.clear().union(u.translate(-c,-l)),e.dirty(t)}s.union(u)}var Bh=n(8);function Sh(e){return(new cu).set(0,0,e.width||0,e.height||0)}function Fh(e){var t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function jh(e,t,n){var a=Object(he.F)(e)?e[t]:e;return null!=a?a:void 0!==n?n:0}function Dh(e){return e<0?Math.ceil(-e):0}function Th(e,t,n){var a,r,i,o,s,u,d,c,l,f,g,h=!n.nodirty,p="flush"===n.bounds?Sh:Fh,A=_h.set(0,0,0,0),v=jh(n.align,"column"),m=jh(n.align,du),y=jh(n.padding,"column"),R=jh(n.padding,du),b=n.columns||t.length,w=b<0?1:Math.ceil(t.length/b),x=t.length,_=Array(x),E=Array(b),k=0,C=Array(x),O=Array(w),B=0,S=Array(x),F=Array(x),j=Array(x);for(r=0;r1)for(r=0;r0&&(S[r]+=l/2);if(m&&jh(n.center,du)&&1!==b)for(r=0;r0&&(F[r]+=f/2);for(r=0;rr&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),_+=i,p=0,v=t.length;p=0&&null==(R=n[A]);A-=f);s?(b=null==g?R.x:Math.round(R.bounds.x1+g*R.bounds.width()),w=_):(b=_,w=null==g?R.y:Math.round(R.bounds.y1+g*R.bounds.height())),m.union(y.bounds.translate(b-(y.x||0),w-(y.y||0))),y.x=b,y.y=w,e.dirty(y),E=o(E,m[d])}return E}function Ih(e,t,n,a,r,i){if(t){e.dirty(t);var o=n,s=n;a?o=Math.round(r.x1+i*r.width()):s=Math.round(r.y1+i*r.height()),t.bounds.translate(o-(t.x||0),s-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=s,e.dirty(t)}}function Qh(e,t,n,a,r,i,o){var s=function(e,t){var n=e[t]||{};return function(t,a){return null!=n[t]?n[t]:null!=e[t]?e[t]:a}}(n,t),u=function(e,t){var n=-1/0;return e.forEach((function(e){null!=e.offset&&(n=Math.max(n,e.offset))})),n>-1/0?n:t}(e,s("offset",0)),d=s("anchor","start"),c=d===uu?1:"middle"===d?.5:0,l={align:"each",bounds:s("bounds","flush"),columns:"vertical"===s("direction")?1:e.length,padding:s("margin",8),center:s("center"),nodirty:!0};switch(t){case ou:l.anchor={x:Math.floor(a.x1)-u,column:uu,y:c*(o||a.height()+2*a.y1),row:d};break;case su:l.anchor={x:Math.ceil(a.x2)+u,y:c*(o||a.height()+2*a.y1),row:d};break;case iu:l.anchor={y:Math.floor(r.y1)-u,row:uu,x:c*(i||r.width()+2*r.x1),column:d};break;case"bottom":l.anchor={y:Math.ceil(r.y2)+u,x:c*(i||r.width()+2*r.x1),column:d};break;case"top-left":l.anchor={x:u,y:u};break;case"top-right":l.anchor={x:i-u,y:u,column:uu};break;case"bottom-left":l.anchor={x:u,y:o-u,row:uu};break;case"bottom-right":l.anchor={x:i-u,y:o-u,column:uu,row:uu}}return l}function Hh(e,t){var n,a,r=t.items[0],i=r.datum,o=r.orient,s=r.bounds,u=r.x,d=r.y;return r._bounds?r._bounds.clear().union(s):r._bounds=s.clone(),s.clear(),function(e,t,n){var a=t.padding,r=a-n.x,i=a-n.y;if(t.datum.title){var o=t.items[1].items[0],s=o.anchor,u=t.titlePadding||0,d=a-o.x,c=a-o.y;switch(o.orient){case ou:r+=Math.ceil(o.bounds.width())+u;break;case su:case"bottom":break;default:i+=o.bounds.height()+u}switch((r||i)&&Kh(e,n,r,i),o.orient){case ou:c+=zh(t,n,o,s,1,1);break;case su:d+=zh(t,n,o,uu,0,0)+u,c+=zh(t,n,o,s,1,1);break;case"bottom":d+=zh(t,n,o,s,0,0),c+=zh(t,n,o,uu,-1,0,1)+u;break;default:d+=zh(t,n,o,s,0,0)}(d||c)&&Kh(e,o,d,c),(d=Math.round(o.bounds.x1-a))<0&&(Kh(e,n,-d,0),Kh(e,o,-d,0))}else(r||i)&&Kh(e,n,r,i)}(e,r,r.items[0].items[0]),s=function(e,t){return e.items.forEach((function(e){return t.union(e.bounds)})),t.x1=e.padding,t.y1=e.padding,t}(r,s),n=2*r.padding,a=2*r.padding,s.empty()||(n=Math.ceil(s.width()+n),a=Math.ceil(s.height()+a)),"symbol"===i.type&&function(e){var t=e.reduce((function(e,t){return e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e}),{});e.forEach((function(e){e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(r.items[0].items[0].items[0].items),"none"!==o&&(r.x=u=0,r.y=d=0),r.width=n,r.height=a,pl(s.set(u,d,u+n,d+a),r),r.mark.bounds.clear().union(s),r}function zh(e,t,n,a,r,i,o){var s="symbol"!==e.datum.type,u=n.datum.vgrad,d=(!s||!i&&u||o?t:t.items[0]).bounds[r?"y2":"x2"]-e.padding,c=u&&i?d:0,l=u&&i?0:d,f=r<=0?0:Lf(n);return Math.round("start"===a?c:a===uu?l-f:.5*(d-f))}function Kh(e,t,n,a){t.x+=n,t.y+=a,t.bounds.translate(n,a),t.mark.bounds.translate(n,a),e.dirty(t)}function Vh(e){qa.call(this,null,e)}Object(he.y)(Vh,qa).transform=function(e,t){var n=t.dataflow;return e.mark.items.forEach((function(t){e.layout&&function(e,t,n){var a,r,i,o,s,u,d,c=function(e){for(var t,n,a,r,i,o,s,u=e.items,d=u.length,c=0,l={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};c0?a:1:0},qh="log",Gh="utc",Xh="continuous",Yh=Bs(cr),Jh=Yh.right,$h=Yh.left,Zh=Jh;function ep(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function tp(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}var np=Symbol("implicit");function ap(){var e=new Map,t=[],n=[],a=np;function r(r){var i=r+"",o=e.get(i);if(!o){if(a!==np)return a;e.set(i,o=t.push(r))}return n[(o-1)%n.length]}return r.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Map;var a,i=sr(n);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o+"";e.has(s)||e.set(s,t.push(o))}}catch(e){i.e(e)}finally{i.f()}return r},r.range=function(e){return arguments.length?(n=Array.from(e),r):n.slice()},r.unknown=function(e){return arguments.length?(a=e,r):a},r.copy=function(){return ap(t,n).unknown(a)},ep.apply(r,arguments),r}function rp(){var e,t,n=ap().unknown(void 0),a=n.domain,r=n.range,i=[0,1],o=!1,s=0,u=0,d=.5;function c(){var n=a().length,c=i[1]i[1-c])))return n=Math.max(0,Jh(l,u)-1),o=u===d?n:Jh(l,d)-1,u-l[n]>t+1e-10&&++n,c&&(s=n,n=f-o,o=f-s),n>o?void 0:a().slice(n,o+1)}},n.invert=function(e){var t=n.invertRange([e,e]);return t?t[0]:t},n.copy=function(){return rp().domain(a()).range(i).round(o).paddingInner(s).paddingOuter(u).align(d)},c()}var ip=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function op(e){if(!(t=ip.exec(e)))throw new Error("invalid format: "+e);var t;return new sp({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 sp(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+""}op.prototype=sp.prototype,sp.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 up,dp,cp,lp,fp=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]},gp=function(e){return(e=fp(Math.abs(e)))?e[1]:NaN},hp=function(e,t){var n=fp(e,t);if(!n)return e+"";var a=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+a:a.length>r+1?a.slice(0,r+1)+"."+a.slice(r+1):a+new Array(r-a.length+2).join("0")},pp={"%":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.round(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 hp(100*e,t)},r:hp,s:function(e,t){var n=fp(e,t);if(!n)return e+"";var a=n[0],r=n[1],i=r-(up=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=a.length;return i===o?a:i>o?a+new Array(i-o+1).join("0"):i>0?a.slice(0,i)+"."+a.slice(i):"0."+new Array(1-i).join("0")+fp(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Ap=function(e){return e},vp=Array.prototype.map,mp=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function yp(e){return dp=function(e){var t,n,a=void 0===e.grouping||void 0===e.thousands?Ap:(t=vp.call(e.grouping,Number),n=e.thousands+"",function(e,a){for(var r=e.length,i=[],o=0,s=t[0],u=0;r>0&&s>0&&(u+s+1>a&&(s=Math.max(1,a-u)),i.push(e.substring(r-=s,r+s)),!((u+=s+1)>a));)s=t[o=(o+1)%t.length];return i.reverse().join(n)}),r=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Ap:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(vp.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",d=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function l(e){var t=(e=op(e)).fill,n=e.align,l=e.sign,f=e.symbol,g=e.zero,h=e.width,p=e.comma,A=e.precision,v=e.trim,m=e.type;"n"===m?(p=!0,m="g"):pp[m]||(void 0===A&&(A=12),v=!0,m="g"),(g||"0"===t&&"="===n)&&(g=!0,t="0",n="=");var y="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",R="$"===f?i:/[%p]/.test(m)?u:"",b=pp[m],w=/[defgprs%]/.test(m);function x(e){var r,i,u,f=y,x=R;if("c"===m)x=b(e)+x,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),A),v&&(e=function(e){e:for(var t,n=e.length,a=1,r=-1;a0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),_&&0==+e&&"+"!==l&&(_=!1),f=(_?"("===l?l:d:"-"===l||"("===l?"":l)+f,x=("s"===m?mp[8+up/3]:"")+x+(_&&"("===l?")":""),w)for(r=-1,i=e.length;++r(u=e.charCodeAt(r))||u>57){x=(46===u?o+e.slice(r+1):e.slice(r))+x,e=e.slice(0,r);break}}p&&!g&&(e=a(e,1/0));var E=f.length+e.length+x.length,k=E>1)+f+e+x+k.slice(E);break;default:e=k+f+e+x}return s(e)}return A=void 0===A?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=op(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor(gp(t)/3))),r=Math.pow(10,-a),i=mp[8+a/3];return function(e){return n(r*e)+i}}}}(e),cp=dp.format,lp=dp.formatPrefix,dp}yp({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var Rp=function(e,t,n,a){var r,i=Ms(e,t,n);switch((a=op(null==a?",f":a)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=a.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gp(t)/3)))-gp(Math.abs(e)))}(i,o))||(a.precision=r),lp(a,o);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gp(t)-gp(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(a.precision=r-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(r=function(e){return Math.max(0,-gp(Math.abs(e)))}(i))||(a.precision=r-2*("%"===a.type))}return cp(a)},bp=Array.prototype.map;function wp(e){return bp.call(e,(function(e){return+e}))}var xp=Array.prototype.slice,_p=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function Ep(e,t){var n=Object.create(e.prototype);for(var a in t)n[a]=t[a];return n}function kp(){}var Cp="\\s*([+-]?\\d+)\\s*",Op="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sp=/^#([0-9a-f]{3,8})$/,Fp=new RegExp("^rgb\\("+[Cp,Cp,Cp]+"\\)$"),jp=new RegExp("^rgb\\("+[Bp,Bp,Bp]+"\\)$"),Dp=new RegExp("^rgba\\("+[Cp,Cp,Cp,Op]+"\\)$"),Tp=new RegExp("^rgba\\("+[Bp,Bp,Bp,Op]+"\\)$"),Mp=new RegExp("^hsl\\("+[Op,Bp,Bp]+"\\)$"),Np=new RegExp("^hsla\\("+[Op,Bp,Bp,Op]+"\\)$"),Up={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Pp(){return this.rgb().formatHex()}function Lp(){return this.rgb().formatRgb()}function Ip(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Sp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Qp(t):3===n?new Vp(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?new Vp(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?new Vp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Fp.exec(e))?new Vp(t[1],t[2],t[3],1):(t=jp.exec(e))?new Vp(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Dp.exec(e))?Hp(t[1],t[2],t[3],t[4]):(t=Tp.exec(e))?Hp(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Mp.exec(e))?Xp(t[1],t[2]/100,t[3]/100,1):(t=Np.exec(e))?Xp(t[1],t[2]/100,t[3]/100,t[4]):Up.hasOwnProperty(e)?Qp(Up[e]):"transparent"===e?new Vp(NaN,NaN,NaN,0):null}function Qp(e){return new Vp(e>>16&255,e>>8&255,255&e,1)}function Hp(e,t,n,a){return a<=0&&(e=t=n=NaN),new Vp(e,t,n,a)}function zp(e){return e instanceof kp||(e=Ip(e)),e?new Vp((e=e.rgb()).r,e.g,e.b,e.opacity):new Vp}function Kp(e,t,n,a){return 1===arguments.length?zp(e):new Vp(e,t,n,null==a?1:a)}function Vp(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}function Wp(){return"#"+Gp(this.r)+Gp(this.g)+Gp(this.b)}function qp(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Gp(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Xp(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $p(e,t,n,a)}function Yp(e){if(e instanceof $p)return new $p(e.h,e.s,e.l,e.opacity);if(e instanceof kp||(e=Ip(e)),!e)return new $p;if(e instanceof $p)return e;var t=(e=e.rgb()).r/255,n=e.g/255,a=e.b/255,r=Math.min(t,n,a),i=Math.max(t,n,a),o=NaN,s=i-r,u=(i+r)/2;return s?(o=t===i?(n-a)/s+6*(n0&&u<1?0:o,new $p(o,s,u,e.opacity)}function Jp(e,t,n,a){return 1===arguments.length?Yp(e):new $p(e,t,n,null==a?1:a)}function $p(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}function Zp(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function eA(e,t,n,a,r){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*n+(1+3*e+3*i-3*o)*a+o*r)/6}_p(kp,Ip,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Pp,formatHex:Pp,formatHsl:function(){return Yp(this).formatHsl()},formatRgb:Lp,toString:Lp}),_p(Vp,Kp,Ep(kp,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Vp(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Vp(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Wp,formatHex:Wp,formatRgb:qp,toString:qp})),_p($p,Jp,Ep(kp,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new $p(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new $p(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*t,r=2*n-a;return new Vp(Zp(e>=240?e-240:e+120,r,a),Zp(e,r,a),Zp(e<120?e+240:e-120,r,a),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var tA=function(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[a],i=e[a+1],o=a>0?e[a-1]:2*r-i,s=a180||n<-180?n-360*Math.round(n/360):n):aA(isNaN(e)?t:e)}function oA(e,t){var n=t-e;return n?rA(e,n):aA(isNaN(e)?t:e)}var sA=function e(t){var n=function(e){return 1==(e=+e)?oA:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}(t,n,e):aA(isNaN(t)?n:t)}}(t);function a(e,t){var a=n((e=Kp(e)).r,(t=Kp(t)).r),r=n(e.g,t.g),i=n(e.b,t.b),o=oA(e.opacity,t.opacity);return function(t){return e.r=a(t),e.g=r(t),e.b=i(t),e.opacity=o(t),e+""}}return a.gamma=e,a}(1);function uA(e){return function(t){var n,a,r=t.length,i=new Array(r),o=new Array(r),s=new Array(r);for(n=0;ni&&(r=t.slice(i,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,u.push({i:o,x:AA(n,a)})),i=yA.lastIndex;return it&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),a=e>2?OA:CA,r=i=null,l}function l(t){return isNaN(t=+t)?n:(r||(r=a(o.map(e),s,u)))(e(d(t)))}return l.invert=function(n){return d(t((i||(i=a(s,o.map(e),AA)))(n)))},l.domain=function(e){return arguments.length?(o=Array.from(e,xA),c()):o.slice()},l.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},l.rangeRound=function(e){return s=Array.from(e),u=wA,c()},l.clamp=function(e){return arguments.length?(d=!!e||EA,c()):d!==EA},l.interpolate=function(e){return arguments.length?(u=e,c()):u},l.unknown=function(e){return arguments.length?(n=e,l):n},function(n,a){return e=n,t=a,c()}}function FA(){return SA()(EA,EA)}function jA(e){var t=e.domain;return e.ticks=function(e){var n=t();return Ds(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var a=t();return Rp(a[0],a[a.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var a,r=t(),i=0,o=r.length-1,s=r[i],u=r[o];return u0?a=Ts(s=Math.floor(s/a)*a,u=Math.ceil(u/a)*a,n):a<0&&(a=Ts(s=Math.ceil(s*a)/a,u=Math.floor(u*a)/a,n)),a>0?(r[i]=Math.floor(s/a)*a,r[o]=Math.ceil(u/a)*a,t(r)):a<0&&(r[i]=Math.ceil(s*a)/a,r[o]=Math.floor(u*a)/a,t(r)),e},e}var DA=function(e,t){var n,a=0,r=(e=e.slice()).length-1,i=e[a],o=e[r];return o0){for(;f<=g;++f)for(c=1,d=n(f);cu)break;p.push(l)}}else for(;f<=g;++f)for(c=i-1,d=n(f);c>=1;--c)if(!((l=d*c)u)break;p.push(l)}2*p.length=s&&o[r]<=u&&(d<0&&(d=r),n=r);if(!(d<0))return s=e.invertExtent(o[d]),u=e.invertExtent(o[n]),[void 0===s[0]?s[1]:s[0],void 0===u[1]?u[0]:u[1]]}}(n):void 0),n.type=e,n};return a.metadata=Object(he.db)(Object(he.i)(n)),a}function sv(e,t,n){return arguments.length>1?(iv[e]=ov(e,t,n),this):uv(e)?iv[e]:void 0}function uv(e){return Object(he.v)(iv,e)}function dv(e,t){var n=iv[e];return n&&n.metadata[t]}function cv(e){return dv(e,Xh)}function lv(e){return dv(e,"discrete")}function fv(e){return dv(e,"discretizing")}function gv(e){return dv(e,qh)}function hv(e){return dv(e,"interpolating")}function pv(e){return dv(e,"quantile")}sv("identity",(function e(t){var n;function a(e){return isNaN(e=+e)?n:e}return a.invert=a,a.domain=a.range=function(e){return arguments.length?(t=Array.from(e,xA),a):t.slice()},a.unknown=function(e){return arguments.length?(n=e,a):n},a.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,xA):[0,1],jA(a)})),sv("linear",(function e(){var t=FA();return t.copy=function(){return BA(t,e())},ep.apply(t,arguments),jA(t)}),Xh),sv(qh,(function e(){var t=IA(SA()).domain([1,10]);return t.copy=function(){return BA(t,e()).base(t.base())},ep.apply(t,arguments),t}),[Xh,qh]),sv("pow",VA,Xh),sv("sqrt",(function(){return VA.apply(null,arguments).exponent(.5)}),Xh),sv("symlog",(function e(){var t=GA(SA());return t.copy=function(){return BA(t,e()).constant(t.constant())},ep.apply(t,arguments)}),Xh),sv("time",(function(){return ep.apply(JA(Zt,Yo,zt,Jt,$o,es,ns,ss,sn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[Xh,"temporal"]),sv(Gh,(function(){return ep.apply(JA(tn,ds,Dt,Qt,ls,gs,ns,ss,dn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[Xh,"temporal"]),sv("sequential",ev,[Xh,"interpolating"]),sv("".concat("sequential","-").concat("linear"),ev,[Xh,"interpolating"]),sv("".concat("sequential","-").concat(qh),(function e(){var t=IA($A()).domain([1,10]);return t.copy=function(){return ZA(t,e()).base(t.base())},tp.apply(t,arguments)}),[Xh,"interpolating",qh]),sv("".concat("sequential","-").concat("pow"),tv,[Xh,"interpolating"]),sv("".concat("sequential","-").concat("sqrt"),(function(){return tv.apply(null,arguments).exponent(.5)}),[Xh,"interpolating"]),sv("".concat("sequential","-").concat("symlog"),(function e(){var t=GA($A());return t.copy=function(){return ZA(t,e()).constant(t.constant())},tp.apply(t,arguments)}),[Xh,"interpolating"]),sv("".concat("diverging","-").concat("linear"),(function e(){var t=jA(av()(EA));return t.copy=function(){return ZA(t,e())},tp.apply(t,arguments)}),[Xh,"interpolating"]),sv("".concat("diverging","-").concat(qh),(function e(){var t=IA(av()).domain([.1,1,10]);return t.copy=function(){return ZA(t,e()).base(t.base())},tp.apply(t,arguments)}),[Xh,"interpolating",qh]),sv("".concat("diverging","-").concat("pow"),rv,[Xh,"interpolating"]),sv("".concat("diverging","-").concat("sqrt"),(function(){return rv.apply(null,arguments).exponent(.5)}),[Xh,"interpolating"]),sv("".concat("diverging","-").concat("symlog"),(function e(){var t=GA(av());return t.copy=function(){return ZA(t,e()).constant(t.constant())},tp.apply(t,arguments)}),[Xh,"interpolating"]),sv("quantile",(function e(){var t,n=[],a=[],r=[];function i(){var e=0,t=Math.max(1,a.length);for(r=new Array(t-1);++e0?r[t-1]:n[0],t=r?[i[r-1],a]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,a]).range(o).unknown(t)},ep.apply(jA(s),arguments)}),"discretizing"),sv("threshold",(function e(){var t,n=[.5],a=[0,1],r=1;function i(e){return e<=e?a[Zh(n,e,0,r)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),r=Math.min(n.length,a.length-1),i):n.slice()},i.range=function(e){return arguments.length?(a=Array.from(e),r=Math.min(n.length,a.length-1),i):a.slice()},i.invertExtent=function(e){var t=a.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(a).unknown(t)},ep.apply(i,arguments)}),"discretizing"),sv("bin-ordinal",(function e(){var t=[],n=[];function a(e){return null==e||e!=e?void 0:n[(Zh(t,e)-1)%n.length]}return a.domain=function(e){return arguments.length?(t=wp(e),a):t.slice()},a.range=function(e){return arguments.length?(n=xp.call(e),a):n.slice()},a.tickFormat=function(e,n){return Rp(t[0],Object(he.U)(t),null==e?10:e,n)},a.copy=function(){return e().domain(a.domain()).range(a.range())},a}),["discrete","discretizing"]),sv("ordinal",ap,"discrete"),sv("band",rp,"discrete"),sv("point",(function(){return function e(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return e(n())},t}(rp().paddingInner(1))}),"discrete");var Av,vv,mv,yv,Rv=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}},bv=function(e,t){var n=iA(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}},wv=180/Math.PI,xv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},_v=function(e,t,n,a,r,i){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*a)&&(n-=e*u,a-=t*u),(s=Math.sqrt(n*n+a*a))&&(n/=s,a/=s,u/=s),e*a180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(r(n)+"rotate(",null,a)-2,x:AA(e,t)})):t&&n.push(r(n)+"rotate("+t+a)}(i.rotate,o.rotate,s,u),function(e,t,n,i){e!==t?i.push({i:n.push(r(n)+"skewX(",null,a)-2,x:AA(e,t)}):t&&n.push(r(n)+"skewX("+t+a)}(i.skewX,o.skewX,s,u),function(e,t,n,a,i,o){if(e!==n||t!==a){var s=i.push(r(i)+"scale(",null,",",null,")");o.push({i:s-4,x:AA(e,n)},{i:s-2,x:AA(t,a)})}else 1===n&&1===a||i.push(r(i)+"scale("+n+","+a+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,u),i=o=null,function(e){for(var t,n=-1,a=u.length;++n6/29*(6/29)*(6/29)?Math.pow(e,1/3):e/(6/29*3*(6/29))+4/29}function Iv(e){return e>6/29?e*e*e:6/29*3*(6/29)*(e-4/29)}function Qv(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Hv(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function zv(e){if(e instanceof Vv)return new Vv(e.h,e.c,e.l,e.opacity);if(e instanceof Pv||(e=Nv(e)),0===e.a&&0===e.b)return new Vv(NaN,01?(Am[e]=t,this):Am[e]}pm({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},hm),pm({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(function(e){return cm(hm(e))}));var mm=function(e){return Object(he.A)(e)?e.map((function(e){return String(e)})):String(e)};function ym(e,t,n){var a;return Object(he.E)(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,~~(Object(he.X)(e.domain())/n)||1))),Object(he.F)(t)&&(a=t.step,t=t.interval),Object(he.H)(t)&&(t="time"===e.type?As(t):e.type==Gh?vs(t):Object(he.n)("Only time and utc scales accept interval strings."),a&&(t=t.every(a))),t}function Rm(e,t,n){var a=e.range(),r=Math.floor(a[0]),i=Math.ceil(Object(he.U)(a));if(r>i&&(a=i,i=r,r=a),t=t.filter((function(t){return t=e(t),r<=t&&t<=i})),n>0&&t.length>1){for(var o=[t[0],Object(he.U)(t)];t.length>n&&t.length>=3;)t=t.filter((function(e,t){return!(t%2)}));t.length<3&&(t=o)}return t}function bm(e,t){return e.bins?Rm(e,e.bins):e.ticks?e.ticks(t):e.domain()}function wm(e,t,n,a,r){var i=e.type,o="time"===i||"time"===a?ks(n):i===Gh||a===Gh?Cs(n):e.tickFormat?e.tickFormat(t,n):n?cp(n):mm;if(gv(i)){var s=function(e){var t=op(e||",");if(null==t.precision){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1}return function(e,t){return function(n){var a,r,i=e(n),o=i.indexOf(t);if(o<0)return i;for(r=(a=function(e,t){var n,a=e.lastIndexOf("e");if(a>0)return a;for(a=e.length;--a>t;)if((n=e.charCodeAt(a))>=48&&n<=57)return a+1}(i,o))o;)if("0"!==i[a]){++a;break}return i.slice(0,a)+r}}(cp(t),cp(".1f")(1)[1])}return cp(t)}(n);o=r||e.bins?s:function(e,t){return function(n){return e(n)?t(n):""}}(o,s)}return o}function xm(e){qa.call(this,null,e)}function _m(e){qa.call(this,null,e)}function Em(){return Ee({})}function km(e){return e.exit}function Cm(e){qa.call(this,null,e)}Object(he.y)(xm,qa).transform=function(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),a=this.value,r=e.scale,i=ym(r,null==e.count?e.values?e.values.length:10:e.count,e.minstep),o=e.format||wm(r,i,e.formatSpecifier,e.formatType,!!e.values),s=e.values?Rm(r,e.values,i):bm(r,i);return a&&(n.rem=a),a=s.map((function(e,t){return Ee({index:t/(s.length-1||1),value:e,label:o(e)})})),e.extra&&a.length&&a.push(Ee({index:-1,extra:{value:a[0].value},label:""})),n.source=a,n.add=a,this.value=a,n},Object(he.y)(_m,qa).transform=function(e,t){var n=t.dataflow,a=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||Em,i=e.key||xe,o=this.value;return Object(he.A)(a.encode)&&(a.encode=null),o&&(e.modified("key")||t.modified(i))&&Object(he.n)("DataJoin does not support modified key function or fields."),o||(t=t.addAll(),this.value=o=Object(he.s)().test(km),o.lookup=function(e){return o.get(i(e))}),t.visit(t.ADD,(function(e){var t=i(e),n=o.get(t);n?n.exit?(o.empty--,a.add.push(n)):a.mod.push(n):(o.set(t,n=r(e)),a.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(function(e){var t=i(e),n=o.get(t);n&&(n.datum=e,a.mod.push(n))})),t.visit(t.REM,(function(e){var t=i(e),n=o.get(t);e!==n.datum||n.exit||(a.rem.push(n),n.exit=!0,++o.empty)})),t.changed(t.ADD_MOD)&&a.modifies("datum"),e.clean&&o.empty>n.cleanThreshold&&n.runAfter(o.clean),a},Object(he.y)(Cm,qa).transform=function(e,t){var n=t.fork(t.ADD_REM),a=e.mod||!1,r=e.encoders,i=t.encode;if(Object(he.A)(i)){if(!n.changed()&&!i.every((function(e){return r[e]})))return t.StopPropagation;i=i[0],n.encode=null}var o="enter"===i,s=r.update||he.r,u=r.enter||he.r,d=r.exit||he.r,c=(i&&!o?r[i]:s)||he.r;if(t.changed(t.ADD)&&(t.visit(t.ADD,(function(t){u(t,e),s(t,e)})),n.modifies(u.output),n.modifies(s.output),c!==he.r&&c!==s&&(t.visit(t.ADD,(function(t){c(t,e)})),n.modifies(c.output))),t.changed(t.REM)&&d!==he.r&&(t.visit(t.REM,(function(t){d(t,e)})),n.modifies(d.output)),o||c!==he.r){var l=t.MOD|(e.modified()?t.REFLOW:0);o?(t.visit(l,(function(t){var r=u(t,e)||a;(c(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)):t.visit(l,(function(t){(c(t,e)||a)&&n.mod.push(t)})),n.mod.length&&n.modifies(c.output)}return n.changed()?n:t.StopPropagation};var Om,Bm,Sm=(Om={},Object(To.a)(Om,"quantile","quantiles"),Object(To.a)(Om,"quantize","thresholds"),Object(To.a)(Om,"threshold","domain"),Om),Fm=(Bm={},Object(To.a)(Bm,"quantile","quantiles"),Object(To.a)(Bm,"quantize","domain"),Bm);function jm(e,t){return null!=e?e:t}function Dm(e,t){return Number.isFinite(e)?t(e):null}function Tm(e){qa.call(this,[],e)}Object(he.y)(Tm,qa).transform=function(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var n,a,r,i,o,s=t.fork(t.NO_SOURCE|t.NO_FIELDS),u=this.value,d=e.type||"symbol",c=e.scale,l=+e.limit,f=ym(c,null==e.count?5:e.count,e.minstep),g=!!e.values||"symbol"===d,h=e.format||function(e,t,n,a,r,i){var o=Fm[e.type]&&"time"!==r&&r!==Gh?function(e,t){var n,a=e[Fm[e.type]](),r=a.length,i=r>1?a[1]-a[0]:a[0];for(n=1;nl?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),u=p.slice(0,l-1),o=!0):u=p,Object(he.D)(r=e.size)?(e.values||0!==c(u[0])||(u=u.slice(1)),i=u.reduce((function(t,n){return Math.max(t,r(n,e))}),0)):r=Object(he.l)(i=r||8),u=u.map((function(t,n){return Ee({index:n,label:h(t,n,u),value:t,offset:i,size:r(t,e)})})),o&&(o=p[u.length],u.push(Ee({index:u.length,label:"\u2026".concat(p.length-u.length," entries"),value:o,offset:i,size:r(o,e)})))):"gradient"===d?(n=c.domain(),a=fm(c,n[0],Object(he.U)(n)),p.length<3&&!e.values&&n[0]!==Object(he.U)(n)&&(p=[n[0],Object(he.U)(n)]),u=p.map((function(e,t){return Ee({index:t,label:h(e,t,p),value:e,perc:a(e)})}))):(r=p.length-1,a=function(e){var t=e.domain(),n=t.length-1,a=+t[0],r=+Object(he.U)(t),i=r-a;if("threshold"===e.type){var o=n?i/n:.1;i=(r+=o)-(a-=o)}return function(e){return(e-a)/i}}(c),u=p.map((function(e,t){return Ee({index:t,label:h(e,t,p),value:e,perc:t?a(e):0,perc2:t===r?1:a(p[t+1])})}))),s.source=u,s.add=u,this.value=u,s};var Mm=Object(he.s)({line:Qm,"line-radial":function(e,t,n,a){return Qm(t*Math.cos(e),t*Math.sin(e),a*Math.cos(n),a*Math.sin(n))},arc:Hm,"arc-radial":function(e,t,n,a){return Hm(t*Math.cos(e),t*Math.sin(e),a*Math.cos(n),a*Math.sin(n))},curve:zm,"curve-radial":function(e,t,n,a){return zm(t*Math.cos(e),t*Math.sin(e),a*Math.cos(n),a*Math.sin(n))},"orthogonal-horizontal":function(e,t,n,a){return"M"+e+","+t+"V"+a+"H"+n},"orthogonal-vertical":function(e,t,n,a){return"M"+e+","+t+"H"+n+"V"+a},"orthogonal-radial":function(e,t,n,a){var r=Math.cos(e),i=Math.sin(e),o=Math.cos(n),s=Math.sin(n);return"M"+t*r+","+t*i+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*o+","+t*s+"L"+a*o+","+a*s},"diagonal-horizontal":function(e,t,n,a){var r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+a+" "+n+","+a},"diagonal-vertical":function(e,t,n,a){var r=(t+a)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+a},"diagonal-radial":function(e,t,n,a){var r=Math.cos(e),i=Math.sin(e),o=Math.cos(n),s=Math.sin(n),u=(t+a)/2;return"M"+t*r+","+t*i+"C"+u*r+","+u*i+" "+u*o+","+u*s+" "+a*o+","+a*s}});function Nm(e){return e.source.x}function Um(e){return e.source.y}function Pm(e){return e.target.x}function Lm(e){return e.target.y}function Im(e){qa.call(this,{},e)}function Qm(e,t,n,a){return"M"+e+","+t+"L"+n+","+a}function Hm(e,t,n,a){var r=n-e,i=a-t,o=Math.sqrt(r*r+i*i)/2;return"M"+e+","+t+"A"+o+","+o+" "+180*Math.atan2(i,r)/Math.PI+" 0 1 "+n+","+a}function zm(e,t,n,a){var r=n-e,i=a-t,o=.2*(r+i),s=.2*(i-r);return"M"+e+","+t+"C"+(e+o)+","+(t+s)+" "+(n+s)+","+(a-o)+" "+n+","+a}function Km(e,t){var n=0;if(void 0===t){var a,r=sr(e);try{for(r.s();!(a=r.n()).done;){var i=a.value;(i=+i)&&(n+=i)}}catch(e){r.e(e)}finally{r.f()}}else{var o,s=-1,u=sr(e);try{for(u.s();!(o=u.n()).done;){var d=o.value;(d=+t(d,++s,e))&&(n+=d)}}catch(e){u.e(e)}finally{u.f()}}return n}function Vm(e){qa.call(this,null,e)}function Wm(e){return cv(e)&&"sequential"!==e}Im.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},Object(he.y)(Im,qa).transform=function(e,t){var n=e.sourceX||Nm,a=e.sourceY||Um,r=e.targetX||Pm,i=e.targetY||Lm,o=e.as||"path",s=e.orient||"vertical",u=e.shape||"line",d=Mm.get(u+"-"+s)||Mm.get(u);return d||Object(he.n)("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(function(e){e[o]=d(n(e),a(e),r(e),i(e))})),t.reflow(e.modified()).modifies(o)},Vm.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},Object(he.y)(Vm,qa).transform=function(e,t){var n,a,r,i=e.as||["startAngle","endAngle"],o=i[0],s=i[1],u=e.field||he.O,d=e.startAngle||0,c=null!=e.endAngle?e.endAngle:2*Math.PI,l=t.source,f=l.map(u),g=f.length,h=d,p=(c-d)/Km(f),A=ho(g);for(e.sort&&A.sort((function(e,t){return f[e]-f[t]})),n=0;n0?1:0)}),0))!==t.length&&n.warn("Log scale domain includes zero: "+Object(he.Z)(t)),t}function Ym(e,t,n){return Object(he.D)(e)&&(t||n)?dm(e,Jm(t||[0,1],n)):e}function Jm(e,t){return t?e.slice().reverse():e}function $m(e){qa.call(this,null,e)}Object(he.y)(Gm,qa).transform=function(e,t){var n=t.dataflow,a=this.value,r=function(e){var t,n=e.type,a="";return"sequential"===n?"sequential-linear":(function(e){var t=e.type;return cv(t)&&"time"!==t&&t!==Gh&&(e.scheme||e.range&&e.range.length&&e.range.every(he.H))}(e)&&(a=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?"sequential-":3===t?"diverging-":""),(a+n||"linear").toLowerCase())}(e);for(r in a&&r===a.type||(this.value=a=sv(r)()),e)if(!qm[r]){if("padding"===r&&Wm(a.type))continue;Object(he.D)(a[r])?a[r](e[r]):n.warn("Unsupported scale property: "+r)}return function(e,t,n){var a=e.type,r=t.round||!1,i=t.range;if(null!=t.rangeStep)i=function(e,t,n){"band"!==e&&"point"!==e&&Object(he.n)("Only band and point scales support rangeStep.");var a=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,r="point"===e?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Wh(n,r,a)]}(a,t,n);else if(t.scheme&&(i=function(e,t,n){var a,r=t.schemeExtent;return Object(he.A)(t.scheme)?a=cm(t.scheme,t.interpolate,t.interpolateGamma):(a=vm(t.scheme.toLowerCase()))||Object(he.n)("Unrecognized scheme name: ".concat(t.scheme)),n="threshold"===e?n+1:"bin-ordinal"===e?n-1:"quantile"===e||"quantize"===e?+t.schemeCount||5:n,hv(e)?Ym(a,r,t.reverse):Object(he.D)(a)?lm(Ym(a,r),n):"ordinal"===e?a:a.slice(0,n)}(a,t,n),Object(he.D)(i))){if(e.interpolator)return e.interpolator(i);Object(he.n)("Scale type ".concat(a," does not support interpolating color schemes."))}if(i&&hv(a))return e.interpolator(cm(Jm(i,t.reverse),t.interpolate,t.interpolateGamma));i&&t.interpolate&&e.interpolate?e.interpolate(gm(t.interpolate,t.interpolateGamma)):Object(he.D)(e.round)?e.round(r):Object(he.D)(e.rangeRound)&&e.interpolate(r?wA:bA),i&&e.range(Jm(i,t.reverse))}(a,e,function(e,t,n){var a=t.bins;if(a&&!Object(he.A)(a)){var r=e.domain(),i=r[0],o=Object(he.U)(r),s=null==a.start?i:a.start,u=null==a.stop?o:a.stop,d=a.step;d||Object(he.n)("Scale bins parameter missing step property."),so&&(u=d*Math.floor(o/d)),a=ho(s,u+d/2,d)}return a?e.bins=a:e.bins&&delete e.bins,"bin-ordinal"===e.type&&(a?t.domain||t.domainRaw||(e.domain(a),n=a.length):e.bins=e.domain()),n}(a,e,function(e,t,n){var a=function(e,t,n){return t?(e.domain(Xm(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(a>-1)return a;var r,i,o=t.domain,s=e.type,u=t.zero||void 0===t.zero&&function(e){var t=e.type;return!e.bins&&("linear"===t||"pow"===t||"sqrt"===t)}(e);return o?(Wm(s)&&t.padding&&o[0]!==Object(he.U)(o)&&(o=function(e,t,n,a,r,i){var o=Math.abs(Object(he.U)(n)-n[0]),s=o/(o-2*a),u=e===qh?Object(he.mb)(t,null,s):"sqrt"===e?Object(he.nb)(t,null,s,.5):"pow"===e?Object(he.nb)(t,null,s,r||1):"symlog"===e?Object(he.ob)(t,null,s,i||1):Object(he.lb)(t,null,s);return(t=t.slice())[0]=u[0],t[t.length-1]=u[1],t}(s,o,t.range,t.padding,t.exponent,t.constant)),(u||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(r=(o=o.slice()).length-1||1,u&&(o[0]>0&&(o[0]=0),o[r]<0&&(o[r]=0)),null!=t.domainMin&&(o[0]=t.domainMin),null!=t.domainMax&&(o[r]=t.domainMax),null!=t.domainMid&&(((i=t.domainMid)o[r])&&n.warn("Scale domainMid exceeds domain min or max.",i),o.splice(r,0,i))),e.domain(Xm(s,o,n)),"ordinal"===s&&e.unknown(t.domainImplicit?np:void 0),t.nice&&e.nice&&e.nice(!0!==t.nice&&ym(e,t.nice)||null),o.length):0}(a,e,n))),t.fork(t.NO_SOURCE|t.NO_FIELDS)},Object(he.y)($m,qa).transform=function(e,t){var n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(Be(e.sort)),this.modified(n),t};var Zm=["y0","y1"];function ey(e){qa.call(this,null,e)}function ty(e,t,n,a,r){for(var i,o=(t-e.sum)/2,s=e.length,u=0;uf&&(f=l),n&&c.sort(n)}return g.max=f,g}(t.source,e.groupby,d,c),a=0,r=n.length,i=n.max;a=a,iy[d<<1].forEach(h);++o=a,iy[u|d<<1].forEach(h);for(iy[d<<0].forEach(h);++s=a,c=n[s*e]>=a,iy[d<<1|c<<2].forEach(h);++o=a,l=c,c=n[s*e+o+1]>=a,iy[u|d<<1|c<<2|l<<3].forEach(h);iy[d|c<<3].forEach(h)}for(o=-1,c=n[s*e]>=a,iy[c<<2].forEach(h);++o=a,iy[c<<2|l<<3].forEach(h);function h(e){var t,n,a=[e[0][0]+o,e[0][1]+s],u=[e[1][0]+o,e[1][1]+s],d=i(a),c=i(u);(t=g[d])?(n=f[c])?(delete g[t.end],delete f[n.start],t===n?(t.ring.push(u),r(t.ring)):f[t.start]=g[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete g[t.end],t.ring.push(u),g[t.end=c]=t):(t=f[c])?(n=g[d])?(delete f[t.start],delete g[n.end],t===n?(t.ring.push(u),r(t.ring)):f[n.start]=g[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete f[t.start],t.ring.unshift(a),f[t.start=d]=t):f[d]=g[c]={start:d,end:c,ring:[a,u]}}iy[c<<3].forEach(h)}(a,r,(function(e){n(e,a,r),function(e){for(var t=0,n=e.length,a=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?o.push([e]):s.push(e)})),s.forEach((function(e){for(var t,n=0,a=o.length;n0&&o0&&s0&&i>0||Object(he.n)("invalid size"),e=r,t=i,a},a.smooth=function(e){return arguments.length?(n=e?o:ry,a):n===o},a};function sy(e,t){for(var n,a=-1,r=t.length;++aa!=g>a&&n<(f-d)*(a-c)/(g-c)+d&&(r=-r)}return r}function dy(e,t,n){var a;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[a=+(e[0]===t[0])],n[a],t[a])}var cy=function(e,t,n){return function(a){var r=Object(he.p)(a),i=n?Math.min(r[0],0):r[0],o=r[1],s=o-i,u=t?Ms(i,o,e):s/(e+1);return ho(u,o,u)}};function ly(e){qa.call(this,null,e)}function fy(e,t,n,a,r){var i=e.x1||0,o=e.y1||0,s=t*n<0;function u(e){e.forEach(d)}function d(e){s&&e.reverse(),e.forEach(c)}function c(e){e[0]=(e[0]-i)*t+a,e[1]=(e[1]-o)*n+r}return function(e){return e.coordinates.forEach(u),e}}function gy(e,t,n){var a=e>=0?e:Rr(t,n);return Math.round((Math.sqrt(4*a*a+1)-1)/2)}function hy(e){return Object(he.D)(e)?e:Object(he.l)(+e)}ly.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},Object(he.y)(ly,qa).transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),a=t.materialize(t.SOURCE).source,r=e.field||he.x,i=oy().smooth(!1!==e.smooth),o=e.thresholds||function(e,t,n){var a=cy(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?a:a(e.map((function(e){return lr(t(e).values)})))}(a,r,e),s=null===e.as?null:e.as||"contour",u=[];return a.forEach((function(t){var n=r(t),a=i.size([n.width,n.height])(n.values,Object(he.A)(o)?o:o(n.values));!function(e,t,n,a){var r=a.scale||t.scale,i=a.translate||t.translate;if(Object(he.D)(r)&&(r=r(n,a)),Object(he.D)(i)&&(i=i(n,a)),1!==r&&null!=r||i){var o=(Object(he.E)(r)?r:r[0])||1,s=(Object(he.E)(r)?r:r[1])||1,u=i&&i[0]||0,d=i&&i[1]||0;e.forEach(fy(t,o,s,u,d))}}(a,n,t,e),a.forEach((function(e){u.push(Ce(t,Ee(null!=s?Object(To.a)({},s,e):e)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n};var py=function(){var e=function(e){return e[0]},t=function(e){return e[1]},n=he.O,a=[-1,-1],r=960,i=500,o=2;function s(s,u){var d=gy(a[0],s,e)>>o,c=gy(a[1],s,t)>>o,l=d?d+2:0,f=c?c+2:0,g=2*l+(r>>o),h=2*f+(i>>o),p=new Float32Array(g*h),A=new Float32Array(g*h),v=p;s.forEach((function(a){var r=l+(+e(a)>>o),i=f+(+t(a)>>o);r>=0&&r=0&&i0&&c>0?(Ay(g,h,p,A,d),vy(g,h,A,p,c),Ay(g,h,p,A,d),vy(g,h,A,p,c),Ay(g,h,p,A,d),vy(g,h,A,p,c)):d>0?(Ay(g,h,p,A,d),Ay(g,h,A,p,d),Ay(g,h,p,A,d),v=A):c>0&&(vy(g,h,p,A,c),vy(g,h,A,p,c),vy(g,h,p,A,c),v=A);for(var m=u?Math.pow(2,-2*o):1/Km(v),y=0,R=g*h;y>o),y2:f+(i>>o)}}return s.x=function(t){return arguments.length?(e=hy(t),s):e},s.y=function(e){return arguments.length?(t=hy(e),s):t},s.weight=function(e){return arguments.length?(n=hy(e),s):n},s.size=function(e){if(!arguments.length)return[r,i];var t=Math.ceil(e[0]),n=Math.ceil(e[1]);return t>=0||t>=0||Object(he.n)("invalid size"),r=t,i=n,s},s.cellSize=function(e){return arguments.length?((e=+e)>=1||Object(he.n)("invalid cell size"),o=Math.floor(Math.log(e)/Math.LN2),s):1<=r&&(s>=i&&(u-=n[s-i+o*e]),a[s-r+o*e]=u/Math.min(s+1,e-1+i-s,i))}function vy(e,t,n,a,r){for(var i=1+(r<<1),o=0;o=r&&(s>=i&&(u-=n[o+(s-i)*e]),a[o+(s-r)*e]=u/Math.min(s+1,t-1+i-s,i))}function my(e){qa.call(this,null,e)}my.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};var yy=Object(he.y)(my,qa),Ry=["x","y","weight","size","cellSize","bandwidth"];function by(e,t){return Ry.forEach((function(n){return null!=t[n]?e[n](t[n]):0})),e}function wy(e){qa.call(this,null,e)}function xy(e){qa.call(this,null,e)}yy.transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,a=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=function(e,t){var n,a,r,i,o,s,u=[],d=function(e){return e(i)};if(null==t)u.push(e);else for(n={},a=0,r=e.length;a0?1:e<0?-1:0},Jy=Math.sqrt,$y=Math.tan;function Zy(e){return e>1?0:e<-1?My:Math.acos(e)}function eR(e){return e>1?Ny:e<-1?-Ny:Math.asin(e)}function tR(){}var nR,aR,rR,iR,oR=Fy(),sR=Fy(),uR={point:tR,lineStart:tR,lineEnd:tR,polygonStart:function(){uR.lineStart=dR,uR.lineEnd=fR},polygonEnd:function(){uR.lineStart=uR.lineEnd=uR.point=tR,oR.add(Qy(sR)),sR.reset()},result:function(){var e=oR/2;return oR.reset(),e}};function dR(){uR.point=cR}function cR(e,t){uR.point=lR,nR=rR=e,aR=iR=t}function lR(e,t){sR.add(iR*e-rR*t),rR=e,iR=t}function fR(){lR(nR,aR)}var gR,hR,pR,AR,vR=uR,mR=1/0,yR=mR,RR=-mR,bR=RR,wR={point:function(e,t){eRR&&(RR=e),tbR&&(bR=t)},lineStart:tR,lineEnd:tR,polygonStart:tR,polygonEnd:tR,result:function(){var e=[[mR,yR],[RR,bR]];return RR=bR=-(yR=mR=1/0),e}},xR=0,_R=0,ER=0,kR=0,CR=0,OR=0,BR=0,SR=0,FR=0,jR={point:DR,lineStart:TR,lineEnd:UR,polygonStart:function(){jR.lineStart=PR,jR.lineEnd=LR},polygonEnd:function(){jR.point=DR,jR.lineStart=TR,jR.lineEnd=UR},result:function(){var e=FR?[BR/FR,SR/FR]:OR?[kR/OR,CR/OR]:ER?[xR/ER,_R/ER]:[NaN,NaN];return xR=_R=ER=kR=CR=OR=BR=SR=FR=0,e}};function DR(e,t){xR+=e,_R+=t,++ER}function TR(){jR.point=MR}function MR(e,t){jR.point=NR,DR(pR=e,AR=t)}function NR(e,t){var n=e-pR,a=t-AR,r=Jy(n*n+a*a);kR+=r*(pR+e)/2,CR+=r*(AR+t)/2,OR+=r,DR(pR=e,AR=t)}function UR(){jR.point=DR}function PR(){jR.point=IR}function LR(){QR(gR,hR)}function IR(e,t){jR.point=QR,DR(gR=pR=e,hR=AR=t)}function QR(e,t){var n=e-pR,a=t-AR,r=Jy(n*n+a*a);kR+=r*(pR+e)/2,CR+=r*(AR+t)/2,OR+=r,BR+=(r=AR*e-pR*t)*(pR+e),SR+=r*(AR+t),FR+=3*r,DR(pR=e,AR=t)}var HR=jR;function zR(e){this._context=e}zR.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Py)}},result:tR};var KR,VR,WR,qR,GR,XR=Fy(),YR={point:tR,lineStart:function(){YR.point=JR},lineEnd:function(){KR&&$R(VR,WR),YR.point=tR},polygonStart:function(){KR=!0},polygonEnd:function(){KR=null},result:function(){var e=+XR;return XR.reset(),e}};function JR(e,t){YR.point=$R,VR=qR=e,WR=GR=t}function $R(e,t){qR-=e,GR-=t,XR.add(Jy(qR*qR+GR*GR)),qR=e,GR=t}var ZR=YR;function eb(){this._string=[]}function tb(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}eb.prototype={_radius:4.5,_circle:tb(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=tb(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var nb=function(e,t){var n,a,r=4.5;function i(e){return e&&("function"==typeof r&&a.pointRadius(+r.apply(this,arguments)),Sy(e,n(a))),a.result()}return i.area=function(e){return Sy(e,n(vR)),vR.result()},i.measure=function(e){return Sy(e,n(ZR)),ZR.result()},i.bounds=function(e){return Sy(e,n(wR)),wR.result()},i.centroid=function(e){return Sy(e,n(HR)),HR.result()},i.projection=function(t){return arguments.length?(n=null==t?(e=null,_y):(e=t).stream,i):e},i.context=function(e){return arguments.length?(a=null==e?(t=null,new eb):new zR(t=e),"function"!=typeof r&&a.pointRadius(r),i):t},i.pointRadius=function(e){return arguments.length?(r="function"==typeof e?e:(a.pointRadius(+e),+e),i):r},i.projection(e).context(t)},ab=function(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:tR,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},rb=function(e,t){return Qy(e[0]-t[0])<1e-6&&Qy(e[1]-t[1])<1e-6};function ib(e,t,n,a){this.x=e,this.z=t,this.o=n,this.e=a,this.v=!1,this.n=this.p=null}var ob=function(e,t,n,a,r){var i,o,s=[],u=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,a=e[0],o=e[t];if(rb(a,o)){for(r.lineStart(),i=0;i=0;--i)r.point((c=d[i])[0],c[1]);else a(f.x,f.p.x,-1,r);f=f.p}d=(f=f.o).z,g=!g}while(!f.v);r.lineEnd()}}};function sb(e){if(t=e.length){for(var t,n,a=0,r=e[0];++at?1:e>=t?0:NaN};1===(vb=mb).length&&(vb=function(e){return function(t,n){return mb(e(t),n)}}(vb));var yb=Array.prototype,Rb=(yb.slice,yb.map,function(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var a=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(r);++a=0;)for(t=(a=e[r]).length;--t>=0;)n[--o]=a[t];return n},wb=function(e,t,n,a){return function(r){var i,o,s,u=t(r),d=ab(),c=t(d),l=!1,f={point:g,lineStart:p,lineEnd:A,polygonStart:function(){f.point=v,f.lineStart=m,f.lineEnd=y,o=[],i=[]},polygonEnd:function(){f.point=g,f.lineStart=p,f.lineEnd=A,o=bb(o);var e=function(e,t){var n=Ab(t),a=t[1],r=Xy(a),i=[Xy(n),-Ky(n),0],o=0,s=0;pb.reset(),1===r?a=Ny+1e-6:-1===r&&(a=-Ny-1e-6);for(var u=0,d=e.length;u=0?1:-1,E=_*x,k=E>My,C=p*b;if(pb.add(zy(C*_*Xy(E),A*w+C*Ky(E))),o+=k?x+_*Py:x,k^g>=n^y>=n){var O=lb(db(f),db(m));hb(O);var B=lb(i,O);hb(B);var S=(k^x>=0?-1:1)*eR(B[2]);(a>S||a===S&&(O[0]||O[1]))&&(s+=k^x>=0?1:-1)}}return(o<-1e-6||o<1e-6&&pb<-1e-6)^1&s}(i,a);o.length?(l||(r.polygonStart(),l=!0),ob(o,_b,e,n,r)):e&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),o=i=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function g(t,n){e(t,n)&&r.point(t,n)}function h(e,t){u.point(e,t)}function p(){f.point=h,u.lineStart()}function A(){f.point=g,u.lineEnd()}function v(e,t){s.push([e,t]),c.point(e,t)}function m(){c.lineStart(),s=[]}function y(){v(s[0][0],s[0][1]),c.lineEnd();var e,t,n,a,u=c.clean(),f=d.result(),g=f.length;if(s.pop(),i.push(s),s=null,g)if(1&u){if((t=(n=f[0]).length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),e=0;e1&&2&u&&f.push(f.pop().concat(f.shift())),o.push(f.filter(xb))}return f}};function xb(e){return e.length>1}function _b(e,t){return((e=e.x)[0]<0?e[1]-Ny-1e-6:Ny-e[1])-((t=t.x)[0]<0?t[1]-Ny-1e-6:Ny-t[1])}var Eb=wb((function(){return!0}),(function(e){var t,n=NaN,a=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,o){var s=i>0?My:-My,u=Qy(i-n);Qy(u-My)<1e-6?(e.point(n,a=(a+o)/2>0?Ny:-Ny),e.point(r,a),e.lineEnd(),e.lineStart(),e.point(s,a),e.point(i,a),t=0):r!==s&&u>=My&&(Qy(n-r)<1e-6&&(n-=1e-6*r),Qy(i-s)<1e-6&&(i-=1e-6*s),a=function(e,t,n,a){var r,i,o=Xy(e-n);return Qy(o)>1e-6?Hy((Xy(t)*(i=Ky(a))*Xy(n)-Xy(a)*(r=Ky(t))*Xy(e))/(r*i*o)):(t+a)/2}(n,a,i,o),e.point(r,a),e.lineEnd(),e.lineStart(),e.point(s,a),t=0),e.point(n=i,a=o),r=s},lineEnd:function(){e.lineEnd(),n=a=NaN},clean:function(){return 2-t}}}),(function(e,t,n,a){var r;if(null==e)r=n*Ny,a.point(-My,r),a.point(0,r),a.point(My,r),a.point(My,0),a.point(My,-r),a.point(0,-r),a.point(-My,-r),a.point(-My,0),a.point(-My,r);else if(Qy(e[0]-t[0])>1e-6){var i=e[0]My?e+Math.round(-e/Py)*Py:e,t]}function Ob(e,t,n){return(e%=Py)?t||n?kb(Sb(e),Fb(t,n)):Sb(e):t||n?Fb(t,n):Cb}function Bb(e){return function(t,n){return[(t+=e)>My?t-Py:t<-My?t+Py:t,n]}}function Sb(e){var t=Bb(e);return t.invert=Bb(-e),t}function Fb(e,t){var n=Ky(e),a=Xy(e),r=Ky(t),i=Xy(t);function o(e,t){var o=Ky(t),s=Ky(e)*o,u=Xy(e)*o,d=Xy(t),c=d*n+s*a;return[zy(u*r-c*i,s*n-d*a),eR(c*r+u*i)]}return o.invert=function(e,t){var o=Ky(t),s=Ky(e)*o,u=Xy(e)*o,d=Xy(t),c=d*r-u*i;return[zy(u*r+d*i,s*n+c*a),eR(c*n-s*a)]},o}function jb(e,t){(t=db(t))[0]-=e,hb(t);var n=Zy(-t[1]);return((-t[2]<0?-n:n)+Py-1e-6)%Py}Cb.invert=Cb;var Db=function(e){var t=Ky(e),n=6*Iy,a=t>0,r=Qy(t)>1e-6;function i(e,n){return Ky(e)*Ky(n)>t}function o(e,n,a){var r=[1,0,0],i=lb(db(e),db(n)),o=cb(i,i),s=i[0],u=o-s*s;if(!u)return!a&&e;var d=t*o/u,c=-t*s/u,l=lb(r,i),f=gb(r,d);fb(f,gb(i,c));var g=l,h=cb(f,g),p=cb(g,g),A=h*h-p*(cb(f,f)-1);if(!(A<0)){var v=Jy(A),m=gb(g,(-h-v)/p);if(fb(m,f),m=ub(m),!a)return m;var y,R=e[0],b=n[0],w=e[1],x=n[1];b0^m[1]<(Qy(m[0]-R)<1e-6?w:x):w<=m[1]&&m[1]<=x:_>My^(R<=m[0]&&m[0]<=b)){var k=gb(g,(-h+v)/p);return fb(k,f),[m,ub(k)]}}}function s(t,n){var r=a?e:My-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return wb(i,(function(e){var t,n,u,d,c;return{lineStart:function(){d=u=!1,c=1},point:function(l,f){var g,h=[l,f],p=i(l,f),A=a?p?0:s(l,f):p?s(l+(l<0?My:-My),f):0;if(!t&&(d=u=p)&&e.lineStart(),p!==u&&(!(g=o(t,h))||rb(t,g)||rb(h,g))&&(h[0]+=1e-6,h[1]+=1e-6,p=i(h[0],h[1])),p!==u)c=0,p?(e.lineStart(),g=o(h,t),e.point(g[0],g[1])):(g=o(t,h),e.point(g[0],g[1]),e.lineEnd()),t=g;else if(r&&t&&a^p){var v;A&n||!(v=o(h,t,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!p||t&&rb(t,h)||e.point(h[0],h[1]),t=h,u=p,n=A},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return c|(d&&u)<<1}}}),(function(t,a,r,i){!function(e,t,n,a,r,i){if(n){var o=Ky(t),s=Xy(t),u=a*n;null==r?(r=t+a*Py,i=t-u/2):(r=jb(o,r),i=jb(o,i),(a>0?ri)&&(r+=a*Py));for(var d,c=r;a>0?c>i:c0)do{d.point(0===c||3===c?e:n,c>1?a:t)}while((c=(c+s+4)%4)!==l);else d.point(i[0],i[1])}function o(a,r){return Qy(a[0]-e)<1e-6?r>0?0:3:Qy(a[0]-n)<1e-6?r>0?2:1:Qy(a[1]-t)<1e-6?r>0?1:0:r>0?3:2}function s(e,t){return u(e.x,t.x)}function u(e,t){var n=o(e,1),a=o(t,1);return n!==a?n-a:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var u,d,c,l,f,g,h,p,A,v,m,y=o,R=ab(),b={point:w,lineStart:function(){b.point=x,d&&d.push(c=[]),v=!0,A=!1,h=p=NaN},lineEnd:function(){u&&(x(l,f),g&&A&&R.rejoin(),u.push(R.result())),b.point=w,A&&y.lineEnd()},polygonStart:function(){y=R,u=[],d=[],m=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=d.length;na&&(f-i)*(a-o)>(g-o)*(e-i)&&++t:g<=a&&(f-i)*(a-o)<(g-o)*(e-i)&&--t;return t}(),n=m&&t,r=(u=bb(u)).length;(n||r)&&(o.polygonStart(),n&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),r&&ob(u,s,t,i,o),o.polygonEnd()),y=o,u=d=c=null}};function w(e,t){r(e,t)&&y.point(e,t)}function x(i,o){var s=r(i,o);if(d&&c.push([i,o]),v)l=i,f=o,g=s,v=!1,s&&(y.lineStart(),y.point(i,o));else if(s&&A)y.point(i,o);else{var u=[h=Math.max(-1e9,Math.min(1e9,h)),p=Math.max(-1e9,Math.min(1e9,p))],R=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,n,a,r,i){var o,s=e[0],u=e[1],d=0,c=1,l=t[0]-s,f=t[1]-u;if(o=n-s,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>c)return;o>d&&(d=o)}if(o=r-s,l||!(o<0)){if(o/=l,l<0){if(o>c)return;o>d&&(d=o)}else if(l>0){if(o0)){if(o/=f,f<0){if(o0){if(o>c)return;o>d&&(d=o)}if(o=i-u,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>d&&(d=o)}else if(f>0){if(o0&&(e[0]=s+d*l,e[1]=u+d*f),c<1&&(t[0]=s+c*l,t[1]=u+c*f),!0}}}}}(u,R,e,t,n,a)?s&&(y.lineStart(),y.point(i,o),m=!1):(A||(y.lineStart(),y.point(u[0],u[1])),y.point(R[0],R[1]),s||y.lineEnd(),m=!1)}h=i,p=o,A=s}return b}}function Mb(e){return function(t){var n=new Nb;for(var a in e)n[a]=e[a];return n.stream=t,n}}function Nb(){}function Ub(e,t,n){var a=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=a&&e.clipExtent(null),Sy(n,e.stream(wR)),t(wR.result()),null!=a&&e.clipExtent(a),e}function Pb(e,t,n){return Ub(e,(function(n){var a=t[1][0]-t[0][0],r=t[1][1]-t[0][1],i=Math.min(a/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),o=+t[0][0]+(a-i*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,s])}),n)}function Lb(e,t,n){return Pb(e,[[0,0],t],n)}function Ib(e,t,n){return Ub(e,(function(n){var a=+t,r=a/(n[1][0]-n[0][0]),i=(a-r*(n[1][0]+n[0][0]))/2,o=-r*n[0][1];e.scale(150*r).translate([i,o])}),n)}function Qb(e,t,n){return Ub(e,(function(n){var a=+t,r=a/(n[1][1]-n[0][1]),i=-r*n[0][0],o=(a-r*(n[1][1]+n[0][1]))/2;e.scale(150*r).translate([i,o])}),n)}Nb.prototype={constructor:Nb,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Hb=Ky(30*Iy),zb=function(e,t){return+t?function(e,t){function n(a,r,i,o,s,u,d,c,l,f,g,h,p,A){var v=d-a,m=c-r,y=v*v+m*m;if(y>4*t&&p--){var R=o+f,b=s+g,w=u+h,x=Jy(R*R+b*b+w*w),_=eR(w/=x),E=Qy(Qy(w)-1)<1e-6||Qy(i-l)<1e-6?(i+l)/2:zy(b,R),k=e(E,_),C=k[0],O=k[1],B=C-a,S=O-r,F=m*B-v*S;(F*F/y>t||Qy((v*B+m*S)/y-.5)>.3||o*f+s*g+u*h2?e[2]%360*Iy:0,C()):[A*Ly,v*Ly,m*Ly]},E.angle=function(e){return arguments.length?(y=e%360*Iy,C()):y*Ly},E.precision=function(e){return arguments.length?(o=zb(s,_=e*e),O()):Jy(_)},E.fitExtent=function(e,t){return Pb(E,e,t)},E.fitSize=function(e,t){return Lb(E,e,t)},E.fitWidth=function(e,t){return Ib(E,e,t)},E.fitHeight=function(e,t){return Qb(E,e,t)},function(){return t=e.apply(this,arguments),E.invert=t.invert&&k,C()}}function Xb(e){var t=0,n=My/3,a=Gb(e),r=a(t,n);return r.parallels=function(e){return arguments.length?a(t=e[0]*Iy,n=e[1]*Iy):[t*Ly,n*Ly]},r}function Yb(e,t){var n=Xy(e),a=(n+Xy(t))/2;if(Qy(a)<1e-6)return function(e){var t=Ky(e);function n(e,n){return[e*t,Xy(n)/t]}return n.invert=function(e,n){return[e/t,eR(n*t)]},n}(e);var r=1+n*(2*a-n),i=Jy(r)/a;function o(e,t){var n=Jy(r-2*a*Xy(t))/a;return[n*Xy(e*=a),i-n*Ky(e)]}return o.invert=function(e,t){var n=i-t;return[zy(e,Qy(n))/a*Yy(n),eR((r-(e*e+n*n)*a*a)/(2*a))]},o}var Jb=function(){return Xb(Yb).scale(155.424).center([0,33.6442])},$b=function(){return Jb().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};function Zb(e){return function(t,n){var a=Ky(t),r=Ky(n),i=e(a*r);return[i*r*Xy(t),i*Xy(n)]}}function ew(e){return function(t,n){var a=Jy(t*t+n*n),r=e(a),i=Xy(r),o=Ky(r);return[zy(t*i,a*o),eR(a&&n*i/a)]}}var tw=Zb((function(e){return Jy(2/(1+e))}));tw.invert=ew((function(e){return 2*eR(e/2)}));var nw=Zb((function(e){return(e=Zy(e))&&e/Xy(e)}));function aw(e,t){return[e,qy($y((Ny+t)/2))]}function rw(e){var t,n,a,r=qb(e),i=r.center,o=r.scale,s=r.translate,u=r.clipExtent,d=null;function c(){var i=My*o(),s=r(function(e){function t(t){return(t=e(t[0]*Iy,t[1]*Iy))[0]*=Ly,t[1]*=Ly,t}return e=Ob(e[0]*Iy,e[1]*Iy,e.length>2?e[2]*Iy:0),t.invert=function(t){return(t=e.invert(t[0]*Iy,t[1]*Iy))[0]*=Ly,t[1]*=Ly,t},t}(r.rotate()).invert([0,0]));return u(null==d?[[s[0]-i,s[1]-i],[s[0]+i,s[1]+i]]:e===aw?[[Math.max(s[0]-i,d),t],[Math.min(s[0]+i,n),a]]:[[d,Math.max(s[1]-i,t)],[n,Math.min(s[1]+i,a)]])}return r.scale=function(e){return arguments.length?(o(e),c()):o()},r.translate=function(e){return arguments.length?(s(e),c()):s()},r.center=function(e){return arguments.length?(i(e),c()):i()},r.clipExtent=function(e){return arguments.length?(null==e?d=t=n=a=null:(d=+e[0][0],t=+e[0][1],n=+e[1][0],a=+e[1][1]),c()):null==d?null:[[d,t],[n,a]]},c()}function iw(e){return $y((Ny+e)/2)}function ow(e,t){var n=Ky(e),a=e===t?Xy(e):qy(n/Ky(t))/qy(iw(t)/iw(e)),r=n*Gy(iw(e),a)/a;if(!a)return aw;function i(e,t){r>0?t<1e-6-Ny&&(t=1e-6-Ny):t>Ny-1e-6&&(t=Ny-1e-6);var n=r/Gy(iw(t),a);return[n*Xy(a*e),r-n*Ky(a*e)]}return i.invert=function(e,t){var n=r-t,i=Yy(a)*Jy(e*e+n*n);return[zy(e,Qy(n))/a*Yy(n),2*Hy(Gy(r/i,1/a))-Ny]},i}function sw(e,t){return[e,t]}function uw(e,t){var n=Ky(e),a=e===t?Xy(e):(n-Ky(t))/(t-e),r=n/a+e;if(Qy(a)<1e-6)return sw;function i(e,t){var n=r-t,i=a*e;return[n*Xy(i),r-n*Ky(i)]}return i.invert=function(e,t){var n=r-t;return[zy(e,Qy(n))/a*Yy(n),r-Yy(a)*Jy(e*e+n*n)]},i}nw.invert=ew((function(e){return e})),aw.invert=function(e,t){return[e,2*Hy(Wy(t))-Ny]},sw.invert=sw;var dw=1.340264,cw=-.081106,lw=893e-6,fw=.003796,gw=Jy(3)/2;function hw(e,t){var n=eR(gw*Xy(t)),a=n*n,r=a*a*a;return[e*Ky(n)/(gw*(dw+3*cw*a+r*(7*lw+9*fw*a))),n*(dw+cw*a+r*(lw+fw*a))]}function pw(e,t){var n=Ky(t),a=Ky(e)*n;return[n*Xy(e)/a,Xy(t)/a]}function Aw(e,t,n,a){return 1===e&&1===t&&0===n&&0===a?_y:Mb({point:function(r,i){this.stream.point(r*e+n,i*t+a)}})}function vw(e,t){var n=t*t,a=n*n;return[e*(.8707-.131979*n+a*(a*(.003971*n-.001529*a)-.013791)),t*(1.007226+n*(.015085+a*(.028874*n-.044475-.005916*a)))]}function mw(e,t){return[Ky(t)*Xy(e),Xy(t)]}function yw(e,t){var n=Ky(t),a=1+Ky(e)*n;return[n*Xy(e)/a,Xy(t)/a]}function Rw(e,t){return[qy($y((Ny+t)/2)),-e]}hw.invert=function(e,t){for(var n,a=t,r=a*a,i=r*r*r,o=0;o<12&&(i=(r=(a-=n=(a*(dw+cw*r+i*(lw+fw*r))-t)/(dw+3*cw*r+i*(7*lw+9*fw*r)))*a)*r*r,!(Qy(n)<1e-12));++o);return[gw*e*(dw+3*cw*r+i*(7*lw+9*fw*r))/Ky(a),eR(Xy(a)/gw)]},pw.invert=ew(Hy),vw.invert=function(e,t){var n,a=t,r=25;do{var i=a*a,o=i*i;a-=n=(a*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-t)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Qy(n)>1e-6&&--r>0);return[e/(.8707+(i=a*a)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),a]},mw.invert=ew(eR),yw.invert=ew((function(e){return 2*Hy(e)})),Rw.invert=function(e,t){return[-t,2*Hy(Wy(e))-Ny]};var bw=Math.abs,ww=(Math.atan,Math.atan2,Math.ceil,Math.cos),xw=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),_w=(Math.tan,Math.PI),Ew=_w/2,kw=(Math.SQRT1_2,Ow(2));function Cw(e){return e>1?Ew:e<-1?-Ew:Math.asin(e)}function Ow(e){return e>0?Math.sqrt(e):0}function Bw(e,t){var n,a=e*xw(t),r=30;do{t-=n=(t+xw(t)-a)/(1+ww(t))}while(bw(n)>1e-6&&--r>0);return t/2}Ow(_w);var Sw=function(e,t,n){function a(a,r){return[e*a*ww(r=Bw(n,r)),t*xw(r)]}return a.invert=function(a,r){return r=Cw(r/t),[a/(e*ww(r)),Cw((2*r+xw(2*r))/n)]},a}(kw/Ew,kw,_w),Fw=nb(),jw=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function Dw(e,t){return function n(){var a=t();return a.type=e,a.path=nb().projection(a),a.copy=a.copy||function(){var e=n();return jw.forEach((function(t){a[t]&&e[t](a[t]())})),e.path.pointRadius(a.path.pointRadius()),e},a}}function Tw(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(Nw[e]=Dw(e,t),this):Nw[e]||null}function Mw(e){return e&&e.path||Fw}var Nw={albers:$b,albersusa:function(){var e,t,n,a,r,i,o=$b(),s=Jb().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Jb().rotate([157,0]).center([-3,19.9]).parallels([8,18]),d={point:function(e,t){i=[e,t]}};function c(e){var t=e[0],o=e[1];return i=null,n.point(t,o),i||(a.point(t,o),i)||(r.point(t,o),i)}function l(){return e=t=null,c}return c.invert=function(e){var t=o.scale(),n=o.translate(),a=(e[0]-n[0])/t,r=(e[1]-n[1])/t;return(r>=.12&&r<.234&&a>=-.425&&a<-.214?s:r>=.166&&r<.234&&a>=-.214&&a<-.115?u:o).invert(e)},c.stream=function(n){return e&&t===n?e:e=function(e){var t=e.length;return{point:function(n,a){for(var r=-1;++r2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}};for(var Uw in Nw)Tw(Uw,Nw[Uw]);function Pw(e){qa.call(this,null,e)}function Lw(e){qa.call(this,null,e)}function Iw(e){qa.call(this,null,e)}function Qw(e,t,n){var a=Rb(e,t-1e-6,n).concat(t);return function(e){return a.map((function(t){return[e,t]}))}}function Hw(e,t,n){var a=Rb(e,t-1e-6,n).concat(t);return function(e){return a.map((function(t){return[t,e]}))}}function zw(e){qa.call(this,[],e),this.generator=function(){var e,t,n,a,r,i,o,s,u,d,c,l,f=10,g=f,h=90,p=360,A=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return Rb(Vy(a/h)*h,n,h).map(c).concat(Rb(Vy(s/p)*p,o,p).map(l)).concat(Rb(Vy(t/f)*f,e,f).filter((function(e){return Qy(e%h)>1e-6})).map(u)).concat(Rb(Vy(i/g)*g,r,g).filter((function(e){return Qy(e%p)>1e-6})).map(d))}return v.lines=function(){return m().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[c(a).concat(l(o).slice(1),c(n).reverse().slice(1),l(s).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(a=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],a>n&&(e=a,a=n,n=e),s>o&&(e=s,s=o,o=e),v.precision(A)):[[a,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],i=+n[0][1],r=+n[1][1],t>e&&(n=t,t=e,e=n),i>r&&(n=i,i=r,r=n),v.precision(A)):[[t,i],[e,r]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(h=+e[0],p=+e[1],v):[h,p]},v.stepMinor=function(e){return arguments.length?(f=+e[0],g=+e[1],v):[f,g]},v.precision=function(f){return arguments.length?(A=+f,u=Qw(i,r,90),d=Hw(t,e,A),c=Qw(s,o,90),l=Hw(a,n,A),v):A},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()}function Kw(e){qa.call(this,null,e)}function Vw(e){if(!Object(he.D)(e))return!1;var t=Object(he.db)(Object(he.g)(e));return t.$x||t.$y||t.$value||t.$max}function Ww(e){qa.call(this,null,e),this.modified(!0)}function qw(e,t,n){Object(he.D)(e[t])&&e[t](n)}function Gw(e,t,n,a){if(isNaN(t)||isNaN(n))return e;var r,i,o,s,u,d,c,l,f,g=e._root,h={data:a},p=e._x0,A=e._y0,v=e._x1,m=e._y1;if(!g)return e._root=h,e;for(;g.length;)if((d=t>=(i=(p+v)/2))?p=i:v=i,(c=n>=(o=(A+m)/2))?A=o:m=o,r=g,!(g=g[l=c<<1|d]))return r[l]=h,e;if(s=+e._x.call(null,g.data),u=+e._y.call(null,g.data),t===s&&n===u)return h.next=g,r?r[l]=h:e._root=h,e;do{r=r?r[l]=new Array(4):e._root=new Array(4),(d=t>=(i=(p+v)/2))?p=i:v=i,(c=n>=(o=(A+m)/2))?A=o:m=o}while((l=c<<1|d)==(f=(u>=o)<<1|s>=i));return r[f]=g,r[l]=h,e}Pw.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},Object(he.y)(Pw,qa).transform=function(e,t){var n=t.fork(t.ALL),a=this.value,r=e.field||he.x,i=e.as||"path",o=n.SOURCE;!a||e.modified()?(this.value=a=Mw(e.projection),n.materialize().reflow()):o=r===he.x||t.modified(r.fields)?n.ADD_MOD:n.ADD;var s=function(e,t){var n=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),n}(a,e.pointRadius);return n.visit(o,(function(e){e[i]=a(r(e))})),a.pointRadius(s),n.modifies(i)},Lw.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},Object(he.y)(Lw,qa).transform=function(e,t){var n,a=e.projection,r=e.fields[0],i=e.fields[1],o=e.as||["x","y"],s=o[0],u=o[1];function d(e){var t=a([r(e),i(e)]);t?(e[s]=t[0],e[u]=t[1]):(e[s]=void 0,e[u]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,d):(n=t.modified(r.fields)||t.modified(i.fields),t.visit(n?t.ADD_MOD:t.ADD,d)),t.modifies(o)},Iw.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},Object(he.y)(Iw,qa).transform=function(e,t){var n=t.fork(t.ALL),a=this.value,r=e.as||"shape",i=n.ADD;return a&&!e.modified()||(this.value=a=function(e,t,n){var a=null==n?function(n){return e(t(n))}:function(a){var r=e.pointRadius(),i=e.pointRadius(n)(t(a));return e.pointRadius(r),i};return a.context=function(t){return e.context(t),a},a}(Mw(e.projection),e.field||Object(he.t)("datum"),e.pointRadius),n.materialize().reflow(),i=n.SOURCE),n.visit(i,(function(e){e[r]=a})),n.modifies(r)},zw.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},Object(he.y)(zw,qa).transform=function(e,t){var n,a=this.value,r=this.generator;if(!a.length||e.modified())for(var i in e)Object(he.D)(r[i])&&r[i](e[i]);return n=r(),a.length?t.mod.push(Oe(a[0],n)):t.add.push(Ee(n)),a[0]=n,t},Kw.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},Object(he.y)(Kw,qa).transform=function(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,a="shared"===e.resolve,r=e.field||he.x,i=function(e,t){var n;return Object(he.D)(e)?(n=function(n){return e(n,t)}).dep=Vw(e):e?n=Object(he.l)(e):(n=function(e){return e.$value/e.$max||0}).dep=!0,n}(e.opacity,e),o=function(e,t){var n;return Object(he.D)(e)?(n=function(n){return Kp(e(n,t))}).dep=Vw(e):n=Object(he.l)(Kp(e||"#888")),n}(e.color,e),s=e.as||"image",u={$x:0,$y:0,$value:0,$max:a?lr(n.map((function(e){return lr(r(e).values)}))):0};return n.forEach((function(e){var t=r(e),n=Object(he.o)({},e,u);a||(n.$max=lr(t.values||[])),e[s]=function(e,t,n,a){for(var r=e.width,i=e.height,o=e.x1||0,s=e.y1||0,u=e.x2||r,d=e.y2||i,c=e.values,l=c?function(e){return c[e]}:he.kb,f=yu(u-o,d-s),g=f.getContext("2d"),h=g.getImageData(0,0,u-o,d-s),p=h.data,A=s,v=0;Ac&&(c=a),rl&&(l=r));if(u>c||d>l)return this;for(this.cover(u,d).cover(c,l),n=0;ne||e>=r||a>t||t>=i;)switch(s=(tf||(i=u.y0)>g||(o=u.x1)=v)<<1|e>=A)&&(u=h[h.length-1],h[h.length-1]=h[h.length-1-d],h[h.length-1-d]=u)}else{var m=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),R=m*m+y*y;if(R=(s=(h+A)/2))?h=s:A=s,(c=o>=(u=(p+v)/2))?p=u:v=u,t=g,!(g=g[l=c<<1|d]))return this;if(!g.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(n=t,f=l)}for(;g.data!==e;)if(a=g,!(g=g.next))return this;return(r=g.next)&&delete g.next,a?(r?a.next=r:delete a.next,this):t?(r?t[l]=r:delete t[l],(g=t[0]||t[1]||t[2]||t[3])&&g===(t[3]||t[2]||t[1]||t[0])&&!g.length&&(n?n[f]=g:this._root=g),this):(this._root=r,this)},tx.removeAll=function(e){for(var t=0,n=e.length;t=0&&(n=e.slice(a+1),e=e.slice(0,a)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function fx(e,t){for(var n,a=0,r=e.length;a0)for(var n,a,r=new Array(n),i=0;i=0&&t._call.call(null,e),t=t._next;--vx}()}finally{vx=0,function(){for(var e,t,n=hx,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:hx=t);px=e,Fx(a)}(),bx=0}}function Sx(){var e=xx.now(),t=e-Rx;t>1e3&&(wx-=t,Rx=e)}function Fx(e){vx||(mx&&(mx=clearTimeout(mx)),e-bx>24?(e<1/0&&(mx=setTimeout(Bx,e-xx.now()-wx)),yx&&(yx=clearInterval(yx))):(yx||(Rx=xx.now(),yx=setInterval(Sx,1e3)),vx=1,_x(Bx)))}function jx(e){return e.x}function Dx(e){return e.y}Cx.prototype=Ox.prototype={constructor:Cx,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Ex():+n)+(null==t?0:+t),this._next||px===this||(px?px._next=this:hx=this,px=this),this._call=e,this._time=n,Fx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fx())}};var Tx=Math.PI*(3-Math.sqrt(5)),Mx={center:function(e,t){var n;function a(){var a,r,i=n.length,o=0,s=0;for(a=0;au+g||rd+g||is.index){var h=u-o.x-o.vx,p=d-o.y-o.vy,A=h*h+p*p;Ae.r&&(e.r=e[t].r)}function s(){if(t){var a,r,i=t.length;for(n=new Array(i),a=0;a=o)){(e.data!==t||e.next)&&(0===c&&(g+=(c=ax())*c),0===l&&(g+=(l=ax())*l),g1?(null==n?s.delete(e):s.set(e,g(n)),t):s.get(e)},find:function(t,n,a){var r,i,o,s,u,d=0,c=e.length;for(null==a?a=1/0:a*=a,d=0;d1?(d.on(e,n),t):d.on(e)}}}(e),a=!1,r=n.stop,i=n.restart;return n.stopped=function(){return a},n.restart=function(){return a=!1,i()},n.stop=function(){return a=!0,r()},Qx(n,t,!0).on("end",(function(){a=!0}))}(t.source,e),n.on("tick",function(e,t){return function(){e.touch(t).run()}}(t.dataflow,this)),e.static||(a=!0,n.tick()),t.modifies("index")),r||a||e.modified(Ux)||t.changed()&&e.restart)if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/i)),e.static)for(n.stop();--i>=0;)n.tick();else if(n.stopped()&&n.restart(),!a)return t.StopPropagation;return this.finish(e,t)},Ix.finish=function(e,t){for(var n,a=t.dataflow,r=this._argops,i=0,o=r.length;i=0;)t+=n[a].value;else t=1;e.value=t}function qx(e,t){var n,a,r,i,o,s=new Jx(e),u=+e.value&&(s.value=e.value),d=[s];for(null==t&&(t=Gx);n=d.pop();)if(u&&(n.value=+n.data.value),(r=t(n.data))&&(o=r.length))for(n.children=new Array(o),i=o-1;i>=0;--i)d.push(a=n.children[i]=new Jx(r[i])),a.parent=n,a.depth=n.depth+1;return s.eachBefore(Yx)}function Gx(e){return e.children}function Xx(e){e.data=e.data.data}function Yx(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Jx(e){this.data=e,this.depth=this.height=0,this.parent=null}function $x(e){qa.call(this,null,e)}function Zx(e){return e.values}function e_(){var e,t=[];return e={entries:function(e){return function e(n,a){if(++a>t.length)return n;var r,i=[];for(r in n)i.push({key:r,values:e(n[r],a)});return i}(function e(n,a){if(a>=t.length)return n;for(var r,i,o,s=-1,u=n.length,d=t[a++],c={},l={};++s=0;--n)r.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,a=t.children,r=a&&a.length;--r>=0;)n+=a[r].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),a=t.ancestors(),r=null;for(e=n.pop(),t=a.pop();e===t;)r=e,e=n.pop(),t=a.pop();return r}(t,e),a=[t];t!==n;)t=t.parent,a.push(t);for(var r=a.length;e!==n;)a.splice(r,0,e),e=e.parent;return a},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return qx(this).eachBefore(Xx)}},$x.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]},Object(he.y)($x,qa).transform=function(e,t){t.source||Object(he.n)("Nest transform requires an upstream data source.");var n=e.generate,a=e.modified(),r=t.clone(),i=this.value;return(!i||a||t.changed())&&(i&&i.each((function(e){e.children&&we(e.data)&&r.rem.push(e.data)})),this.value=i=qx({values:Object(he.i)(e.keys).reduce((function(e,t){return e.key(t),e}),e_()).entries(r.source)},Zx),n&&i.each((function(e){e.children&&(e=Ee(e.data),r.add.push(e),r.source.push(e))})),Vx(i,xe,xe)),r.source.root=i,r},Object(he.y)(t_,qa).transform=function(e,t){t.source&&t.source.root||Object(he.n)(this.constructor.name+" transform requires a backing tree data source.");var n=this.layout(e.method),a=this.fields,r=t.source.root,i=e.as||a;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(Be(e.sort,(function(e){return e.data}))),function(e,t,n){for(var a,r=0,i=t.length;r0&&n*n>a*a+r*r}function s_(e,t){for(var n=0;n(o*=o)?(a=(d+o-r)/(2*d),i=Math.sqrt(Math.max(0,o/d-a*a)),n.x=e.x-a*s-i*u,n.y=e.y-a*u+i*s):(a=(d+r-o)/(2*d),i=Math.sqrt(Math.max(0,r/d-a*a)),n.x=t.x+a*s-i*u,n.y=t.y+a*u+i*s)):(n.x=t.x+n.r,n.y=t.y)}function f_(e,t){var n=e.r+t.r-1e-6,a=t.x-e.x,r=t.y-e.y;return n>0&&n*n>a*a+r*r}function g_(e){var t=e._,n=e.next._,a=t.r+n.r,r=(t.x*n.r+n.x*t.r)/a,i=(t.y*n.r+n.y*t.r)/a;return r*r+i*i}function h_(e){this._=e,this.next=null,this.previous=null}function p_(e){if(!(r=e.length))return 0;var t,n,a,r,i,o,s,u,d,c,l;if((t=e[0]).x=0,t.y=0,!(r>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(r>2))return t.r+n.r;l_(n,t,a=e[2]),t=new h_(t),n=new h_(n),a=new h_(a),t.next=a.previous=n,n.next=t.previous=a,a.next=n.previous=t;e:for(s=3;s0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=v_(t),n):e},n.parentId=function(e){return arguments.length?(t=v_(e),n):t},n};function U_(e){qa.call(this,null,e)}function P_(e,t){return e.parent===t.parent?1:2}function L_(e){var t=e.children;return t?t[0]:e.t}function I_(e){var t=e.children;return t?t[t.length-1]:e.t}function Q_(e,t,n){var a=n/(t.i-e.i);t.c-=a,t.s+=n,e.c+=a,t.z+=n,t.m+=n}function H_(e,t,n){return e.a.parent===t.parent?e.a:n}function z_(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function K_(e,t){return e.parent===t.parent?1:2}function V_(e,t){return e+t.x}function W_(e,t){return Math.max(e,t.y)}U_.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},Object(he.y)(U_,qa).transform=function(e,t){t.source||Object(he.n)("Stratify transform requires an upstream data source.");var n=this.value,a=e.modified(),r=t.fork(t.ALL).materialize(t.SOURCE),i=!this.value||a||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return r.source=r.source.slice(),i&&(n=r.source.length?Vx(N_().id(e.key).parentId(e.parentKey)(r.source),e.key,he.gb):Vx(N_()([{}]),e.key,e.key)),r.source.root=this.value=n,r},z_.prototype=Object.create(Jx.prototype);var q_={tidy:function(){var e=P_,t=1,n=1,a=null;function r(r){var u=function(e){for(var t,n,a,r,i,o=new z_(e,0),s=[o];t=s.pop();)if(a=t._.children)for(t.children=new Array(i=a.length),r=i-1;r>=0;--r)s.push(n=t.children[r]=new z_(a[r],r)),n.parent=t;return(o.parent=new z_(null,0)).children=[o],o}(r);if(u.eachAfter(i),u.parent.m=-u.z,u.eachBefore(o),a)r.eachBefore(s);else{var d=r,c=r,l=r;r.eachBefore((function(e){e.xc.x&&(c=e),e.depth>l.depth&&(l=e)}));var f=d===c?1:e(d,c)/2,g=f-d.x,h=t/(c.x+f+g),p=n/(l.depth||1);r.eachBefore((function(e){e.x=(e.x+g)*h,e.y=e.depth*p}))}return r}function i(t){var n=t.children,a=t.parent.children,r=t.i?a[t.i-1]:null;if(n){!function(e){for(var t,n=0,a=0,r=e.children,i=r.length;--i>=0;)(t=r[i]).z+=n,t.m+=n,n+=t.s+(a+=t.c)}(t);var i=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+e(t._,r._),t.m=t.z-i):t.z=i}else r&&(t.z=r.z+e(t._,r._));t.parent.A=function(t,n,a){if(n){for(var r,i=t,o=t,s=n,u=i.parent.children[0],d=i.m,c=o.m,l=s.m,f=u.m;s=I_(s),i=L_(i),s&&i;)u=L_(u),(o=I_(o)).a=t,(r=s.z+l-i.z-d+e(s._,i._))>0&&(Q_(H_(s,t,a),t,r),d+=r,c+=r),l+=s.m,d+=i.m,f+=u.m,c+=o.m;s&&!I_(o)&&(o.t=s,o.m+=l-c),i&&!L_(u)&&(u.t=i,u.m+=d-f,a=t)}return a}(t,r,t.parent.A||a[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return r.separation=function(t){return arguments.length?(e=t,r):e},r.size=function(e){return arguments.length?(a=!1,t=+e[0],n=+e[1],r):a?null:[t,n]},r.nodeSize=function(e){return arguments.length?(a=!0,t=+e[0],n=+e[1],r):a?[t,n]:null},r},cluster:function(){var e=K_,t=1,n=1,a=!1;function r(r){var i,o=0;r.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(V_,0)/e.length}(n),t.y=function(e){return 1+e.reduce(W_,0)}(n)):(t.x=i?o+=e(t,i):0,t.y=0,i=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(r),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(r),d=s.x-e(s,u)/2,c=u.x+e(u,s)/2;return r.eachAfter(a?function(e){e.x=(e.x-r.x)*t,e.y=(r.y-e.y)*n}:function(e){e.x=(e.x-d)/(c-d)*t,e.y=(1-(r.y?e.y/r.y:1))*n})}return r.separation=function(t){return arguments.length?(e=t,r):e},r.size=function(e){return arguments.length?(a=!1,t=+e[0],n=+e[1],r):a?null:[t,n]},r.nodeSize=function(e){return arguments.length?(a=!0,t=+e[0],n=+e[1],r):a?[t,n]:null},r}},G_=["x","y","depth","children"];function X_(e){t_.call(this,e)}X_.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:G_.length,default:G_}]};var Y_=Object(he.y)(X_,t_);function J_(e){qa.call(this,[],e)}Y_.layout=function(e){var t=e||"tidy";if(Object(he.v)(q_,t))return q_[t]();Object(he.n)("Unrecognized Tree layout method: "+t)},Y_.params=["size","nodeSize"],Y_.fields=G_,J_.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},Object(he.y)(J_,qa).transform=function(e,t){var n=this.value,a=t.source&&t.source.root,r=t.fork(t.NO_SOURCE),i={};return a||Object(he.n)("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(r.rem=n,t.visit(t.SOURCE,(function(e){i[xe(e)]=1})),a.each((function(e){var t=e.data,n=e.parent&&e.parent.data;n&&i[xe(t)]&&i[xe(n)]&&r.add.push(Ee({source:n,target:t}))})),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,(function(e){i[xe(e)]=1})),n.forEach((function(e){(i[xe(e.source)]||i[xe(e.target)])&&r.mod.push(e)}))),r};var $_=function(e,t,n,a,r){for(var i,o=e.children,s=-1,u=o.length,d=e.value&&(r-n)/e.value;++sf&&(f=s),A=c*c*p,(g=Math.max(f/A,A/l))>h){c-=s;break}h=g}v.push(o={value:c,dice:u1?t:1)},n}(Z_),nE=function e(t){function n(e,n,a,r,i){if((o=e._squarify)&&o.ratio===t)for(var o,s,u,d,c,l=-1,f=o.length,g=e.value;++l1?t:1)},n}(Z_),aE={binary:function(e,t,n,a,r){var i,o,s=e.children,u=s.length,d=new Array(u+1);for(d[0]=o=i=0;i=n-1){var c=s[t];return c.x0=r,c.y0=i,c.x1=o,void(c.y1=u)}for(var l=d[t],f=a/2+l,g=t+1,h=n-1;g>>1;d[p]u-i){var m=(r*v+o*A)/a;e(t,g,A,r,i,m,u),e(g,n,v,m,i,o,u)}else{var y=(i*v+u*A)/a;e(t,g,A,r,i,o,y),e(g,n,v,r,y,o,u)}}(0,u,e.value,t,n,a,r)},dice:O_,slice:$_,slicedice:function(e,t,n,a,r){(1&e.depth?$_:O_)(e,t,n,a,r)},squarify:tE,resquarify:nE},rE=["x0","y0","x1","y1","depth","children"];function iE(e){t_.call(this,e)}iE.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:rE.length,default:rE}]};var oE=Object(he.y)(iE,t_);oE.layout=function(){var e=function(){var e=tE,t=!1,n=1,a=1,r=[0],i=m_,o=m_,s=m_,u=m_,d=m_;function c(e){return e.x0=e.y0=0,e.x1=n,e.y1=a,e.eachBefore(l),r=[0],t&&e.eachBefore(C_),e}function l(t){var n=r[t.depth],a=t.x0+n,c=t.y0+n,l=t.x1-n,f=t.y1-n;l>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;var a=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*a),this._halfedges=new Int32Array(3*a),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return Object(_.a)(e,null,[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:RE,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:bE,r=t.length,i=new Float64Array(2*r),o=0;o>1,o=1/0,s=1/0,u=-1/0,d=-1/0,c=0;cu&&(u=l),f>d&&(d=f),this._ids[c]=c}for(var g,h,p,A=(o+u)/2,v=(s+d)/2,m=1/0,y=0;y0&&(h=x,m=_)}for(var E=e[2*h],k=e[2*h+1],C=1/0,O=0;ON&&(D[T++]=U,N=this._dists[U])}return this.hull=D.subarray(0,T),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(AE(b,w,E,k,S,F)){var P=h,L=E,I=k;h=p,E=S,k=F,p=P,S=L,F=I}var Q=function(e,t,n,a,r,i){var o=n-e,s=a-t,u=r-e,d=i-t,c=o*o+s*s,l=u*u+d*d,f=.5/(o*d-s*u);return{x:e+(d*c-s*l)*f,y:t+(o*l-u*c)*f}}(b,w,E,k,S,F);this._cx=Q.x,this._cy=Q.y;for(var H=0;H0&&Math.abs(G-K)<=lE&&Math.abs(X-V)<=lE)&&(K=G,V=X,q!==g&&q!==h&&q!==p)){for(var Y=0,J=0,$=this._hashKey(G,X);J0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}},{key:"_legalize",value:function(e){for(var t,n,a,r,i,o,s,u,d,c,l,f,g,h,p,A,v=this._triangles,m=this._halfedges,y=this.coords,R=0,b=0;;){var w=m[e],x=e-e%3;if(b=x+(e+2)%3,-1!==w){var _=w-w%3,E=x+(e+1)%3,k=_+(w+2)%3,C=v[b],O=v[e],B=v[E],S=v[k];if(t=y[2*C],n=y[2*C+1],a=y[2*O],r=y[2*O+1],i=y[2*B],o=y[2*B+1],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,(d=t-(s=y[2*S]))*((f=r-(u=y[2*S+1]))*(A=(g=i-s)*g+(h=o-u)*h)-(p=(l=a-s)*l+f*f)*h)-(c=n-u)*(l*A-p*g)+(d*d+c*c)*(l*h-f*g)<0){v[e]=S,v[w]=C;var F=m[k];if(-1===F){var j=this._hullStart;do{if(this._hullTri[j]===k){this._hullTri[j]=e;break}j=this._hullPrev[j]}while(j!==this._hullStart)}this._link(e,F),this._link(w,m[b]),this._link(b,k);var D=_+(w+1)%3;R=33306690738754716e-32*Math.abs(o+s)?o-s:0}function AE(e,t,n,a,r,i){return(pE(r,i,e,t,n,a)||pE(e,t,n,a,r,i)||pE(n,a,r,i,e,t))<0}function vE(e,t,n,a,r,i){var o=n-e,s=a-t,u=r-e,d=i-t,c=o*o+s*s,l=u*u+d*d,f=.5/(o*d-s*u),g=(d*c-s*l)*f,h=(o*l-u*c)*f;return g*g+h*h}function mE(e,t,n,a){if(a-n<=20)for(var r=n+1;r<=a;r++){for(var i=e[r],o=t[i],s=r-1;s>=n&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=i}else{var u=n+1,d=a;yE(e,n+a>>1,u),t[e[n]]>t[e[a]]&&yE(e,n,a),t[e[u]]>t[e[a]]&&yE(e,u,a),t[e[n]]>t[e[u]]&&yE(e,n,u);for(var c=e[u],l=t[c];;){do{u++}while(t[e[u]]l);if(d=d-n?(mE(e,t,u,a),mE(e,t,n,d-1)):(mE(e,t,n,d-1),mE(e,t,u,a))}}function yE(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}function RE(e){return e[0]}function bE(e){return e[1]}var wE=function(){function e(){Object(x.a)(this,e),this._x0=this._y0=this._x1=this._y1=null,this._=""}return Object(_.a)(e,[{key:"moveTo",value:function(e,t){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t)}},{key:"closePath",value:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}},{key:"lineTo",value:function(e,t){this._+="L".concat(this._x1=+e,",").concat(this._y1=+t)}},{key:"arc",value:function(e,t,n){var a=(e=+e)+(n=+n),r=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+="M".concat(a,",").concat(r):(Math.abs(this._x1-a)>1e-6||Math.abs(this._y1-r)>1e-6)&&(this._+="L"+a+","+r),n&&(this._+="A".concat(n,",").concat(n,",0,1,1,").concat(e-n,",").concat(t,"A").concat(n,",").concat(n,",0,1,1,").concat(this._x1=a,",").concat(this._y1=r))}},{key:"rect",value:function(e,t,n,a){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t,"h").concat(+n,"v").concat(+a,"h").concat(-n,"Z")}},{key:"value",value:function(){return this._||null}}]),e}(),xE=function(){function e(){Object(x.a)(this,e),this._=[]}return Object(_.a)(e,[{key:"moveTo",value:function(e,t){this._.push([e,t])}},{key:"closePath",value:function(){this._.push(this._[0].slice())}},{key:"lineTo",value:function(e,t){this._.push([e,t])}},{key:"value",value:function(){return this._.length?this._:null}}]),e}(),_E=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500],a=Object(ei.a)(n,4),r=a[0],i=a[1],o=a[2],s=a[3];if(Object(x.a)(this,e),!((o=+o)>=(r=+r)&&(s=+s)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=o,this.xmin=r,this.ymax=s,this.ymin=i,this._init()}return Object(_.a)(e,[{key:"update",value:function(){return this.delaunay.update(),this._init(),this}},{key:"_init",value:function(){for(var e,t,n=this.delaunay,a=n.points,r=n.hull,i=n.triangles,o=this.vectors,s=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2),u=0,d=0,c=i.length;u1;)r-=2;for(var i=2;i4)for(var s=0;s0){if(t>=this.ymax)return null;(r=(this.ymax-t)/a)0){if(e>=this.xmax)return null;(r=(this.xmax-e)/n)this.xmax?2:0)|(tthis.ymax?8:0)}}]),e}(),EE=D.a.mark(jE),kE=2*Math.PI;function CE(e){return e[0]}function OE(e){return e[1]}function BE(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var SE=function(){function e(t){Object(x.a)(this,e),this._delaunator=new gE(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}return Object(_.a)(e,null,[{key:"from",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:CE,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:OE,r=arguments.length>3?arguments[3]:void 0;return new e("length"in t?FE(t,n,a,r):Float64Array.from(jE(t,n,a,r)))}}]),Object(_.a)(e,[{key:"update",value:function(){return this._delaunator.update(),this._init(),this}},{key:"_init",value:function(){var e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){for(var t=e.triangles,n=e.coords,a=0;a1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(function(e,t){return t})).sort((function(e,n){return t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]}));for(var n=this.collinear[0],a=this.collinear[this.collinear.length-1],r=[t[2*n],t[2*n+1],t[2*a],t[2*a+1]],i=1e-8*Math.sqrt(Math.pow(r[3]-r[1],2)+Math.pow(r[2]-r[0],2)),o=0,s=t.length/2;o0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=c[0],this.triangles[1]=c[1],this.triangles[2]=c[1],f[c[0]]=1,2===c.length&&(f[c[1]]=0))}},{key:"voronoi",value:function(e){return new _E(this,e)}},{key:"neighbors",value:D.a.mark((function e(t){var n,a,r,i,o,s,u,d,c,l,f;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.inedges,a=this.hull,r=this._hullIndex,i=this.halfedges,o=this.triangles,!(s=this.collinear)){e.next=10;break}if(!((u=s.indexOf(t))>0)){e.next=6;break}return e.next=6,s[u-1];case 6:if(!(u2&&void 0!==arguments[2]?arguments[2]:0;if((e=+e)!=e||(t=+t)!=t)return-1;for(var a,r=n;(a=this._step(n,e,t))>=0&&a!==n&&a!==r;)n=a;return a}},{key:"_step",value:function(e,t,n){var a=this.inedges,r=this.hull,i=this._hullIndex,o=this.halfedges,s=this.triangles,u=this.points;if(-1===a[e]||!u.length)return(e+1)%(u.length>>1);var d=e,c=Math.pow(t-u[2*e],2)+Math.pow(n-u[2*e+1],2),l=a[e],f=l;do{var g=s[f],h=Math.pow(t-u[2*g],2)+Math.pow(n-u[2*g+1],2);if(h1&&void 0!==arguments[1]?arguments[1]:2,n=null==e?e=new wE:void 0,a=this.points,r=0,i=a.length;r>5<<5,u=~~Math.max(Math.abs(m+y),Math.abs(m-y))}else o=o+31>>5<<5;if(u>g&&(g=u),l+o>=2048&&(l=0,f+=g,g=0),f+u>=2048)break;r.translate((l+(o>>1))/i,(f+(u>>1))/i),t.rotate&&r.rotate(t.rotate*UE),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=o,t.height=u,t.xoff=l,t.yoff=f,t.x1=o>>1,t.y1=u>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,l+=o}for(var b=r.getImageData(0,0,2048/i,2048/i).data,w=[];--a>=0;)if((t=n[a]).hasText){for(s=(o=t.width)>>5,u=t.y1-t.y0,d=0;d>5),k=b[2048*(f+c)+(l+d)<<2]?1<<31-d%32:0;w[E]|=k,x|=k}x?_=c:(t.y0++,u--,c--,f++)}t.y1=t.y0+_,t.sprite=w.slice(0,(t.y1-t.y0)*s)}}}function LE(e,t,n){n>>=5;for(var a,r=e.sprite,i=e.width>>5,o=e.x-(i<<4),s=127&o,u=32-s,d=e.y1-e.y0,c=(e.y+e.y0)*n+(o>>5),l=0;l>>s:0))&t[c+f])return!0;c+=n}return!1}function IE(e,t){var n=e[0],a=e[1];t.x+t.x0a.x&&(a.x=t.x+t.x1),t.y+t.y1>a.y&&(a.y=t.y+t.y1)}function QE(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function HE(e){return"function"==typeof e?e:function(){return e}}var zE={archimedean:QE,rectangular:function(e){var t=4*e[0]/e[1],n=0,a=0;return function(e){var r=e<0?-1:1;switch(Math.sqrt(1+4*r*e)-r&3){case 0:n+=t;break;case 1:a+=4;break;case 2:n-=t;break;default:a-=4}return[n,a]}}},KE=["x","y","font","fontSize","fontStyle","fontWeight","angle"],VE=["text","font","rotate","fontSize","fontStyle","fontWeight"];function WE(e){qa.call(this,function(){var e,t,n,a,r,i,o,s=[256,256],u=QE,d=[],c=Math.random,l={};function f(e,t,n){for(var a,r,i,o,d,l=t.x,f=t.y,g=Math.sqrt(s[0]*s[0]+s[1]*s[1]),h=u(s),p=c()<.5?1:-1,A=-p;(a=h(A+=p))&&(r=~~a[0],i=~~a[1],!(Math.min(Math.abs(r),Math.abs(i))>=g));)if(t.x=l+r,t.y=f+i,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>s[0]||t.y+t.y1>s[1]||n&&LE(t,e,s[0])||n&&(d=n,!((o=t).x+o.x1>d[0].x&&o.x+o.x0d[0].y&&o.y+o.y0>5,R=s[0]>>5,b=t.x-(y<<4),w=127&b,x=32-w,_=t.y1-t.y0,E=(t.y+t.y0)*R+(b>>5),k=0;k<_;k++){v=0;for(var C=0;C<=y;C++)e[E+C]|=v<>>w:0);E+=R}return t.sprite=null,!0}return!1}return l.layout=function(){for(var u=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=2048/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(yu()),l=function(e){for(var t=[],n=-1;++n>5)*s[1]),g=null,h=d.length,p=-1,A=[],v=d.map((function(s){return{text:e(s),font:t(s),style:a(s),weight:r(s),rotate:i(s),size:~~(n(s)+1e-14),padding:o(s),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:s}})).sort((function(e,t){return t.size-e.size}));++p>1,m.y=s[1]*(c()+.5)>>1,PE(u,m,v,p),m.hasText&&f(l,m,g)&&(A.push(m),g?IE(g,m):g=[{x:m.x+m.x0,y:m.y+m.y0},{x:m.x+m.x1,y:m.y+m.y1}],m.x-=s[0]>>1,m.y-=s[1]>>1)}return A},l.words=function(e){return arguments.length?(d=e,l):d},l.size=function(e){return arguments.length?(s=[+e[0],+e[1]],l):s},l.font=function(e){return arguments.length?(t=HE(e),l):t},l.fontStyle=function(e){return arguments.length?(a=HE(e),l):a},l.fontWeight=function(e){return arguments.length?(r=HE(e),l):r},l.rotate=function(e){return arguments.length?(i=HE(e),l):i},l.text=function(t){return arguments.length?(e=HE(t),l):e},l.spiral=function(e){return arguments.length?(u=zE[e]||e,l):u},l.fontSize=function(e){return arguments.length?(n=HE(e),l):n},l.padding=function(e){return arguments.length?(o=HE(e),l):o},l.random=function(e){return arguments.length?(c=e,l):c},l}(),e)}function qE(e){return new Uint8Array(e)}function GE(e){return new Uint16Array(e)}function XE(e){return new Uint32Array(e)}function YE(e,t,n){var a=(t<257?qE:t<65537?GE:XE)(e);return n&&a.set(n),a}WE.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:KE}]},Object(he.y)(WE,qa).transform=function(e,t){!e.size||e.size[0]&&e.size[1]||Object(he.n)("Wordcloud size dimensions must be non-zero.");var n=e.modified();if(n||t.changed(t.ADD_REM)||VE.some((function(n){var a=e[n];return Object(he.D)(a)&&t.modified(a.fields)}))){var a,r=t.materialize(t.SOURCE).source,i=this.value,o=e.as||KE,s=e.fontSize||14;if(Object(he.D)(s)?a=e.fontSizeRange:s=Object(he.l)(s),a){var u=s,d=sv("sqrt")().domain(Object(he.p)(r,u)).range(a);s=function(e){return d(u(e))}}r.forEach((function(e){e[o[0]]=NaN,e[o[1]]=NaN,e[o[3]]=0}));for(var c,l,f=i.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(s).random(wr).layout(),g=i.size(),h=g[0]>>1,p=g[1]>>1,A=0,v=f.length;Ar?1:0})),function(e,t){return Array.from(t,(function(t){return e[t]}))}(e,t)}(l,f),d)o=t,s=e,t=Array(d+c),e=XE(d+c),function(e,t,n,a,r,i,o,s,u){var d,c=0,l=0;for(d=0;c0)for(u=0;u=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length)},add:function(e){for(var n,a=0,r=t.length,i=e.length;aa.length||n>e)&&(e=Math.max(n,e),a=YE(t,e,a),r=YE(t,e))}}}(),e),this._indices=null,this._dims=null}ZE.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]};var ek=Object(he.y)(ZE,qa);function tk(e){qa.call(this,null,e)}ek.transform=function(e,t){return this._dims?e.modified("fields")||e.fields.some((function(e){return t.modified(e.fields)}))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},ek.init=function(e,t){for(var n,a,r=e.fields,i=e.query,o=this._indices={},s=this._dims=[],u=i.length,d=0;dA)for(r=A,i=Math.min(h,v);rv)for(r=Math.max(h,v),i=p;rg)for(r=g,i=Math.min(l,h);rh)for(r=Math.max(l,h),i=f;r",Ek[3]="Identifier",Ek[4]="Keyword",Ek[5]="Null",Ek[6]="Numeric",Ek[7]="Punctuator",Ek[8]="String",Ek[9]="RegularExpression";var Lk="ILLEGAL",Ik=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Qk=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Hk(e,t){if(!e)throw new Error("ASSERT: "+t)}function zk(e){return e>=48&&e<=57}function Kk(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function Vk(e){return"01234567".indexOf(e)>=0}function Wk(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function qk(e){return 10===e||13===e||8232===e||8233===e}function Gk(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Ik.test(String.fromCharCode(e))}function Xk(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Qk.test(String.fromCharCode(e))}var Yk={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function Jk(){for(var e;Ck1114111||"}"!==e)&&fC({},"Unexpected token %0",Lk),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),a=56320+(t-65536&1023),String.fromCharCode(n,a))}function eC(){var e,t;for(e=kk.charCodeAt(Ck++),t=String.fromCharCode(e),92===e&&(117!==kk.charCodeAt(Ck)&&fC({},"Unexpected token %0",Lk),++Ck,(e=$k("u"))&&"\\"!==e&&Gk(e.charCodeAt(0))||fC({},"Unexpected token %0",Lk),t=e);Ck>>="===(a=kk.substr(Ck,4))?{type:7,value:a,start:r,end:Ck+=4}:">>>"===(n=a.substr(0,3))||"<<="===n||">>="===n?{type:7,value:n,start:r,end:Ck+=3}:o===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(o)>=0||"=>"===t?{type:7,value:t,start:r,end:Ck+=2}:"<>=!+-*%&|^/".indexOf(o)>=0?{type:7,value:o,start:r,end:++Ck}:void fC({},"Unexpected token %0",Lk)}function nC(){var e,t,n;if(Hk(zk((n=kk[Ck]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=Ck,e="","."!==n){if(e=kk[Ck++],n=kk[Ck],"0"===e){if("x"===n||"X"===n)return++Ck,function(e){for(var t="";Ck=Ok?{type:2,start:Ck,end:Ck}:Gk(e=kk.charCodeAt(Ck))?function(){var e,t;return e=Ck,{type:1===(t=92===kk.charCodeAt(Ck)?eC():function(){var e,t;for(e=Ck++;Ck=0&&Ck=0&&fC({},"Invalid regular expression",n),{value:n,literal:t}}(),a=function(e,t){var n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(function(e,t){if(parseInt(t,16)<=1114111)return"x";fC({},"Invalid regular expression")})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){fC({},"Invalid regular expression")}try{return new RegExp(e,t)}catch(e){return null}}(t.value,n.value),{literal:t.literal+n.literal,value:a,regex:{pattern:t.value,flags:n.value},start:e,end:Ck}}()),iC()):gC(rC())}return n}function bC(){var e=[];if(hC("("),!pC(")"))for(;Ck":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function kC(){var e,t;return e=function(){var e,t,n,a,r,i,o,s,u,d;if(e=Bk,u=_C(),0===(r=EC(a=Bk)))return u;for(a.prec=r,rC(),t=[e,Bk],i=[u,a,o=_C()];(r=EC(Bk))>0;){for(;i.length>2&&r<=i[i.length-2].prec;)o=i.pop(),s=i.pop().value,u=i.pop(),t.pop(),n=oC(s,u,o),i.push(n);(a=rC()).prec=r,i.push(a),t.push(Bk),n=_C(),i.push(n)}for(n=i[d=i.length-1],t.pop();d>1;)t.pop(),n=oC(i[d-1].value,i[d-2],n),d-=2;return n}(),pC("?")&&(rC(),t=kC(),hC(":"),e=function(e,t,n){var a=new Pk("ConditionalExpression");return a.test=e,a.consequent=t,a.alternate=n,a}(e,t,kC())),e}function CC(){var e=kC();if(pC(","))throw new Error("Disabled.");return e}var OC=function(e){Ck=0,Ok=(kk=e).length,Bk=null,iC();var t=CC();if(2!==Bk.type)throw new Error("Unexpect token after expression.");return t},BC={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"},SC=function(e){function t(t,n,a){return function(r){return function(t,n,a,r){var i=e(n[0]);return a&&(i=a+"("+i+")",0===a.lastIndexOf("new ",0)&&(i="("+i+")")),i+"."+t+(r<0?"":0===r?"()":"("+n.slice(1).map(e).join(",")+")")}(t,r,n,a)}}var n="new Date";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&Object(he.n)("Missing arguments to clamp function."),t.length>3&&Object(he.n)("Too many arguments to clamp function.");var n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:t("getDate",n,0),day:t("getDay",n,0),year:t("getFullYear",n,0),month:t("getMonth",n,0),hours:t("getHours",n,0),minutes:t("getMinutes",n,0),seconds:t("getSeconds",n,0),milliseconds:t("getMilliseconds",n,0),time:t("getTime",n,0),timezoneoffset:t("getTimezoneOffset",n,0),utcdate:t("getUTCDate",n,0),utcday:t("getUTCDay",n,0),utcyear:t("getUTCFullYear",n,0),utcmonth:t("getUTCMonth",n,0),utchours:t("getUTCHours",n,0),utcminutes:t("getUTCMinutes",n,0),utcseconds:t("getUTCSeconds",n,0),utcmilliseconds:t("getUTCMilliseconds",n,0),length:t("length",null,-1),join:t("join",null),indexof:t("indexOf",null),lastindexof:t("lastIndexOf",null),slice:t("slice",null),reverse:function(t){return"("+e(t[0])+").slice().reverse()"},parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase","String",0),lower:t("toLowerCase","String",0),substring:t("substring","String"),split:t("split","String"),replace:t("replace","String"),trim:t("trim","String",0),regexp:"RegExp",test:t("test","RegExp"),if:function(t){t.length<3&&Object(he.n)("Missing arguments to if function."),t.length>3&&Object(he.n)("Too many arguments to if function.");var n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}};function FC(e,t){for(var n,a,r=t.fields,i=t.values,o=r.length,s=0;s=0})):t},R_union:function(e,t){var n=Object(he.cb)(t[0]),a=Object(he.cb)(t[1]);return n>a&&(n=t[1],a=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]a&&(n=t[1],a=t[0]),e.length?aa&&(e[1]=a),e):[n,a]}};function DC(e,t,n,a){"Literal"!==t[0].type&&Object(he.n)("First argument to selection functions must be a string literal.");var r=t[0].value,i=":"+r;"intersect"!==(t.length>=2&&Object(he.U)(t).value)||Object(he.v)(a,"@unit")||(a["@unit"]=n.getData(r).indataRef(n,"unit")),Object(he.v)(a,i)||(a[i]=n.getData(r).tuplesRef())}function TC(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function MC(e){var t=Kp(e);return.2126*TC(t.r)+.7152*TC(t.g)+.0722*TC(t.b)}function NC(e){var t=this.context.data[e];return t?t.values.value:[]}var UC={};function PC(e,t,n){var a=e+":"+n,r=UC[a];return r&&r[0]===t||(UC[a]=r=[t,t(n)]),r[1]}function LC(e,t){return PC("timeFormat",ks,t)(e)}var IC=new Date(2e3,0,1);function QC(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(IC.setYear(2e3),IC.setMonth(e),IC.setDate(t),LC(IC,n)):""}function HC(e,t){var n;return Object(he.D)(e)?e:Object(he.H)(e)?(n=t.scales[e])&&n.value:void 0}var zC,KC,VC,WC,qC,GC=Fy(),XC=Fy(),YC={point:tR,lineStart:tR,lineEnd:tR,polygonStart:function(){GC.reset(),YC.lineStart=JC,YC.lineEnd=$C},polygonEnd:function(){var e=+GC;XC.add(e<0?Py+e:e),this.lineStart=this.lineEnd=this.point=tR},sphere:function(){XC.add(Py)}};function JC(){YC.point=ZC}function $C(){eO(zC,KC)}function ZC(e,t){YC.point=eO,zC=e,KC=t,VC=e*=Iy,WC=Ky(t=(t*=Iy)/2+Uy),qC=Xy(t)}function eO(e,t){var n=(e*=Iy)-VC,a=n>=0?1:-1,r=a*n,i=Ky(t=(t*=Iy)/2+Uy),o=Xy(t),s=qC*o,u=WC*i+s*Ky(r),d=s*a*Xy(r);GC.add(zy(d,u)),VC=e,WC=i,qC=o}var tO,nO,aO,rO,iO,oO,sO,uO,dO,cO,lO=Fy(),fO={point:gO,lineStart:pO,lineEnd:AO,polygonStart:function(){fO.point=vO,fO.lineStart=mO,fO.lineEnd=yO,lO.reset(),YC.polygonStart()},polygonEnd:function(){YC.polygonEnd(),fO.point=gO,fO.lineStart=pO,fO.lineEnd=AO,GC<0?(tO=-(aO=180),nO=-(rO=90)):lO>1e-6?rO=90:lO<-1e-6&&(nO=-90),cO[0]=tO,cO[1]=aO},sphere:function(){tO=-(aO=180),nO=-(rO=90)}};function gO(e,t){dO.push(cO=[tO=e,aO=e]),trO&&(rO=t)}function hO(e,t){var n=db([e*Iy,t*Iy]);if(uO){var a=lb(uO,n),r=lb([a[1],-a[0],0],a);hb(r),r=ub(r);var i,o=e-iO,s=o>0?1:-1,u=r[0]*Ly*s,d=Qy(o)>180;d^(s*iOrO&&(rO=i):d^(s*iO<(u=(u+360)%360-180)&&urO&&(rO=t)),d?eRO(tO,aO)&&(aO=e):RO(e,aO)>RO(tO,aO)&&(tO=e):aO>=tO?(eaO&&(aO=e)):e>iO?RO(tO,e)>RO(tO,aO)&&(aO=e):RO(e,aO)>RO(tO,aO)&&(tO=e)}else dO.push(cO=[tO=e,aO=e]);trO&&(rO=t),uO=n,iO=e}function pO(){fO.point=hO}function AO(){cO[0]=tO,cO[1]=aO,fO.point=gO,uO=null}function vO(e,t){if(uO){var n=e-iO;lO.add(Qy(n)>180?n+(n>0?360:-360):n)}else oO=e,sO=t;YC.point(e,t),hO(e,t)}function mO(){YC.lineStart()}function yO(){vO(oO,sO),YC.lineEnd(),Qy(lO)>1e-6&&(tO=-(aO=180)),cO[0]=tO,cO[1]=aO,uO=null}function RO(e,t){return(t-=e)<0?t+360:t}function bO(e,t){return e[0]-t[0]}function wO(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tRO(a[0],a[1])&&(a[1]=r[1]),RO(r[0],a[1])>RO(a[0],a[1])&&(a[0]=r[0])):i.push(a=r);for(o=-1/0,t=0,a=i[n=i.length-1];t<=n;a=r,++t)r=i[t],(s=RO(a[1],r[0]))>o&&(o=s,tO=r[0],aO=a[1])}return dO=cO=null,tO===1/0||nO===1/0?[[NaN,NaN],[NaN,NaN]]:[[tO,nO],[aO,rO]]})),ZO=YO("centroid",(function(e){xO=_O=EO=kO=CO=OO=BO=SO=FO=jO=DO=0,Sy(e,LO);var t=FO,n=jO,a=DO,r=t*t+n*n+a*a;return r<1e-12&&(t=OO,n=BO,a=SO,_O<1e-6&&(t=EO,n=kO,a=CO),(r=t*t+n*n+a*a)<1e-12)?[NaN,NaN]:[zy(n,t)*Ly,eR(a/Jy(r))*Ly]}));function eB(e){this.clear(),e&&this.union(e)}var tB=eB.prototype;tB.clone=function(){return new eB(this)},tB.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},tB.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},tB.equals=function(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},tB.set=function(e,t,n,a){return nthis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},tB.expand=function(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},tB.round=function(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},tB.scale=function(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},tB.translate=function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},tB.rotate=function(e,t,n){var a=this.rotatedPoints(e,t,n);return this.clear().add(a[0],a[1]).add(a[2],a[3]).add(a[4],a[5]).add(a[6],a[7])},tB.rotatedPoints=function(e,t,n){var a=this.x1,r=this.y1,i=this.x2,o=this.y2,s=Math.cos(e),u=Math.sin(e),d=t-t*s+n*u,c=n-t*u-n*s;return[s*a-u*r+d,u*a+s*r+c,s*a-u*o+d,u*a+s*o+c,s*i-u*r+d,u*i+s*r+c,s*i-u*o+d,u*i+s*o+c]},tB.union=function(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},tB.intersect=function(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},tB.alignsWith=function(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},tB.intersects=function(e){return e&&!(this.x2e.x2||this.y2e.y2)},tB.contains=function(e,t){return!(ethis.x2||tthis.y2)},tB.width=function(){return this.x2-this.x1},tB.height=function(){return this.y2-this.y1};var nB=0;function aB(e){return e&&e.gradient}function rB(e,t,n){var a=e.id,r=e.gradient,i="radial"===r?"p_":"";return a||(a=e.id="gradient_"+nB++,"radial"===r?(e.x1=iB(e.x1,.5),e.y1=iB(e.y1,.5),e.r1=iB(e.r1,0),e.x2=iB(e.x2,.5),e.y2=iB(e.y2,.5),e.r2=iB(e.r2,.5),i="p_"):(e.x1=iB(e.x1,0),e.y1=iB(e.y1,0),e.x2=iB(e.x2,1),e.y2=iB(e.y2,0))),t[a]=e,"url("+(n||"")+"#"+i+a+")"}function iB(e,t){return null!=e?e:t}function oB(e){this.mark=e,this.bounds=this.bounds||new eB}function sB(e){oB.call(this,e),this.items=this.items||[]}Object(he.y)(sB,oB);var uB=/^([A-Za-z]+:)?\/\//,dB=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,cB=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;function lB(e,t){return fB.apply(this,arguments)}function fB(){return(fB=ve(D.a.mark((function e(t,n){var a,r;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sanitize(t,n);case 2:return a=e.sent,r=a.href,e.abrupt("return",a.localFile?this.file(r):this.http(r,n));case 5:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function gB(e,t){return hB.apply(this,arguments)}function hB(){return(hB=ve(D.a.mark((function e(t,n){var a,r,i,o,s,u,d;return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(he.o)({},this.options,n),a=this.fileAccess,r={href:null},u=dB.test(t.replace(cB,"")),null!=t&&"string"==typeof t&&u||Object(he.n)("Sanitize failure, invalid URI: "+Object(he.Z)(t)),d=uB.test(t),(s=n.baseURL)&&!d&&(t.startsWith("/")||"/"===s[s.length-1]||(t="/"+t),t=s+t),o=(i=t.startsWith("file://"))||"file"===n.mode||"http"!==n.mode&&!d&&a,i?t=t.slice("file://".length):t.startsWith("//")&&("file"===n.defaultProtocol?(t=t.slice(2),o=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(r,"localFile",{value:!!o}),r.href=t,n.target&&(r.target=n.target+""),n.rel&&(r.rel=n.rel+""),"image"===n.context&&n.crossOrigin&&(r.crossOrigin=n.crossOrigin+""),e.abrupt("return",r);case 14:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function pB(e){return e?function(t){return new Promise((function(n,a){e.readFile(t,(function(e,t){e?a(e):n(t)}))}))}:AB}function AB(){return vB.apply(this,arguments)}function vB(){return(vB=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No file system access.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mB(e){return e?function(){var t=ve(D.a.mark((function t(n,a){var r,i,o;return D.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(he.o)({},this.options.http,a),i=a&&a.response,t.next=4,e(n,r);case 4:return o=t.sent,t.abrupt("return",o.ok?Object(he.D)(o[i])?o[i]():o.text():Object(he.n)(o.status+""+o.statusText));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}():yB}function yB(){return RB.apply(this,arguments)}function RB(){return(RB=ve(D.a.mark((function e(){return D.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(he.n)("No HTTP fetch method available.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bB(e){var t=function(t,n){var a={delimiter:e};return wB(t,n?Object(he.o)(n,a):a)};return t.responseType="text",t}function wB(e,t){return t.header&&(e=t.header.map(he.Z).join(t.delimiter)+"\n"+e),ft(t.delimiter).parse(e+"")}he.ab,he.cb,he.cb,he.bb,he.eb,he.x,wB.responseType="text";var xB=n(271);bB(","),bB("\t"),xB.a;var _B=function(e,t){return function(t){return{options:t||{},sanitize:gB,load:lB,fileAccess:!1,file:pB(null),http:mB(e)}}}("undefined"!=typeof fetch&&fetch);function EB(e){this._pending=0,this._loader=e||_B()}var kB=EB.prototype;function CB(e){e._pending+=1}function OB(e){e._pending-=1}kB.pending=function(){return this._pending},kB.sanitizeURL=function(e){var t=this;return CB(t),t._loader.sanitize(e,{context:"href"}).then((function(e){return OB(t),e})).catch((function(){return OB(t),null}))},kB.loadImage=function(e){var t=this,n=Ru();return CB(t),t._loader.sanitize(e,{context:"image"}).then((function(e){var a=e.href;if(!a||!n)throw{url:a};var r=new n,i=Object(he.v)(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=i&&(r.crossOrigin=i),r.onload=function(){return OB(t)},r.onerror=function(){return OB(t)},r.src=a,r})).catch((function(e){return OB(t),{complete:!1,width:0,height:0,src:e&&e.url||""}}))},kB.ready=function(){var e=this;return new Promise((function(t){!function n(a){e.pending()?setTimeout((function(){n(!0)}),10):t(a)}(!1)}))};var BB={basis:{curve:nd},"basis-closed":{curve:id},"basis-open":{curve:sd},bundle:{curve:dd,tension:"beta",value:.85},cardinal:{curve:fd,tension:"tension",value:0},"cardinal-open":{curve:hd,tension:"tension",value:0},"cardinal-closed":{curve:Ad,tension:"tension",value:0},"catmull-rom":{curve:Fd,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Dd,tension:"alpha",value:.5},"catmull-rom-open":{curve:Md,tension:"alpha",value:.5},linear:{curve:Ud},"linear-closed":{curve:Ld},monotone:{horizontal:Gd,vertical:qd},natural:{curve:Jd},step:{curve:Zd},"step-after":{curve:tc},"step-before":{curve:ec}};function SB(e,t,n){var a=Object(he.v)(BB,e)&&BB[e],r=null;return a&&(r=a.curve||a[t||"vertical"],a.tension&&null!=n&&(r=r[a.tension](n))),r}var FB={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},jB=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/],DB=function(e){var t,n,a,r,i,o,s,u,d,c,l,f=[];for(u=0,c=(t=e.slice().replace(jB[0],"###$1").split(jB[1]).slice(1)).length;us)for(d=1,l=r.length;d1&&(n*=p=Math.sqrt(p),a*=p);var A=f/n,v=l/n,m=-l/a,y=f/a,R=A*s+v*u,b=m*s+y*u,w=A*e+v*t,x=m*e+y*t,_=(w-R)*(w-R)+(x-b)*(x-b),E=1/_-.25;E<0&&(E=0);var k=Math.sqrt(E);i==r&&(k=-k);var C=.5*(R+w)-k*(x-b),O=.5*(b+x)+k*(w-R),B=Math.atan2(b-O,R-C),S=Math.atan2(x-O,w-C),F=S-B;F<0&&1===i?F+=NB:F>0&&0===i&&(F-=NB);for(var j=Math.ceil(Math.abs(F/(MB+.001))),D=[],T=0;T1e-14?(i=s*s+u*o)>=0&&(d=(-s+(i=Math.sqrt(i)))/o,c=(-s-i)/o):d=.5*u/s,0vS)RS(e-n,t-n),RS(e+n,t+n);else{var o,s,u=function(a){return RS(n*Math.cos(a)+e,n*Math.sin(a)+t)};if(u(a),u(r),r!==a)if((a%=NB)<0&&(a+=NB),(r%=NB)<0&&(r+=NB),rr;++s,o-=MB)u(o);else for(o=a-a%MB+MB,s=0;s<4&&oA)return!1;s>p&&(p=s)}else if(i>0){if(s0&&(e.globalAlpha=n,e.fillStyle=NS(e,t,t.fill),!0)},PS=[],LS=function(e,t,n){var a=null!=(a=t.strokeWidth)?a:1;return!(a<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=NS(e,t,t.stroke),e.lineWidth=a,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||PS),e.lineDashOffset=t.strokeDashOffset||0),!0)};function IS(e,t){return e.zindex-t.zindex||e.index-t.index}function QS(e){if(!e.zdirty)return e.zitems;var t,n,a,r=e.items,i=[];for(n=0,a=r.length;n=0;)if(n=t(r[a]))return n;if(r===i)for(a=(r=e.items).length;--a>=0;)if(!r[a].zindex&&(n=t(r[a])))return n;return null}function KS(e){return function(t,n,a){HS(n,(function(n){a&&!a.intersects(n.bounds)||VS(e,t,n,n)}))}}function VS(e,t,n,a){var r=null==n.opacity?1:n.opacity;0!==r&&(e(t,a)||(DS(t,n),n.fill&&US(t,n,r)&&t.fill(),n.stroke&&LS(t,n,r)&&t.stroke()))}function WS(e){return e=e||he.gb,function(t,n,a,r,i,o){return a*=t.pixelRatio,r*=t.pixelRatio,zS(n,(function(n){var s=n.bounds;if((!s||s.contains(i,o))&&s)return e(t,n,a,r,i,o)?n:void 0}))}}function qS(e,t){return function(n,a,r,i){var o,s,u=Array.isArray(a)?a[0]:a,d=null==t?u.fill:t,c=u.stroke&&n.isPointInStroke;return c&&(o=u.strokeWidth,s=u.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,a)&&(d&&n.isPointInPath(r,i)||c&&n.isPointInStroke(r,i))}}function GS(e){return WS(qS(e))}function XS(e,t){return"translate("+e+","+t+")"}function YS(e){return"rotate("+e+")"}function JS(e){return XS(e.x||0,e.y||0)}function $S(e){return XS(e.x||0,e.y||0)+(e.angle?" "+YS(e.angle):"")+(e.scaleX||e.scaleY?" "+function(e,t){return"scale("+e+","+t+")"}(e.scaleX||1,e.scaleY||1):"")}var ZS=function(e,t,n){function a(e,n){var a=n.x||0,r=n.y||0,i=n.angle||0;e.translate(a,r),i&&e.rotate(i*=TB),e.beginPath(),t(e,n),i&&e.rotate(-i),e.translate(-a,-r)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",$S(n)),e("d",t(null,n))},bound:function(e,n){var a=n.x||0,r=n.y||0;return t(mS(e),n),AS(e,n).translate(a,r),n.angle&&e.rotate(n.angle*TB,a,r),e},draw:KS(a),pick:GS(a),isect:n||BS(a)}},eF=ZS("arc",(function(e,t){return rS.context(e)(t)})),tF=function(e,t,n){function a(e,n){e.beginPath(),t(e,n)}var r,i=qS(a);return{type:e,tag:"path",nested:!0,attr:function(e,n){var a=n.mark.items;a.length&&e("d",t(null,a))},bound:function(e,n){var a=n.items;return 0===a.length?e:(t(mS(e),a),AS(e,a[0]))},draw:(r=a,function(e,t,n){!t.items.length||n&&!n.intersects(t.bounds)||VS(r,e,t.items[0],t.items)}),pick:function(e,t,n,a,r,o){var s=t.items,u=t.bounds;return!s||!s.length||u&&!u.contains(r,o)?null:(n*=e.pixelRatio,a*=e.pixelRatio,i(e,s,n,a)?s[0]:null)},isect:SS,tip:n}},nF=tF("area",(function(e,t){var n=t[0],a=n.interpolate||"linear";return("horizontal"===n.orient?oS:iS).curve(SB(a,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,a,r="horizontal"===e[0].orient?t[1]:t[0],i="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(a=Math.abs(e[o][i]-r)).5&&t<1.5?.5-Math.abs(t-1):0}function sF(e,t){var n=oF(t);e("d",fS(null,t,n,n))}function uF(e,t,n,a){var r=oF(t);e.beginPath(),fS(e,t,(n||0)+r,(a||0)+r)}var dF=qS(uF),cF=qS(uF,!1),lF={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",JS(t))},bound:function(e,t){if(!t.clip&&t.items)for(var n=t.items,a=0,r=n.length;ap||iA)))return e.save(),e.translate(g,h),g=r-g,h=i-h,m&&lS(d)&&!dF(e,d,s,u)?(e.restore(),null):(l=d.strokeForeground,(f=!1!==t.interactive)&&l&&d.stroke&&cF(e,d,s,u)?(e.restore(),d):(!(c=zS(d,(function(e){return function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,g,h)?o.pick(e,n,a,g,h):null})))&&f&&(d.fill||!l&&d.stroke)&&dF(e,d,s,u)&&(c=d),e.restore(),c||null))}))},isect:FS,content:function(e,t,n){e("clip-path",t.clip?iF(n,t,t):null)},background:function(e,t){e("class","background"),sF(e,t)},foreground:function(e,t){e("class","foreground"),t.strokeForeground?sF(e,t):e("d","")}};function fF(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((function(t){e.image=t,e.image.url=e.url}))),n}function gF(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function hF(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function pF(e,t){return"center"===e?t/2:"right"===e?t:0}function AF(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var vF={type:"image",tag:"image",nested:!1,attr:function(e,t,n){var a=fF(t,n),r=t.x||0,i=t.y||0,o=gF(t,a),s=hF(t,a),u=!1===t.aspect?"none":"xMidYMid";r-=pF(t.align,o),i-=AF(t.baseline,s),!a.src&&a.toDataURL?e("href",a.toDataURL(),"http://www.w3.org/1999/xlink","xlink:href"):e("href",a.src||"","http://www.w3.org/1999/xlink","xlink:href"),e("transform",XS(r,i)),e("width",o),e("height",s),e("preserveAspectRatio",u)},bound:function(e,t){var n=t.image,a=t.x||0,r=t.y||0,i=gF(t,n),o=hF(t,n);return a-=pF(t.align,i),r-=AF(t.baseline,o),e.set(a,r,a+i,r+o)},draw:function(e,t,n){var a=this;HS(t,(function(t){if(!n||n.intersects(t.bounds)){var r,i,o,s,u=fF(t,a),d=t.x||0,c=t.y||0,l=gF(t,u),f=hF(t,u);d-=pF(t.align,l),c-=AF(t.baseline,f),!1!==t.aspect&&(i=u.width/u.height,o=t.width/t.height,i==i&&o==o&&i!==o&&(o=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(a=e[i].y-t[1])*a1?e:e[0]:e}(e.lineBreak&&e.text&&!Object(he.A)(e.text)?e.text.split(e.lineBreak):e.text)}function UF(e,t){var n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,a=function(e){if(OF.width===jF){var t=LF(e);return function(e){return DF(e,t)}}var n=TF(e);return function(e){return FF(e,n)}}(e);if(a(t)>>1,a(t.slice(r))>n?s=r+1:u=r;return i+t.slice(s)}for(;s>>1),a(t.slice(0,r))=0;)if(!1!==e[r].defined&&(n=e[r].x-t[0])*n+(a=e[r].y-t[1])*a<(n=e[r].size||1)*n)return e[r];return null}))},WF=function(e,t,n){var a=VF[e.mark.marktype],r=t||a.bound;return a.nested&&(e=e.mark),r(e.bounds||(e.bounds=new eB),e,n)},qF={mark:null},GF=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant"];function XF(e){return function e(t){var n,a,r,i=t.marktype,o=t.items;if(o)for(a=0,r=o.length;at;)e.removeChild(n[--a]);return e}function nj(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}YF.toJSON=function(e){return function(e,t){return JSON.stringify(e,GF,t)}(this.root,e||0)},YF.mark=function(e,t,n){var a=JF(e,t=t||this.root.items[0]);return t.items[n]=a,a.zindex&&(a.group.zdirty=!0),a};var aj=function(e,t){var n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]};function rj(e,t){this._active=null,this._handlers={},this._loader=e||_B(),this._tooltip=t||ij}function ij(e,t,n,a){e.element().setAttribute("title",a||"")}var oj=rj.prototype;function sj(e){this._el=null,this._bgcolor=null,this._loader=new EB(e)}oj.initialize=function(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},oj.element=function(){return this._el},oj.canvas=function(){return this._el&&this._el.firstChild},oj.origin=function(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},oj.scene=function(e){return arguments.length?(this._scene=e,this):this._scene},oj.on=function(){},oj.off=function(){},oj._handlerIndex=function(e,t,n){for(var a=e?e.length:0;--a>=0;)if(e[a].type===t&&(!n||e[a].handler===n))return a;return-1},oj.handlers=function(e){var t,n=this._handlers,a=[];if(e)a.push.apply(a,n[this.eventName(e)]);else for(t in n)a.push.apply(a,n[t]);return a},oj.eventName=function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},oj.handleHref=function(e,t,n){this._loader.sanitize(n,{context:"href"}).then((function(t){var n=new MouseEvent(e.type,e),a=$F(null,"a");for(var r in t)a.setAttribute(r,t[r]);a.dispatchEvent(n)})).catch((function(){}))},oj.handleTooltip=function(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,a){var r,i,o=e&&e.mark;if(o&&(r=VF[o.marktype]).tip){for((i=aj(t,n))[0]-=a[0],i[1]-=a[1];e=e.mark.group;)i[0]-=e.x||0,i[1]-=e.y||0;e=r.tip(o.items,i)}return e}(t,e,this.canvas(),this._origin);var a=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,a)}},oj.getItemBoundingClientRect=function(e){if(t=this.canvas()){for(var t,n=t.getBoundingClientRect(),a=this._origin,r=e.bounds,i=r.x1+a[0]+n.left,o=r.y1+a[1]+n.top,s=r.width(),u=r.height();e.mark&&(e=e.mark.group);)i+=e.x||0,o+=e.y||0;return{x:i,y:o,width:s,height:u,left:i,top:o,right:i+s,bottom:o+u}}};var uj=sj.prototype;function dj(e,t){rj.call(this,e,t),this._down=null,this._touch=null,this._first=!0}uj.initialize=function(e,t,n,a,r){return this._el=e,this.resize(t,n,a,r)},uj.element=function(){return this._el},uj.canvas=function(){return this._el&&this._el.firstChild},uj.background=function(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},uj.resize=function(e,t,n,a){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=a||1,this},uj.dirty=function(){},uj.render=function(e){var t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},uj._render=function(){},uj.renderAsync=function(e){var t=this.render(e);return this._ready?this._ready.then((function(){return t})):Promise.resolve(t)},uj._load=function(e,t){var n=this,a=n._loader[e](t);if(!n._ready){var r=n._call;n._ready=n._loader.ready().then((function(e){e&&r(),n._ready=null}))}return a},uj.sanitizeURL=function(e){return this._load("sanitizeURL",e)},uj.loadImage=function(e){return this._load("loadImage",e)};var cj=Object(he.y)(dj,rj);function lj(e,t,n){return function(a){var r=this._active,i=this.pickEvent(a);i===r||(r&&r.exit||this.fire(n,a),this._active=i,this.fire(t,a)),this.fire(e,a)}}function fj(e){return function(t){this.fire(e,t),this._active=null}}cj.initialize=function(e,t,n){var a=this._canvas=e&&ZF(e,"canvas");if(a){var r=this;this.events.forEach((function(e){a.addEventListener(e,(function(t){cj[e]?cj[e].call(r,t):r.fire(e,t)}))}))}return rj.prototype.initialize.call(this,e,t,n)},cj.canvas=function(){return this._canvas},cj.context=function(){return this._canvas.getContext("2d")},cj.events=["keydown","keypress","keyup","dragenter","dragleave","dragover","mousedown","mouseup","mousemove","mouseout","mouseover","click","dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],cj.DOMMouseScroll=function(e){this.fire("mousewheel",e)},cj.mousemove=lj("mousemove","mouseover","mouseout"),cj.dragover=lj("dragover","dragenter","dragleave"),cj.mouseout=fj("mouseout"),cj.dragleave=fj("dragleave"),cj.mousedown=function(e){this._down=this._active,this.fire("mousedown",e)},cj.click=function(e){this._down===this._active&&(this.fire("click",e),this._down=null)},cj.touchstart=function(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",e,!0)},cj.touchmove=function(e){this.fire("touchmove",e,!0)},cj.touchend=function(e){this.fire("touchend",e,!0),this._touch=null},cj.fire=function(e,t,n){var a,r,i=n?this._touch:this._active,o=this._handlers[e];if(t.vegaType=e,"click"===e&&i&&i.href?this.handleHref(t,i,i.href):"mousemove"!==e&&"mouseout"!==e||this.handleTooltip(t,i,"mouseout"!==e),o)for(a=0,r=o.length;a=0&&a.splice(r,1),this},cj.pickEvent=function(e){var t=aj(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},cj.pick=function(e,t,n,a,r){var i=this.context();return VF[e.marktype].pick.call(this,i,e,t,n,a,r)};var gj="undefined"!=typeof window&&window.devicePixelRatio||1;function hj(e){sj.call(this,e),this._redraw=!1,this._dirty=new eB}var pj=Object(he.y)(hj,sj),Aj=sj.prototype,vj=new eB;function mj(e,t,n){return vj.set(0,0,t,n).translate(-e[0],-e[1])}function yj(e,t){rj.call(this,e,t);var n=this;n._hrefHandler=bj(n,(function(e,t){t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=bj(n,(function(e,t){n.handleTooltip(e,t,"mouseout"!==e.type)}))}pj.initialize=function(e,t,n,a,r,i){return this._options=i,this._canvas=yu(1,1,i&&i.type),e&&(tj(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),Aj.initialize.call(this,e,t,n,a,r)},pj.resize=function(e,t,n,a){return Aj.resize.call(this,e,t,n,a),function(e,t,n,a,r,i){var o="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),u=o?gj:r;for(var d in e.width=t*u,e.height=n*u,i)s[d]=i[d];o&&1!==u&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=u,s.setTransform(u,0,0,u,u*a[0],u*a[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options&&this._options.context),this._redraw=!0,this},pj.canvas=function(){return this._canvas},pj.context=function(){return this._canvas?this._canvas.getContext("2d"):null},pj.dirty=function(e){var t=function(e,t){if(null==t)return e;for(var n=vj.clear().union(e);null!=t;t=t.mark.group)n.translate(t.x||0,t.y||0);return n}(e.bounds,e.mark.group);this._dirty.union(t)},pj._render=function(e){var t=this.context(),n=this._origin,a=this._width,r=this._height,i=this._dirty;return t.save(),this._redraw||i.empty()?(this._redraw=!1,i=mj(n,a,r).expand(1)):i=function(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,i.intersect(mj(n,a,r)),n),this.clear(-n[0],-n[1],a,r),this.draw(t,e,i),t.restore(),this._dirty.clear(),this},pj.draw=function(e,t,n){var a=VF[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),Object(he.D)(n)?(e.beginPath(),n(e),e.clip()):aF(e,t.group)}(e,t),a.draw.call(this,e,t,n),t.clip&&e.restore()},pj.clear=function(e,t,n,a){var r=this.context();r.clearRect(e,t,n,a),null!=this._bgcolor&&(r.fillStyle=this._bgcolor,r.fillRect(e,t,n,a))};var Rj=Object(he.y)(yj,rj);function bj(e,t){return function(n){var a=n.target.__data__;n.vegaType=n.type,a=Array.isArray(a)?a[0]:a,t.call(e._obj,n,a)}}function wj(e,t,n){var a,r,i="<"+e;if(t)for(a in t)null!=(r=t[a])&&(i+=" "+a+'="'+r+'"');return n&&(i+=" "+n),i+">"}function xj(e){return""}Rj.initialize=function(e,t,n){var a=this._svg;return a&&(a.removeEventListener("click",this._hrefHandler),a.removeEventListener("mousemove",this._tooltipHandler),a.removeEventListener("mouseout",this._tooltipHandler)),this._svg=a=e&&ZF(e,"svg"),a&&(a.addEventListener("click",this._hrefHandler),a.addEventListener("mousemove",this._tooltipHandler),a.addEventListener("mouseout",this._tooltipHandler)),rj.prototype.initialize.call(this,e,t,n)},Rj.canvas=function(){return this._svg},Rj.on=function(e,t){var n=this.eventName(e),a=this._handlers;if(this._handlerIndex(a[n],e,t)<0){var r={type:e,handler:t,listener:bj(this,t)};(a[n]||(a[n]=[])).push(r),this._svg&&this._svg.addEventListener(n,r.listener)}return this},Rj.off=function(e,t){var n=this.eventName(e),a=this._handlers[n],r=this._handlerIndex(a,e,t);return r>=0&&(this._svg&&this._svg.removeEventListener(n,a[r].listener),a.splice(r,1)),this};var _j={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},Ej={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity",blend:"mix-blend-mode"},kj=Object.keys(Ej),Cj=_j.xmlns;function Oj(e){sj.call(this,e),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var Bj=Object(he.y)(Oj,sj),Sj=sj.prototype;function Fj(e,t,n){var a,r,i;if("radial"===t.gradient){var o=ej(e,n++,"pattern",Cj);o.setAttribute("id","p_"+t.id),o.setAttribute("viewBox","0,0,1,1"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("preserveAspectRatio","xMidYMid slice"),(o=ej(o,0,"rect",Cj)).setAttribute("width","1"),o.setAttribute("height","1"),o.setAttribute("fill","url("+Ij()+"#"+t.id+")"),(e=ej(e,n++,"radialGradient",Cj)).setAttribute("id",t.id),e.setAttribute("fx",t.x1),e.setAttribute("fy",t.y1),e.setAttribute("fr",t.r1),e.setAttribute("cx",t.x2),e.setAttribute("cy",t.y2),e.setAttribute("r",t.r2)}else(e=ej(e,n++,"linearGradient",Cj)).setAttribute("id",t.id),e.setAttribute("x1",t.x1),e.setAttribute("x2",t.x2),e.setAttribute("y1",t.y1),e.setAttribute("y2",t.y2);for(a=0,r=t.stops.length;a1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}Bj.initialize=function(e,t,n,a){return e&&(this._svg=ej(e,0,"svg",Cj),this._svg.setAttribute("class","marks"),tj(e,1),this._root=ej(this._svg,0,"g",Cj),tj(this._svg,1)),this._defs={gradient:{},clipping:{}},this.background(this._bgcolor),Sj.initialize.call(this,e,t,n,a)},Bj.background=function(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),Sj.background.apply(this,arguments)},Bj.resize=function(e,t,n,a){return Sj.resize.call(this,e,t,n,a),this._svg&&(this._svg.setAttribute("width",this._width*this._scale),this._svg.setAttribute("height",this._height*this._scale),this._svg.setAttribute("viewBox","0 0 "+this._width+" "+this._height),this._root.setAttribute("transform","translate("+this._origin+")")),this._dirty=[],this},Bj.canvas=function(){return this._svg},Bj.svg=function(){if(!this._svg)return null;var e={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var t in _j)e[t]=_j[t];var n=this._bgcolor?wj("rect",{width:this._width,height:this._height,style:"fill: "+this._bgcolor+";"})+xj("rect"):"";return wj("svg",e)+n+this._svg.innerHTML+xj("svg")},Bj._render=function(e){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,e),tj(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},Bj.updateDefs=function(){var e,t=this._svg,n=this._defs,a=n.el,r=0;for(e in n.gradient)a||(n.el=a=ej(t,0,"defs",Cj)),r=Fj(a,n.gradient[e],r);for(e in n.clipping)a||(n.el=a=ej(t,0,"defs",Cj)),r=jj(a,n.clipping[e],r);a&&(0===r?(t.removeChild(a),n.el=null):tj(a,r))},Bj._resetDefs=function(){var e=this._defs;e.gradient={},e.clipping={}},Bj.dirty=function(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},Bj.isDirty=function(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},Bj._dirtyCheck=function(){this._dirtyAll=!0;var e=this._dirty;if(!e.length||!this._dirtyID)return!0;var t,n,a,r,i,o,s,u=++this._dirtyID;for(i=0,o=e.length;i/g,">")}zj.resize=function(e,t,n,a){Kj.resize.call(this,e,t,n,a);var r=this._origin,i=this._text,o={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var s in _j)o[s]=_j[s];i.head=wj("svg",o);var u=this._bgcolor;return"transparent"!==u&&"none"!==u||(u=null),i.bg=u?wj("rect",{width:this._width,height:this._height,style:"fill: "+u+";"})+xj("rect"):"",i.root=wj("g",{transform:"translate("+r+")"}),i.foot=xj("g")+xj("svg"),this},zj.background=function(){var e=Kj.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),e},zj.svg=function(){var e=this._text;return e.head+e.bg+e.defs+e.root+e.body+e.foot},zj._render=function(e){return this._text.body=this.mark(e),this._text.defs=this.buildDefs(),this},zj.buildDefs=function(){var e,t,n,a,r,i=this._defs,o="";for(t in i.gradient){for(r=(n=i.gradient[t]).stops,"radial"===n.gradient?(o+=wj(a="pattern",{id:"p_"+t,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),o+=wj("rect",{width:"1",height:"1",fill:"url(#"+t+")"})+xj("rect"),o+=xj(a),o+=wj(a="radialGradient",{id:t,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):o+=wj(a="linearGradient",{id:t,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2}),e=0;e0?wj("defs")+o+xj("defs"):""},zj.attributes=function(e,t){return Hj={},e(Vj,t,this),Hj},zj.href=function(e){var t,n=this,a=e.href;if(a){if(t=n._hrefs&&n._hrefs[a])return t;n.sanitizeURL(a).then((function(e){e["xlink:href"]=e.href,e.href=null,(n._hrefs||(n._hrefs={}))[a]=e}))}return null},zj.mark=function(e){var t,n=this,a=VF[e.marktype],r=a.tag,i=this._defs,o="";function s(s){var u=n.href(s);if(u&&(o+=wj("a",u)),t="g"!==r?Wj(s,e,r,i):null,o+=wj(r,n.attributes(a.attr,s),t),"text"===r){var d=NF(s);if(Object(he.A)(d))for(var c={x:0,dy:MF(s)},l=0;l0?r:Object(he.v)(n,r)?Object(he.n)("Illegal identifier: "+r):Object(he.v)(a,r)?a[r]:Object(he.v)(t,r)?r:(s[r]=1,c(r))},MemberExpression:function(e){var t=!e.computed,n=l(e.object);t&&(d+=1);var a=l(e.property);return n===o&&(u[function(e){var t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(a)]=1),t&&(d-=1),n+(t?"."+a:"["+a+"]")},CallExpression:function(e){"Identifier"!==e.callee.type&&Object(he.n)("Illegal callee type: "+e.callee.type);var t=e.callee.name,n=e.arguments,a=Object(he.v)(r,t)&&r[t];return a||Object(he.n)("Unrecognized function: "+t),Object(he.D)(a)?a(n):a+"("+n.map(l).join(",")+")"},ArrayExpression:function(e){return"["+e.elements.map(l).join(",")+"]"},BinaryExpression:function(e){return"("+l(e.left)+e.operator+l(e.right)+")"},UnaryExpression:function(e){return"("+e.operator+l(e.argument)+")"},ConditionalExpression:function(e){return"("+l(e.test)+"?"+l(e.consequent)+":"+l(e.alternate)+")"},LogicalExpression:function(e){return"("+l(e.left)+e.operator+l(e.right)+")"},ObjectExpression:function(e){return"{"+e.properties.map(l).join(",")+"}"},Property:function(e){d+=1;var t=l(e.key);return d-=1,t+":"+l(e.value)}};function g(e){var t={code:l(e),globals:Object.keys(s),fields:Object.keys(u)};return s={},u={},t}return g.functions=r,g.constants=a,g}(gD);function pD(e,t,n){";"!==t[t.length-1]&&(t="return("+t+");");var a=Function.apply(null,e.concat(t));return n&&n.functions?a.bind(n.functions):a}function AD(e,t){return pD(["event"],e,t)}function vD(e,t){return pD(["item","_"],e,t)}function mD(e,t,n){var a,r;for(a in n=n||{},e)r=e[a],n[a]=Object(he.A)(r)?r.map((function(e){return yD(e,t,n)})):yD(r,t,n);return n}function yD(e,t,n){if(!e||!Object(he.F)(e))return e;for(var a,r=0,i=RD.length;r=0;)if(a=r[i].type,n=r[i].handler,e===a&&(t===n||t===n.raw)){this._handler.off(a,n);break}return this},ND.addResizeListener=function(e){var t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},ND.removeResizeListener=function(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},ND.addSignalListener=function(e,t){return LD(this,e,UD(this,e),t)},ND.removeSignalListener=function(e,t){return ID(this,UD(this,e),t)},ND.addDataListener=function(e,t){return LD(this,e,rk(this,e).values,t)},ND.removeDataListener=function(e,t){return ID(this,rk(this,e).values,t)},ND.preventDefault=function(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},ND.timer=function(e,t){this._timers.push(function(e,t,n){var a=new Cx,r=t;return null==t?(a.restart(e,t,n),a):(t=+t,n=null==n?Ex():+n,a.restart((function i(o){o+=r,a.restart(i,r+=t,n),e(o)}),t,n),a)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},ND.events=function(e,t,n){var a,r=this,i=new Qe(n),o=function(n,a){r.runAsync(null,(function(){"view"===e&&function(e,t){var n=e._eventConfig.defaults,a=n.prevent,r=n.allow;return!1!==a&&!0!==r&&(!0===a||!1===r||(a?a[t]:r?!r[t]:e.preventDefault()))}(r,t)&&n.preventDefault(),i.receive(function(e,t,n){var a,r,i,o=e._renderer,s=o&&o.canvas();return s&&(i=uk(e),r=t.changedTouches?t.changedTouches[0]:t,(a=dg(r,s))[0]-=i[0],a[1]-=i[1]),t.dataflow=e,t.item=n,t.vega=function(e,t,n){var a=t?"group"===t.mark.marktype?t:t.mark.group:null;function r(e){var n,r=a;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){r=n;break}return r&&r.mark&&r.mark.interactive?r:{}}function i(e){if(!e)return n;Object(he.H)(e)&&(e=r(e));for(var t=n.slice();e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:Object(he.l)(e),item:Object(he.l)(t||{}),group:r,xy:i,x:function(e){return i(e)[0]},y:function(e){return i(e)[1]}}}(e,n,a),t}(r,n,a))}))};if("timer"===e)lk(r,"timer",t)&&r.timer(o,t);else if("view"===e)lk(r,"view",t)&&r.addEventListener(t,o,ck);else if("window"===e?lk(r,"window",t)&&"undefined"!=typeof window&&(a=[window]):"undefined"!=typeof document&&lk(r,"selector",t)&&(a=document.querySelectorAll(e)),a){for(var s=0,u=a.length;s=0;)r[e].stop();for(e=i.length;--e>=0;)for(t=(n=i[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);return a&&a.call(this,this._handler,null,null,null),this},ND.hover=function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",fk),gk,hk(e)),this.on(this.events("view","mouseout",fk),gk,hk(t)),this},ND.data=function(e,t){return arguments.length<2?rk(this,e).values.value:ik.call(this,e,Fe().remove(he.gb).insert(t))},ND.change=ik,ND.insert=function(e,t){return ik.call(this,e,Fe().insert(t))},ND.remove=function(e,t){return ik.call(this,e,Fe().remove(t))},ND.scale=function(e){var t=this._runtime.scales;return Object(he.v)(t,e)||Object(he.n)("Unrecognized scale or projection: "+e),t[e].value},ND.initialize=function(e,t){var n=this,a=n._renderType,r=n._eventConfig.bind,i=nh(a);e=n._el=e?_k(n,e):null,function(e){var t=e.container();t&&(t.setAttribute("role","figure"),ak(t,e.description()))}(n),i||n.error("Unrecognized renderer type: "+a);var o=i.handler||pg,s=e?i.renderer:i.headless;return n._renderer=s?wk(n,n._renderer,e,s):null,n._handler=function(e,t,n,a){var r=new a(e.loader(),xk(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,uk(e),e);return t&&t.handlers().forEach((function(e){r.on(e.type,e.handler)})),r}(n,n._handler,e,o),n._redraw=!0,e&&"none"!==r&&(t=t?n._elBind=_k(n,t):e.appendChild(pk("div",{class:"vega-bindings"})),n._bind.forEach((function(e){e.param.element&&"container"!==r&&(e.element=_k(n,e.param.element))})),n._bind.forEach((function(e){!function(e,t,n){if(t){var a=n.param,r=n.state;r||(r=n.state={elements:null,active:!1,set:null,update:function(t){t!==e.signal(a.signal)&&e.runAsync(null,(function(){r.source=!0,e.signal(a.signal,t)}))}},a.debounce&&(r.update=Object(he.m)(a.debounce,r.update))),function(e,t,n,a){var r=pk("div",{class:"vega-bind"});r.appendChild(pk("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(r);var i=Ak;switch(n.input){case"checkbox":i=vk;break;case"select":i=mk;break;case"radio":i=yk;break;case"range":i=Rk}i(e,r,n,a)}(r,t,a,e.signal(a.signal)),r.active||(e.on(e._signals[a.signal],null,(function(){r.source?r.source=!1:r.set(e.signal(a.signal))})),r.active=!0)}}(n,e.element||t,e)}))),n},ND.toImageURL=function(e,t){return Tk.apply(this,arguments)},ND.toCanvas=function(e,t){return Nk.apply(this,arguments)},ND.toSVG=function(e){return Uk.apply(this,arguments)},ND.getState=function(e){return this._runtime.getState(e||{data:SD,signals:FD,recurse:!0})},ND.setState=function(e){return this.runAsync(null,(function(t){t._trigger=!1,t._runtime.setState(e)}),(function(e){e._trigger=!0})),this};var QD=function(e){return Object(he.F)(e)?e:{type:e||"pad"}},HD=function(e){return+e||0},zD=function(e){return Object(he.F)(e)?e.signal?e:{top:HD(e.top),bottom:HD(e.bottom),left:HD(e.left),right:HD(e.right)}:function(e){return{top:e,bottom:e,left:e,right:e}}(HD(e))},KD=["value","update","init","react","bind"];function VD(e,t){Object(he.n)(e+' for "outer" push: '+Object(he.Z)(t))}var WD=function(e,t){var n=e.name;if("outer"===e.push)t.signals[n]||VD("No prior signal definition",n),KD.forEach((function(t){void 0!==e[t]&&VD("Invalid property ",t)}));else{var a=t.addSignal(n,e.value);!1===e.react&&(a.react=!1),e.bind&&t.addBinding(n,e.bind)}},qD=function(e,t,n){var a,r,i={};try{e=Object(he.H)(e)?e:Object(he.Z)(e)+"",a=OC(e)}catch(t){Object(he.n)("Expression parse error: "+e)}return a.visit((function(e){if("CallExpression"===e.type){var n=e.callee.name,a=gD.visitors[n];a&&a(n,e.arguments,t,i)}})),(r=hD(a)).globals.forEach((function(e){var n="$"+e;!Object(he.v)(i,n)&&t.getSignal(e)&&(i[n]=t.signalRef(e))})),{$expr:n?n+"return("+r.code+");":r.code,$fields:r.fields,$params:i}};function GD(e,t,n,a){this.id=-1,this.type=e,this.value=t,this.params=n,a&&(this.parent=a)}function XD(e,t,n,a){return new GD(e,t,n,a)}function YD(e,t){return XD("operator",e,t)}function JD(e){var t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function $D(e,t){return t?{$field:e,$name:t}:{$field:e}}var ZD=$D("key");function eT(e,t){return{$compare:e,$order:t}}function tT(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}function nT(e){return e&&e.signal}function aT(e){if(nT(e))return!0;if(Object(he.F)(e))for(var t in e)if(aT(e[t]))return!0;return!1}function rT(e,t){return null!=e?e:t}function iT(e){return e&&e.signal||e}function oT(e,t){return(e.merge?sT:e.stream?uT:e.type?dT:Object(he.n)("Invalid stream specification: "+Object(he.Z)(e)))(e,t)}function sT(e,t){var n=cT({merge:e.merge.map((function(e){return oT(e,t)}))},e,t);return t.addStream(n).id}function uT(e,t){var n=cT({stream:oT(e.stream,t)},e,t);return t.addStream(n).id}function dT(e,t){var n,a;return"timer"===e.type?(n=t.event("timer",e.throttle),e={between:e.between,filter:e.filter}):n=t.event(function(e){return"scope"===e?"view":e||"view"}(e.source),e.type),a=cT({stream:n},e,t),1===Object.keys(a).length?n:t.addStream(a).id}function cT(e,t,n){var a=t.between;return a&&(2!==a.length&&Object(he.n)('Stream "between" parameter must have 2 entries: '+Object(he.Z)(t)),e.between=[oT(a[0],n),oT(a[1],n)]),a=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&a.push(function(e,t,n){var a="event.item";return a+(e&&"*"!==e?"&&"+a+".mark.marktype==='"+e+"'":"")+(n?"&&"+a+".mark.role==='"+n+"'":"")+(t?"&&"+a+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),"scope"===t.source&&a.push("inScope(event.item)"),a.length&&(e.filter=qD("("+a.join(")&&(")+")").$expr),null!=(a=t.throttle)&&(e.throttle=+a),null!=(a=t.debounce)&&(e.debounce=+a),t.consume&&(e.consume=!0),e}var lT,fT,gT=function(e,t,n){return lT=t||hT,fT=n||AT,mT(e.trim()).map(yT)},hT="view",pT=/[[\]{}]/,AT={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};function vT(e,t,n,a,r){for(var i,o=0,s=e.length;t=0?--o:a&&a.indexOf(i)>=0&&++o}return t}function mT(e){for(var t=[],n=0,a=e.length,r=0;r"!==(e=e.slice(r+1).trim())[0])throw"Expected '>' after between selector: "+e;return t=t.map(yT),(n=yT(e.slice(1).trim())).between?{between:t,stream:n}:(n.between=t,n)}(e):function(e){var t,n,a={source:lT},r=[],i=[0,0],o=0,s=0,u=e.length,d=0;if("}"===e[u-1]){if(!((d=e.lastIndexOf("{"))>=0))throw"Unmatched right brace: "+e;try{i=function(e){var t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((function(t){var n=+t;if(n!=n)throw e;return n}))}(e.substring(d+1,u-1))}catch(t){throw"Invalid throttle specification: "+e}u=(e=e.slice(0,d).trim()).length,d=0}if(!u)throw e;if("@"===e[0]&&(o=++d),(t=vT(e,d,":"))1?(a.type=r[1],o?a.markname=r[0].slice(1):function(e){return fT[e]}(r[0])?a.marktype=r[0]:a.source=r[0]):a.type=r[0],"!"===a.type.slice(-1)&&(a.consume=!0,a.type=a.type.slice(0,-1)),null!=n&&(a.filter=n),i[0]&&(a.throttle=i[0]),i[1]&&(a.debounce=i[1]),a}(e)}function RT(e){return{signal:"["+e.map((function(e){return e.scale?'scale("'+e.scale+'")':e.signal}))+"]"}}function bT(e){return function(t,n,a){return XD(e,n,t||void 0,a)}}var wT=bT("aggregate"),xT=bT("axisticks"),_T=bT("bound"),ET=bT("collect"),kT=bT("compare"),CT=bT("datajoin"),OT=bT("encode"),BT=bT("expression"),ST=(bT("extent"),bT("facet")),FT=bT("field"),jT=bT("key"),DT=bT("legendentries"),TT=bT("load"),MT=bT("mark"),NT=bT("multiextent"),UT=bT("multivalues"),PT=bT("overlap"),LT=bT("params"),IT=bT("prefacet"),QT=bT("projection"),HT=bT("proxy"),zT=bT("relay"),KT=bT("render"),VT=bT("scale"),WT=bT("sieve"),qT=bT("sortitems"),GT=bT("viewlayout"),XT=bT("values"),YT=0,JT={min:"min",max:"max",count:"sum"};function $T(e,t){return Object(he.F)(e)?e.signal?t.signalRef(e.signal):Object(he.n)("Unsupported object: "+Object(he.Z)(e)):e}function ZT(e,t){return e.signal?t.signalRef(e.signal):e.map((function(e){return $T(e,t)}))}function eM(e){Object(he.n)("Can not find data set: "+Object(he.Z)(e))}function tM(e,t,n){if(e)return e.signal?n.signalRef(e.signal):(Object(he.A)(e)?nM:e.fields?rM:aM)(e,t,n);null==t.domainMin&&null==t.domainMax||Object(he.n)("No scale domain defined for domainMin/domainMax to override.")}function nM(e,t,n){return e.map((function(e){return $T(e,n)}))}function aM(e,t,n){var a=n.getData(e.data);return a||eM(e.data),lv(t.type)?a.valuesRef(n,e.field,oM(e.sort,!1)):pv(t.type)?a.domainRef(n,e.field):a.extentRef(n,e.field)}function rM(e,t,n){var a=e.data,r=e.fields.reduce((function(e,t){return t=Object(he.H)(t)?{data:a,field:t}:Object(he.A)(t)||t.signal?function(e,t){var n="_:vega:_"+YT++,a=ET({});if(Object(he.A)(e))a.value={$ingest:e};else if(e.signal){var r="setdata("+Object(he.Z)(n)+","+e.signal+")";a.params.input=t.signalRef(r)}return t.addDataPipeline(n,[a,WT({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e}),[]);return(lv(t.type)?iM:pv(t.type)?sM:uM)(e,n,r)}function iM(e,t,n){var a,r,i,o,s,u=oM(e.sort,!0);return a=n.map((function(e){var n=t.getData(e.data);return n||eM(e.data),n.countsRef(t,e.field,u)})),r={groupby:ZD,pulse:a},u&&(i=u.op||"count",s=u.field?tT(i,u.field):"count",r.ops=[JT[i]],r.fields=[t.fieldRef(s)],r.as=[s]),i=t.add(wT(r)),o=t.add(ET({pulse:JD(i)})),s=t.add(XT({field:ZD,sort:t.sortRef(u),pulse:JD(o)})),JD(s)}function oM(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!JT[e.op]&&Object(he.n)("Multiple domain scales can not be sorted using "+e.op):Object(he.n)("No field provided for sort aggregate op: "+e.op):Object(he.F)(e)?e.field="key":e={field:"key"}),e}function sM(e,t,n){var a=n.map((function(e){var n=t.getData(e.data);return n||eM(e.data),n.domainRef(t,e.field)}));return JD(t.add(UT({values:a})))}function uM(e,t,n){var a=n.map((function(e){var n=t.getData(e.data);return n||eM(e.data),n.extentRef(t,e.field)}));return JD(t.add(NT({extents:a})))}function dM(e,t,n){return Object(he.A)(e)?e.map((function(e){return dM(e,t,n)})):Object(he.F)(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:Object(he.n)("Unsupported parameter object: "+Object(he.Z)(e)):e}var cM="value",lM=["size","shape","fill","stroke","strokeWidth","strokeDash","opacity"],fM={name:1,style:1,interactive:1},gM={value:0},hM={value:1},pM=Object(he.db)(["rule"]),AM=Object(he.db)(["group","image","rect"]),vM=function(e,t,n,a){var r=qD(e,t);return r.$fields.forEach((function(e){a[e]=1})),Object(he.o)(n,r.$params),r.$expr},mM=function(e,t,n,a){return function e(t,n,a,r){var i,o,s;if(t.signal)i="datum",s=vM(t.signal,n,a,r);else if(t.group||t.parent){for(o=Math.max(1,t.level||1),i="item";o-- >0;)i+=".mark.group";t.parent?(s=t.parent,i+=".datum"):s=t.group}else t.datum?(i="datum",s=t.datum):Object(he.n)("Invalid field reference: "+Object(he.Z)(t));return t.signal||(Object(he.H)(s)?(r[s]=1,s=Object(he.Y)(s).map(he.Z).join("][")):s=e(s,n,a,r)),i+"["+s+"]"}(Object(he.F)(e)?e:{datum:e},t,n,a)},yM=function(e,t,n,a){return Object(he.F)(e)?"("+bM(null,e,t,n,a)+")":e};function RM(e,t,n,a){var r;if(Object(he.H)(e))r="%"+e,Object(he.v)(n,r)||(n[r]=t.scaleRef(e)),r=Object(he.Z)(r);else{for(r in t.scales)n["%"+r]=t.scaleRef(r);r=Object(he.Z)("%")+"+"+(e.signal?"("+vM(e.signal,t,n,a)+")":mM(e,t,n,a))}return"_["+r+"]"}var bM=function(e,t,n,a,r){if(null!=t.gradient)return function(e,t,n,a){return"this.gradient("+RM(e.gradient,t,n,a)+","+Object(he.Z)(e.start)+","+Object(he.Z)(e.stop)+","+Object(he.Z)(e.count)+")"}(t,n,a,r);var i=t.signal?vM(t.signal,n,a,r):t.color?function(e,t,n,a){function r(e,r,i,o){return"this."+e+"("+[bM(null,r,t,n,a),bM(null,i,t,n,a),bM(null,o,t,n,a)].join(",")+").toString()"}return e.c?r("hcl",e.h,e.c,e.l):e.h||e.s?r("hsl",e.h,e.s,e.l):e.l||e.a?r("lab",e.l,e.a,e.b):e.r||e.g||e.b?r("rgb",e.r,e.g,e.b):null}(t.color,n,a,r):null!=t.field?mM(t.field,n,a,r):void 0!==t.value?Object(he.Z)(t.value):void 0;return null!=t.scale&&(i=function(e,t,n,a,r){var i,o,s,u=RM(e.scale,n,a,r);return null!=e.range?(o=u+".range()",t=0===(i=+e.range)?o+"[0]":"($="+o+","+(1===i?"$[$.length-1]":"$[0]+"+i+"*($[$.length-1]-$[0])")+")"):(void 0!==t&&(t=u+"("+t+")"),e.band&&(s=function(e,t){if(!Object(he.H)(e))return-1;var n=t.scaleType(e);return"band"===n||"point"===n?1:0}(e.scale,n))&&(o=u+".bandwidth",i=e.band.signal?o+"()*"+yM(e.band,n,a,r):o+"()"+(1===(i=+e.band)?"":"*"+i),s<0&&(i="("+o+"?"+i+":0)"),t=(t?t+"+":"")+i,e.extra&&(t="(datum.extra?"+u+"(datum.extra.value):"+t+")")),null==t&&(t="0")),t}(t,i,n,a,r)),void 0===i&&(i=null),null!=t.exponent&&(i="Math.pow("+i+","+yM(t.exponent,n,a,r)+")"),null!=t.mult&&(i+="*"+yM(t.mult,n,a,r)),null!=t.offset&&(i+="+"+yM(t.offset,n,a,r)),t.round&&(i="Math.round("+i+")"),i},wM=function(e,t,n){var a=e+"["+Object(he.Z)(t)+"]";return"$=".concat(n,";if(").concat(a,"!==$)").concat(a,"=$,m=1;")},xM=function(e,t,n,a,r){var i="";return t.forEach((function(t){var o=bM(e,t,n,a,r);i+=t.test?vM(t.test,n,a,r)+"?"+o+":":o})),":"===Object(he.U)(i)&&(i+="null"),wM("o",e,i)};function _M(e,t,n,a){var r,i,o,s={},u="var o=item,datum=o.datum,m=0,$;";for(r in e)i=e[r],Object(he.A)(i)?u+=xM(r,i,a,n,s):(o=bM(r,i,a,n,s),u+=wM("o",r,o));return u+=function(e,t){var n="";return pM[t]||(e.x2&&(e.x?(AM[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(AM[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(e,t),{$expr:u+="return m;",$fields:Object.keys(s),$output:Object.keys(e)}}function EM(e){return Object(he.F)(e)&&!Object(he.A)(e)?Object(he.o)({},e):{value:e}}function kM(e,t,n,a){return null!=n?(Object(he.F)(n)&&!Object(he.A)(n)?e.update[t]=n:e[a||"enter"][t]={value:n},1):0}function CM(e,t,n){for(var a in t)kM(e,a,t[a]);for(var r in n)kM(e,r,n[r],"update")}function OM(e,t,n){for(var a in t)n&&Object(he.v)(n,a)||(e[a]=Object(he.o)(e[a]||{},t[a]));return e}function BM(e,t,n,a,r,i){var o,s;for(s in(i=i||{}).encoders={$encode:o={}},e=function(e,t,n,a,r){var i,o,s,u={},d={};for(o in o="lineBreak","text"!==t||null==r[o]||FM(o,e)||SM(u,o,r[o]),("legend"==n||String(n).startsWith("axis"))&&(n=null),s="frame"===n?r.group:"mark"===n?Object(he.o)({},r.mark,r[t]):null)FM(o,e)||("fill"===o||"stroke"===o)&&(FM("fill",e)||FM("stroke",e))||SM(u,o,s[o]);for(o in Object(he.i)(a).forEach((function(t){var n=r.style&&r.style[t];for(var a in n)FM(a,e)||SM(u,a,n[a])})),e=Object(he.o)({},e),u)(s=u[o]).signal?(i=i||{})[o]=s:d[o]=s;return e.enter=Object(he.o)(d,e.enter),i&&(e.update=Object(he.o)(i,e.update)),e}(e,t,n,a,r.config))o[s]=_M(e[s],t,i,r);return i}function SM(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}function FM(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}var jM=function(e,t,n,a,r,i,o){return{type:e,name:o?o.name:void 0,role:t,style:o&&o.style||n,key:a,from:r,interactive:!(!o||!o.interactive),encode:OM(i,o,fM)}},DM=n(17);function TM(e,t){var n=function(n,a){return rT(e[n],rT(t[n],a))};return n.isVertical=function(n){return"vertical"===rT(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection))},n.gradientLength=function(){return rT(e.gradientLength,t.gradientLength||t.gradientWidth)},n.gradientThickness=function(){return rT(e.gradientThickness,t.gradientThickness||t.gradientHeight)},n.entryColumns=function(){return rT(e.columns,rT(t.columns,+n.isVertical(!0)))},n}function MM(e,t){var n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function NM(e,t,n){return'item.anchor === "'.concat("start",'" ? ').concat(e,' : item.anchor === "').concat("end",'" ? ').concat(t," : ").concat(n)}var UM=NM(Object(he.Z)("left"),Object(he.Z)("right"),Object(he.Z)("center"));function PM(e,t){return t?e?Object(he.F)(e)?Object(DM.a)({},e,{offset:PM(e.offset,t)}):{value:e,offset:t}:t:e}var LM=function(e,t,n,a){var r,i,o,s,u,d,c=TM(e,n),l=c.isVertical(),f=c.gradientThickness(),g=c.gradientLength();return l?(o=[0,1],s=[0,0],u=f,d=g):(o=[0,0],s=[1,0],u=g,d=f),CM(r={enter:i={opacity:gM,x:gM,y:gM,width:EM(u),height:EM(d)},update:Object(he.o)({},i,{opacity:hM,fill:{gradient:t,start:o,stop:s}}),exit:{opacity:gM}},{stroke:c("gradientStrokeColor"),strokeWidth:c("gradientStrokeWidth")},{opacity:c("gradientOpacity")}),jM("rect","legend-gradient",null,void 0,void 0,r,a)},IM=function(e,t,n,a,r){var i,o,s,u,d,c,l=TM(e,n),f=l.isVertical(),g=l.gradientThickness(),h=l.gradientLength(),p="";return f?(s="y",d="y2",u="x",c="width",p="1-"):(s="x",d="x2",u="y",c="height"),(o={opacity:gM,fill:{scale:t,field:cM}})[s]={signal:p+"datum.perc",mult:h},o[u]=gM,o[d]={signal:p+"datum.perc2",mult:h},o[c]=EM(g),CM(i={enter:o,update:Object(he.o)({},o,{opacity:hM}),exit:{opacity:gM}},{stroke:l("gradientStrokeColor"),strokeWidth:l("gradientStrokeWidth")},{opacity:l("gradientOpacity")}),jM("rect","legend-band",null,cM,r,i,a)},QM="datum.".concat("perc",'<=0?"').concat("left",'":datum.').concat("perc",'>=1?"').concat("right",'":"').concat("center",'"'),HM="datum.".concat("perc",'<=0?"').concat("bottom",'":datum.').concat("perc",'>=1?"').concat("top",'":"').concat("middle",'"'),zM=function(e,t,n,a){var r,i,o,s,u,d=TM(e,t),c=d.isVertical(),l=EM(d.gradientThickness()),f=d.gradientLength(),g=d("labelOverlap"),h=d("labelSeparation"),p="";return CM(r={enter:i={opacity:gM},update:o={opacity:hM,text:{field:"label"}},exit:{opacity:gM}},{fill:d("labelColor"),fillOpacity:d("labelOpacity"),font:d("labelFont"),fontSize:d("labelFontSize"),fontStyle:d("labelFontStyle"),fontWeight:d("labelFontWeight"),limit:rT(e.labelLimit,t.gradientLabelLimit)}),c?(i.align={value:"left"},i.baseline=o.baseline={signal:HM},s="y",u="x",p="1-"):(i.align=o.align={signal:QM},i.baseline={value:"top"},s="x",u="y"),i[s]=o[s]={signal:p+"datum.perc",mult:f},i[u]=o[u]=l,l.offset=rT(e.labelOffset,t.gradientLabelOffset)||0,e=jM("text","legend-label","guide-label",cM,a,r,n),g&&(e.overlap={separation:h,method:g,order:"datum.index"}),e},KM=function(e,t,n,a,r,i,o,s){return{type:"group",name:n,role:e,style:t,from:a,interactive:r||!1,encode:i,marks:o,layout:s}},VM=function(e,t,n,a,r){var i,o,s,u,d,c,l,f=TM(e,t),g=n.entries,h=!(!g||!g.interactive),p=g?g.name:void 0,A=f("clipHeight"),v=f("symbolOffset"),m={data:"value"},y={},R="(".concat(r,") ? datum.").concat("offset"," : datum.").concat("size"),b=A?EM(A):{field:"size"},w="datum.".concat("index"),x="max(1, ".concat(r,")");b.mult=.5,y={enter:i={opacity:gM,x:{signal:R,mult:.5,offset:v},y:b},update:o={opacity:hM,x:i.x,y:i.y},exit:{opacity:gM}};var _=null,E=null;return e.fill||(_=t.symbolBaseFillColor,E=t.symbolBaseStrokeColor),CM(y,{fill:f("symbolFillColor",_),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor",E),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),lM.forEach((function(t){e[t]&&(o[t]=i[t]={scale:e[t],field:cM})})),u=jM("symbol","legend-symbol",null,cM,m,y,n.symbols),A&&(u.clip=!0),(s=EM(v)).offset=f("labelOffset"),CM(y={enter:i={opacity:gM,x:{signal:R,offset:s},y:b},update:o={opacity:hM,text:{field:"label"},x:i.x,y:i.y},exit:{opacity:gM}},{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")}),d=jM("text","legend-label","guide-label",cM,m,y,n.labels),y={enter:{noBound:{value:!A},width:gM,height:A?EM(A):gM,opacity:gM},exit:{opacity:gM},update:o={opacity:hM,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(c="ceil(item.mark.items.length / ".concat(x,")"),o.row.signal="".concat(w,"%").concat(c),o.column.signal="floor(".concat(w," / ").concat(c,")"),l={field:["row",w]}):(o.row.signal="floor(".concat(w," / ").concat(x,")"),o.column.signal="".concat(w," % ").concat(x),l={field:w}),o.column.signal="(".concat(r,")?").concat(o.column.signal,":").concat(w),(e=KM("scope",null,p,a={facet:{data:a,name:"value",groupby:"index"}},h,OM(y,g,fM),[u,d])).sort=l,e},WM='item.orient === "left"',qM='item.orient === "right"',GM="(".concat(WM," || ").concat(qM,")"),XM="datum.vgrad && ".concat(GM),YM=NM('"top"','"bottom"','"middle"'),JM=NM('"right"','"left"','"center"'),$M="datum.vgrad && ".concat(qM," ? (").concat(JM,") : (").concat(GM," && !(datum.vgrad && ").concat(WM,')) ? "left" : ').concat(UM),ZM="item._anchor || (".concat(GM,' ? "middle" : "start")'),eN="".concat(XM," ? (").concat(WM," ? -90 : 90) : 0"),tN="".concat(GM," ? (datum.vgrad ? (").concat(qM,' ? "bottom" : "top") : ').concat(YM,') : "top"'),nN=function(e,t){var n;return Object(he.F)(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+aN(e.path)+")":e.sphere&&(n="geoShape("+aN(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e};function aN(e){return Object(he.F)(e)&&e.signal?e.signal:Object(he.Z)(e)}var rN=function(e){var t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")&&t.indexOf("title")?"group"===e.type?"scope":t||"mark":t},iN=function(e){return{marktype:e.type,name:e.name||void 0,role:e.role||rN(e),zindex:+e.zindex||void 0}},oN=function(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e},sN=function(e,t){var n=Ya(e.type);n||Object(he.n)("Unrecognized transform type: "+Object(he.Z)(e.type));var a=XD(n.type.toLowerCase(),null,uN(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(a)),a.metadata=n.metadata||{},a};function uN(e,t,n){var a,r,i,o={};for(r=0,i=e.params.length;r1&&(o=[RT(o)]),a.length&&o.push(a.length>1?{merge:a}:a[0]),null!=i&&(r&&Object(he.n)("Signal encode and update are mutually exclusive."),r="encode(item(),"+Object(he.Z)(i)+")"),s.update=Object(he.H)(r)?qD(r,t,"var datum=event.item&&event.item.datum;"):null!=r.expr?qD(r.expr,t,"var datum=event.item&&event.item.datum;"):null!=r.value?r.value:null!=r.signal?{$expr:"_.value",$params:{value:t.signalRef(r.signal)}}:Object(he.n)("Invalid signal update specification."),e.force&&(s.options={force:!0}),o.forEach((function(e){t.addUpdate(Object(he.o)(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):oT(e,t)}}(e,t),s))}))}(e,t,n.id)}))}(e,t)})),Object(he.i)(e.axes).forEach((function(e){return BN(e,t)})),Object(he.i)(e.marks).forEach((function(e){return wN(e,t)})),Object(he.i)(e.legends).forEach((function(e){return function(e,t){var n,a,r,i,o,s,u,d,c,l=t.config.legend,f=e.encode||{},g=f.legend||{},h=g.name||void 0,p=g.interactive,A=g.style,v=TM(e,l),m=lM.reduce((function(t,n){return t||e[n]}),0);return m||Object(he.n)("Missing valid scale for legend."),o=function(e,t){var n=e.type||"symbol";return e.type||1!==function(e){return lM.reduce((function(t,n){return t+(e[n]?1:0)}),0)}(e)||!e.fill&&!e.stroke||(n=cv(t)?"gradient":fv(t)?"discrete":"symbol"),"gradient"!==n?n:fv(t)?"discrete":"gradient"}(e,t.scaleType(m)),s={title:null!=e.title,type:o,vgrad:"symbol"!==o&&v.isVertical()},u=JD(t.add(ET(null,[s]))),g=OM(function(e,t){var n={enter:{},update:{}};return CM(n,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:t.strokeWidth,strokeDash:t.strokeDash,x:e("legendX"),y:e("legendY")}),n}(v,l),g,fM),n={enter:{x:{value:0},y:{value:0}}},d=JD(t.add(DT(r={type:o,scale:t.scaleRef(m),count:t.objectProperty(v("tickCount")),limit:t.property(v("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),"gradient"===o?(i=[LM(e,m,l,f.gradient),zM(e,l,f.labels,d)],r.count=r.count||t.signalRef("max(2,2*floor((".concat(iT(v.gradientLength()),")/100))"))):"discrete"===o?i=[IM(e,m,l,f.gradient,d),zM(e,l,f.labels,d)]:(a=function(e,t){var n=TM(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,l),i=[VM(e,l,f,d,iT(a.columns))],r.size=function(e,t,n){var a=iT(xN("size",e,n)),r=iT(xN("strokeWidth",e,n)),i=iT(function(e,t,n){return MM("fontSize",e)||function(e,t,n){var a=t.config.style[n];return a&&a[e]}("fontSize",t,n)}(n[1].encode,t,"guide-label"));return qD("max(ceil(sqrt(".concat(a,")+").concat(r,"),").concat(i,")"),t)}(e,t,i[0].marks)),i=[KM("legend-entry",null,null,u,p,n,i,a)],s.title&&i.push(function(e,t,n,a){var r,i=TM(e,t);return CM(r={enter:{opacity:gM},update:{opacity:hM,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:gM}},{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:ZM},angle:{signal:eN},align:{signal:$M},baseline:{signal:tN},text:e.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),jM("text","legend-title","guide-title",null,a,r,n)}(e,l,f.title,u)),c=KM("legend",A,h,u,p,g,i),e.zindex&&(c.zindex=e.zindex),wN(c,t)}(e,t)})),e.title&&function(e,t){var n,a,r=TM(e=Object(he.H)(e)?{text:e}:e,t.config.title),i=e.encode||{},o=i.group||{},s=o.name||void 0,u=o.interactive,d=o.style,c=[];n=JD(t.add(ET(null,[{}]))),c.push(function(e,t,n,a){var r={value:0},i={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return CM(i,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),jM("text","title-text","group-title",null,a,i,n)}(e,r,function(e){var t=e.encode;return t&&t.title||Object(he.o)({name:e.name,interactive:e.interactive,style:e.style},t)}(e),n)),e.subtitle&&c.push(function(e,t,n,a){var r={value:0},i={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return CM(i,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),jM("text","title-subtitle","group-subtitle",null,a,i,n)}(e,r,i.subtitle,n)),a=KM("title",d,s,n,u,function(e,t){var n={enter:{},update:{}};return CM(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:UM},angle:{signal:_N},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),OM(n,t,fM)}(r,o),c),e.zindex&&(a.zindex=e.zindex),wN(a,t)}(e.title,t),t.parseLambdas(),t};function FN(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function jN(e){this.config=e,this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function DN(e){this.config=e.config,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}var TN=jN.prototype=DN.prototype;function MN(e){return(Object(he.A)(e)?NN:UN)(e)}function NN(e){for(var t,n="[",a=0,r=e.length;a0?",":"")+(Object(he.F)(t)?t.signal||MN(t):Object(he.Z)(t));return n+"]"}function UN(e){var t,n,a="{",r=0;for(t in e)n=e[t],a+=(++r>1?",":"")+Object(he.Z)(t)+":"+(Object(he.F)(n)?n.signal||MN(n):Object(he.Z)(n));return a+"}"}TN.fork=function(){return new DN(this)},TN.isSubscope=function(){return this._subid>0},TN.toRuntime=function(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig}},TN.id=function(){return(this._subid?this._subid+":":0)+this._id++},TN.add=function(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((function(t){t.$ref=e.id})),e.refs=null),e},TN.proxy=function(e){var t=e instanceof GD?JD(e):e;return this.add(HT({value:t}))},TN.addStream=function(e){return this.streams.push(e),e.id=this.id(),e},TN.addUpdate=function(e){return this.updates.push(e),e},TN.finish=function(){var e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){var a;e&&((a=e.data||(e.data={}))[t]||(a[t]=[])).push(n)}for(e in this.data)for(var a in n((t=this.data[e]).input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values"),t.index)n(t.index[a],e,"index:"+a);return this},TN.pushState=function(e,t,n){this._encode.push(JD(this.add(WT({pulse:e})))),this._parent.push(t),this._lookup.push(n?JD(this.proxy(n)):null),this._markpath.push(-1)},TN.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},TN.parent=function(){return Object(he.U)(this._parent)},TN.encode=function(){return Object(he.U)(this._encode)},TN.lookup=function(){return Object(he.U)(this._lookup)},TN.markpath=function(){var e=this._markpath;return++e[e.length-1]},TN.fieldRef=function(e,t){if(Object(he.H)(e))return $D(e,t);e.signal||Object(he.n)("Unsupported field reference: "+Object(he.Z)(e));var n,a=e.signal,r=this.field[a];return r||(n={name:this.signalRef(a)},t&&(n.as=t),this.field[a]=r=JD(this.add(FT(n)))),r},TN.compareRef=function(e){function t(e){return nT(e)?(a=!0,n.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(a=!0,n.exprRef(e.expr)):e}var n=this,a=!1,r=Object(he.i)(e.field).map(t),i=Object(he.i)(e.order).map(t);return a?JD(this.add(kT({fields:r,orders:i}))):eT(r,i)},TN.keyRef=function(e,t){var n=this.signals,a=!1;return e=Object(he.i)(e).map((function(e){return nT(e)?(a=!0,JD(n[e.signal])):e})),a?JD(this.add(jT({fields:e,flat:t}))):function(e,t){var n={$key:e};return t&&(n.$flat=!0),n}(e,t)},TN.sortRef=function(e){if(!e)return e;var t=tT(e.op,e.field),n=e.order||"ascending";return n.signal?JD(this.add(kT({fields:t,orders:this.signalRef(n.signal)}))):eT(t,n)},TN.event=function(e,t){var n=e+":"+t;if(!this.events[n]){var a=this.id();this.streams.push({id:a,source:e,type:t}),this.events[n]=a}return this.events[n]},TN.hasOwnSignal=function(e){return Object(he.v)(this.signals,e)},TN.addSignal=function(e,t){this.hasOwnSignal(e)&&Object(he.n)("Duplicate signal name: "+Object(he.Z)(e));var n=t instanceof GD?t:this.add(YD(t));return this.signals[e]=n},TN.getSignal=function(e){return this.signals[e]||Object(he.n)("Unrecognized signal name: "+Object(he.Z)(e)),this.signals[e]},TN.signalRef=function(e){return this.signals[e]?JD(this.signals[e]):(Object(he.v)(this.lambdas,e)||(this.lambdas[e]=this.add(YD(null))),JD(this.lambdas[e]))},TN.parseLambdas=function(){for(var e=Object.keys(this.lambdas),t=0,n=e.length;t-1}function rU(e,t){var n,a=0,r=sr(e.entries());try{for(r.s();!(n=r.n()).done;){var i=Object(ei.a)(n.value,2),o=i[0];if(t(i[1],o,a++))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}function iU(e,t){var n,a=0,r=sr(e.entries());try{for(r.s();!(n=r.n()).done;){var i=Object(ei.a)(n.value,2),o=i[0];if(!t(i[1],o,a++))return!1}}catch(e){r.e(e)}finally{r.f()}return!0}function oU(e,t){for(var n=0,a=Object.keys(t);n1&&void 0!==arguments[1]?arguments[1]:"datum",n=Object(he.Y)(e),a=[],r=1;r<=n.length;r++){var i="[".concat(n.slice(0,r).map(he.Z).join("]["),"]");a.push("".concat(t).concat(i))}return a.join(" && ")}function RU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";return"".concat(t,"[").concat(Object(he.Z)(Object(he.Y)(e).join(".")),"]")}function bU(e){return"".concat(Object(he.Y)(e).map(mU).join("\\."))}function wU(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function xU(e){return"".concat(Object(he.Y)(e).join("."))}function _U(e){return e?Object(he.Y)(e).length:0}function EU(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=a.vgChannel;return EU(r?nL(e,t,n.style):void 0,nL(e,t,n.style),r?n[t.type][r]:void 0,n[t.type][e],r?n.mark[r]:n.mark[e])}function nL(e,t,n){return aL(e,ZP(t),n)}function aL(e,t,n){var a,r,i=sr(t=Object(he.i)(t));try{for(i.s();!(r=i.n()).done;){var o=n[r.value];o&&void 0!==o[e]&&(a=o[e])}}catch(e){i.e(e)}finally{i.f()}return a}function rL(e,t){return Object(he.i)(e).reduce((function(e,n){var a;return e.field.push(MH(n,t)),e.order.push(null!==(a=n.sort)&&void 0!==a?a:"ascending"),e}),{field:[],order:[]})}function iL(e,t){var n=Object(Bh.a)(e);return t.forEach((function(e){var t,a=sr(n);try{for(a.s();!(t=a.n()).done;){var r=t.value;if(YN(r,e))return}}catch(e){a.e(e)}finally{a.f()}n.push(e)})),n}function oL(e,t){return YN(e,t)||!t?e:e?[].concat(Object(Bh.a)(Object(he.i)(e)),Object(Bh.a)(Object(he.i)(t))).join(", "):t}function sL(e,t){var n=e.value,a=t.value;if(null==n||null===a)return{explicit:e.explicit,value:null};if(WP(n)&&WP(a))return{explicit:e.explicit,value:oL(n,a)};if(!WP(n)&&!WP(a))return{explicit:e.explicit,value:iL(n,a)};throw new Error("It should never reach here")}var uL=n(262),dL=n(261);function cL(e,t,n){return(cL=Object(dL.a)()?Reflect.construct:function(e,t,n){var a=[null];a.push.apply(a,t);var r=new(Function.bind.apply(e,a));return n&&Object(uL.a)(r,n.prototype),r}).apply(null,arguments)}function lL(e){return"Invalid specification ".concat(JSON.stringify(e),'. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".')}var fL='Autosize "fit" only works for single views and layered views.';function gL(e){return"".concat("width"==e?"Width":"Height",' "container" only works for single views and layered views.')}function hL(e){return"".concat("width"==e?"Width":"Height",' "container" only works well with autosize "fit" or "fit-x".')}function pL(e){return e?'Dropping "fit-'.concat(e,'" because spec has discrete ').concat(MP(e),"."):'Dropping "fit" because spec has discrete size.'}function AL(e){return'Cannot project a selection on encoding channel "'.concat(e,'", which has no field.')}function vL(e,t){return'Cannot project a selection on encoding channel "'.concat(e,'" as it uses an aggregate function ("').concat(t,'").')}function mL(e){return'The "nearest" transform is not supported for '.concat(e," marks.")}function yL(e){return"Selection not supported for ".concat(e," yet.")}function RL(e){return'Cannot find a selection named "'.concat(e,'".')}var bL="Scale bindings are currently only supported for scales with unbinned, continuous domains.",wL="Legend bindings are only supported for selections over an individual field or encoding channel.";function xL(e){return'Cannot define and lookup the "'.concat(e,'" selection in the same view. ')+"Try moving the lookup into a second, layered view?"}function _L(e){return'Unknown repeated value "'.concat(e,'".')}function EL(e){return'The "columns" property cannot be used when "'.concat(e,'" has nested row/column.')}var kL="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function CL(e){return'Unrecognized parse "'.concat(e,'".')}function OL(e,t,n){return'An ancestor parsed field "'.concat(e,'" as ').concat(n," but a child wants to parse the field as ").concat(t,".")}function BL(e){return"Ignoring an invalid transform: ".concat(eU(e),".")}var SL='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function FL(e){return"Layer's shared ".concat(e.join(",")," channel ").concat(1===e.length?"is":"are"," overriden.")}function jL(e){var t=e.parentProjection,n=e.projection;return"Layer's shared projection ".concat(eU(t)," is overridden by a child projection ").concat(eU(n),".")}function DL(e,t,n){return"Channel ".concat(e," is a ").concat(t,". Converted to {value: ").concat(eU(n),"}.")}function TL(e){return'Invalid field type "'.concat(e,'".')}function ML(e,t){return'Invalid field type "'.concat(e,'" for aggregate: "').concat(t,'", using "quantitative" instead.')}function NL(e){return'Invalid aggregation operator "'.concat(e,'".')}function UL(e,t){return'Missing type for channel "'.concat(e,'", using "').concat(t,'" instead.')}function PL(e,t){var n=t.fill,a=t.stroke;return"Dropping color ".concat(e," as the plot also has ").concat(n&&a?"fill and stroke":n?"fill":"stroke",".")}function LL(e,t){return"Dropping ".concat(eU(e),' from channel "').concat(t,'" since it does not contain any data field, datum, value, or signal.')}function IL(e,t,n){return"".concat(e,"-encoding with type ").concat(t," is deprecated. Replacing with ").concat(n,"-encoding.")}var QL="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function HL(e,t,n){return"".concat(e,' dropped as it is incompatible with "').concat(t,'"').concat(n?" when ".concat(n):"",".")}function zL(e){return"".concat(e,"-encoding is dropped as ").concat(e," is not a valid encoding channel.")}function KL(e){return"".concat(e," encoding should be discrete (ordinal / nominal / binned).")}function VL(e){return"Facet encoding dropped as ".concat(e.join(" and ")," ").concat(e.length>1?"are":"is"," also specified.")}function WL(e,t){return'Using discrete channel "'.concat(e,'" to encode "').concat(t,'" field can be misleading as it does not encode ').concat("ordinal"===t?"order":"magnitude",".")}function qL(e,t){return"Line mark is for continuous lines and thus cannot be used with ".concat(e&&t?"x2 and y2":e?"x2":"y2",". We will use the rule mark (line segments) instead.")}function GL(e,t){return'Specified orient "'.concat(e,'" overridden with "').concat(t,'".')}var XL="Custom domain scale cannot be unioned with default field-based domain.",YL='Scale\'s "rangeStep" is deprecated and will be removed in Vega-Lite 5.0. Please use "width"/"height": {"step": ...} instead. See https://vega.github.io/vega-lite/docs/size.html.';function JL(e){return'Cannot use the scale property "'.concat(e,'" with non-color channel.')}function $L(e){return"Using unaggregated domain with raw field has no effect (".concat(eU(e),").")}function ZL(e){return'Unaggregated domain not applicable for "'.concat(e,'" since it produces values outside the origin domain of the source data.')}function eI(e){return"Unaggregated domain is currently unsupported for log scale (".concat(eU(e),").")}function tI(e){return'Cannot apply size to non-oriented mark "'.concat(e,'".')}function nI(e,t,n){return'Channel "'.concat(e,'" does not work with "').concat(t,'" scale. We are using "').concat(n,'" scale instead.')}function aI(e,t){return'FieldDef does not work with "'.concat(e,'" scale. We are using "').concat(t,'" scale instead.')}function rI(e,t,n){return"".concat(n,"-scale's \"").concat(t,'" is dropped as it does not work with ').concat(e," scale.")}function iI(e,t){return'Scale type "'.concat(t,'" does not work with mark "').concat(e,'".')}function oI(e){return'The step for "'.concat(e,'" is dropped because the ').concat("width"===e?"x":"y"," is continuous.")}function sI(e,t,n,a){return"Conflicting ".concat(t.toString(),' property "').concat(e.toString(),'" (').concat(eU(n)," and ").concat(eU(a),"). Using ").concat(eU(n),".")}function uI(e,t,n,a){return"Conflicting ".concat(t.toString(),' property "').concat(e.toString(),'" (').concat(eU(n)," and ").concat(eU(a),"). Using the union of the two domains.")}function dI(e){return'Setting the scale to be independent for "'.concat(e,'" means we also have to set the guide (axis or legend) to be independent.')}function cI(e){return"Dropping sort property ".concat(eU(e),' as unioned domains only support boolean or op "count", "min", and "max".')}var lI="Unable to merge domains.",fI="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",gI="Invalid channel for axis.";function hI(e){return'Cannot stack "'.concat(e,'" if there is already "').concat(e,'2".')}function pI(e){return"Cannot stack non-linear scale (".concat(e,").")}function AI(e){return'Stacking is applied even though the aggregate function is non-summative ("'.concat(e,'").')}function vI(e,t){return"Invalid ".concat(e,": ").concat(eU(t),".")}function mI(e){return'Time unit "'.concat(e,'" is not supported. We are replacing it with ').concat(wU(e,"day","date"),".")}function yI(e){return"Dropping day from datetime ".concat(eU(e)," as day cannot be combined with other units.")}function RI(e,t){return"".concat(t?"extent ":"").concat(t&&e?"and ":"").concat(e?"center ":"").concat(t&&e?"are ":"is ","not needed when data are aggregated.")}function bI(e,t,n){return"".concat(e," is not usually used with ").concat(t," for ").concat(n,".")}function wI(e,t){return"Continuous axis should not have customized aggregation function ".concat(e,"; ").concat(t," already agregates the axis.")}function xI(e,t){return"Center is not needed to be specified in ".concat(t," when extent is ").concat(e,".")}function _I(e){return"1D error band does not support ".concat(e,".")}function EI(e){return"Channel ".concat(e,' is required for "binned" bin.')}function kI(e){return"Domain for ".concat(e," is required for threshold scale.")}var CI=v,OI=Object(he.K)(he.e),BI=OI;function SI(e){return BI=e}function FI(){return BI=OI}function jI(){var e;(e=BI).warn.apply(e,arguments)}function DI(e){return!(!e||!(e.year||e.quarter||e.month||e.date||e.day||e.hours||e.minutes||e.seconds||e.milliseconds))}var TI,MI=["january","february","march","april","may","june","july","august","september","october","november","december"],NI=MI.map((function(e){return e.substr(0,3)})),UI=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],PI=UI.map((function(e){return e.substr(0,3)}));function LI(e,t){var n=[];if(t&&void 0!==e.day&&lU(e).length>1&&(jI(CI.droppedDay(e)),delete(e=JN(e)).day),void 0!==e.year?n.push(e.year):void 0!==e.day?n.push(2006):n.push(0),void 0!==e.month){var a=t?function(e){if(BU(e)&&(e=+e),Object(he.E)(e))return e-1;var t=e.toLowerCase(),n=MI.indexOf(t);if(-1!==n)return n;var a=t.substr(0,3),r=NI.indexOf(a);if(-1!==r)return r;throw new Error(CI.invalidTimeUnit("month",e))}(e.month):e.month;n.push(a)}else if(void 0!==e.quarter){var r=t?function(e){if(BU(e)&&(e=+e),Object(he.E)(e))return e>4&&jI(CI.invalidTimeUnit("quarter",e)),e-1;throw new Error(CI.invalidTimeUnit("quarter",e))}(e.quarter):e.quarter;n.push(Object(he.E)(r)?3*r:r+"*3")}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){var i=t?function(e){if(BU(e)&&(e=+e),Object(he.E)(e))return e%7;var t=e.toLowerCase(),n=UI.indexOf(t);if(-1!==n)return n;var a=t.substr(0,3),r=PI.indexOf(a);if(-1!==r)return r;throw new Error(CI.invalidTimeUnit("day",e))}(e.day):e.day;n.push(Object(he.E)(i)?i+1:i+"+1")}else n.push(1);for(var o=0,s=["hours","minutes","seconds","milliseconds"];o-1&&(t!==TI.SECONDS||0===n||"i"!==e.charAt(n-1))}function ZI(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1},r=a.end,i=yU(t),o=GI(e)?"utc":"";function s(e){return e===TI.QUARTER?"(".concat(o,"quarter(").concat(i,")-1)"):"".concat(o).concat(e,"(").concat(i,")")}var u=KI.reduce((function(t,a){return $I(e,a)&&(t[a]=s(a),n=a),t}),{});return r&&(u[n]+="+1"),QI(u)}function eQ(e,t,n){if(e){var a=function(e){if(e){var t=JI(e);return"timeUnitSpecifier(".concat(VN()(t),", ").concat(VN()(YI),")")}}(e);return n||GI(e)?"utcFormat(".concat(t,", ").concat(a,")"):"timeFormat(".concat(t,", ").concat(a,")")}}function tQ(e){var t;if(e)return Object(he.H)(e)?t={unit:nQ(e)}:Object(he.F)(e)&&(t=Object.assign(Object.assign({},e),e.unit?{unit:nQ(e.unit)}:{})),GI(t.unit)&&(t.utc=!0,t.unit=function(e){return e.substr(3)}(t.unit)),t}function nQ(e){return"day"!==e&&e.indexOf("day")>=0?(jI(CI.dayReplacedWithDate(e)),wU(e,"day","date")):e}function aQ(e){var t=tQ(e),n=t.utc,a=T(t,["utc"]);return a.unit?(n?"utc":"")+lU(a).map((function(e){return hU("".concat("unit"===e?"":"_".concat(e,"_")).concat(a[e]))})).join(""):(n?"utc":"")+"timeunit"+lU(a).map((function(e){return hU("_".concat(e,"_").concat(a[e]))})).join("")}function rQ(e){return e&&!!e.field&&void 0!==e.equal}function iQ(e){return e&&!!e.field&&void 0!==e.lt}function oQ(e){return e&&!!e.field&&void 0!==e.lte}function sQ(e){return e&&!!e.field&&void 0!==e.gt}function uQ(e){return e&&!!e.field&&void 0!==e.gte}function dQ(e){if(e&&e.field){if(Object(he.A)(e.range)&&2===e.range.length)return!0;if(qP(e.range))return!0}return!1}function cQ(e){return e&&!!e.field&&(Object(he.A)(e.oneOf)||Object(he.A)(e.in))}function lQ(e){return e&&!!e.field&&void 0!==e.valid}function fQ(e){return cQ(e)||rQ(e)||dQ(e)||iQ(e)||sQ(e)||oQ(e)||uQ(e)}function gQ(e,t){return nz(e,{timeUnit:t,time:!0})}function hQ(e,t){return e.map((function(e){return gQ(e,t)}))}function pQ(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=e.field,r=null===(t=tQ(e.timeUnit))||void 0===t?void 0:t.unit,i=r?"time("+ZI(r,a)+")":MH(e,{expr:"datum"});if(rQ(e))return i+"==="+gQ(e.equal,r);if(iQ(e)){var o=e.lt;return"".concat(i,"<").concat(gQ(o,r))}if(sQ(e)){var s=e.gt;return"".concat(i,">").concat(gQ(s,r))}if(oQ(e)){var u=e.lte;return"".concat(i,"<=").concat(gQ(u,r))}if(uQ(e)){var d=e.gte;return"".concat(i,">=").concat(gQ(d,r))}if(cQ(e))return"indexof([".concat(hQ(e.oneOf,r).join(","),"], ").concat(i,") !== -1");if(lQ(e))return AQ(i,e.valid);if(dQ(e)){var c=e.range,l=qP(c)?{signal:"".concat(c.signal,"[0]")}:c[0],f=qP(c)?{signal:"".concat(c.signal,"[1]")}:c[1];if(null!==l&&null!==f&&n)return"inrange("+i+", ["+gQ(l,r)+", "+gQ(f,r)+"])";var g=[];return null!==l&&g.push("".concat(i," >= ").concat(gQ(l,r))),null!==f&&g.push("".concat(i," <= ").concat(gQ(f,r))),g.length>0?g.join(" && "):"true"}throw new Error("Invalid field predicate: ".concat(JSON.stringify(e)))}function AQ(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?"isValid(".concat(e,") && isFinite(+").concat(e,")"):"!isValid(".concat(e,") || !isFinite(+").concat(e,")")}function vQ(e){var t;return fQ(e)&&e.timeUnit?Object.assign(Object.assign({},e),{timeUnit:null===(t=tQ(e.timeUnit))||void 0===t?void 0:t.unit}):e}var mQ,yQ={quantitative:1,ordinal:1,temporal:1,nominal:1,geojson:1};!function(e){e.LINEAR="linear",e.LOG="log",e.POW="pow",e.SQRT="sqrt",e.SYMLOG="symlog",e.IDENTITY="identity",e.SEQUENTIAL="sequential",e.TIME="time",e.UTC="utc",e.QUANTILE="quantile",e.QUANTIZE="quantize",e.THRESHOLD="threshold",e.BIN_ORDINAL="bin-ordinal",e.ORDINAL="ordinal",e.POINT="point",e.BAND="band"}(mQ||(mQ={}));var RQ={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"},bQ=lU(RQ),wQ={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function xQ(e){return wQ[e]}var _Q=["linear","log","pow","sqrt","symlog","time","utc"],EQ=Object(he.db)(_Q),kQ=Object(he.db)(["linear","log","pow","sqrt","symlog"]),CQ=Object(he.db)(["quantile","quantize","threshold"]),OQ=_Q.concat(["quantile","quantize","threshold","sequential","identity"]),BQ=Object(he.db)(OQ),SQ=Object(he.db)(["ordinal","bin-ordinal","point","band"]);function FQ(e){return e in SQ}function jQ(e){return e in BQ}function DQ(e){return e in EQ}function TQ(e){return e in CQ}function MQ(e){return null==e?void 0:e.selection}var NQ={type:1,domain:1,domainMid:1,align:1,range:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},UQ=(lU(NQ),T(NQ,["type","domain","range","scheme"])),PQ=lU(UQ);function LQ(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!aU(["point","band","identity"],e);case"bins":return!aU(["point","band","identity","ordinal"],e);case"round":return DQ(e)||"band"===e||"point"===e;case"padding":return DQ(e)||aU(["point","band"],e);case"paddingOuter":case"align":return aU(["point","band"],e);case"paddingInner":return"band"===e;case"domainMid":case"clamp":return DQ(e);case"nice":return DQ(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return jQ(e)&&!aU(["log","time","utc","threshold","quantile"],e)}}function IQ(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return mP(e)?void 0:CI.cannotUseScalePropertyWithNonColor(e);case"align":case"type":case"bins":case"domain":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"reverse":case"round":case"clamp":case"zero":return}}function QQ(e,t){return aU(["ordinal","nominal"],t)?void 0===e||FQ(e):"temporal"===t?aU([mQ.TIME,mQ.UTC,void 0],e):"quantitative"!==t||aU([mQ.LOG,mQ.POW,mQ.SQRT,mQ.SYMLOG,mQ.QUANTILE,mQ.QUANTIZE,mQ.THRESHOLD,mQ.LINEAR,void 0],e)}function HQ(e,t){if(!QP(e))return!1;switch(e){case nP:case aP:case"theta":case"radius":return DQ(t)||aU(["band","point"],t);case uP:case fP:case dP:case cP:case lP:case"angle":return DQ(t)||TQ(t)||aU(["band","point","ordinal"],t);case rP:case iP:case oP:return"band"!==t;case gP:return"ordinal"===t||TQ(t);case sP:return"ordinal"===t}}function zQ(e,t){return e+"_"+t}function KQ(e){var t=e.channel,n=e.channelDef,a=e.markDef,r=e.scale,i=e.config,o=YQ(e);return xH(n)&&!$U(n.aggregate)&&r&&DQ(r.get("type"))&&!1===r.get("zero")?VQ({fieldDef:n,channel:t,markDef:a,ref:o,config:i}):o}function VQ(e){var t=e.fieldDef,n=e.channel,a=e.markDef,r=e.ref,i=e.config;return UU(a.type)||null===EU(a.invalid,tL("invalid",a,i))?r:[WQ(t,n),r]}function WQ(e,t){var n=qQ(e,!0),a="y"===OP(t)?{field:{group:"height"}}:{value:0};return Object.assign({test:n},a)}function qQ(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return AQ(Object(he.H)(e)?e:MH(e,{expr:"datum"}),!t)}function GQ(e,t,n,a){var r={};if(t&&(r.scale=t),EH(e)){var i=e.datum;DI(i)?r.signal=II(i):r.value=i}else r.field=MH(e,n);if(a){var o=a.offset,s=a.band;o&&(r.offset=o),s&&(r.band=s)}return r}function XQ(e){var t=e.scaleName,n=e.fieldOrDatumDef,a=e.fieldOrDatumDef2,r=e.offset,i=e.startSuffix,o=e.band,s=void 0===o?.5:o,u=05&&void 0!==arguments[5]&&arguments[5];return!t||n?(n=Object(he.H)(n)?n:a)||i?"".concat(r?"utc":"time","Format(").concat(e,", '").concat(n,"')"):void 0:eQ(t,e,r)}(d,xH(a)?null===(n=tQ(a.timeUnit))||void 0===n?void 0:n.unit:void 0,r,g,f,!c);return h?{signal:h}:void 0}return c?void 0:(r=rH(_H(a),r,u),xH(a)&&oz(a.bin)?{signal:sH(d,MH(a,{expr:o,binSuffix:"end"}),r,i,u)}:r||"quantitative"===_H(a)?{signal:"".concat(iH(d,r))}:{signal:"isValid(".concat(d,") ? ").concat(d,' : ""+').concat(d)})}function rH(e,t,n){return Object(he.H)(t)?t:"quantitative"===e?n.numberFormat:void 0}function iH(e,t){return"format(".concat(e,', "').concat(t||"",'")')}function oH(e,t,n,a){var r;return tH(n)?nH({formatType:n,field:e,format:t}):iH(e,null!==(r=Object(he.H)(t)?t:void 0)&&void 0!==r?r:a.numberFormat)}function sH(e,t,n,a,r){var i=oH(e,n,a,r),o=oH(t,n,a,r);return"".concat(AQ(e,!1),' ? "null" : ').concat(i,' + "').concat(" \u2013 ",'" + ').concat(o)}var uH={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function dH(e){return!!uH[e]}function cH(e){return!!e&&!!e.encoding}function lH(e){return!(!e||"count"!==e.op&&!e.field)}function fH(e){return!!e&&Object(he.A)(e)}function gH(e){return!!e.row||!!e.column}function hH(e){return!!e&&!!e.header}function pH(e){return void 0!==e.facet}function AH(e){var t=e.field,n=e.timeUnit,a=e.bin,r=e.aggregate;return Object.assign(Object.assign(Object.assign(Object.assign({},n?{timeUnit:n}:{}),a?{bin:a}:{}),r?{aggregate:r}:{}),{field:t})}function vH(e){return BH(e)&&!!e.sort}function mH(e){var t=e.channel,n=e.fieldDef,a=e.fieldDef2,r=e.markDef,i=e.stack,o=e.config,s=e.isMidPoint,u=n.timeUnit,d=n.bin;if(aU(["x","y","theta","radius"],t)){if(jH(n)&&void 0!==n.band)return n.band;if(u&&!a)return s?tL("timeUnitBandPosition",r,o):PU(r.type)?tL("timeUnitBand",r,o):0;if(oz(d))return PU(r.type)&&!s?1:.5;if((null==i?void 0:i.fieldChannel)===t&&s)return.5}}function yH(e,t,n,a,r,i){return!!(oz(t.bin)||t.timeUnit&&BH(t)&&"temporal"===t.type)&&!!mH({channel:e,fieldDef:t,fieldDef2:n,stack:a,markDef:r,config:i})}function RH(e){return!!e&&!!e.condition}function bH(e){var t=e&&e.condition;return!!t&&!Object(he.A)(t)&&xH(t)}function wH(e){var t=e&&e.condition;return!!t&&!Object(he.A)(t)&&OH(t)}function xH(e){return!(!e||!e.field&&"count"!==e.aggregate)}function _H(e){return e&&e.type}function EH(e){return!!e&&"datum"in e}function kH(e){return BH(e)&&UH(e)||CH(e)}function CH(e){return EH(e)&&Object(he.E)(e.datum)}function OH(e){return xH(e)||EH(e)}function BH(e){return!!e&&(!!e.field&&!!e.type||"count"===e.aggregate)}function SH(e){return e&&"value"in e&&void 0!==e.value}function FH(e){return!(!e||!e.scale&&!e.sort)}function jH(e){return!!e&&("stack"in e||"band"in e)}function DH(e){return!!e&&!!e.format}function TH(e){return!!e.op}function MH(e){var t,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.field,o=r.prefix,s=r.suffix,u="";if(PH(e))i=CU("count");else{var d;if(!r.nofn)if(TH(e))d=e.op;else{var c=e.bin,l=e.aggregate,f=e.timeUnit;oz(c)?(d=iz(c),s=(null!==(t=r.binSuffix)&&void 0!==t?t:"")+(null!==(n=r.suffix)&&void 0!==n?n:"")):l?XU(l)?(u=".".concat(i),i="argmax_".concat(l.argmax)):GU(l)?(u=".".concat(i),i="argmin_".concat(l.argmin)):d=String(l):f&&(d=aQ(f),s=(!aU(["range","mid"],r.binSuffix)&&r.binSuffix||"")+(null!==(a=r.suffix)&&void 0!==a?a:""))}d&&(i=i?"".concat(d,"_").concat(i):d)}return s&&(i="".concat(i,"_").concat(s)),o&&(i="".concat(o,"_").concat(i)),r.forAs?i:r.expr?RU(i,r.expr)+u:bU(i)+u}function NH(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return xH(e)&&!!e.bin;case"temporal":return!1}throw new Error(CI.invalidFieldType(e.type))}function UH(e){return!NH(e)}function PH(e){return"count"===e.aggregate}var LH=function(e,t){switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){var t=e.aggregate,n=e.bin,a=e.timeUnit,r=e.field;if(XU(t))return"".concat(r," for argmax(").concat(t.argmax,")");if(GU(t))return"".concat(r," for argmin(").concat(t.argmin,")");var i=tQ(a),o=t||(null==i?void 0:i.unit)||(null==i?void 0:i.maxbins)&&"timeunit"||oz(n)&&"bin";return o?o.toUpperCase()+"("+r+")":r}(e);default:return function(e,t){var n,a=e.field,r=e.bin,i=e.timeUnit,o=e.aggregate;if("count"===o)return t.countTitle;if(oz(r))return"".concat(a," (binned)");if(i){var s=null===(n=tQ(i))||void 0===n?void 0:n.unit;if(s)return"".concat(a," (").concat(JI(s).join("-"),")")}else if(o)return XU(o)?"".concat(a," for max ").concat(o.argmax):GU(o)?"".concat(a," for min ").concat(o.argmin):"".concat(vU(o)," of ").concat(a);return a}(e,t)}},IH=LH;function QH(e){IH=e}function HH(){QH(LH)}function zH(e,t,n){var a,r,i=n.allowDisabling,o=n.includeDefault,s=void 0===o||o,u=(null!==(a=KH(e))&&void 0!==a?a:{}).title;if(!xH(e))return u;var d=e,c=s?VH(d,t):void 0;return i?EU(u,d.title,c):null!==(r=null!=u?u:d.title)&&void 0!==r?r:c}function KH(e){return function(e){return!(!e||!e.axis&&!e.stack&&!e.impute&&void 0===e.band)}(e)&&e.axis?e.axis:function(e){return!!e&&!!e.legend}(e)&&e.legend?e.legend:hH(e)&&e.header?e.header:void 0}function VH(e,t){return IH(e,t)}function WH(e){var t;if(DH(e))return{format:e.format,formatType:e.formatType};var n=null!==(t=KH(e))&&void 0!==t?t:{};return{format:n.format,formatType:n.formatType}}function qH(e){return xH(e)?e:bH(e)?e.condition:void 0}function GH(e){return OH(e)?e:wH(e)?e.condition:void 0}function XH(e,t){if(Object(he.H)(e)||Object(he.E)(e)||Object(he.B)(e)){var n=Object(he.H)(e)?"string":Object(he.E)(e)?"number":"boolean";return jI(CI.primitiveChannelDef(t,n,e)),{value:e}}return OH(e)?YH(e,t):wH(e)?Object.assign(Object.assign({},e),{condition:YH(e.condition,t)}):e}function YH(e,t){return xH(e)?JH(e,t):function(e){var t=e.type;if(t)return e;var n=e.datum;return t=Object(he.E)(n)?"quantitative":Object(he.H)(n)?"nominal":DI(n)?"temporal":void 0,Object.assign(Object.assign({},e),{type:t})}(e)}function JH(e,t){var n=e.aggregate,a=e.timeUnit,r=e.bin,i=e.field,o=Object.assign({},e);if(!n||YU(n)||XU(n)||GU(n)||(jI(CI.invalidAggregate(n)),delete o.aggregate),a&&(o.timeUnit=tQ(a)),i&&(o.field="".concat(i)),oz(r)&&(o.bin=$H(r,t)),sz(r)&&!aU(DP,t)&&jI("Channel ".concat(t,' should not be used with "binned" bin.')),BH(o)){var s=o.type,u=function(e){if(e)switch(e=e.toLowerCase()){case"q":case"quantitative":return"quantitative";case"t":case"temporal":return"temporal";case"o":case"ordinal":return"ordinal";case"n":case"nominal":return"nominal";case"geojson":return"geojson"}}(s);s!==u&&(o.type=u),"quantitative"!==s&&$U(n)&&(jI(CI.invalidFieldTypeForCountAggregate(s,n)),o.type="quantitative")}else if(!CP(t)){var d=function(e,t){if(e.timeUnit)return"temporal";if(oz(e.bin))return"quantitative";switch(KP(t)){case"continuous":return"quantitative";case"discrete":case"flexible":return"nominal";default:return"quantitative"}}(o,t);jI(CI.missingFieldType(t,d)),o.type=d}if(BH(o)){var c=function(e,t){var n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:"Channel ".concat(t," should not be used with a geojson data.")};switch(t){case"row":case"column":case"facet":return UH(e)?{compatible:!1,warning:CI.facetChannelShouldBeDiscrete(t)}:ZH;case"x":case"y":case"color":case"fill":case"stroke":case"text":case"detail":case"key":case"tooltip":case"href":case"url":case"angle":case"theta":case"radius":return ZH;case"longitude":case"longitude2":case"latitude":case"latitude2":return"quantitative"!==n?{compatible:!1,warning:"Channel ".concat(t," should be used with a quantitative field only, not ").concat(e.type," field.")}:ZH;case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeWidth":case"size":case"theta2":case"radius2":case"x2":case"y2":return"nominal"!==n||e.sort?ZH:{compatible:!1,warning:"Channel ".concat(t," should not be used with an unsorted discrete field.")};case"strokeDash":return aU(["ordinal","nominal"],e.type)?ZH:{compatible:!1,warning:"StrokeDash channel should be used with only discrete data."};case"shape":return aU(["ordinal","nominal","geojson"],e.type)?ZH:{compatible:!1,warning:"Shape channel should be used with only either discrete or geojson data."};case"order":return"nominal"!==e.type||"sort"in e?ZH:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(o,t),l=c.compatible,f=c.warning;l||jI(f)}if(vH(o)&&Object(he.H)(o.sort)){var g=o.sort;if(dH(g))return Object.assign(Object.assign({},o),{sort:{encoding:g}});var h=g.substr(1);if("-"===g.charAt(0)&&dH(h))return Object.assign(Object.assign({},o),{sort:{encoding:h,order:"descending"}})}if(hH(o)){var p=o.header,A=p.orient,v=T(p,["orient"]);if(A)return Object.assign(Object.assign({},o),{header:Object.assign(Object.assign({},v),{labelOrient:p.labelOrient||A,titleOrient:p.titleOrient||A})})}return o}function $H(e,t){return Object(he.B)(e)?{maxbins:cz(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:Object.assign(Object.assign({},e),{maxbins:cz(t)})}var ZH={compatible:!0};function ez(e){var t=KH(e),n=t&&t.formatType||DH(e)&&e.formatType;return"time"===n||!n&&function(e){return e&&("temporal"===e.type||xH(e)&&!!e.timeUnit)}(e)}function tz(e){var t=KH(e),n=t&&t.formatType||DH(e)&&e.formatType;return n&&tH(n)}function nz(e,t){var n,a,r=t.timeUnit,i=t.type,o=t.time,s=t.undefinedIfExprNotRequired,u=r&&(null===(n=tQ(r))||void 0===n?void 0:n.unit);if(qP(e)){var d=e.signal;if(o&&!u&&"temporal"!==i)return o?"isDate(".concat(d,") ? time(").concat(d,") : ").concat(d):d;a=d}else DI(e)?a=II(e):(Object(he.H)(e)||Object(he.E)(e))&&(u||"temporal"===i)&&(a=function(e){return!!zI[e]}(u)?II(Object(To.a)({},u,e)):"datetime(".concat(JSON.stringify(e),")"));return a?o?"time(".concat(a,")"):a:s?void 0:JSON.stringify(e)}function az(e,t){var n=e.type;return t.map((function(t){var a=nz(t,{timeUnit:xH(e)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==a?{signal:a}:t}))}function rz(e,t){return oz(e.bin)?QP(t)&&aU(["ordinal","nominal"],e.type):(console.warn("Only call this method for binned field defs."),!1)}function iz(e){return Object(he.B)(e)&&(e=$H(e,void 0)),"bin"+lU(e).map((function(t){return dz(e[t])?hU("_".concat(t,"_").concat(Object.entries(e[t]))):hU("_".concat(t,"_").concat(e[t]))})).join("")}function oz(e){return!0===e||uz(e)&&!e.binned}function sz(e){return"binned"===e||uz(e)&&!0===e.binned}function uz(e){return Object(he.F)(e)}function dz(e){return null==e?void 0:e.selection}function cz(e){switch(e){case tP:case"column":case uP:case rP:case iP:case oP:case fP:case dP:case cP:case lP:case sP:return 6;case gP:return 4;default:return 10}}function lz(e,t){var n=e&&e[t];return!!n&&(Object(he.A)(n)?rU(n,(function(e){return!!e.field})):xH(n)||bH(n))}function fz(e){return rU(wP,(function(t){if(lz(e,t)){var n=e[t];if(Object(he.A)(n))return rU(n,(function(e){return!!e.aggregate}));var a=qH(n);return a&&!!a.aggregate}return!1}))}function gz(e,t){var n=[],a=[],r=[],i=[],o={};return Az(e,(function(s,u){if(xH(s)){var d=s.field,c=s.aggregate,l=s.bin,f=s.timeUnit,g=T(s,["field","aggregate","bin","timeUnit"]);if(c||f||l){var h,p=KH(s),A=p&&p.title,v=MH(s,{forAs:!0}),m=Object.assign(Object.assign(Object.assign({},A?[]:{title:zH(s,t,{allowDisabling:!0})}),g),{field:v}),y="x"===u||"y"===u;if(c){if(XU(c)?(h="argmax",v=MH({op:"argmax",field:c.argmax},{forAs:!0}),m.field="".concat(v,".").concat(d)):GU(c)?(h="argmin",v=MH({op:"argmin",field:c.argmin},{forAs:!0}),m.field="".concat(v,".").concat(d)):"boxplot"!==c&&"errorbar"!==c&&"errorband"!==c&&(h=c),h){var R={op:h,as:v};d&&(R.field=d),i.push(R)}}else if(n.push(v),BH(s)&&oz(l)){if(a.push({bin:l,field:d,as:v}),n.push(MH(s,{binSuffix:"end"})),rz(s,u)&&n.push(MH(s,{binSuffix:"range"})),y){var b={field:v+"_end"};o[u+"2"]=b}m.bin="binned",CP(u)||(m.type="quantitative")}else if(f){r.push({timeUnit:f,field:d,as:v});var w=BH(s)&&"temporal"!==s.type&&"time";w&&("text"===u||"tooltip"===u?m.formatType=w:function(e){return!!SP[e]}(u)?m.legend=Object.assign({formatType:w},m.legend):y&&(m.axis=Object.assign({formatType:w},m.axis)))}o[u]=m}else n.push(d),o[u]=e[u]}else o[u]=e[u]})),{bins:a,timeUnits:r,aggregate:i,groupby:n,encoding:o}}function hz(e,t){var n=t.type;return lU(e).reduce((function(a,r){if(!EP(r))return jI(CI.invalidEncodingChannel(r)),a;if(!function(e,t,n){var a=function(e,t){return function(e){switch(e){case rP:case iP:case oP:case"detail":case"key":case"tooltip":case"href":case"order":case dP:case cP:case lP:case fP:case"facet":case tP:case"column":return HP;case nP:case aP:case"latitude":case"longitude":return zP;case"x2":case"y2":case"latitude2":case"longitude2":return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case uP:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case gP:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case sP:return{point:"always",geoshape:"always"};case"text":return{text:"always"};case"angle":return{point:"always",text:"always"};case"url":return{image:"always"};case"theta":case"radius":return{text:"always",arc:"always"};case"theta2":case"radius2":return{arc:"always"}}}(e)[t]}(t,n);if(!a)return!1;if("binned"===a){var r=e["x2"===t?"x":"y"];return!!(xH(r)&&xH(e[t])&&sz(r.bin))}return!0}(e,r,n))return jI(CI.incompatibleChannel(r,n)),a;if("size"===r&&"line"===n){var i=qH(e[r]);if(null==i?void 0:i.aggregate)return jI(CI.LINE_WITH_VARYING_SIZE),a}if("color"===r&&(t.filled?"fill"in e:"stroke"in e))return jI(CI.droppingColor("encoding",{fill:"fill"in e,stroke:"stroke"in e})),a;var o=e[r];if("detail"===r||"order"===r&&!Object(he.A)(o)&&!SH(o)||"tooltip"===r&&Object(he.A)(o))o&&(a[r]=Object(he.i)(o).reduce((function(e,t){return xH(t)?e.push(JH(t,r)):jI(CI.emptyFieldDef(t,r)),e}),[]));else{if("tooltip"===r&&null===o)a[r]=null;else if(!(xH(o)||EH(o)||SH(o)||RH(o)||qP(o)))return jI(CI.emptyFieldDef(o,r)),a;a[r]=XH(o,r)}return a}),{})}function pz(e){var t,n=[],a=sr(lU(e));try{for(a.s();!(t=a.n()).done;){var r=t.value;if(lz(e,r)){var i,o=e[r],s=sr(Object(he.i)(o));try{for(s.s();!(i=s.n()).done;){var u=i.value;xH(u)?n.push(u):bH(u)&&n.push(u.condition)}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){a.e(e)}finally{a.f()}return n}function Az(e,t,n){if(e){var a,r=sr(lU(e));try{for(r.s();!(a=r.n()).done;){var i=a.value,o=e[i];if(Object(he.A)(o)){var s,u=sr(o);try{for(u.s();!(s=u.n()).done;){var d=s.value;t.call(n,d,i)}}catch(e){u.e(e)}finally{u.f()}}else t.call(n,o,i)}}catch(e){r.e(e)}finally{r.f()}}}function vz(e,t,n,a){return e?lU(e).reduce((function(n,r){var i=e[r];return Object(he.A)(i)?i.reduce((function(e,n){return t.call(a,e,n,r)}),n):t.call(a,n,i,r)}),n):n}function mz(e,t){return lU(t).reduce((function(n,a){switch(a){case"x":case"y":case"href":case"url":case"x2":case"y2":case"theta":case"theta2":case"radius":case"radius2":case"latitude":case"longitude":case"latitude2":case"longitude2":case"text":case"shape":case"angle":case"tooltip":return n;case"order":if("line"===e||"trail"===e)return n;case"detail":case"key":var r=t[a];return(Object(he.A)(r)||xH(r))&&Object(he.i)(r).forEach((function(e){e.aggregate||n.push(MH(e,{}))})),n;case"size":if("trail"===e)return n;case"color":case"fill":case"stroke":case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeDash":case"strokeWidth":var i=qH(t[a]);return i&&!i.aggregate&&n.push(MH(i,{})),n}}),[])}function yz(e,t,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("tooltip"in n)return{tooltip:n.tooltip};var r=e.map((function(e){var n=e.fieldPrefix,r=e.titlePrefix,i=a?" of ".concat(t.field):"";return{field:n+t.field,type:t.type,title:qP(r)?{signal:r+'"'.concat(escape(i),'"')}:r+i}}));return{tooltip:[].concat(Object(Bh.a)(r),Object(Bh.a)(pz(n)))}}function Rz(e){var t=e.axis,n=e.title,a=e.field;return t&&void 0!==t.title?void 0:EU(n,a)}function bz(e,t,n,a,r){var i=n.scale,o=n.axis;return function(s){var u=s.partName,d=s.mark,c=s.positionPrefix,l=s.endPositionPrefix,f=void 0===l?void 0:l,g=s.extraEncoding,h=void 0===g?{}:g,p=Rz(n);return wz(e,u,r,{mark:d,encoding:Object.assign(Object.assign(Object.assign(Object(To.a)({},t,Object.assign(Object.assign(Object.assign({field:c+"_"+n.field,type:n.type},void 0!==p?{title:p}:{}),void 0!==i?{scale:i}:{}),void 0!==o?{axis:o}:{})),Object(he.H)(f)?Object(To.a)({},t+"2",{field:f+"_"+n.field}):{}),a),h)})}}function wz(e,t,n,a){var r=e.clip,i=e.color,o=e.opacity,s=e.type;return e[t]||void 0===e[t]&&n[t]?[Object.assign(Object.assign({},a),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[t]),r?{clip:r}:{}),i?{color:i}:{}),o?{opacity:o}:{}),IU(a.mark)?a.mark:{type:a.mark}),{style:"".concat(s,"-").concat(t)}),Object(he.B)(e[t])?{}:e[t])})]:[]}function xz(e,t,n){var a=e.encoding,r="vertical"===t?"y":"x",i=a[r],o=a[r+"2"],s=a[r+"Error"],u=a[r+"Error2"];return{continuousAxisChannelDef:_z(i,n),continuousAxisChannelDef2:_z(o,n),continuousAxisChannelDefError:_z(s,n),continuousAxisChannelDefError2:_z(u,n),continuousAxis:r}}function _z(e,t){if(e&&e.aggregate){var n=e.aggregate,a=T(e,["aggregate"]);return n!==t&&jI(CI.errorBarContinuousAxisHasCustomizedAggregate(n,t)),a}return e}function Ez(e,t){var n=e.mark,a=e.encoding,r=a.x,i=a.y;if(kH(r)){if(kH(i)){var o=xH(r)&&r.aggregate,s=xH(i)&&i.aggregate;if(o||s!==t){if(s||o!==t){if(o===t&&s===t)throw new Error("Both x and y cannot have aggregate");return IU(n)&&n.orient?n.orient:"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(kH(i))return"vertical";throw new Error("Need a valid continuous axis for "+t+"s")}var kz=lU({box:1,median:1,outliers:1,rule:1,ticks:1}),Cz=new VU("boxplot",Bz);function Oz(e){return Object(he.E)(e)?"tukey":e}function Bz(e,t){var n,a,r=t.config,i=e.mark,o=(e.encoding,e.selection),s=(e.projection,T(e,["mark","encoding","selection","projection"])),u=IU(i)?i:{type:i};o&&jI(CI.selectionNotSupported("boxplot"));var d,c=null!==(n=u.extent)&&void 0!==n?n:r.boxplot.extent,l=EU(u.size,r.boxplot.size),f=Oz(c),g=function(e,t,n){var a=Ez(e,"boxplot"),r=xz(e,a,"boxplot"),i=r.continuousAxisChannelDef,o=r.continuousAxis,s=i.field,u=Oz(t),d=[].concat(Object(Bh.a)(Sz(s)),[{op:"median",field:s,as:"mid_box_"+s},{op:"min",field:s,as:("min-max"===u?"lower_whisker_":"min_")+s},{op:"max",field:s,as:("min-max"===u?"upper_whisker_":"max_")+s}]),c="min-max"===u||"tukey"===u?[]:[{calculate:'datum["upper_box_'.concat(s,'"] - datum["lower_box_').concat(s,'"]'),as:"iqr_"+s},{calculate:'min(datum["upper_box_'.concat(s,'"] + datum["iqr_').concat(s,'"] * ').concat(t,', datum["max_').concat(s,'"])'),as:"upper_whisker_"+s},{calculate:'max(datum["lower_box_'.concat(s,'"] - datum["iqr_').concat(s,'"] * ').concat(t,', datum["min_').concat(s,'"])'),as:"lower_whisker_"+s}],l=e.encoding,f=o,g=(l[f],function(e){var t,n,a=e.tooltip,r=T(e,["tooltip"]);return a?(Object(he.A)(a)?(a.forEach((function(e){e.aggregate?(t||(t=[]),t.push(e)):(n||(n=[]),n.push(e))})),t&&(r.tooltip=t)):a.aggregate?r.tooltip=a:n=a,Object(he.A)(n)&&1===n.length&&(n=n[0]),{customTooltipWithoutAggregatedField:n,filteredEncoding:r}):{filteredEncoding:e}}(T(l,["symbol"==typeof f?f:f+""]))),h=g.customTooltipWithoutAggregatedField,p=gz(g.filteredEncoding,n),A=p.bins,v=p.timeUnits,m=p.aggregate,y=p.groupby,R=p.encoding,b="vertical"===a?"horizontal":"vertical",w=a;return{transform:[].concat(Object(Bh.a)(A),Object(Bh.a)(v),[{aggregate:[].concat(Object(Bh.a)(m),Object(Bh.a)(d)),groupby:y}],c),groupby:y,aggregate:m,continuousAxisChannelDef:i,continuousAxis:o,encodingWithoutContinuousAxis:R,ticksOrient:b,boxOrient:w,customTooltipWithoutAggregatedField:h}}(e,c,r),h=g.transform,p=g.continuousAxisChannelDef,A=g.continuousAxis,v=g.groupby,m=g.aggregate,y=g.encodingWithoutContinuousAxis,R=g.ticksOrient,b=g.boxOrient,w=g.customTooltipWithoutAggregatedField,x=(y.color,y.size),_=T(y,["color","size"]),E=function(e){return bz(u,A,p,e,r.boxplot)},k=E(_),C=E(y),O=E(Object.assign(Object.assign({},_),x?{size:x}:{})),B=yz([{fieldPrefix:"min-max"===f?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===f?"lower_whisker_":"min_",titlePrefix:"Min"}],p,y),S={type:"tick",color:"black",opacity:1,orient:R,invalid:null},F="min-max"===f?B:yz([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],p,y),j=[].concat(Object(Bh.a)(k({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:F})),Object(Bh.a)(k({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:F})),Object(Bh.a)(k({partName:"ticks",mark:S,positionPrefix:"lower_whisker",extraEncoding:F})),Object(Bh.a)(k({partName:"ticks",mark:S,positionPrefix:"upper_whisker",extraEncoding:F}))),D=[].concat(Object(Bh.a)("tukey"!==f?j:[]),Object(Bh.a)(C({partName:"box",mark:Object.assign(Object.assign({type:"bar"},l?{size:l}:{}),{orient:b,invalid:null}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:B})),Object(Bh.a)(O({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},Object(he.F)(r.boxplot.median)&&r.boxplot.median.color?{color:r.boxplot.median.color}:{}),l?{size:l}:{}),{orient:R}),positionPrefix:"mid_box",extraEncoding:B})));if("min-max"!==f){var M='datum["lower_box_'.concat(p.field,'"]'),N='datum["upper_box_'.concat(p.field,'"]'),U="(".concat(N," - ").concat(M,")"),P="".concat(M," - ").concat(c," * ").concat(U),L="".concat(N," + ").concat(c," * ").concat(U),I='datum["'.concat(p.field,'"]'),Q={joinaggregate:Sz(p.field),groupby:v},H=void 0;"tukey"===f&&(H={transform:[{filter:"(".concat(P," <= ").concat(I,") && (").concat(I," <= ").concat(L,")")},{aggregate:[{op:"min",field:p.field,as:"lower_whisker_"+p.field},{op:"max",field:p.field,as:"upper_whisker_"+p.field},{op:"min",field:"lower_box_"+p.field,as:"lower_box_"+p.field},{op:"max",field:"upper_box_"+p.field,as:"upper_box_"+p.field}].concat(Object(Bh.a)(m)),groupby:v}],layer:j}),_.tooltip;var z=T(_,["tooltip"]),K=p.scale,V=p.axis,W=Rz(p),q=wz(u,"outliers",r.boxplot,{transform:[{filter:"(".concat(I," < ").concat(P,") || (").concat(I," > ").concat(L,")")}],mark:"point",encoding:Object.assign(Object.assign(Object(To.a)({},A,Object.assign(Object.assign(Object.assign({field:p.field,type:p.type},void 0!==W?{title:W}:{}),void 0!==K?{scale:K}:{}),void 0!==V?{axis:V}:{})),z),w?{tooltip:w}:{})})[0];q&&H?d={transform:[Q],layer:[q,H]}:q?(d=q).transform.unshift(Q):H&&(d=H).transform.unshift(Q)}return d?Object.assign(Object.assign({},s),{layer:[d,{transform:h,layer:D}]}):Object.assign(Object.assign({},s),{transform:(null!==(a=s.transform)&&void 0!==a?a:[]).concat(h),layer:D})}function Sz(e){return[{op:"q1",field:e,as:"lower_box_"+e},{op:"q3",field:e,as:"upper_box_"+e}]}var Fz=lU({ticks:1,rule:1}),jz=new VU("errorbar",Dz);function Dz(e,t){var n=t.config,a=Tz(e,"errorbar",n),r=a.transform,i=a.continuousAxisChannelDef,o=a.continuousAxis,s=a.encodingWithoutContinuousAxis,u=a.ticksOrient,d=a.markDef,c=a.outerSpec,l=a.tooltipEncoding,f=bz(d,o,i,s,n.errorbar),g={type:"tick",orient:u},h=[].concat(Object(Bh.a)(f({partName:"ticks",mark:g,positionPrefix:"lower",extraEncoding:l})),Object(Bh.a)(f({partName:"ticks",mark:g,positionPrefix:"upper",extraEncoding:l})),Object(Bh.a)(f({partName:"rule",mark:"rule",positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})));return Object.assign(Object.assign(Object.assign({},c),{transform:r}),h.length>1?{layer:h}:Object.assign({},h[0]))}function Tz(e,t,n){var a,r=e.mark,i=e.encoding,o=e.selection,s=(e.projection,T(e,["mark","encoding","selection","projection"])),u=IU(r)?r:{type:r};o&&jI(CI.selectionNotSupported(t));var d=function(e,t){var n=e.encoding;if(function(e){return(OH(e.x)||OH(e.y))&&!OH(e.x2)&&!OH(e.y2)&&!OH(e.xError)&&!OH(e.xError2)&&!OH(e.yError)&&!OH(e.yError2)}(n))return{orient:Ez(e,t),inputType:"raw"};var a=function(e){return OH(e.x2)||OH(e.y2)}(n),r=function(e){return OH(e.xError)||OH(e.xError2)||OH(e.yError)||OH(e.yError2)}(n),i=n.x,o=n.y;if(a){if(r)throw new Error("".concat(t," cannot be both type aggregated-upper-lower and aggregated-error"));var s=n.x2,u=n.y2;if(OH(s)&&OH(u))throw new Error("".concat(t," cannot have both x2 and y2"));if(OH(s)){if(kH(i))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error("Both x and x2 have to be quantitative in ".concat(t))}if(OH(u)){if(kH(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error("Both y and y2 have to be quantitative in ".concat(t))}throw new Error("No ranged axis")}var d=n.xError,c=n.xError2,l=n.yError,f=n.yError2;if(OH(c)&&!OH(d))throw new Error("".concat(t," cannot have xError2 without xError"));if(OH(f)&&!OH(l))throw new Error("".concat(t," cannot have yError2 without yError"));if(OH(d)&&OH(l))throw new Error("".concat(t," cannot have both xError and yError with both are quantiative"));if(OH(d)){if(kH(i))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(OH(l)){if(kH(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}(e,t),c=d.orient,l=d.inputType,f=xz(e,c,t),g=f.continuousAxisChannelDef,h=f.continuousAxisChannelDef2,p=f.continuousAxisChannelDefError,A=f.continuousAxisChannelDefError2,v=f.continuousAxis,m=function(e,t,n,a,r,i,o,s){var u,d=[],c=[],l=t.field,f=!1;if("raw"===i){var g,h,p,A=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":s.errorbar.center,v=e.extent?e.extent:"mean"===A?"stderr":"iqr";"median"===A!=("iqr"===v)&&jI(CI.errorBarCenterIsUsedWithWrongExtent(A,v,o)),"stderr"===v||"stdev"===v?(d=[{op:v,field:l,as:"extent_"+l},{op:A,field:l,as:"center_"+l}],c=[{calculate:'datum["center_'.concat(l,'"] + datum["extent_').concat(l,'"]'),as:"upper_"+l},{calculate:'datum["center_'.concat(l,'"] - datum["extent_').concat(l,'"]'),as:"lower_"+l}],u=[{fieldPrefix:"center_",titlePrefix:vU(A)},{fieldPrefix:"upper_",titlePrefix:Mz(A,v,"+")},{fieldPrefix:"lower_",titlePrefix:Mz(A,v,"-")}],f=!0):(e.center&&e.extent&&jI(CI.errorBarCenterIsNotNeeded(e.extent,o)),"ci"===v?(g="mean",h="ci0",p="ci1"):(g="median",h="q1",p="q3"),d=[{op:h,field:l,as:"lower_"+l},{op:p,field:l,as:"upper_"+l},{op:g,field:l,as:"center_"+l}],u=[{fieldPrefix:"upper_",titlePrefix:zH({field:l,aggregate:p,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:zH({field:l,aggregate:h,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:zH({field:l,aggregate:g,type:"quantitative"},s,{allowDisabling:!1})}])}else{(e.center||e.extent)&&jI(CI.errorBarCenterAndExtentAreNotNeeded(e.center,e.extent)),"aggregated-upper-lower"===i?(u=[],c=[{calculate:'datum["'.concat(n.field,'"]'),as:"upper_"+l},{calculate:'datum["'.concat(l,'"]'),as:"lower_"+l}]):"aggregated-error"===i&&(u=[{fieldPrefix:"",titlePrefix:l}],c=[{calculate:'datum["'.concat(l,'"] + datum["').concat(a.field,'"]'),as:"upper_"+l}],r?c.push({calculate:'datum["'.concat(l,'"] + datum["').concat(r.field,'"]'),as:"lower_"+l}):c.push({calculate:'datum["'.concat(l,'"] - datum["').concat(a.field,'"]'),as:"lower_"+l}));var m,y=sr(c);try{for(y.s();!(m=y.n()).done;){var R=m.value;u.push({fieldPrefix:R.as.substring(0,6),titlePrefix:wU(wU(R.calculate,'datum["',""),'"]',"")})}}catch(e){y.e(e)}finally{y.f()}}return{postAggregateCalculates:c,errorBarSpecificAggregate:d,tooltipSummary:u,tooltipTitleWithFieldName:f}}(u,g,h,p,A,l,t,n),y=m.errorBarSpecificAggregate,R=m.postAggregateCalculates,b=m.tooltipSummary,w=m.tooltipTitleWithFieldName,x=i,_=v,E=(x[_],"x"===v?"x2":"y2"),k=(x[E],"x"===v?"xError":"yError"),C=(x[k],"x"===v?"xError2":"yError2"),O=(x[C],gz(T(x,["symbol"==typeof _?_:_+"","symbol"==typeof E?E:E+"","symbol"==typeof k?k:k+"","symbol"==typeof C?C:C+""]),n)),B=O.bins,S=O.timeUnits,F=O.aggregate,j=O.groupby,D=O.encoding,M=[].concat(Object(Bh.a)(F),Object(Bh.a)(y)),N="raw"!==l?[]:j,U=yz(b,g,D,w);return{transform:[].concat(Object(Bh.a)(null!==(a=s.transform)&&void 0!==a?a:[]),Object(Bh.a)(B),Object(Bh.a)(S),Object(Bh.a)(0===M.length?[]:[{aggregate:M,groupby:N}]),Object(Bh.a)(R)),groupby:N,continuousAxisChannelDef:g,continuousAxis:v,encodingWithoutContinuousAxis:D,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:u,outerSpec:s,tooltipEncoding:U}}function Mz(e,t,n){return vU(e)+" "+n+" "+t}var Nz=lU({band:1,borders:1}),Uz=new VU("errorband",Pz);function Pz(e,t){var n=t.config,a=Tz(e,"errorband",n),r=a.transform,i=a.continuousAxisChannelDef,o=a.continuousAxis,s=a.encodingWithoutContinuousAxis,u=a.markDef,d=a.outerSpec,c=a.tooltipEncoding,l=u,f=bz(l,o,i,s,n.errorband),g=void 0!==e.encoding.x&&void 0!==e.encoding.y,h={type:g?"area":"rect"},p={type:g?"line":"rule"},A=Object.assign(Object.assign({},l.interpolate?{interpolate:l.interpolate}:{}),l.tension&&l.interpolate?{tension:l.tension}:{});return g?(h=Object.assign(Object.assign({},h),A),p=Object.assign(Object.assign({},p),A)):l.interpolate?jI(CI.errorBand1DNotSupport("interpolate")):l.tension&&jI(CI.errorBand1DNotSupport("tension")),Object.assign(Object.assign({},d),{transform:r,layer:[].concat(Object(Bh.a)(f({partName:"band",mark:h,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})),Object(Bh.a)(f({partName:"borders",mark:p,positionPrefix:"lower",extraEncoding:c})),Object(Bh.a)(f({partName:"borders",mark:p,positionPrefix:"upper",extraEncoding:c})))})}var Lz={};function Iz(e,t,n){var a=new VU(e,t);Lz[e]={normalizer:a,parts:n}}Iz("boxplot",Bz,kz),Iz("errorbar",Dz,Fz),Iz("errorband",Pz,Nz);var Qz=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Hz=lU({size:1,shape:1,fill:1,stroke:1,strokeDash:1,strokeWidth:1,opacity:1}),zz={fillColor:{part:"legend",vgProp:"fill"},gradientStrokeColor:{part:"gradient",vgProp:"stroke"},labelColor:{part:"labels",vgProp:"fill"},strokeColor:{part:"legend",vgProp:"stroke"},symbolFillColor:{part:"symbols",vgProp:"fill"},symbolStrokeColor:{part:"symbols",vgProp:"stroke"},titleColor:{part:"title",vgProp:"fill"}},Kz={clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Vz=(lU(Kz),{single:{on:"click",fields:["_vgsid_"],resolve:"global",empty:"all",clear:"dblclick"},multi:{on:"click",fields:["_vgsid_"],toggle:"event.shiftKey",resolve:"global",empty:"all",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}});function Wz(e){return!(!e||"legend"!==e&&!e.legend)}function qz(e){return Wz(e)&&Object(he.F)(e)}function Gz(e){return"concat"in e}function Xz(e){return"vconcat"in e}function Yz(e){return"hconcat"in e}function Jz(e){return Object(he.F)(e)&&void 0!==e.step}function $z(e){return e.view||e.width||e.height}var Zz=lU({align:1,bounds:1,center:1,columns:1,spacing:1});function eK(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e["width"===t?"continuousWidth":"continuousHeight"]}function tK(e,t){var n=nK(e,t);return Jz(n)?n.step:aK}function nK(e,t){var n;return EU(null!==(n=e[t])&&void 0!==n?n:e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}var aK=20,rK={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:aK},mark:{color:"#4c78a8",invalid:"filter",timeUnitBand:1},arc:{},area:{},bar:{binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},circle:{},geoshape:{},image:{},line:{},point:{},rect:{binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5},rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},axis:{},axisX:{},axisY:{},axisLeft:{},axisRight:{},axisTop:{},axisBottom:{},axisBand:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Vz,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},iK=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],oK={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},sK={blue:iK[0],orange:iK[1],red:iK[2],teal:iK[3],green:iK[4],yellow:iK[5],purple:iK[6],pink:iK[7],brown:iK[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function uK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:Object(he.F)(e)?Object.assign(Object.assign({},sK),e):sK}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function dK(e){return{signals:[{name:"fontSize",value:Object(he.F)(e)?Object.assign(Object.assign({},oK),e):oK}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function cK(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function lK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=e.font,a=e.fontSize,r=T(e,["color","font","fontSize"]);return Object(he.N)({},rK,n?cK(n):{},t?uK(t):{},a?dK(a):{},r||{})}var fK=["view"].concat(Object(Bh.a)(LU)),gK=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],hK=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},{area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]});function pK(e){e=JN(e);var t,n=sr(gK);try{for(n.s();!(t=n.n()).done;)delete e[t.value]}catch(e){n.e(e)}finally{n.f()}if(e.axis)for(var a in e.axis)FU(e.axis[a])&&delete e.axis[a];if(e.legend){var r,i=sr(Qz);try{for(i.s();!(r=i.n()).done;){var o=r.value;delete e.legend[o]}}catch(e){i.e(e)}finally{i.f()}}if(e.mark){var s,u=sr(HU);try{for(u.s();!(s=u.n()).done;){var d=s.value;delete e.mark[d]}}catch(e){u.e(e)}finally{u.f()}}var c,l=sr(fK);try{for(l.s();!(c=l.n()).done;){var f,g=c.value,h=sr(HU);try{for(h.s();!(f=h.n()).done;){var p=f.value;delete e[g][p]}}catch(e){h.e(e)}finally{h.f()}var A=hK[g];if(A){var v,m=sr(A);try{for(m.s();!(v=m.n()).done;){var y=v.value;delete e[g][y]}}catch(e){m.e(e)}finally{m.f()}}AK(e,g)}}catch(e){l.e(e)}finally{l.f()}var R,b=sr(lU(Lz));try{for(b.s();!(R=b.n()).done;)delete e[R.value]}catch(e){b.e(e)}finally{b.f()}for(var w in function(e){var t=VP(e.title),n=t.mark,a=t.subtitle,r=Object.assign(Object.assign({},e.style["group-title"]),n);lU(r).length>0&&(e.style["group-title"]=r),lU(a).length>0?e.title=a:delete e.title}(e),e)Object(he.F)(e[w])&&0===lU(e[w]).length&&delete e[w];return lU(e).length>0?e:void 0}function AK(e,t,n,a){var r=a?e[t][a]:e[t];"view"===t&&(n="cell");var i=Object.assign(Object.assign({},r),e.style[null!=n?n:t]);lU(i).length>0&&(e.style[null!=n?n:t]=i),a||delete e[t]}function vK(e){return void 0!==e.layer}var mK=n(33),yK=n(41),RK=function(){function e(){Object(x.a)(this,e)}return Object(_.a)(e,[{key:"map",value:function(e,t){return pH(e)?this.mapFacet(e,t):function(e){return void 0!==e.repeat}(e)?this.mapRepeat(e,t):Yz(e)?this.mapHConcat(e,t):Xz(e)?this.mapVConcat(e,t):Gz(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}},{key:"mapLayerOrUnit",value:function(e,t){if(vK(e))return this.mapLayer(e,t);if(KU(e))return this.mapUnit(e,t);throw new Error(CI.invalidSpec(e))}},{key:"mapLayer",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{layer:e.layer.map((function(e){return n.mapLayerOrUnit(e,t)}))})}},{key:"mapHConcat",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map((function(e){return n.map(e,t)}))})}},{key:"mapVConcat",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map((function(e){return n.map(e,t)}))})}},{key:"mapConcat",value:function(e,t){var n=this,a=e.concat,r=T(e,["concat"]);return Object.assign(Object.assign({},r),{concat:a.map((function(e){return n.map(e,t)}))})}},{key:"mapFacet",value:function(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}},{key:"mapRepeat",value:function(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}}]),e}(),bK={zero:1,center:1,normalize:1};function wK(e){return!!bK[e]}var xK=["arc","bar","area","rule","point","circle","square","line","text","tick"],_K=["bar","area","arc"];function EK(e,t,n){var a,r,i="x"===n?"y":"radius",o=e[n],s=e[i];if(xH(o)&&xH(s))if("quantitative"===_H(o)&&"quantitative"===_H(s)){if(o.stack)return n;if(s.stack)return i;var u=xH(o)&&!!o.aggregate;if(u!==(xH(s)&&!!s.aggregate))return u?n:i;var d=null===(a=o.scale)||void 0===a?void 0:a.type,c=null===(r=s.scale)||void 0===r?void 0:r.type;if(d&&"linear"!==d)return i;if(c&&"linear"!==c)return n}else{if("quantitative"===_H(o))return n;if("quantitative"===_H(s))return i}else{if("quantitative"===_H(o))return n;if("quantitative"===_H(s))return i}}function kK(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function CK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=IU(e)?e.type:e;if(!aU(xK,a))return null;var r=EK(t,0,"x")||EK(t,0,"theta");if(!r)return null;var i=t[r],o=xH(i)?MH(i,{}):void 0,s=kK(r),u=t[s],d=xH(u)?MH(u,{}):void 0;d===o&&(d=void 0,u=void 0,s=void 0);var c,l=FP.reduce((function(e,n){if("tooltip"!==n&&lz(t,n)){var a=t[n];Object(he.i)(a).forEach((function(t){var a=qH(t);if(!a.aggregate){var r=MH(a,{});r&&r===d||e.push({channel:n,fieldDef:a})}}))}return e}),[]);if(void 0!==i.stack?c=Object(he.B)(i.stack)?i.stack?"zero":null:i.stack:l.length>0&&aU(_K,a)&&(c="zero"),!c||!wK(c))return null;if(fz(t)&&0===l.length)return null;if(i.scale&&i.scale.type&&i.scale.type!==mQ.LINEAR){if(n.disallowNonLinearStack)return null;jI(CI.cannotStackNonLinearScale(i.scale.type))}return OH(t[BP(r)])?(void 0!==i.stack&&jI(CI.cannotStackRangedMark(r)),null):(xH(i)&&i.aggregate&&!aU(ZU,i.aggregate)&&jI(CI.stackNonSummativeAggregate(i.aggregate)),{groupbyChannel:u?s:void 0,groupbyField:d,fieldChannel:r,impute:null!==i.impute&&UU(a),stackBy:l,offset:c})}function OK(e){e.point,e.line;var t=T(e,["point","line"]);return lU(t).length>1?t:t.type}function BK(e){for(var t=0,n=["line","area","rule","trail"];t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return"transparent"===e.point?{opacity:0}:e.point?Object(he.F)(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?Object(he.F)(t.point)?t.point:{}:void 0}function FK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}var jK=function(){function e(){Object(x.a)(this,e),this.name="path-overlay"}return Object(_.a)(e,[{key:"hasMatchingType",value:function(e,t){if(KU(e)){var n=e.mark,a=e.encoding,r=IU(n)?n:{type:n};switch(r.type){case"line":case"rule":case"trail":return!!SK(r,t[r.type],a);case"area":return!!SK(r,t[r.type],a)||!!FK(r,t[r.type])}}return!1}},{key:"run",value:function(e,t,n){var a=t.config,r=e.selection,i=e.projection,o=e.encoding,s=e.mark,u=T(e,["selection","projection","encoding","mark"]),d=IU(s)?s:{type:s},c=SK(d,a[d.type],o),l="area"===d.type&&FK(d,a[d.type]),f=[Object.assign(Object.assign({},r?{selection:r}:{}),{mark:OK(Object.assign(Object.assign({},"area"===d.type&&void 0===d.opacity&&void 0===d.fillOpacity?{opacity:.7}:{}),d)),encoding:ZN(o,["shape"])})],g=CK(d,o),h=o;if(g){var p=g.fieldChannel,A=g.offset;h=Object.assign(Object.assign({},o),Object(To.a)({},p,Object.assign(Object.assign({},o[p]),A?{stack:A}:{})))}return l&&f.push(Object.assign(Object.assign({},i?{projection:i}:{}),{mark:Object.assign(Object.assign({type:"line"},$N(d,["clip","interpolate","tension","tooltip"])),l),encoding:h})),c&&f.push(Object.assign(Object.assign({},i?{projection:i}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},$N(d,["clip","tooltip"])),c),encoding:h})),n(Object.assign(Object.assign({},u),{layer:f}),Object.assign(Object.assign({},t),{config:BK(a)}))}}]),e}(),DK=function(){function e(){Object(x.a)(this,e),this.name="RangeStep"}return Object(_.a)(e,[{key:"hasMatchingType",value:function(e){var t;if(KU(e)&&e.encoding){var n,a=sr(DP);try{for(a.s();!(n=a.n()).done;){var r=n.value,i=e.encoding[r];if(i&&OH(i)&&(null===(t=null==i?void 0:i.scale)||void 0===t?void 0:t.rangeStep))return!0}}catch(e){a.e(e)}finally{a.f()}}return!1}},{key:"run",value:function(e){var t,n,a={},r=Object.assign({},e.encoding),i=sr(DP);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=MP(o),u=r[o];if(u&&OH(u)&&(null===(t=null==u?void 0:u.scale)||void 0===t?void 0:t.rangeStep)){var d=u.scale,c=T(u,["scale"]),l=d,f=(l.rangeStep,T(l,["rangeStep"]));a[s]={step:d.rangeStep},jI(CI.RANGE_STEP_DEPRECATED),r=Object.assign(Object.assign({},r),Object(To.a)({},o,Object.assign(Object.assign({},c),lU(f).length>0?{scale:f}:{})))}}}catch(e){i.e(e)}finally{i.f()}return Object.assign(Object.assign(Object.assign({},a),e),{encoding:r})}}]),e}();function TK(e,t){return t?gH(e)?IK(e,t):UK(e,t):e}function MK(e,t){return t?IK(e,t):e}function NK(e,t,n){var a=t[e];return function(e){return e&&!Object(he.H)(e)&&"repeat"in e}(a)?a.repeat in n?Object.assign(Object.assign({},t),Object(To.a)({},e,n[a.repeat])):void jI(CI.noSuchRepeatedValue(a.repeat)):t}function UK(e,t){if(void 0!==(e=NK("field",e,t))){if(null===e)return null;if(vH(e)&&lH(e.sort)){var n=NK("field",e.sort,t);e=Object.assign(Object.assign({},e),n?{sort:n}:{})}return e}}function PK(e,t){if(xH(e))return UK(e,t);var n=NK("datum",e,t);return n===e||n.type||(n.type="nominal"),n}function LK(e,t){if(!OH(e)){if(wH(e)){var n=PK(e.condition,t);return n?Object.assign(Object.assign({},e),{condition:n}):(e.condition,T(e,["condition"]))}return e}return PK(e,t)||(RH(e)?{condition:e.condition}:void 0)}function IK(e,t){var n={};for(var a in e)if(Object(he.v)(e,a)){var r=e[a];if(Object(he.A)(r))n[a]=r.map((function(e){return LK(e,t)})).filter((function(e){return e}));else{var i=LK(r,t);void 0!==i&&(n[a]=i)}}return n}var QK=function(){function e(){Object(x.a)(this,e),this.name="RuleForRangedLine"}return Object(_.a)(e,[{key:"hasMatchingType",value:function(e){if(KU(e)){var t=e.encoding;if("line"===e.mark){var n,a=sr(kP);try{for(a.s();!(n=a.n()).done;){var r=n.value,i=t[OP(r)];if(t[r]&&(xH(i)&&!sz(i.bin)||EH(i)))return!0}}catch(e){a.e(e)}finally{a.f()}}}return!1}},{key:"run",value:function(e,t,n){var a=e.encoding;return jI(CI.lineWithRange(!!a.x2,!!a.y2)),n(Object.assign(Object.assign({},e),{mark:"rule"}),t)}}]),e}();function HK(e){var t=e.parentEncoding,n=e.encoding;if(t&&n){var a=lU(t).reduce((function(e,t){return n[t]&&e.push(t),e}),[]);a.length>0&&jI(CI.encodingOverridden(a))}var r=Object.assign(Object.assign({},null!=t?t:{}),null!=n?n:{});return lU(r).length>0?r:void 0}function zK(e){var t=e.parentProjection,n=e.projection;return t&&n&&jI(CI.projectionOverridden({parentProjection:t,projection:n})),null!=n?n:t}function KK(e,t){void 0===t&&(t=lK(e.config));var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return VK.map(e,{config:t})}(e,t),a=function(e,t,n){var a=t.width,r=t.height,i=KU(e)||vK(e),o={};i?"container"==a&&"container"==r?(o.type="fit",o.contains="padding"):"container"==a?(o.type="fit-x",o.contains="padding"):"container"==r&&(o.type="fit-y",o.contains="padding"):("container"==a&&(jI(CI.containerSizeNonSingle("width")),a=void 0),"container"==r&&(jI(CI.containerSizeNonSingle("height")),r=void 0));var s=Object.assign(Object.assign(Object.assign({type:"pad"},o),n?WK(n.autosize):{}),WK(e.autosize));if("fit"!==s.type||i||(jI(CI.FIT_NON_SINGLE),s.type="pad"),"container"==a&&"fit"!=s.type&&"fit-x"!=s.type&&jI(CI.containerSizeNotCompatibleWithAutosize("width")),"container"==r&&"fit"!=s.type&&"fit-y"!=s.type&&jI(CI.containerSizeNotCompatibleWithAutosize("height")),!YN(s,{type:"pad"}))return s}(n,{width:e.width,height:e.height,autosize:e.autosize},t);return Object.assign(Object.assign({},n),a?{autosize:a}:{})}var VK=new(function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){var e;return Object(x.a)(this,n),(e=t.apply(this,arguments)).nonFacetUnitNormalizers=[Cz,jz,Uz,new jK,new QK,new DK],e}return Object(_.a)(n,[{key:"map",value:function(e,t){if(KU(e)){var a=lz(e.encoding,tP),r=lz(e.encoding,"column"),i=lz(e.encoding,"facet");if(a||r||i)return this.mapFacetedUnit(e,t)}return Object(yK.a)(Object(mK.a)(n.prototype),"map",this).call(this,e,t)}},{key:"mapUnit",value:function(e,t){var n=t.parentEncoding,a=t.parentProjection,r=Object.assign(Object.assign({},e),{encoding:MK(e.encoding,t.repeater)});if(n||a)return this.mapUnitWithParentEncodingOrProjection(r,t);var i,o=this.mapLayerOrUnit.bind(this),s=sr(this.nonFacetUnitNormalizers);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(u.hasMatchingType(r,t.config))return u.run(r,t,o)}}catch(e){s.e(e)}finally{s.f()}return r}},{key:"mapRepeat",value:function(e,t){return function(e){return!Object(he.A)(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}},{key:"mapLayerRepeat",value:function(e,t){var n=this,a=e.repeat,r=e.spec,i=T(e,["repeat","spec"]),o=a.row,s=a.column,u=a.layer,d=t.repeater,c=void 0===d?{}:d,l=t.repeaterPrefix,f=void 0===l?"":l;return o||s?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),s?{column:s}:{}),spec:{repeat:{layer:u},spec:r}}),t):Object.assign(Object.assign({},i),{layer:u.map((function(e){var a=Object.assign(Object.assign({},c),{layer:e}),i=(r.name||"")+f+"child__layer_".concat(hU(e)),o=n.mapLayerOrUnit(r,Object.assign(Object.assign({},t),{repeater:a,repeaterPrefix:i}));return o.name=i,o}))})}},{key:"mapNonLayerRepeat",value:function(e,t){var n,a=e,r=a.repeat,i=a.spec,o=a.data,s=T(e,["repeat","spec","data"]);!Object(he.A)(r)&&e.columns&&(e=ZN(e,["columns"]),jI(CI.columnsNotSupportByRowCol("repeat")));var u,d=[],c=t.repeater,l=void 0===c?{}:c,f=t.repeaterPrefix,g=void 0===f?"":f,h=!Object(he.A)(r)&&r.row||[l?l.row:null],p=!Object(he.A)(r)&&r.column||[l?l.column:null],A=sr(Object(he.A)(r)&&r||[l?l.repeat:null]);try{for(A.s();!(u=A.n()).done;){var v,m=u.value,y=sr(h);try{for(y.s();!(v=y.n()).done;){var R,b=v.value,w=sr(p);try{for(w.s();!(R=w.n()).done;){var x=R.value,_={repeat:m,row:b,column:x,layer:l.layer},E=(i.name||"")+g+"child__"+(Object(he.A)(r)?"".concat(hU(m)):(r.row?"row_".concat(hU(b)):"")+(r.column?"column_".concat(hU(x)):"")),k=this.map(i,Object.assign(Object.assign({},t),{repeater:_,repeaterPrefix:E}));k.name=E,d.push(ZN(k,["data"]))}}catch(e){w.e(e)}finally{w.f()}}}catch(e){y.e(e)}finally{y.f()}}}catch(e){A.e(e)}finally{A.f()}var C=Object(he.A)(r)?e.columns:r.column?r.column.length:1;return Object.assign(Object.assign({data:null!==(n=i.data)&&void 0!==n?n:o,align:"all"},s),{columns:C,concat:d})}},{key:"mapFacet",value:function(e,t){return gH(e.facet)&&e.columns&&(e=ZN(e,["columns"]),jI(CI.columnsNotSupportByRowCol("facet"))),Object(yK.a)(Object(mK.a)(n.prototype),"mapFacet",this).call(this,e,t)}},{key:"mapUnitWithParentEncodingOrProjection",value:function(e,t){var n=e.encoding,a=e.projection,r=t.parentEncoding,i=t.parentProjection,o=t.config,s=zK({parentProjection:i,projection:a}),u=HK({parentEncoding:r,encoding:MK(n,t.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),s?{projection:s}:{}),u?{encoding:u}:{}),{config:o})}},{key:"mapFacetedUnit",value:function(e,t){var n=e.encoding,a=n.row,r=n.column,i=n.facet,o=T(n,["row","column","facet"]),s=e.mark,u=e.width,d=e.projection,c=e.height,l=e.view,f=e.selection,g=(e.encoding,T(e,["mark","width","projection","height","view","selection","encoding"])),h=this.getFacetMappingAndLayout({row:a,column:r,facet:i},t),p=h.facetMapping,A=h.layout,v=MK(o,t.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),A),{facet:p,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u?{width:u}:{}),c?{height:c}:{}),l?{view:l}:{}),d?{projection:d}:{}),{mark:s,encoding:v}),f?{selection:f}:{})}),t)}},{key:"getFacetMappingAndLayout",value:function(e,t){var n,a=e.row,r=e.column,i=e.facet;if(a||r){i&&jI(CI.facetChannelDropped([].concat(Object(Bh.a)(a?[tP]:[]),Object(Bh.a)(r?["column"]:[]))));for(var o={},s={},u=0,d=[tP,"column"];u2&&void 0!==arguments[2]?arguments[2]:{},a=t.markDef,r=t.encoding,i=t.config,o=n.vgChannel,s=n.defaultRef,u=n.defaultValue;void 0===s&&void 0!==(u=null!=u?u:$Q({channel:e,vgChannel:o,markDef:a,config:i}))&&(s=$P(u));var d=r[e];return bV(t,d,null!=o?o:e,(function(n){return YQ({channel:e,channelDef:n,markDef:a,config:i,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:s})}))}function xV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0},n=e.markDef,a=e.encoding,r=e.config,i=n.type,o=EU(t.filled,n.filled),s={fill:tL("fill",n,r),stroke:tL("stroke",n,r),color:tL("color",n,r)},u=aU(["bar","point","circle","square","geoshape"],i)?"transparent":void 0,d=EU(n.fill,!0===o?n.color:void 0,s.fill,!0===o?s.color:void 0,u),c=EU(n.stroke,!1===o?n.color:void 0,s.stroke,!1===o?s.color:void 0),l=o?"fill":"stroke",f=Object.assign(Object.assign({},d?{fill:$P(d)}:{}),c?{stroke:$P(c)}:{});return n.color&&(o?n.fill:n.stroke)&&jI(CI.droppingColor("property",{fill:"fill"in n,stroke:"stroke"in n})),Object.assign(Object.assign(Object.assign(Object.assign({},f),wV("color",e,{vgChannel:l,defaultValue:o?d:c})),wV("fill",e,{defaultValue:a.fill?d:void 0})),wV("stroke",e,{defaultValue:a.stroke?c:void 0}))}function _V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n=e.encoding[t];return bV(e,n,t,(function(t){return EV(t,e.config)}))}function EV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(e){if(SH(e))return{value:e.value};if(BH(e)){var a=WH(e),r=a.format,i=a.formatType;return aH({fieldOrDatumDef:e,format:r,formatType:i,expr:n,config:t})}}}function kV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.encoding,a=e.markDef,r=e.config,i=n.tooltip;return Object(he.A)(i)?{tooltip:CV({tooltip:i},e.stack,r,t)}:bV(e,i,"tooltip",(function(i){var o=EV(i,e.config,t.reactiveGeom?"datum.datum":"datum");if(o)return o;if(null!==i){var s=EU(a.tooltip,tL("tooltip",a,r));return!0===s&&(s={content:"encoding"}),Object(he.H)(s)?{value:s}:Object(he.F)(s)?"encoding"===s.content?CV(n,e.stack,r,t):{signal:"datum"}:void 0}}))}function CV(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=a.reactiveGeom,i=[],o={},s={},u=r?"datum.datum":"datum",d=[];function c(a,r){var i=OP(r),o=BH(a)?a:Object.assign(Object.assign({},a),{type:e[i].type}),c=Object(he.i)(zH(o,n,{allowDisabling:!1})).join(", "),l=EV(o,n,u).signal;if("x"===r||"y"===r){var f="x"===r?"x2":"y2",g=qH(e[f]);if(sz(o.bin)&&g){var h=MH(o,{expr:u}),p=MH(g,{expr:u}),A=WH(o);l=sH(h,p,A.format,A.formatType,n),s[f]=!0}else if(t&&t.fieldChannel===r&&"normalize"===t.offset){var v=WH(o);l=aH({fieldOrDatumDef:o,format:v.format,formatType:v.formatType,expr:u,config:n,normalizeStack:!0}).signal}}d.push({channel:r,key:c,value:l})}Az(e,(function(e,t){xH(e)?c(e,t):bH(e)&&c(e.condition,t)}));for(var l=0,f=d;l0?{signal:"{".concat(i.join(", "),"}")}:void 0}function OV(e,t){var n=t[function(e){switch(e){case"x":return"xOffset";case"y":return"yOffset";case"x2":return"x2Offset";case"y2":return"y2Offset";case"theta":return"thetaOffset";case"radius":return"radiusOffset";case"theta2":return"theta2Offset";case"radius2":return"radius2Offset"}}(e)];if(n)return n}function BV(e,t,n){var a=n.defaultPos,r=n.vgChannel,i=t.encoding,o=t.markDef,s=t.config,u=t.stack,d=i[e],c=i[BP(e)],l=t.scaleName(e),f=t.getScaleComponent(e),g=OV(e,o),h=FV({model:t,defaultPos:a,channel:e,scaleName:l,scale:f}),p=d||!i.latitude&&!i.longitude?SV({channel:e,channelDef:d,channel2Def:c,markDef:o,config:s,scaleName:l,scale:f,stack:u,offset:g,defaultRef:h}):{field:t.getName(e)};return Object(To.a)({},null!=r?r:e,p)}function SV(e){var t=e.channel,n=e.channelDef,a=e.isMidPoint,r=e.scaleName,i=e.stack,o=e.offset,s=e.markDef,u=e.config;if(xH(n)&&i&&t===i.fieldChannel){if(jH(n)){var d=mH({channel:t,fieldDef:n,isMidPoint:a,markDef:s,stack:i,config:u});if(void 0!==d)return XQ({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",band:d,offset:o})}return GQ(n,r,{suffix:"end"},{offset:o})}return KQ(e)}function FV(e){var t=e.model,n=e.defaultPos,a=e.channel,r=e.scaleName,i=e.scale,o=t.markDef,s=t.config;return function(){var e=OP(a),u=EU(o[a],tL(a,o,s));if(void 0!==u)return JQ(a,u);if("zeroOrMin"===n||"zeroOrMax"===n){if(r){var d=i.get("type");if(aU([mQ.LOG,mQ.TIME,mQ.UTC],d));else if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}return"zeroOrMin"===n?"x"===e?{value:0}:{field:{group:"height"}}:"x"===e?{field:{group:"width"}}:{value:0}}var c=t["x"===e?"width":"height"];return Object.assign(Object.assign({},c),{mult:.5})}}var jV={left:"x",center:"xc",right:"x2"},DV={top:"y",middle:"yc",bottom:"y2"};function TV(e,t,n){var a="x"===e?"align":"baseline",r=EU(t[a],tL(a,t,n));return"x"===e?jV[null!=r?r:"center"]:DV[null!=r?r:"middle"]}function MV(e,t,n){var a=n.defaultPos,r=n.defaultPos2;return n.range?NV(e,t,{defaultPos:a,defaultPos2:r}):BV(e,t,{defaultPos:a})}function NV(e,t,n){var a=n.defaultPos,r=n.defaultPos2,i=t.markDef,o=t.config,s="x"===e?"width":"height",u=function(e,t,n){var a,r=e.encoding,i=e.mark,o=e.markDef,s=e.stack,u=e.config,d="x2"===n?"x":"y",c="x2"===n?"width":"height",l=r[d],f=e.scaleName(d),g=e.getScaleComponent(d),h=OV(n,e.markDef);if(!l&&(r.latitude||r.longitude))return Object(To.a)({},n,{field:e.getName(n)});var p=UV({channel:n,channelDef:l,channel2Def:r[n],markDef:o,config:u,scaleName:f,scale:g,stack:s,offset:h,defaultRef:void 0});if(void 0!==p)return Object(To.a)({},n,p);var A=FV({model:e,defaultPos:t,channel:n,scaleName:f,scale:g})();return EU(PV(n,o),PV(n,(a={},Object(To.a)(a,n,nL(n,o,u.style)),Object(To.a)(a,c,nL(c,o,u.style)),a)),PV(n,u[i]),PV(n,u.mark),Object(To.a)({},n,A))}(t,r,"x"===e?"x2":"y2"),d=u[s]?TV(e,i,o):e;return Object.assign(Object.assign({},BV(e,t,{defaultPos:a,vgChannel:d})),u)}function UV(e){var t=e.channel,n=e.channelDef,a=e.channel2Def,r=e.markDef,i=e.config,o=e.scaleName,s=e.scale,u=e.stack,d=e.offset,c=e.defaultRef;return OH(n)&&u&&t.charAt(0)===u.fieldChannel.charAt(0)?GQ(n,o,{suffix:"start"},{offset:d}):KQ({channel:t,channelDef:a,scaleName:o,scale:s,stack:u,markDef:r,config:i,offset:d,defaultRef:c})}function PV(e,t){var n="x2"===e?"width":"height";return t[e]?Object(To.a)({},e,JQ(e,t[e])):t[n]?Object(To.a)({},n,{value:t[n]}):void 0}function LV(e,t,n){var a,r,i,o,s=e.config,u=e.encoding,d=e.markDef,c=e.stack,l="x"===t?"x2":"y2",f="x"===t?"width":"height",g=u[t],h=u[l],p=e.getScaleComponent(t),A=p?p.get("type"):void 0,v=e.scaleName(t),m=d.orient,y=null!==(o=null!==(i=null!==(r=null!==(a=u[f])&&void 0!==a?a:u.size)&&void 0!==r?r:d[f])&&void 0!==i?i:d.size)&&void 0!==o?o:tL("size",d,s,{vgChannel:f}),R="x"===t?"vertical"===m:"horizontal"===m;return xH(g)&&(oz(g.bin)||sz(g.bin)||g.timeUnit&&!h)&&!y&&!FQ(A)?zV({fieldDef:g,fieldDef2:h,channel:t,markDef:d,scaleName:v,band:mH({channel:t,fieldDef:g,stack:c,markDef:d,config:s}),spacing:EU(d.binSpacing,s[n].binSpacing),reverse:p.get("reverse"),config:s}):(OH(g)&&FQ(A)||R)&&!h?OH(g)&&A===mQ.BAND?function(e,t,n,a){var r,i=n.scaleName(t),o="x"===t?"width":"height",s=n.markDef,u=n.encoding,d=TV(t,s,n.config),c=OV(t,s),l=Object(To.a)({},d,GQ(e,i,{},{band:.5,offset:c}));if(u.size||null!==s.size&&void 0!==s.size)if(s.orient){if(OH(u.size)||SH(u.size))return Object.assign(Object.assign({},l),wV("size",n,{vgChannel:o}));if(void 0!==s.size)return Object.assign(Object.assign({},l),Object(To.a)({},o,{value:s.size}))}else jI(CI.cannotApplySizeToNonOrientedMark(s.type));if(void 0!==(null==a?void 0:a.value))return Object.assign(Object.assign({},l),Object(To.a)({},o,a));var f=e.band,g=void 0===f?1:f;return r={},Object(To.a)(r,t,GQ(e,i,{binSuffix:"range"},{band:(1-g)/2,offset:c})),Object(To.a)(r,o,null!=a?a:QV(i,g)),r}(g,t,e,IV(n,d,f,v,p,s,jH(g)?g.band:void 0)):function(e,t,n){var a="x"===e?"xc":"yc",r="x"===e?"width":"height";return Object.assign(Object.assign({},BV(e,t,{defaultPos:"mid",vgChannel:a})),wV("size",t,{defaultRef:n,vgChannel:r}))}(t,e,IV(n,d,f,v,p,s)):NV(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function IV(e,t,n,a,r,i,o){var s=EU(t[n],t.size,tL("size",t,i,{vgChannel:n}));if(void 0!==s)return $P(s);if(r){var u=r.get("type");if("point"===u||"band"===u){if(void 0!==i[e].discreteBandSize)return{value:i[e].discreteBandSize};if(u===mQ.POINT){var d=r.get("range");return GP(d)&&Object(he.E)(d.step)?{value:d.step-2}:{value:aK-2}}return QV(a,o)}return{value:i[e].continuousBandSize}}var c=tK(i.view,n);return{value:EU(i[e].discreteBandSize,c-2)}}function QV(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{scale:e,band:t}}function HV(e,t,n){return function(e){return e in hP}(e)?0:qP(n)?"x"===e||"y2"===e?{signal:"".concat(n.signal," ? ").concat(t," : 0")}:{signal:"".concat(n.signal," ? 0 : ").concat(t)}:{x:n?t:0,x2:n?0:t,y:n?0:t,y2:n?t:0}[e]}function zV(e){var t,n,a=e.fieldDef,r=e.fieldDef2,i=e.channel,o=e.vgChannel,s=e.vgChannel2,u=e.band,d=e.scaleName,c=e.markDef,l=e.spacing,f=void 0===l?0:l,g=e.reverse,h=e.config,p=i===nP?"x2":"y2";return o=o||i,s=s||p,oz(a.bin)||a.timeUnit?(t={},Object(To.a)(t,s,KV({channel:i,fieldDef:a,scaleName:d,markDef:c,band:(1-u)/2,offset:HV(p,f,g),config:h})),Object(To.a)(t,o,KV({channel:i,fieldDef:a,scaleName:d,markDef:c,band:1-(1-u)/2,offset:HV(i,f,g),config:h})),t):sz(a.bin)&&xH(r)?(n={},Object(To.a)(n,s,GQ(a,d,{},{offset:HV(p,f,g)})),Object(To.a)(n,o,GQ(r,d,{},{offset:HV(i,f,g)})),n):void jI(CI.channelRequiredForBinned(p))}function KV(e){var t=e.channel,n=e.fieldDef,a=e.scaleName,r=e.markDef,i=e.band,o=e.offset,s=e.config;return VQ({fieldDef:n,channel:t,markDef:r,ref:XQ({scaleName:a,fieldOrDatumDef:n,band:i,offset:o}),config:s})}function VV(e,t){var n="include"===t.color?xV(e):{},a=n.fill,r=void 0===a?void 0:a,i=n.stroke,o=void 0===i?void 0:i;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},function(e,t){return YP.reduce((function(n,a){return void 0!==e[a]&&"ignore"!==t[a]&&(n[a]={value:e[a]}),n}),{})}(e.markDef,t)),WV(e,"fill",r)),WV(e,"stroke",o)),wV("opacity",e)),wV("fillOpacity",e)),wV("strokeOpacity",e)),wV("strokeWidth",e)),wV("strokeDash",e)),kV(e)),_V(e,"href"))}function WV(e,t,n){var a=e.config,r=e.mark;if("hide"===eL("invalid",e.markDef,a)&&n&&!UU(r)){var i=function(e,t){var n=t.invalid,a=void 0!==n&&n,r=t.channels.reduce((function(t,n){var a=e.getScaleComponent(n);if(a){var r=a.get("type"),i=e.vgField(n,{expr:"datum"});i&&jQ(r)&&(t[i]=!0)}return t}),{}),i=lU(r);if(i.length>0){var o=a?"||":"&&";return i.map((function(e){return qQ(e,a)})).join(" ".concat(o," "))}}(e,{invalid:!0,channels:IP});if(i)return Object(To.a)({},t,[{test:i,value:null}].concat(Object(Bh.a)(Object(he.i)(n))))}return n?Object(To.a)({},t,n):{}}function qV(e){var t=e.config;if(eL("invalid",e.markDef,t)){var n=function(e,t){var n=t.invalid,a=void 0!==n&&n,r=t.channels.reduce((function(t,n){var a=e.getScaleComponent(n);if(a){var r=a.get("type"),i=e.vgField(n,{expr:"datum"});i&&jQ(r)&&(t[i]=!0)}return t}),{}),i=lU(r);if(i.length>0){var o=a?"||":"&&";return i.map((function(e){return qQ(e,a)})).join(" ".concat(o," "))}}(e,{channels:["x","y"]});if(n)return{defined:{signal:n}}}return{}}function GV(e,t){if(void 0!==t)return Object(To.a)({},e,{value:t})}function XV(e,t){var n,a=t.channel,r=t.vgChannel,i=t.vgChannel2,o=t.defaultRef,s=e.encoding,u=e.markDef,d=e.stack,c=e.config,l="radius"===a?"radius2":"theta2",f=s[a],g=s[l],h=e.getScaleComponent(a),p=h?h.get("type"):void 0,A=e.scaleName(a);if(xH(f)&&(oz(f.bin)||sz(f.bin)||f.timeUnit&&!g)&&!FQ(p))return zV({fieldDef:f,channel:a,vgChannel:r,vgChannel2:i,markDef:u,scaleName:A,band:mH({channel:a,fieldDef:f,stack:d,markDef:u,config:c}),spacing:0,reverse:h.get("reverse"),config:c});var v={channel:a,channelDef:f,channel2Def:g,markDef:u,config:c,scaleName:A,scale:h,stack:d,offset:0,defaultRef:void 0},m=$Q({channel:a,vgChannel:r,markDef:u,config:c}),y=$Q({channel:l,vgChannel:i,markDef:u,config:c});return n={},Object(To.a)(n,r,SV(Object.assign(Object.assign({},v),{defaultRef:m?{value:m}:o}))),Object(To.a)(n,i,UV(Object.assign(Object.assign({},v),{channel:l,defaultRef:{value:null!=y?y:0}}))),n}function YV(e,t){var n=t.encoding,a=t.markDef,r=t.stack,i=t.config,o=$Q({channel:e,markDef:a,config:i}),s=SV({channel:e,channelDef:n[e],markDef:a,config:i,isMidPoint:!0,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:r,offset:OV(e,a),defaultRef:o?{value:o}:void 0});return s?Object(To.a)({},e,s):{}}var JV={has:function(e){return"interval"!==e.type&&e.nearest},parse:function(e,t){if(t.events){var n,a=sr(t.events);try{for(a.s();!(n=a.n()).done;)n.value.markname=e.getName("voronoi")}catch(e){a.e(e)}finally{a.f()}}},marks:function(e,t,n){var a=t.project.hasChannel,r=a.x,i=a.y,o=e.mark;if(UU(o))return jI(CI.nearestNotSupportForContinuous(o)),n;var s={name:e.getName("voronoi"),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},kV(e,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]},u=0,d=!1;return n.forEach((function(t,n){var a,r=null!==(a=t.name)&&void 0!==a?a:"";r===e.component.mark[0].name?u=n:r.indexOf("voronoi")>=0&&(d=!0)})),d||n.splice(u+1,0,s),n}},$V=function(){function e(t,n){Object(x.a)(this,e),this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}return Object(_.a)(e,[{key:"clone",value:function(){throw new Error("Cannot clone node")}},{key:"numChildren",value:function(){return this._children.length}},{key:"addChild",value:function(e,t){this._children.indexOf(e)>-1?console.warn("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}},{key:"removeChild",value:function(e){var t=this._children.indexOf(e);return this._children.splice(t,1),t}},{key:"remove",value:function(){var e,t=this._parent.removeChild(this),n=sr(this._children);try{for(n.s();!(e=n.n()).done;){var a=e.value;a._parent=this._parent,this._parent.addChild(a,t++)}}catch(e){n.e(e)}finally{n.f()}}},{key:"insertAsParentOf",value:function(e){var t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}},{key:"swapWithParent",value:function(){var e,t=this._parent,n=t.parent,a=sr(this._children);try{for(a.s();!(e=a.n()).done;)e.value.parent=t}catch(e){a.e(e)}finally{a.f()}this._children=[],t.removeChild(this),t.parent.removeChild(t),this.parent=n,t.parent=this}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e,e&&e.addChild(this)}},{key:"children",get:function(){return this._children}}]),e}(),ZV=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r,i){var o;return Object(x.a)(this,n),(o=t.call(this,e,a)).type=r,o.refCounts=i,o._source=o._name=a,o.refCounts&&!(o._name in o.refCounts)&&(o.refCounts[o._name]=0),o}return Object(_.a)(n,[{key:"clone",value:function(){var e=new this.constructor;return e.debugName="clone_"+this.debugName,e._source=this._source,e._name="clone_"+this._name,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return void 0===this._hash&&(this._hash="Output ".concat(function(e){var t=++kU;return e?String(e)+t:t}())),this._hash}},{key:"getSource",value:function(){return this.refCounts[this._name]++,this._source}},{key:"isRequired",value:function(){return!!this.refCounts[this._name]}},{key:"setSource",value:function(e){this._source=e}}]),n}($V),eW=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).formula=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.formula))}},{key:"merge",value:function(e){for(var t in this.formula=Object.assign({},this.formula),e.formula)this.formula[t]&&!e.formula[t].band||(this.formula[t]=e.formula[t]);var n,a=sr(e.children);try{for(a.s();!(n=a.n()).done;){var r=n.value;e.removeChild(r),r.parent=this}}catch(e){a.e(e)}finally{a.f()}e.remove()}},{key:"producedFields",value:function(){return new Set(fU(this.formula).map((function(e){return e.as})))}},{key:"dependentFields",value:function(){return new Set(fU(this.formula).map((function(e){return e.field})))}},{key:"hash",value:function(){return"TimeUnit ".concat(tU(this.formula))}},{key:"assemble",value:function(){var e,t=[],n=sr(fU(this.formula));try{for(n.s();!(e=n.n()).done;){var a=e.value,r=a.field,i=a.as,o=tQ(a.timeUnit),s=o.unit,u=o.utc,d=T(o,["unit","utc"]);t.push(Object.assign(Object.assign(Object.assign(Object.assign({field:r,type:"timeunit"},s?{units:JI(s)}:{}),u?{timezone:"utc"}:{}),d),{as:[i,"".concat(i,"_end")]}))}}catch(e){n.e(e)}finally{n.f()}return t}}],[{key:"makeFromEncoding",value:function(e,t){var a=t.reduceFieldDef((function(e,n,a){var r=n.field,i=n.timeUnit,o=gX(t)?t.encoding[BP(a)]:void 0,s=gX(t)&&yH(a,n,o,t.stack,t.markDef,t.config);if(i){var u=MH(n,{forAs:!0});e[tU({as:u,field:r,timeUnit:i})]=Object.assign({as:u,field:r,timeUnit:i},s?{band:!0}:{})}return e}),{});return 0===lU(a).length?null:new n(e,a)}},{key:"makeFromTransform",value:function(e,t){var a=Object.assign({},t),r=a.timeUnit,i=T(a,["timeUnit"]),o=tQ(r),s=Object.assign(Object.assign({},i),{timeUnit:o});return new n(e,Object(To.a)({},tU(s),s))}}]),n}($V),tW=function e(){Object(x.a)(this,e);for(var t=arguments.length,n=new Array(t),a=0;a=0)r.update="{".concat(a.map((function(e){return"".concat(Object(he.Z)(e.field),": ").concat(e.signals.data)})).join(", "),"}");else{var o,s=sr(a);try{for(s.s();!(o=s.n()).done;){var u=o.value,d="".concat(Object(he.Z)(u.field),": ").concat(u.signals.data);i.indexOf(d)<0&&(i="".concat(i.substring(0,i.length-1),", ").concat(d,"}"))}}catch(e){s.e(e)}finally{s.f()}r.update=i}return n.concat(a.map((function(e){return{name:e.signals.data}})))},signals:function(e,t,n){if(e.parent&&!sW(e)){var a,r=sr(t.scales);try{var i=function(){var e=a.value,t=n.filter((function(t){return t.name===e.signals.data}))[0];t.push="outer",delete t.value,delete t.update};for(r.s();!(a=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}}return n}};function oW(e,t){var n=Object(he.Z)(e.scaleName(t));return"domain(".concat(n,")")}function sW(e){var t;return e.parent&&AX(e.parent)&&(null!==(t=!e.parent.parent)&&void 0!==t?t:sW(e.parent.parent))}var uW={has:function(e){var t="global"===e.resolve&&e.bind&&Wz(e.bind),n=1===e.project.items.length&&"_vgsid_"!==e.project.items[0].field;return t&&!n&&jI(CI.LEGEND_BINDINGS_PROJECT_LENGTH),t&&n},parse:function(e,t,n,a){var r;if(a.on||delete t.events,a.clear||delete t.clear,a.on||a.clear){var i,o='event.item && indexof(event.item.mark.role, "legend") < 0',s=sr(t.events);try{for(s.s();!(i=s.n()).done;){var u=i.value;u.filter=Object(he.i)(null!==(r=u.filter)&&void 0!==r?r:[]),u.filter.indexOf(o)<0&&u.filter.push(o)}}catch(e){s.e(e)}finally{s.f()}}var d=qz(t.bind)?t.bind.legend:"click",c=Object(he.H)(d)?gT(d,"view"):Object(he.i)(d);t.bind={legend:{merge:c}}},topLevelSignals:function(e,t,n){var a,r=t.name,i=qz(t.bind)&&t.bind.legend,o=function(e){return function(t){var n=JN(t);return n.markname=e,n}},s=sr(t.project.items);try{var u=function(){var e=a.value;if(!e.hasLegend)return"continue";var s="".concat(hU(e.field),"_legend"),u="".concat(r,"_").concat(s);if(0===n.filter((function(e){return e.name===u})).length){var d=i.merge.map(o("".concat(s,"_symbols"))).concat(i.merge.map(o("".concat(s,"_labels")))).concat(i.merge.map(o("".concat(s,"_entries"))));n.unshift(Object.assign(Object.assign({name:u},t.init?{}:{value:null}),{on:[{events:d,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:"!event.item || !datum ? null : ".concat(u),force:!0}]}))}};for(s.s();!(a=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return n},signals:function(e,t,n){var a=t.name,r=t.project,i=n.find((function(e){return e.name===a+kW})),o=a+"_tuple_fields",s=r.items.filter((function(e){return e.hasLegend})).map((function(e){return hU("".concat(a,"_").concat(hU(e.field),"_legend"))})),u=s.map((function(e){return"".concat(e," !== null")})).join(" && "),d="".concat(u," ? {fields: ").concat(o,", values: [").concat(s.join(", "),"]} : null");t.events&&s.length>0?i.on.push({events:s.map((function(e){return{signal:e}})),update:d}):s.length>0&&(i.update=d,delete i.value,delete i.on);var c=n.find((function(e){return e.name===a+"_toggle"})),l=qz(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:l})):c.on[0].events=l),n}},dW="_translate_delta",cW={has:function(e){return"interval"===e.type&&e.translate},signals:function(e,t,n){var a=t.name,r=iW.has(t),i=a+"_translate_anchor",o=t.project.hasChannel,s=o.x,u=o.y,d=gT(t.translate,"scope");return r||(d=d.map((function(e){return e.between[0].markname=a+yW,e}))),n.push({name:i,value:{},on:[{events:d.map((function(e){return e.between[0]})),update:"{x: x(unit), y: y(unit)"+(void 0!==s?", extent_x: "+(r?oW(e,nP):"slice(".concat(s.signals.visual,")")):"")+(void 0!==u?", extent_y: "+(r?oW(e,aP):"slice(".concat(u.signals.visual,")")):"")+"}"}]},{name:a+dW,value:{},on:[{events:d,update:"{x: ".concat(i,".x - x(unit), y: ").concat(i,".y - y(unit)}")}]}),void 0!==s&&lW(e,t,s,"width",n),void 0!==u&&lW(e,t,u,"height",n),n}};function lW(e,t,n,a,r){var i,o=t.name,s=o+"_translate_anchor",u=o+dW,d=n.channel,c=iW.has(t),l=r.filter((function(e){return e.name===n.signals[c?"data":"visual"]}))[0],f=e.getSizeSignalRef(a).signal,g=e.getScaleComponent(d),h=g.get("type"),p=c&&d===nP?"-":"",A="".concat(s,".extent_").concat(d),v="".concat(p).concat(u,".").concat(d," / ")+(c?"".concat(f):"span(".concat(A,")")),m="".concat(c?"log"===h?"panLog":"pow"===h?"panPow":"panLinear":"panLinear","(").concat(A,", ").concat(v)+(c&&"pow"===h?", ".concat(null!==(i=g.get("exponent"))&&void 0!==i?i:1):"")+")";l.on.push({events:{signal:u},update:c?m:"clampRange(".concat(m,", 0, ").concat(f,")")})}var fW={has:function(e){return"interval"===e.type&&e.zoom},signals:function(e,t,n){var a=t.name,r=iW.has(t),i=a+"_zoom_delta",o=t.project.hasChannel,s=o.x,u=o.y,d=Object(he.Z)(e.scaleName(nP)),c=Object(he.Z)(e.scaleName(aP)),l=gT(t.zoom,"scope");return r||(l=l.map((function(e){return e.markname=a+yW,e}))),n.push({name:a+"_zoom_anchor",on:[{events:l,update:r?"{"+[d?"x: invert(".concat(d,", x(unit))"):"",c?"y: invert(".concat(c,", y(unit))"):""].filter((function(e){return!!e})).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:i,on:[{events:l,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&gW(e,t,s,"width",n),void 0!==u&&gW(e,t,u,"height",n),n}};function gW(e,t,n,a,r){var i,o=t.name,s=n.channel,u=iW.has(t),d=r.filter((function(e){return e.name===n.signals[u?"data":"visual"]}))[0],c=e.getSizeSignalRef(a).signal,l=e.getScaleComponent(s),f=l.get("type"),g=u?oW(e,s):d.name,h=o+"_zoom_delta",p="".concat(o).concat("_zoom_anchor",".").concat(s),A="".concat(u?"log"===f?"zoomLog":"pow"===f?"zoomPow":"zoomLinear":"zoomLinear","(").concat(g,", ").concat(p,", ").concat(h)+(u&&"pow"===f?", ".concat(null!==(i=l.get("exponent"))&&void 0!==i?i:1):"")+")";d.on.push({events:{signal:h},update:u?A:"clampRange(".concat(A,", 0, ").concat(c,")")})}var hW=[{has:function(){return!0},parse:function(e,t,n){var a,r,i,o=t.name,s=null!==(a=t.project)&&void 0!==a?a:t.project=new tW,u={},d={},c=new Set,l=function(e,t){for(var n="visual"===t?e.channel:e.field,a=hU("".concat(o,"_").concat(n)),r=1;c.has(a);r++)a=hU("".concat(o,"_").concat(n,"_").concat(r));return c.add(a),Object(To.a)({},t,a)};if(!n.fields&&!n.encodings){var f=e.config.selection[n.type];if(n.init){var g,h=sr(Object(he.i)(n.init));try{for(h.s();!(g=h.n()).done;){var p,A=g.value,v=sr(lU(A));try{for(v.s();!(p=v.n()).done;){var m=p.value;_P[m]?(n.encodings||(n.encodings=[])).push(m):"interval"===n.type?(jI('Interval selections should be initialized using "x" and/or "y" keys.'),n.encodings=f.encodings):(n.fields||(n.fields=[])).push(m)}}catch(e){v.e(e)}finally{v.f()}}}catch(e){h.e(e)}finally{h.f()}}else n.encodings=f.encodings,n.fields=f.fields}var y,R=sr(null!==(r=n.fields)&&void 0!==r?r:[]);try{for(R.s();!(y=R.n()).done;){var b=y.value,w={type:"E",field:b};w.signals=Object.assign({},l(w,"data")),s.items.push(w),s.hasField[b]=w}}catch(e){R.e(e)}finally{R.f()}var x,_=sr(null!==(i=n.encodings)&&void 0!==i?i:[]);try{for(_.s();!(x=_.n()).done;){var E=x.value,k=e.fieldDef(E);if(k){var C=k.field;if(k.aggregate){jI(CI.cannotProjectAggregate(E,k.aggregate));continue}if(!C){jI(CI.cannotProjectOnChannelWithoutField(E));continue}if(k.timeUnit){C=e.vgField(E);var O={timeUnit:k.timeUnit,as:C,field:k.field};d[tU(O)]=O}if(!u[C]){var B="E";"interval"===t.type?jQ(e.getScaleComponent(E).get("type"))&&(B="R"):k.bin&&(B="R-RE");var S={field:C,channel:E,type:B};S.signals=Object.assign(Object.assign({},l(S,"data")),l(S,"visual")),s.items.push(u[C]=S),s.hasField[C]=s.hasChannel[E]=u[C]}}else jI(CI.cannotProjectOnChannelWithoutField(E))}}catch(e){_.e(e)}finally{_.f()}if(n.init){var F=function(e){return s.items.map((function(t){return void 0!==e[t.channel]?e[t.channel]:e[t.field]}))};if("interval"===n.type)t.init=F(n.init);else{var j=Object(he.i)(n.init);t.init=j.map(F)}}lU(d).length>0&&(s.timeUnit=new eW(null,d))},signals:function(e,t,n){var a=t.name+"_tuple_fields";return n.filter((function(e){return e.name===a})).length>0?n:n.concat({name:a,value:t.project.items.map((function(e){e.signals,e.hasLegend;var t=T(e,["signals","hasLegend"]),n=JN(t);return n.field=bU(n.field),n}))})}},aW,iW,uW,cW,fW,nW,JV,rW];function pW(e,t){var n,a=sr(hW);try{for(a.s();!(n=a.n()).done;){var r=n.value;r.has(e)&&t(r)}}catch(e){a.e(e)}finally{a.f()}}function AW(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:he.x;if(Object(he.A)(e)){var a=e.map((function(e){return AW(e,t,n)}));return t?"[".concat(a.join(", "),"]"):a}return DI(e)?n(t?II(e):HI(e)):t?n(JSON.stringify(e)):e}function vW(e,t){return BW(e,(function(n,a){t=a.marks?a.marks(e,n,t):t,pW(n,(function(a){a.marks&&(t=a.marks(e,n,t))}))})),t}function mW(e){return e.map((function(e){return e.on&&!e.on.length&&delete e.on,e}))}var yW="_brush",RW={signals:function(e,t){var n=t.name,a=n+"_tuple_fields",r=iW.has(t),i=[],o=[],s=[];if(t.translate&&!r){var u="!event.item || event.item.mark.name !== ".concat(Object(he.Z)(n+yW));bW(t,(function(e,t){var n,a=Object(he.i)(null!==(n=t.between[0].filter)&&void 0!==n?n:t.between[0].filter=[]);return a.indexOf(u)<0&&a.push(u),e}))}t.project.items.forEach((function(n,a){var r=n.channel;if(r===nP||r===aP){var u=t.init?t.init[a]:null,d=function(e,t,n,a){var r=n.channel,i=n.signals.visual,o=n.signals.data,s=iW.has(t),u=Object(he.Z)(e.scaleName(r)),d=e.getScaleComponent(r),c=d?d.get("type"):void 0,l=function(e){return"scale(".concat(u,", ").concat(e,")")},f=e.getSizeSignalRef(r===nP?"width":"height").signal,g="".concat(r,"(unit)"),h=bW(t,(function(e,t){return[].concat(Object(Bh.a)(e),[{events:t.between[0],update:"[".concat(g,", ").concat(g,"]")},{events:t,update:"[".concat(i,"[0], clamp(").concat(g,", 0, ").concat(f,")]")}])}));return h.push({events:{signal:t.name+"_scale_trigger"},update:jQ(c)?"[".concat(l("".concat(o,"[0]")),", ").concat(l("".concat(o,"[1]")),"]"):"[0, 0]"}),s?[{name:o,on:[]}]:[Object.assign(Object.assign({name:i},a?{init:AW(a,!0,l)}:{value:[]}),{on:h}),Object.assign(Object.assign({name:o},a?{init:AW(a)}:{}),{on:[{events:{signal:i},update:"".concat(i,"[0] === ").concat(i,"[1] ? null : invert(").concat(u,", ").concat(i,")")}]})]}(e,t,n,u),c=n.signals.data,l=n.signals.visual,f=Object(he.Z)(e.scaleName(r)),g=jQ(e.getScaleComponent(r).get("type"))?"+":"";i.push.apply(i,Object(Bh.a)(d)),o.push(c),s.push({scaleName:e.scaleName(r),expr:"(!isArray(".concat(c,") || ")+"(".concat(g,"invert(").concat(f,", ").concat(l,")[0] === ").concat(g).concat(c,"[0] && ")+"".concat(g,"invert(").concat(f,", ").concat(l,")[1] === ").concat(g).concat(c,"[1]))")})}else jI("Interval selections only support x and y encoding channels.")})),r||i.push({name:n+"_scale_trigger",value:{},on:[{events:s.map((function(e){return{scale:e.scaleName}})),update:s.map((function(e){return e.expr})).join(" && ")+" ? ".concat(n+"_scale_trigger"," : {}")}]});var d=t.init,c="unit: ".concat(FW(e),", fields: ").concat(a,", values");return i.concat(Object.assign(Object.assign({name:n+kW},d?{init:"{".concat(c,": ").concat(AW(d),"}")}:{}),{on:[{events:[{signal:o.join(" || ")}],update:o.join(" && ")+" ? {".concat(c,": [").concat(o,"]} : null")}]}))},modifyExpr:function(e,t){return t.name+kW+", "+("global"===t.resolve?"true":"{unit: ".concat(FW(e),"}"))},marks:function(e,t,n){var a=t.name,r=t.project.hasChannel,i=r.x,o=r.y,s=i&&i.signals.visual,u=o&&o.signals.visual,d="data(".concat(Object(he.Z)(t.name+EW),")");if(iW.has(t))return n;var c={x:void 0!==i?{signal:"".concat(s,"[0]")}:{value:0},y:void 0!==o?{signal:"".concat(u,"[0]")}:{value:0},x2:void 0!==i?{signal:"".concat(s,"[1]")}:{field:{group:"width"}},y2:void 0!==o?{signal:"".concat(u,"[1]")}:{field:{group:"height"}}};if("global"===t.resolve){var l,f=sr(lU(c));try{for(f.s();!(l=f.n()).done;){var g=l.value;c[g]=[Object.assign({test:"".concat(d,".length && ").concat(d,"[0].unit === ").concat(FW(e))},c[g]),{value:0}]}}catch(e){f.e(e)}finally{f.f()}}var h=t.mark,p=h.fill,A=h.fillOpacity,v=h.cursor,m=T(h,["fill","fillOpacity","cursor"]),y=lU(m).reduce((function(e,t){return e[t]=[{test:[void 0!==i&&"".concat(s,"[0] !== ").concat(s,"[1]"),void 0!==o&&"".concat(u,"[0] !== ").concat(u,"[1]")].filter((function(e){return e})).join(" && "),value:m[t]},{value:null}],e}),{});return[{name:a+yW+"_bg",type:"rect",clip:!0,encode:{enter:{fill:{value:p},fillOpacity:{value:A}},update:c}}].concat(Object(Bh.a)(n),[{name:a+yW,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},v?{cursor:{value:v}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},c),y)}}])}};function bW(e,t){return e.events.reduce((function(e,n){return n.between?t(e,n):(jI("".concat(n," is not an ordered event stream for interval selections.")),e)}),[])}function wW(e,t){var n=t.name,a=n+"_tuple_fields",r=t.project,i="(item().isVoronoi ? datum.datum : datum)",o=r.items.map((function(t){var n=e.fieldDef(t.channel);return n&&n.bin?"[".concat(i,"[").concat(Object(he.Z)(e.vgField(t.channel,{})),"], ")+"".concat(i,"[").concat(Object(he.Z)(e.vgField(t.channel,{binSuffix:"end"})),"]]"):"".concat(i,"[").concat(Object(he.Z)(t.field),"]")})).join(", "),s="unit: ".concat(FW(e),", fields: ").concat(a,", values"),u=t.events;return[{name:n+kW,on:u?[{events:u,update:"datum && item().mark.marktype !== 'group' ? {".concat(s,": [").concat(o,"]} : null"),force:!0}]:[]}]}var xW={signals:wW,modifyExpr:function(e,t){return t.name+kW+", "+("global"===t.resolve?"null":"{unit: ".concat(FW(e),"}"))}},_W={signals:wW,modifyExpr:function(e,t){return t.name+kW+", "+("global"===t.resolve?"true":"{unit: ".concat(FW(e),"}"))}},EW="_store",kW="_tuple",CW="vlSelectionResolve",OW={single:_W,multi:xW,interval:RW};function BW(e,t){var n=e.component.selection;if(n){var a,r=sr(fU(n));try{for(r.s();!(a=r.n()).done;){var i=a.value;if(!0===t(i,OW[i.type]))break}}catch(e){r.e(e)}finally{r.f()}}}function SW(e){for(var t=e.parent;t&&!hX(t);)t=t.parent;return t}function FW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},n=t.escape,a=n?Object(he.Z)(e.name):e.name,r=SW(e);if(r){var i,o=r.facet,s=sr(RP);try{for(s.s();!(i=s.n()).done;){var u=i.value;o[u]&&(a+=" + '__facet_".concat(u,"_' + (facet[").concat(Object(he.Z)(r.vgField(u)),"])"))}}catch(e){s.e(e)}finally{s.f()}}return a}function jW(e){var t=!1;return BW(e,(function(e){t=t||e.project.items.some((function(e){return"_vgsid_"===e.field}))})),t}function DW(e){var t=OC(e),n=new Set;return t.visit((function(e){"MemberExpression"===e.type&&function e(t){return"MemberExpression"===t.object.type?e(t.object):"datum"===t.object.name}(e)&&n.add(function e(t){var n=[];return"Identifier"===t.type?[t.name]:"Literal"===t.type?[t.value]:("MemberExpression"===t.type&&(n.push.apply(n,Object(Bh.a)(e(t.object))),n.push.apply(n,Object(Bh.a)(e(t.property)))),n)}(e).slice(1).join("."))})),n}var TW=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r){var i;return Object(x.a)(this,n),(i=t.call(this,e)).model=a,i.filter=r,i.expr=UW(i.model,i.filter,Object(E.a)(i)),i._dependentFields=DW(i.expr),i}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,this.model,JN(this.filter))}},{key:"dependentFields",value:function(){return this._dependentFields}},{key:"producedFields",value:function(){return new Set}},{key:"assemble",value:function(){return{type:"filter",expr:this.expr}}},{key:"hash",value:function(){return"Filter ".concat(this.expr)}}]),n}($V);function MW(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum",r=[];function i(t){var i=hU(t),o=e.getSelectionComponent(i,t),s=Object(he.Z)(i+EW);if(o.project.timeUnit){var u=null!=n?n:e.component.data.raw,d=o.project.timeUnit.clone();u.parent?d.insertAsParentOf(u):u.parent=d}return"none"!==o.empty&&r.push(s),"vlSelectionTest(".concat(s,", ").concat(a)+("global"===o.resolve?")":", ".concat(Object(he.Z)(o.resolve),")"))}var o=pU(t,i);return(r.length?"!("+r.map((function(e){return"length(data(".concat(e,"))")})).join(" || ")+") || ":"")+"(".concat(o,")")}function NW(e,t){var n=t.encoding,a=t.field;if(n||a){if(n&&!a){var r=e.project.items.filter((function(e){return e.channel===n}));!r.length||r.length>1?(a=e.project.items[0].field,jI((r.length?"Multiple ":"No ")+"matching ".concat(Object(he.Z)(n)," encoding found for selection ").concat(Object(he.Z)(t.selection),". ")+'Using "field": '.concat(Object(he.Z)(a),"."))):a=r[0].field}}else a=e.project.items[0].field,e.project.items.length>1&&jI('A "field" or "encoding" must be specified when using a selection as a scale domain. '+'Using "field": '.concat(Object(he.Z)(a),"."));return"".concat(e.name,"[").concat(Object(he.Z)(a),"]")}function UW(e,t,n){return pU(t,(function(t){return Object(he.H)(t)?t:function(e){return null==e?void 0:e.selection}(t)?MW(e,t.selection,n):pQ(t)}))}function PW(e,t){if(e)return WP(e)?e:e.map((function(e){return VH(e,t)})).join(", ")}function LW(e,t,n,a){var r,i,o;e.encode=null!==(r=e.encode)&&void 0!==r?r:{},e.encode[t]=null!==(i=e.encode[t])&&void 0!==i?i:{},e.encode[t].update=null!==(o=e.encode[t].update)&&void 0!==o?o:{},e.encode[t].update[n]=a}function IW(e){return qP(e)?e.signal:Object(he.Z)(e.value)}function QW(e,t,n){var a,r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1},o=e.combine(),s=o.disable,u=o.orient,d=o.scale,c=o.labelExpr,l=o.title,f=o.zindex,g=T(o,["disable","orient","scale","labelExpr","title","zindex"]);if(!s){for(var h in g){var p=DU[h],A=g[h];if(p&&p!==t&&"both"!==p)delete g[h];else if(FU(A)){var v=A.condition,m=T(A,["condition"]),y=Object(he.i)(v),R=SU[h];if(R){var b=R.vgProp,w=R.part,x=[].concat(Object(Bh.a)(y.map((function(e){var t=e.test,n=T(e,["test"]);return Object.assign({test:UW(null,t)},n)}))),[m]);LW(g,w,b,x),delete g[h]}else if(null===R){var _={signal:y.map((function(e){var t=e.test,n=T(e,["test"]);return"".concat(UW(null,t)," ? ").concat(IW(n)," : ")})).join("")+IW(m)};g[h]=_}}else if(qP(A)){var E=SU[h];if(E){var k=E.vgProp,C=E.part;LW(g,C,k,A),delete g[h]}}}if("grid"===t){if(!g.grid)return;if(g.encode){var O=g.encode.grid;g.encode=Object.assign({},O?{grid:O}:{}),0===lU(g.encode).length&&delete g.encode}return Object.assign(Object.assign({scale:d,orient:u},g),{domain:!1,labels:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:EU(f,0)})}if(i.header||!e.mainExtracted){if(void 0!==c){var B=c;(null===(r=null===(a=g.encode)||void 0===a?void 0:a.labels)||void 0===r?void 0:r.update)&&qP(g.encode.labels.update.text)&&(B=wU(c,"datum.label",g.encode.labels.update.text.signal)),LW(g,"labels","text",{signal:B})}if(g.encode){var S,F=sr(jU);try{for(F.s();!(S=F.n()).done;){var j=S.value;e.hasAxisPart(j)||delete g.encode[j]}}catch(e){F.e(e)}finally{F.f()}0===lU(g.encode).length&&delete g.encode}var D=PW(l,n);return Object.assign(Object.assign(Object.assign({scale:d,orient:u,grid:!1},D?{title:D}:{}),g),{zindex:EU(f,0)})}}}function HW(e){var t,n=e.component.axes,a=[],r=sr(DP);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(n[i]){var o,s=sr(n[i]);try{for(s.s();!(o=s.n()).done;)if(!o.value.get("gridScale")){var u="x"===i?"height":"width",d=e.getSizeSignalRef(u).signal;u!==d&&a.push({name:u,update:d})}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}return a}var zW={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},KW={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},VW=lU(zW),WW=lU(KW);function qW(e,t,n,a){var r,i,o,s=aL(e,a,t.style);if(void 0!==s)return{configFrom:"style",configValue:s};var u,d=sr(n);try{for(d.s();!(u=d.n()).done;){var c=u.value;if(void 0!==(null===(r=t[c])||void 0===r?void 0:r[e]))return{configFrom:c,configValue:t[c][e]}}}catch(e){d.e(e)}finally{d.f()}var l,f=sr(n);try{for(f.s();!(l=f.n()).done;){var g=l.value;if((null===(i=t[g])||void 0===i?void 0:i.style)&&void 0!==(s=aL(e,null===(o=t[g])||void 0===o?void 0:o.style,t.style)))return{configFrom:"axis-config-style",configValue:s}}}catch(e){f.e(e)}finally{f.f()}return{}}function GW(e,t,n,a,r){if(void 0!==(null==t?void 0:t.labelAngle))return OU(null==t?void 0:t.labelAngle);var i=qW("labelAngle",e.config,r,null==t?void 0:t.style).configValue;return void 0!==i?OU(i):n===nP&&aU(["nominal","ordinal"],a.type)?270:void 0}function XW(e,t){if(void 0!==e)return e=OU(e),"top"===t||"bottom"===t?e<=45||315<=e?"top"===t?"bottom":"top":135<=e&&e<=225?"top"===t?"top":"bottom":"middle":e<=45||315<=e||135<=e&&e<=225?"middle":45<=e&&e<=135?"left"===t?"top":"bottom":"left"===t?"bottom":"top"}function YW(e,t){if(void 0!==e)return e=OU(e),"top"===t||"bottom"===t?e%180==0?"center":02&&void 0!==arguments[2]?arguments[2]:"middle";switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}var a=YW(t,"row"===e?"left":"top");return a?{align:a}:{}}function sq(e,t){var n=XW(e,"row"===t?"left":"top");return n?{baseline:n}:{}}function uq(e,t){var n,a=e.component.layoutHeaders[t],r=[],i=sr(rq);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(a[o]){var s,u=sr(a[o]);try{for(u.s();!(s=u.n()).done;){var d=lq(e,t,o,a,s.value);null!=d&&r.push(d)}}catch(e){u.e(e)}finally{u.f()}}}}catch(e){i.e(e)}finally{i.f()}return r}function dq(e,t){var n,a=e.sort;return lH(a)?{field:MH(a,{expr:"datum"}),order:null!==(n=a.order)&&void 0!==n?n:"ascending"}:Object(he.A)(a)?{field:ZW(e,t,{expr:"datum"}),order:"ascending"}:{field:MH(e,{expr:"datum"}),order:null!=a?a:"ascending"}}function cq(e,t,n){var a=nq(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e,n,t),r=a.format,i=a.formatType,o=a.labelAngle,s=a.labelAnchor,u=a.labelOrient,d=a.labelExpr,c=aH({fieldOrDatumDef:e,format:r,formatType:i,expr:"parent",config:n}).signal,l=eq(t,u);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:d?wU(wU(d,"datum.label",c),"datum.value",MH(e,{expr:"parent"})):c}},"row"===t?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),sq(o,l)),oq(l,o,s)),hq(n,e,t,WW,KW))}function lq(e,t,n,a,r){if(r){var i=null,o=a.facetFieldDef,s=e.config?e.config:void 0;if(o&&r.labels){var u=nq(["labelOrient"],o,s,t).labelOrient;("row"===t&&!aU(["top","bottom"],u)||"column"===t&&!aU(["left","right"],u))&&(i=cq(o,t,s))}var d=hX(e)&&!gH(e.facet),c=r.axes,l=(null==c?void 0:c.length)>0;if(i||l){var f="row"===t?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("".concat(t,"_").concat(n)),type:"group",role:"".concat(t,"-").concat(n)},a.facetFieldDef?{from:{data:e.getName(t+"_domain")},sort:dq(o,t)}:{}),l&&d?{from:{data:e.getName("facet_domain_".concat(t))}}:{}),i?{title:i}:{}),r.sizeSignal?{encode:{update:Object(To.a)({},f,r.sizeSignal)}}:{}),l?{axes:c}:{})}}return null}var fq={column:{start:0,end:1},row:{start:1,end:0}};function gq(e,t){return fq[t][e]}function hq(e,t,n,a,r){var i,o={},s=sr(a);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(r[u]){var d=tq(u,t,e,n);void 0!==d&&(o[r[u]]=d)}}}catch(e){s.e(e)}finally{s.f()}return o}function pq(e){return[].concat(Object(Bh.a)(Aq(e,"width")),Object(Bh.a)(Aq(e,"height")),Object(Bh.a)(Aq(e,"childWidth")),Object(Bh.a)(Aq(e,"childHeight")))}function Aq(e,t){var n="width"===t?"x":"y",a=e.component.layoutSize.get(t);if(!a||"merged"===a)return[];var r=e.getSizeSignalRef(t).signal;if("step"===a){var i=e.getScaleComponent(n);if(i){var o=i.get("type"),s=i.get("range");if(FQ(o)&&GP(s)){var u=e.scaleName(n);return hX(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[vq(u,s)]:[vq(u,s),{name:r,update:mq(u,i,"domain('".concat(u,"').length"))}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==a){var d=r.endsWith("width"),c=d?"containerSize()[0]":"containerSize()[1]",l=eK(e.config.view,d?"width":"height"),f="isFinite(".concat(c,") ? ").concat(c," : ").concat(l);return[{name:r,init:f,on:[{update:f,events:"window:resize"}]}]}return[{name:r,value:a}]}function vq(e,t){return{name:e+"_step",value:t.step}}function mq(e,t,n){var a=t.get("type"),r=t.get("padding"),i=EU(t.get("paddingOuter"),r),o=t.get("paddingInner");return o="band"===a?void 0!==o?o:r:1,"bandspace(".concat(n,", ").concat(o,", ").concat(i,") * ").concat(e,"_step")}function yq(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function Rq(e,t){return lU(e).reduce((function(n,a){var r=e[a];return Object.assign(Object.assign({},n),bV(t,r,a,(function(e){return qP(e)?e:{value:e.value}})))}),{})}function bq(e,t){var n=e.scale[t],a=aU(DP,t)?"axis":"legend";return"independent"===n?("shared"===e[a][t]&&jI(CI.independentScaleMeansIndependentGuide(t)),"independent"):e[a][t]||"shared"}var wq=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(x.a)(this,e),this.explicit=t,this.implicit=n}return Object(_.a)(e,[{key:"clone",value:function(){return new e(JN(this.explicit),JN(this.implicit))}},{key:"combine",value:function(){return Object.assign(Object.assign({},this.explicit),this.implicit)}},{key:"get",value:function(e){return EU(this.explicit[e],this.implicit[e])}},{key:"getWithExplicit",value:function(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}},{key:"setWithExplicit",value:function(e,t){void 0!==t.value&&this.set(e,t.value,t.explicit)}},{key:"set",value:function(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}},{key:"copyKeyFromSplit",value:function(e,t){void 0!==t.explicit[e]?this.set(e,t.explicit[e],!0):void 0!==t.implicit[e]&&this.set(e,t.implicit[e],!1)}},{key:"copyKeyFromObject",value:function(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}},{key:"copyAll",value:function(e){var t,n=sr(lU(e.combine()));try{for(n.s();!(t=n.n()).done;){var a=t.value,r=e.getWithExplicit(a);this.setWithExplicit(a,r)}}catch(e){n.e(e)}finally{n.f()}}}]),e}();function xq(e){return{explicit:!0,value:e}}function _q(e){return{explicit:!1,value:e}}function Eq(e){return function(t,n,a,r){var i=e(t.value,n.value);return i>0?t:i<0?n:kq(t,n,a,r)}}function kq(e,t,n,a){return e.explicit&&t.explicit&&jI(CI.mergeConflictingProperty(n,a,e.value,t.value)),e}function Cq(e,t,n,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:kq;return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:YN(e.value,t.value)?e:r(e,t,n,a)}var Oq=Object.assign(Object.assign({},Kz),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),Bq=lU(Oq),Sq=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return n}(wq);function Fq(e){return EU(e.legend.type,jq(e))}function jq(e){var t=e.channel,n=e.timeUnit,a=e.scaleType,r=e.alwaysReturn;if(mP(t)){if(aU(["quarter","month","day"],n))return"symbol";if(DQ(a))return r?"gradient":void 0}return r?"symbol":void 0}function Dq(e){var t=e.legend,n=e.legendConfig,a=e.timeUnit,r=e.channel,i=e.scaleType,o=EU(t.orient,n.orient,"right"),s=Fq({legend:t,channel:r,timeUnit:a,scaleType:i,alwaysReturn:!0});return EU(t.direction,n[s?"gradientDirection":"symbolDirection"],function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(o,s))}function Tq(e,t,n,a){var r=e.getSizeSignalRef(t).signal;return{signal:"clamp(".concat(r,", ").concat(n,", ").concat(a,")")}}function Mq(e,t,n){var a=t.getScaleComponent(n).get("type");return EU(e.get("type"),jq({channel:n,scaleType:a,alwaysReturn:!0}))}function Nq(e,t,n,a,r){var i,o,s,u,d;if("symbol"===Mq(r,n,a)){var c=n.markDef,l=n.encoding,f=n.config,g=n.mark,h=c.filled&&"trail"!==g,p=Object.assign(Object.assign({},function(e,t,n){var a,r=sr(n);try{for(r.s();!(a=r.n()).done;){var i=a.value,o=tL(i,t.markDef,t.config);void 0!==o&&(e[i]={value:o})}}catch(e){r.e(e)}finally{r.f()}return e}({},n,QU)),xV(n,{filled:h})),A=null!==(i=Iq(l.opacity))&&void 0!==i?i:c.opacity;if(p.fill)if("fill"===a||h&&a===rP)delete p.fill;else if(p.fill.field)r.get("symbolFillColor")?delete p.fill:(p.fill=$P(null!==(o=f.legend.symbolBaseFillColor)&&void 0!==o?o:"black"),p.fillOpacity=$P(null!=A?A:1));else if(Object(he.A)(p.fill)){var v=null!==(d=null!==(u=Qq(null!==(s=l.fill)&&void 0!==s?s:l.color))&&void 0!==u?u:c.fill)&&void 0!==d?d:h&&c.color;v&&(p.fill=$P(v))}if(p.stroke)if("stroke"===a||!h&&a===rP)delete p.stroke;else if(p.stroke.field)delete p.stroke;else if(Object(he.A)(p.stroke)){var m=EU(Qq(l.stroke||l.color),c.stroke,h?c.color:void 0);m&&(p.stroke={value:m})}if(a!==dP){var y=xH(e)&&zq(n,r,e);y?p.opacity=[Object.assign({test:y},$P(null!=A?A:1)),$P(f.legend.unselectedOpacity)]:A&&(p.opacity=$P(A))}return p=Object.assign(Object.assign({},p),t),lU(p).length>0?p:void 0}}function Uq(e,t,n,a,r){if("gradient"===Mq(r,n,a)){var i={},o=Iq(n.encoding.opacity)||n.markDef.opacity;return o&&(i.opacity=$P(o)),i=Object.assign(Object.assign({},i),t),lU(i).length>0?i:void 0}}function Pq(e,t,n,a,r){var i=n.legend(a)||{},o=n.config,s=xH(e)?zq(n,r,e):void 0,u=s?[{test:s,value:1},{value:o.legend.unselectedOpacity}]:void 0,d=aH({fieldOrDatumDef:e,format:i.format,formatType:i.formatType,field:"datum.value",config:o,isUTCScale:n.getScaleComponent(a).get("type")===mQ.UTC,omitNumberFormatAndEmptyTimeFormat:!0}),c=Object.assign(Object.assign(Object.assign({},u?{opacity:u}:{}),d?{text:d}:{}),t);return lU(c).length>0?c:void 0}function Lq(e,t,n,a,r){var i=r.get("selections");return(null==i?void 0:i.length)?{fill:{value:"transparent"}}:void 0}function Iq(e){return Hq(e,(function(e,t){return Math.max(e,t.value)}))}function Qq(e){return Hq(e,(function(e,t){return EU(e,t.value)}))}function Hq(e,t){return function(e){var t=e&&e.condition;return!!t&&(Object(he.A)(t)||SH(t))}(e)?Object(he.i)(e.condition).reduce(t,e.value):SH(e)?e.value:void 0}function zq(e,t,n){var a=t.get("selections");if(null==a?void 0:a.length){var r=Object(he.Z)(n.field);return a.map((function(e){var t=Object(he.Z)(hU(e)+EW);return"(!length(data(".concat(t,")) || (").concat(e,"[").concat(r,"] && indexof(").concat(e,"[").concat(r,"], datum.value) >= 0))")})).join(" || ")}}function Kq(e,t,n,a){switch(t){case"disable":return void 0!==n;case"values":return!!(null==n?void 0:n.values);case"title":if("title"===t&&e===(null==a?void 0:a.title))return!0}return e===(n||{})[t]}function Vq(e,t,n,a){var r;if("disable"===e)return void 0!==t&&!t;t=t||{};var i=a.encoding,o=a.mark,s=GH(i[n]),u=a.config.legend,d=xH(s)?null===(r=tQ(s.timeUnit))||void 0===r?void 0:r.unit:void 0,c=a.getScaleComponent(n).get("type");switch(e){case"direction":return Dq({legend:t,legendConfig:u,timeUnit:d,channel:n,scaleType:c});case"format":if(ez(s))return;return rH(s.type,t.format,a.config);case"formatType":if(ez(s))return;return t.formatType;case"gradientLength":return EU(t.gradientLength,u.gradientLength,function(e){var t=e.legend,n=e.legendConfig,a=e.model,r=e.channel,i=e.scaleType,o=n.gradientHorizontalMaxLength,s=n.gradientHorizontalMinLength,u=n.gradientVerticalMaxLength,d=n.gradientVerticalMinLength;if(DQ(i)){if("horizontal"===Dq({legend:t,legendConfig:n,channel:r,scaleType:i})){var c=EU(t.orient,n.orient);return"top"===c||"bottom"===c?Tq(a,"width",s,o):s}return Tq(a,"height",d,u)}}({model:a,legend:t,legendConfig:u,channel:n,scaleType:c}));case"labelOverlap":return EU(t.labelOverlap,function(e){if(aU(["quantile","threshold","log"],e))return"greedy"}(c));case"symbolType":return EU(t.symbolType,function(e,t,n,a){var r;if("shape"!==t){var i=null!==(r=Qq(n))&&void 0!==r?r:a;if(i)return i}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(o,n,i.shape,a.markDef.shape));case"title":return zH(s,a.config,{allowDisabling:!0});case"type":return Fq({legend:t,channel:n,timeUnit:d,scaleType:c,alwaysReturn:!1});case"values":return function(e,t){var n=e.values;return Object(he.A)(n)?az(t,n):qP(n)?n:void 0}(t,s)}return t[e]}function Wq(e,t){var n,a,r,i,o,s;if(!e)return t.clone();var u=e.getWithExplicit("orient"),d=t.getWithExplicit("orient");if(!u.explicit||!d.explicit||u.value===d.value){var c,l=!1,f=sr(Bq);try{var g=function(){var n=c.value,a=Cq(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",(function(e,t){switch(n){case"symbolType":return function(e,t){return"circle"===t.value?t:e}(e,t);case"title":return sL(e,t);case"type":return l=!0,_q("symbol")}return kq(e,t,n,"legend")}));e.setWithExplicit(n,a)};for(f.s();!(c=f.n()).done;)g()}catch(e){f.e(e)}finally{f.f()}return l&&((null===(r=null===(a=null===(n=e.implicit)||void 0===n?void 0:n.encode)||void 0===a?void 0:a.gradient)||void 0===r||r)&&AU(e.implicit,["encode","gradient"]),(null===(s=null===(o=null===(i=e.explicit)||void 0===i?void 0:i.encode)||void 0===o?void 0:o.gradient)||void 0===s||s)&&AU(e.explicit,["encode","gradient"])),e}}function qq(e,t,n,a){var r,i,o;e.encode=null!==(r=e.encode)&&void 0!==r?r:{},e.encode[t]=null!==(i=e.encode[t])&&void 0!==i?i:{},e.encode[t].update=null!==(o=e.encode[t].update)&&void 0!==o?o:{},e.encode[t].update[n]=a}function Gq(e){var t,n=e.component.legends,a={},r=sr(lU(n));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=e.getScaleComponent(i),s=eU(o.get("domains"));if(a[s]){var u,d=sr(a[s]);try{for(d.s();!(u=d.n()).done;)Wq(u.value,n[i])||a[s].push(n[i])}catch(e){d.e(e)}finally{d.f()}}else a[s]=[n[i].clone()]}}catch(e){r.e(e)}finally{r.f()}return fU(a).flat().map(Xq).filter((function(e){return void 0!==e}))}function Xq(e){var t,n,a,r,i=e.combine(),o=i.disable,s=i.labelExpr,u=(i.selections,T(i,["disable","labelExpr","selections"]));if(!o){if(null===(t=u.encode)||void 0===t?void 0:t.symbols){var d=u.encode.symbols.update;!d.fill||"transparent"===d.fill.value||d.stroke||u.stroke||(d.stroke={value:"transparent"});var c,l=sr(Hz);try{for(l.s();!(c=l.n()).done;){var f=c.value;u[f]&&delete d[f]}}catch(e){l.e(e)}finally{l.f()}}if(u.title||delete u.title,void 0!==s){var g=s;(null===(r=null===(a=null===(n=u.encode)||void 0===n?void 0:n.labels)||void 0===a?void 0:a.update)||void 0===r?void 0:r.text)&&qP(u.encode.labels.update.text)&&(g=wU(s,"datum.label",u.encode.labels.update.text.signal)),qq(u,"labels","text",{signal:g})}for(var h in u){var p=u[h];if(qP(p)){var A=zz[h];if(A){var v=A.vgProp;qq(u,A.part,v,p),delete u[h]}}}return u}}function Yq(e){var t=e.component.projection;if(!t||t.merged)return[];var n=t.combine(),a=n.name,r=T(n,["name"]);if(t.data){var i={signal:"[".concat(t.size.map((function(e){return e.signal})).join(", "),"]")},o=t.data.reduce((function(t,n){var a=qP(n)?n.signal:"data('".concat(e.lookupDataSource(n),"')");return aU(t,a)||t.push(a),t}),[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:a,size:i,fit:{signal:o.length>1?"[".concat(o.join(", "),"]"):o[0]}},r)]}return[Object.assign(Object.assign({name:a},{translate:{signal:"[width / 2, height / 2]"}}),r)]}var Jq=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"],$q=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r,i){var o;return Object(x.a)(this,n),(o=t.call(this,Object.assign({},a),{name:e})).specifiedProjection=a,o.size=r,o.data=i,o.merged=!1,o}return Object(_.a)(n,[{key:"isFit",get:function(){return!!this.data}}]),n}(wq);var Zq=n(264),eG=n(263),tG=n(265);function nG(e,t){return"".concat(iz(e),"_").concat(t)}function aG(e,t,n){var a,r=nG(null!==(a=$H(n,void 0))&&void 0!==a?a:{},t);return e.getName("".concat(r,"_bins"))}function rG(e,t,n){var a,r;a=function(e){return"as"in e}(e)?Object(he.H)(e.as)?[e.as,"".concat(e.as,"_end")]:[e.as[0],e.as[1]]:[MH(e,{forAs:!0}),MH(e,{binSuffix:"end",forAs:!0})];var i=Object.assign({},$H(t,void 0)),o=nG(i,e.field),s=function(e,t){return{signal:e.getName("".concat(t,"_bins")),extentSignal:e.getName("".concat(t,"_extent"))}}(n,o),u=s.signal,d=s.extentSignal;if(dz(i.extent)){var c=i.extent,l=c.selection;r=NW(n.getSelectionComponent(hU(l),l),c),delete i.extent}return{key:o,binComponent:Object.assign(Object.assign(Object.assign({bin:i,field:e.field,as:[a]},u?{signal:u}:{}),d?{extentSignal:d}:{}),r?{span:r}:{})}}var iG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).bins=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.bins))}},{key:"merge",value:function(e,t){var n,a=sr(lU(e.bins));try{for(a.s();!(n=a.n()).done;){var r=n.value;r in this.bins?(t(e.bins[r].signal,this.bins[r].signal),this.bins[r].as=sU([].concat(Object(Bh.a)(this.bins[r].as),Object(Bh.a)(e.bins[r].as)),tU)):this.bins[r]=e.bins[r]}}catch(e){a.e(e)}finally{a.f()}var i,o=sr(e.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;e.removeChild(s),s.parent=this}}catch(e){o.e(e)}finally{o.f()}e.remove()}},{key:"producedFields",value:function(){return new Set(fU(this.bins).map((function(e){return e.as})).flat(2))}},{key:"dependentFields",value:function(){return new Set(fU(this.bins).map((function(e){return e.field})))}},{key:"hash",value:function(){return"Bin ".concat(tU(this.bins))}},{key:"assemble",value:function(){return fU(this.bins).flatMap((function(e){var t=[],n=function(e){return Object(Zq.a)(e)||Object(eG.a)(e)||Object(or.a)(e)||Object(tG.a)()}(e.as),a=n[0],r=n.slice(1),i=e.bin,o=i.extent,s=T(i,["extent"]),u=Object.assign(Object.assign(Object.assign({type:"bin",field:bU(e.field),as:a,signal:e.signal},dz(o)?{extent:null}:{extent:o}),e.span?{span:{signal:"span(".concat(e.span,")")}}:{}),s);!o&&e.extentSignal&&(t.push({type:"extent",field:bU(e.field),signal:e.extentSignal}),u.extent={signal:e.extentSignal}),t.push(u);var d,c=sr(r);try{for(c.s();!(d=c.n()).done;)for(var l=d.value,f=0;f<2;f++)t.push({type:"formula",expr:MH({field:a[f]},{expr:"datum"}),as:l[f]})}catch(e){c.e(e)}finally{c.f()}return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}],[{key:"makeFromEncoding",value:function(e,t){var a=t.reduceFieldDef((function(e,n,a){if(BH(n)&&oz(n.bin)){var r=rG(n,n.bin,t),i=r.key,o=r.binComponent;e[i]=Object.assign(Object.assign(Object.assign({},o),e[i]),function(e,t,n,a){var r,i;if(rz(t,n)){var o=gX(e)&&null!==(i=null!==(r=e.axis(n))&&void 0!==r?r:e.legend(n))&&void 0!==i?i:{},s=MH(t,{expr:"datum"}),u=MH(t,{expr:"datum",binSuffix:"end"});return{formulaAs:MH(t,{binSuffix:"range",forAs:!0}),formula:sH(s,u,o.format,o.formatType,a)}}return{}}(t,n,a,t.config))}return e}),{});return 0===lU(a).length?null:new n(e,a)}},{key:"makeFromTransform",value:function(e,t,a){var r=rG(t,t.bin,a),i=r.key,o=r.binComponent;return new n(e,Object(To.a)({},i,o))}}]),n}($V),oG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e){var a,r;if(Object(x.a)(this,n),a=t.call(this,null),$K(e=null!=e?e:{name:"source"})||(r=e.format?Object.assign({},ZN(e.format,["parse"])):{}),YK(e))a._data={values:e.values};else if(XK(e)){if(a._data={url:e.url},!r.type){var i=/(?:\.([^.]+))?$/.exec(e.url)[1];aU(["json","csv","tsv","dsv","topojson"],i)||(i="json"),r.type=i}}else eV(e)?a._data={values:[{type:"Sphere"}]}:(JK(e)||$K(e))&&(a._data={});return a._generator=$K(e),e.name&&(a._name=e.name),r&&lU(r).length>0&&(a._data.format=r),a}return Object(_.a)(n,[{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){}},{key:"hasName",value:function(){return!!this._name}},{key:"remove",value:function(){throw new Error("Source nodes are roots and cannot be removed.")}},{key:"hash",value:function(){throw new Error("Cannot hash sources")}},{key:"assemble",value:function(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}},{key:"data",get:function(){return this._data}},{key:"isGenerator",get:function(){return this._generator}},{key:"dataName",get:function(){return this._name},set:function(e){this._name=e}},{key:"parent",set:function(e){throw new Error("Source nodes have to be roots.")}}]),n}($V);function sG(e){var t,n=sr(e);try{for(n.s();!(t=n.n()).done;){var a,r=t.value,i=sr(r.children);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(o.parent!==r)return console.error("Dataflow graph is inconsistent.",r,o),!1}}catch(e){i.e(e)}finally{i.f()}if(!sG(r.children))return!1}}catch(e){n.e(e)}finally{n.f()}return!0}var uG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).params=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){}},{key:"hash",value:function(){return"Graticule ".concat(tU(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"graticule"},!0===this.params?{}:this.params)}}]),n}($V),dG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).params=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){var e;return new Set([null!==(e=this.params.as)&&void 0!==e?e:"data"])}},{key:"hash",value:function(){return"Hash ".concat(tU(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"sequence"},this.params)}}]),n}($V);function cG(e){return e instanceof oG||e instanceof uG||e instanceof dG}var lG=function(){function e(){Object(x.a)(this,e),this._mutated=!1}return Object(_.a)(e,[{key:"setMutated",value:function(){this._mutated=!0}},{key:"mutatedFlag",get:function(){return this._mutated}}]),e}(),fG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){var e;return Object(x.a)(this,n),(e=t.call(this))._continue=!1,e}return Object(_.a)(n,[{key:"setContinue",value:function(){this._continue=!0}},{key:"reset",value:function(){}},{key:"optimizeNextFromLeaves",value:function(e){if(cG(e))return!1;var t=e.parent;return this.run(e).continueFlag&&this.optimizeNextFromLeaves(t),this.mutatedFlag}},{key:"continueFlag",get:function(){return this._continue}},{key:"flags",get:function(){return{continueFlag:this.continueFlag,mutatedFlag:this.mutatedFlag}},set:function(e){var t=e.continueFlag,n=e.mutatedFlag;t&&this.setContinue(),n&&this.setMutated()}}]),n}(lG),gG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return n}(lG);var hG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r){var i;return Object(x.a)(this,n),(i=t.call(this,e)).dimensions=a,i.measures=r,i}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,new Set(this.dimensions),JN(this.measures))}},{key:"merge",value:function(e){return function(e,t){if(e.size!==t.size)return!1;var n,a=sr(e);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(!t.has(r))return!1}}catch(e){a.e(e)}finally{a.f()}return!0}(this.dimensions,e.dimensions)?(function(e,t){var n,a,r=sr(lU(t));try{for(r.s();!(a=r.n()).done;){var i,o=a.value,s=t[o],u=sr(lU(s));try{for(u.s();!(i=u.n()).done;){var d=i.value;o in e?e[o][d]=new Set([].concat(Object(Bh.a)(null!==(n=e[o][d])&&void 0!==n?n:[]),Object(Bh.a)(s[d]))):e[o]=Object(To.a)({},d,s[d])}}catch(e){u.e(e)}finally{u.f()}}}catch(e){r.e(e)}finally{r.f()}}(this.measures,e.measures),!0):(function(){var e;(e=BI).debug.apply(e,arguments)}("different dimensions, cannot merge"),!1)}},{key:"addDimensions",value:function(e){e.forEach(this.dimensions.add,this.dimensions)}},{key:"dependentFields",value:function(){return new Set([].concat(Object(Bh.a)(this.dimensions),Object(Bh.a)(lU(this.measures))))}},{key:"producedFields",value:function(){var e,t=new Set,n=sr(lU(this.measures));try{for(n.s();!(e=n.n()).done;){var a,r=e.value,i=sr(lU(this.measures[r]));try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.measures[r][o];0===s.size?t.add("".concat(o,"_").concat(r)):s.forEach(t.add,t)}}catch(e){i.e(e)}finally{i.f()}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"hash",value:function(){return"Aggregate ".concat(tU({dimensions:this.dimensions,measures:this.measures}))}},{key:"assemble",value:function(){var e,t=[],n=[],a=[],r=sr(lU(this.measures));try{for(r.s();!(e=r.n()).done;){var i,o=e.value,s=sr(lU(this.measures[o]));try{for(s.s();!(i=s.n()).done;){var u,d=i.value,c=sr(this.measures[o][d]);try{for(c.s();!(u=c.n()).done;){var l=u.value;a.push(l),t.push(d),n.push("*"===o?null:bU(o))}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}}}catch(e){r.e(e)}finally{r.f()}return{type:"aggregate",groupby:Object(Bh.a)(this.dimensions).map(bU),ops:t,fields:n,as:a}}},{key:"groupBy",get:function(){return this.dimensions}}],[{key:"makeFromEncoding",value:function(e,t){var a=!1;t.forEachFieldDef((function(e){e.aggregate&&(a=!0)}));var r={},i=new Set;return a?(t.forEachFieldDef((function(e,n){var a,o,s,u,d=e.aggregate,c=e.field;if(d)if("count"===d)r["*"]=null!==(a=r["*"])&&void 0!==a?a:{},r["*"].count=new Set([MH(e,{forAs:!0})]);else{if(GU(d)||XU(d)){var l=GU(d)?"argmin":"argmax",f=d[l];r[f]=null!==(o=r[f])&&void 0!==o?o:{},r[f][l]=new Set([MH({op:l,field:f},{forAs:!0})])}else r[c]=null!==(s=r[c])&&void 0!==s?s:{},r[c][d]=new Set([MH(e,{forAs:!0})]);QP(n)&&"unaggregated"===t.scaleDomain(n)&&(r[c]=null!==(u=r[c])&&void 0!==u?u:{},r[c].min=new Set([MH({field:c,aggregate:"min"},{forAs:!0})]),r[c].max=new Set([MH({field:c,aggregate:"max"},{forAs:!0})]))}else!function(e,t,n,a){var r=gX(a)?a.encoding[BP(t)]:void 0;if(BH(n)&&gX(a)&&yH(t,n,r,a.stack,a.markDef,a.config))e.add(MH(n,{})),e.add(MH(n,{suffix:"end"})),n.bin&&rz(n,t)&&e.add(MH(n,{binSuffix:"range"}));else if(function(e){return e in pP}(t)){var i=function(e){switch(e){case"latitude":return"y";case"latitude2":return"y2";case"longitude":return"x";case"longitude2":return"x2"}}(t);e.add(a.getName(i))}else e.add(MH(n))}(i,n,e,t)})),i.size+lU(r).length===0?null:new n(e,i,r)):null}},{key:"makeFromTransform",value:function(e,t){var a,r,i,o,s=new Set,u={},d=sr(t.aggregate);try{for(d.s();!(o=d.n()).done;){var c=o.value,l=c.op,f=c.field,g=c.as;l&&("count"===l?(u["*"]=null!==(a=u["*"])&&void 0!==a?a:{},u["*"].count=new Set([g||MH(c,{forAs:!0})])):(u[f]=null!==(r=u[f])&&void 0!==r?r:{},u[f][l]=new Set([g||MH(c,{forAs:!0})])))}}catch(e){d.e(e)}finally{d.f()}var h,p=sr(null!==(i=t.groupby)&&void 0!==i?i:[]);try{for(p.s();!(h=p.n()).done;){var A=h.value;s.add(A)}}catch(e){p.e(e)}finally{p.f()}return s.size+lU(u).length===0?null:new n(e,s,u)}}]),n}($V),pG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r,i){var o;Object(x.a)(this,n),(o=t.call(this,e)).model=a,o.name=r,o.data=i;var s,u=sr(RP);try{for(u.s();!(s=u.n()).done;){var d=s.value,c=a.facet[d];if(c){var l=c.bin,f=c.sort;o[d]=Object.assign({name:a.getName("".concat(d,"_domain")),fields:[MH(c)].concat(Object(Bh.a)(oz(l)?[MH(c,{binSuffix:"end"})]:[]))},lH(f)?{sortField:f}:Object(he.A)(f)?{sortIndexField:ZW(c,d)}:{})}}}catch(e){u.e(e)}finally{u.f()}return o.childModel=a.child,o}return Object(_.a)(n,[{key:"hash",value:function(){var e,t="Facet",n=sr(RP);try{for(n.s();!(e=n.n()).done;){var a=e.value;this[a]&&(t+=" ".concat(a.charAt(0),":").concat(tU(this[a])))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"dependentFields",value:function(){var e,t=new Set(this.fields),n=sr(RP);try{for(n.s();!(e=n.n()).done;){var a=e.value;this[a]&&(this[a].sortField&&t.add(this[a].sortField.field),this[a].sortIndexField&&t.add(this[a].sortIndexField))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"producedFields",value:function(){return new Set}},{key:"getSource",value:function(){return this.name}},{key:"getChildIndependentFieldsWithStep",value:function(){for(var e={},t=0,n=["x","y"];t0){s[c]=!0;break}}catch(e){h.e(e)}finally{h.f()}}}catch(e){l.e(e)}finally{l.f()}if(s[c]){var p='length(data("'.concat(this.facet.name,'"))'),A="row"===c?r?{signal:"ceil(".concat(p," / ").concat(r,")")}:1:r?{signal:"min(".concat(p,", ").concat(r,")")}:{signal:p};o.push({name:"".concat(this.facet.name,"_").concat(c),transform:[{type:"sequence",start:0,stop:A}]})}}}catch(e){u.e(e)}finally{u.f()}var v=s.row,m=s.column;return(v||m)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}},{key:"assemble",value:function(){var e,t,n=[],a=null,r=this.getChildIndependentFieldsWithStep(),i=this.column,o=this.row,s=this.facet;if(i&&o&&(r.x||r.y)){a="cross_".concat(this.column.name,"_").concat(this.row.name);var u=[].concat(null!==(e=r.x)&&void 0!==e?e:[],null!==(t=r.y)&&void 0!==t?t:[]),d=u.map((function(){return"distinct"}));n.push({name:a,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:u,ops:d}]})}for(var c=0,l=["column",tP];c0&&void 0!==arguments[0]&&arguments[0];return lU(this._parse).filter((function(e){return!t||_U(e)>1})).map((function(t){var n=vG(t,e._parse[t]);return n?{type:"formula",expr:n,as:xU(t)}:null})).filter((function(e){return null!==e}))}},{key:"parse",get:function(){return this._parse}}],[{key:"makeExplicit",value:function(e,t,n){var a={},r=t.data;return!$K(r)&&r&&r.format&&r.format.parse&&(a=r.format.parse),this.makeWithAncestors(e,a,{},n)}},{key:"makeWithAncestors",value:function(e,t,a,r){var i,o=sr(lU(a));try{for(o.s();!(i=o.n()).done;){var s=i.value,u=r.getWithExplicit(s);void 0!==u.value&&(u.explicit||u.value===a[s]||"derived"===u.value||"flatten"===a[s]?delete a[s]:jI(CI.differentParse(s,a[s],u.value)))}}catch(e){o.e(e)}finally{o.f()}var d,c=sr(lU(t));try{for(c.s();!(d=c.n()).done;){var l=d.value,f=r.get(l);void 0!==f&&(f===t[l]?delete t[l]:jI(CI.differentParse(l,t[l],f)))}}catch(e){c.e(e)}finally{c.f()}var g=new wq(t,a);r.copyAll(g);var h,p={},A=sr(lU(g.combine()));try{for(A.s();!(h=A.n()).done;){var v=h.value,m=g.get(v);null!==m&&(p[v]=m)}}catch(e){A.e(e)}finally{A.f()}return 0===lU(p).length||r.parseNothing?null:new n(e,p)}}]),n}($V),RG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"addDimensions",value:function(e){this.transform.groupby=sU(this.transform.groupby.concat(e),(function(e){return e}))}},{key:"dependentFields",value:function(){var e=new Set;return this.transform.groupby&&this.transform.groupby.forEach((function(t){return e.add(t)})),this.transform.joinaggregate.map((function(e){return e.field})).filter((function(e){return void 0!==e})).forEach((function(t){return e.add(t)})),e}},{key:"producedFields",value:function(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}},{key:"getDefaultName",value:function(e){var t;return null!==(t=e.as)&&void 0!==t?t:MH(e)}},{key:"hash",value:function(){return"JoinAggregateTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e,t=[],n=[],a=[],r=sr(this.transform.joinaggregate);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.push(i.op),a.push(this.getDefaultName(i)),t.push(void 0===i.field?null:i.field)}}catch(e){r.e(e)}finally{r.f()}var o=this.transform.groupby;return Object.assign({type:"joinaggregate",as:a,ops:n,fields:t},void 0!==o?{groupby:o}:{})}}]),n}($V),bG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e))._stack=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this._stack))}},{key:"addDimensions",value:function(e){var t;(t=this._stack.facetby).push.apply(t,Object(Bh.a)(e))}},{key:"dependentFields",value:function(){var e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach((function(t){return e.add(t)})),this._stack.facetby.forEach((function(t){return e.add(t)})),this._stack.sort.field.forEach((function(t){return e.add(t)})),e}},{key:"producedFields",value:function(){return new Set(this._stack.as)}},{key:"hash",value:function(){return"Stack ".concat(tU(this._stack))}},{key:"getGroupbyFields",value:function(){var e=this._stack,t=e.dimensionFieldDef,n=e.impute,a=e.groupby;return t?t.bin?n?[MH(t,{binSuffix:"mid"})]:[MH(t,{}),MH(t,{binSuffix:"end"})]:[MH(t)]:null!=a?a:[]}},{key:"assemble",value:function(){var e=[],t=this._stack,n=t.facetby,a=t.dimensionFieldDef,r=t.stackField,i=t.stackby,o=t.sort,s=t.offset,u=t.impute,d=t.as;if(u&&a){var c=a.band,l=void 0===c?.5:c;a.bin&&e.push({type:"formula",expr:"".concat(l,"*")+MH(a,{expr:"datum"})+"+".concat(1-l,"*")+MH(a,{expr:"datum",binSuffix:"end"}),as:MH(a,{binSuffix:"mid",forAs:!0})}),e.push({type:"impute",field:r,groupby:[].concat(Object(Bh.a)(i),Object(Bh.a)(n)),key:MH(a,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[].concat(Object(Bh.a)(this.getGroupbyFields()),Object(Bh.a)(n)),field:r,sort:o,as:d,offset:s}),e}},{key:"stack",get:function(){return this._stack}}],[{key:"makeFromTransform",value:function(e,t){var a=t.stack,r=t.groupby,i=t.as,o=t.offset,s=void 0===o?"zero":o,u=[],d=[];if(void 0!==t.sort){var c,l=sr(t.sort);try{for(l.s();!(c=l.n()).done;){var f=c.value;u.push(f.field),d.push(EU(f.order,"ascending"))}}catch(e){l.e(e)}finally{l.f()}}return new n(e,{stackField:a,groupby:r,offset:s,sort:{field:u,order:d},facetby:[],as:function(e){return Object(he.A)(e)&&e.every((function(e){return Object(he.H)(e)}))&&e.length>1}(i)?i:Object(he.H)(i)?[i,i+"_end"]:[t.stack+"_start",t.stack+"_end"]})}},{key:"makeFromEncoding",value:function(e,t){var a=t.stack,r=t.encoding;if(!a)return null;var i,o=a.groupbyChannel,s=a.fieldChannel,u=a.offset,d=a.impute;o&&(i=qH(r[o]));var c,l=function(e){return e.stack.stackBy.reduce((function(e,t){var n=MH(t.fieldDef);return n&&e.push(n),e}),[])}(t),f=t.encoding.order;return c=Object(he.A)(f)||xH(f)?rL(f):l.reduce((function(e,t){return e.field.push(t),e.order.push("y"===s?"descending":"ascending"),e}),{field:[],order:[]}),new n(e,{dimensionFieldDef:i,stackField:t.vgField(s),facetby:[],stackby:l,sort:c,offset:u,impute:d,as:[t.vgField(s,{suffix:"start",forAs:!0}),t.vgField(s,{suffix:"end",forAs:!0})]})}}]),n}($V),wG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"addDimensions",value:function(e){this.transform.groupby=sU(this.transform.groupby.concat(e),(function(e){return e}))}},{key:"dependentFields",value:function(){var e,t,n=new Set;return(null!==(e=this.transform.groupby)&&void 0!==e?e:[]).forEach((function(e){return n.add(e)})),(null!==(t=this.transform.sort)&&void 0!==t?t:[]).forEach((function(e){return n.add(e.field)})),this.transform.window.map((function(e){return e.field})).filter((function(e){return void 0!==e})).forEach((function(e){return n.add(e)})),n}},{key:"producedFields",value:function(){return new Set(this.transform.window.map(this.getDefaultName))}},{key:"getDefaultName",value:function(e){var t;return null!==(t=e.as)&&void 0!==t?t:MH(e)}},{key:"hash",value:function(){return"WindowTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e,t,n=[],a=[],r=[],i=[],o=sr(this.transform.window);try{for(o.s();!(t=o.n()).done;){var s=t.value;a.push(s.op),r.push(this.getDefaultName(s)),i.push(void 0===s.param?null:s.param),n.push(void 0===s.field?null:s.field)}}catch(e){o.e(e)}finally{o.f()}var u=this.transform.frame,d=this.transform.groupby;if(u&&null===u[0]&&null===u[1]&&a.every((function(e){return YU(e)})))return Object.assign({type:"joinaggregate",as:r,ops:a,fields:n},void 0!==d?{groupby:d}:{});var c=[],l=[];if(void 0!==this.transform.sort){var f,g=sr(this.transform.sort);try{for(g.s();!(f=g.n()).done;){var h=f.value;c.push(h.field),l.push(null!==(e=h.order)&&void 0!==e?e:"ascending")}}catch(e){g.e(e)}finally{g.f()}}var p={field:c,order:l},A=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:i,as:r,ops:a,fields:n,sort:p},void 0!==A?{ignorePeers:A}:{}),void 0!==d?{groupby:d}:{}),void 0!==u?{frame:u}:{})}}]),n}($V),xG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(x.a)(this,n),t.call(this,e)}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null)}}]),Object(_.a)(n,[{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set(["_vgsid_"])}},{key:"hash",value:function(){return"Identifier"}},{key:"assemble",value:function(){return{type:"identifier",as:"_vgsid_"}}}]),n}($V),_G=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){var t=e.parent;if(e instanceof yG){if(cG(t))return this.flags;if(t.numChildren()>1)return this.setContinue(),this.flags;if(t instanceof yG)this.setMutated(),t.merge(e);else{if(cU(t.producedFields(),e.dependentFields()))return this.setContinue(),this.flags;this.setMutated(),e.swapWithParent()}}return this.setContinue(),this.flags}}]),n}(fG),EG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"mergeNodes",value:function(e,t){var n,a=t.shift(),r=sr(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.removeChild(i),i.parent=a,i.remove()}}catch(e){r.e(e)}finally{r.f()}}},{key:"run",value:function(e){for(var t=e.children.map((function(e){return e.hash()})),n={},a=0;a1&&(this.setMutated(),this.mergeNodes(e,n[o]))}}catch(e){i.e(e)}finally{i.f()}var s,u=sr(e.children);try{for(u.s();!(s=u.n()).done;){var d=s.value;this.run(d)}}catch(e){u.e(e)}finally{u.f()}return this.mutatedFlag}}]),n}(gG),kG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){return e instanceof ZV||e.numChildren()>0||e instanceof pG||(this.setMutated(),e.remove()),this.flags}}]),n}(fG),CG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){var e;return Object(x.a)(this,n),(e=t.apply(this,arguments)).fields=new Set,e.prev=null,e}return Object(_.a)(n,[{key:"run",value:function(e){if(this.setContinue(),e instanceof eW){var t=e.producedFields();uU(t,this.fields)?(this.setMutated(),this.prev.remove()):this.fields=new Set([].concat(Object(Bh.a)(this.fields),Object(Bh.a)(t))),this.prev=e}return this.flags}},{key:"reset",value:function(){this.fields.clear()}}]),n}(fG),OG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){this.setContinue();var t,n=e.parent.children.filter((function(e){return e instanceof eW})),a=n.pop(),r=sr(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.setMutated(),a.merge(i)}}catch(e){r.e(e)}finally{r.f()}return this.flags}}]),n}(fG);function BG(e){if(e instanceof pG)if(1!==e.numChildren()||e.children[0]instanceof ZV){var t=e.model.component.data.main;!function e(t){if(t instanceof ZV&&t.type===nV&&1===t.numChildren()){var n=t.children[0];n instanceof pG||(n.swapWithParent(),e(t))}}(t);var n,a=function(e){return function t(n){if(!(n instanceof pG)){var a=n.clone();if(a instanceof ZV){var r=NG+a.getSource();a.setSource(r),e.model.component.data.outputNodes[r]=a}else(a instanceof hG||a instanceof bG||a instanceof wG||a instanceof RG)&&a.addDimensions(e.fields);return n.children.flatMap(t).forEach((function(e){return e.parent=a})),[a]}return n.children.flatMap(t)}}(e),r=sr(e.children.map(a).flat());try{for(r.s();!(n=r.n()).done;)n.value.parent=t}catch(e){r.e(e)}finally{r.f()}}else{var i=e.children[0];(i instanceof hG||i instanceof bG||i instanceof wG||i instanceof RG)&&i.addDimensions(e.fields),i.swapWithParent(),BG(e)}else e.children.map(BG)}var SG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.call(this)}return Object(_.a)(n,[{key:"run",value:function(e){e instanceof ZV&&!e.isRequired()&&(this.setMutated(),e.remove());var t,n=sr(e.children);try{for(n.s();!(t=n.n()).done;){var a=t.value;this.run(a)}}catch(e){n.e(e)}finally{n.f()}return this.mutatedFlag}}]),n}(gG),FG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e){var a;return Object(x.a)(this,n),(a=t.call(this)).requiresSelectionId=e&&jW(e),a}return Object(_.a)(n,[{key:"run",value:function(e){e instanceof xG&&(this.requiresSelectionId&&(cG(e.parent)||e.parent instanceof hG||e.parent instanceof yG)||(this.setMutated(),e.remove()));var t,n=sr(e.children);try{for(n.s();!(t=n.n()).done;){var a=t.value;this.run(a)}}catch(e){n.e(e)}finally{n.f()}return this.mutatedFlag}}]),n}(gG),jG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){var t=e.parent,n=Object(Bh.a)(t.children),a=t.children.filter((function(e){return e instanceof yG}));if(t.numChildren()>1&&a.length>=1){var r,i={},o=new Set,s=sr(a);try{for(s.s();!(r=s.n()).done;){var u,d=r.value.parse,c=sr(lU(d));try{for(c.s();!(u=c.n()).done;){var l=u.value;l in i?i[l]!==d[l]&&o.add(l):i[l]=d[l]}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}var f,g=sr(o);try{for(g.s();!(f=g.n()).done;)delete i[f.value]}catch(e){g.e(e)}finally{g.f()}if(0!==lU(i).length){this.setMutated();var h,p=new yG(t,i),A=sr(n);try{for(A.s();!(h=A.n()).done;){var v=h.value;if(v instanceof yG){var m,y=sr(lU(i));try{for(y.s();!(m=y.n()).done;){var R=m.value;delete v.parse[R]}}catch(e){y.e(e)}finally{y.f()}}t.removeChild(v),v.parent=p,v instanceof yG&&0===lU(v.parse).length&&v.remove()}}catch(e){A.e(e)}finally{A.f()}}}return this.setContinue(),this.flags}}]),n}(fG),DG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){var t,n=e.parent,a={},r=sr(n.children.filter((function(e){return e instanceof hG})));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=tU(i.groupBy);o in a||(a[o]=[]),a[o].push(i)}}catch(e){r.e(e)}finally{r.f()}var s,u=sr(lU(a));try{for(u.s();!(s=u.n()).done;){var d=a[s.value];if(d.length>1){var c,l=d.pop(),f=sr(d);try{for(f.s();!(c=f.n()).done;){var g=c.value;l.merge(g)&&(n.removeChild(g),g.parent=l,g.remove(),this.setMutated())}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){u.e(e)}finally{u.f()}return this.setContinue(),this.flags}}]),n}(fG),TG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e){var a;return Object(x.a)(this,n),(a=t.call(this)).model=e,a}return Object(_.a)(n,[{key:"run",value:function(e){var t,n=e.parent,a=!(cG(n)||n instanceof TW||n instanceof yG||n instanceof xG),r=[],i=[],o=sr(n.children);try{for(o.s();!(t=o.n()).done;){var s=t.value;s instanceof iG&&(a&&!cU(n.producedFields(),s.dependentFields())?r.push(s):i.push(s))}}catch(e){o.e(e)}finally{o.f()}if(r.length>0){var u,d=r.pop(),c=sr(r);try{for(c.s();!(u=c.n()).done;){var l=u.value;d.merge(l,this.model.renameSignal.bind(this.model))}}catch(e){c.e(e)}finally{c.f()}this.setMutated(),n instanceof iG?n.merge(d,this.model.renameSignal.bind(this.model)):d.swapWithParent()}if(i.length>1){var f,g=i.pop(),h=sr(i);try{for(h.s();!(f=h.n()).done;){var p=f.value;g.merge(p,this.model.renameSignal.bind(this.model))}}catch(e){h.e(e)}finally{h.f()}this.setMutated()}return this.setContinue(),this.flags}}]),n}(fG),MG=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"run",value:function(e){var t=e.parent,n=Object(Bh.a)(t.children);if(!rU(n,(function(e){return e instanceof ZV}))||t.numChildren()<=1)return this.setContinue(),this.flags;var a,r,i=[],o=sr(n);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s instanceof ZV){for(var u=s;1===u.numChildren();){var d=u.children[0];if(!(d instanceof ZV))break;u=d}i.push.apply(i,Object(Bh.a)(u.children)),a?(t.removeChild(s),s.parent=a.parent,a.parent.removeChild(a),a.parent=u,this.setMutated()):a=u}else i.push(s)}}catch(e){o.e(e)}finally{o.f()}if(i.length){this.setMutated();var c,l=sr(i);try{for(l.s();!(c=l.n()).done;){var f=c.value;f.parent.removeChild(f),f.parent=a}}catch(e){l.e(e)}finally{l.f()}}return this.setContinue(),this.flags}}]),n}(fG),NG="scale_";function UG(e){var t=[];return e.forEach((function e(n){0===n.numChildren()?t.push(n):n.children.forEach(e)})),t}function PG(e){return e}function LG(e,t){return t.map((function(t){if(e instanceof fG){var n=e.optimizeNextFromLeaves(t);return e.reset(),n}return e.run(t)})).some(PG)}function IG(e,t){var n=e.sources,a=new Set;return a.add(LG(new SG,n)),a.add(LG(new FG(t),n)),n=n.filter((function(e){return e.numChildren()>0})),a.add(LG(new kG,UG(n))),n=n.filter((function(e){return e.numChildren()>0})),a.add(LG(new _G,UG(n))),a.add(LG(new TG(t),UG(n))),a.add(LG(new CG,UG(n))),a.add(LG(new jG,UG(n))),a.add(LG(new DG,UG(n))),a.add(LG(new OG,UG(n))),a.add(LG(new EG,n)),a.add(LG(new MG,UG(n))),e.sources=n,a.has(!0)}function QG(e,t){sG(e.sources);for(var n=0,a=0,r=0;r<5&&IG(e,t);r++)n++;e.sources.map(BG);for(var i=0;i<5&&IG(e,t);i++)a++;sG(e.sources),5===Math.max(n,a)&&jI("Maximum optimization runs(".concat(5,") reached."))}var HG=function(){function e(t){Object(x.a)(this,e),Object.defineProperty(this,"signal",{enumerable:!0,get:t})}return Object(_.a)(e,null,[{key:"fromName",value:function(t,n){return new e((function(){return t(n)}))}}]),e}();function zG(e){gX(e)?function(e){var t,n=e.component.scales,a=sr(lU(n));try{for(a.s();!(t=a.n()).done;){var r=t.value,i=KG(e,r);if(n[r].setWithExplicit("domains",i),GG(e,r),e.component.data.isFaceted){for(var o=e;!hX(o)&&o.parent;)o=o.parent;if("shared"===o.component.resolve.scale[r]){var s,u=sr(i.value);try{for(u.s();!(s=u.n()).done;){var d=s.value;XP(d)&&(d.data=NG+d.data.replace(NG,""))}}catch(e){u.e(e)}finally{u.f()}}}}}catch(e){a.e(e)}finally{a.f()}}(e):function(e){var t,n=sr(e.children);try{for(n.s();!(t=n.n()).done;)zG(t.value)}catch(e){n.e(e)}finally{n.f()}var a,r=e.component.scales,i=sr(lU(r));try{for(i.s();!(a=i.n()).done;){var o,s=a.value,u=void 0,d=null,c=sr(e.children);try{for(c.s();!(o=c.n()).done;){var l=o.value.component.scales[s];if(l){u=void 0===u?l.getWithExplicit("domains"):Cq(u,l.getWithExplicit("domains"),"domains","scale",YG);var f=l.get("selectionExtent");d&&f&&d.selection!==f.selection&&jI("The same selection must be used to override scale domains in a layered view."),d=f}}}catch(e){c.e(e)}finally{c.f()}r[s].setWithExplicit("domains",u),d&&r[s].set("selectionExtent",d,!0)}}catch(e){i.e(e)}finally{i.f()}}(e)}function KG(e,t){var n=e.getScaleComponent(t).get("type"),a=e.encoding,r=function(e,t,n,a){if("unaggregated"===e){var r=XG(t,n),i=r.valid,o=r.reason;if(!i)return void jI(o)}else if(void 0===e&&a.useUnaggregatedDomain&&XG(t,n).valid)return"unaggregated";return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]=Object.assign(Object.assign({},e.specifiedScales[t]),{domain:r})),"x"===t&&GH(a.x2)?GH(a.x)?Cq(WG(n,r,e,"x"),WG(n,r,e,"x2"),"domain","scale",YG):WG(n,r,e,"x2"):"y"===t&&GH(a.y2)?GH(a.y)?Cq(WG(n,r,e,"y"),WG(n,r,e,"y2"),"domain","scale",YG):WG(n,r,e,"y2"):WG(n,r,e,t)}function VG(e,t,n){var a,r=null===(a=tQ(n))||void 0===a?void 0:a.unit;return"temporal"===t||r?function(e,t,n){return e.map((function(e){var a=nz(e,{timeUnit:n,type:t});return{signal:"{data: ".concat(a,"}")}}))}(e,t,r):[e]}function WG(e,t,n,a){var r=GH(n.encoding[a]),i=r.type,o=r.timeUnit;if(function(e){return e&&e.unionWith}(t)){var s=WG(e,void 0,n,a),u=VG(t.unionWith,i,o);return xq([].concat(Object(Bh.a)(s.value),Object(Bh.a)(u)))}if(qP(t))return xq([t]);if(t&&"unaggregated"!==t&&!MQ(t))return xq(VG(t,i,o));var d=n.stack;if(d&&a===d.fieldChannel){if("normalize"===d.offset)return _q([[0,1]]);var c=n.requestDataName(nV);return _q([{data:c,field:n.vgField(a,{suffix:"start"})},{data:c,field:n.vgField(a,{suffix:"end"})}])}var l=QP(a)&&xH(r)?function(e,t,n){if(FQ(n)){var a=e.fieldDef(t),r=a.sort;if(fH(r))return{op:"min",field:ZW(a,t),order:"ascending"};var i=e.stack,o=i?[].concat(Object(Bh.a)(i.groupbyField?[i.groupbyField]:[]),Object(Bh.a)(i.stackBy.map((function(e){return e.fieldDef.field})))):void 0;if(lH(r))return qG(r,i&&!aU(o,r.field));if(cH(r)){var s=r.encoding,u=r.order,d=e.fieldDef(s),c=d.aggregate,l=d.field,f=i&&!aU(o,l);if(GU(c)||XU(c))return qG({field:MH(d),order:u},f);if(YU(c)||!c)return qG({op:c,field:l,order:u},f)}else{if("descending"===r)return{op:"min",field:e.vgField(t),order:"descending"};if(aU(["ascending",void 0],r))return!0}}}(n,a,e):void 0;if(EH(r))return _q(VG([r.datum],i,o));var f=r;if("unaggregated"===t){var g=n.requestDataName(nV),h=r.field;return _q([{data:g,field:MH({field:h,aggregate:"min"})},{data:g,field:MH({field:h,aggregate:"max"})}])}if(oz(f.bin)){if(FQ(e))return _q("bin-ordinal"===e?[]:[{data:gU(l)?n.requestDataName(nV):n.requestDataName("raw"),field:n.vgField(a,rz(f,a)?{binSuffix:"range"}:{}),sort:!0!==l&&Object(he.F)(l)?l:{field:n.vgField(a,{}),op:"min"}}]);var p=f.bin;if(oz(p)){var A=aG(n,f.field,p);return _q([new HG((function(){var e=n.getSignalName(A);return"[".concat(e,".start, ").concat(e,".stop]")}))])}return _q([{data:n.requestDataName(nV),field:n.vgField(a,{})}])}if(f.timeUnit&&aU(["time","utc"],e)&&yH(a,f,gX(n)?n.encoding[BP(a)]:void 0,n.stack,n.markDef,n.config)){var v=n.requestDataName(nV);return _q([{data:v,field:n.vgField(a)},{data:v,field:n.vgField(a,{suffix:"end"})}])}return _q(l?[{data:gU(l)?n.requestDataName(nV):n.requestDataName("raw"),field:n.vgField(a),sort:l}]:[{data:n.requestDataName(nV),field:n.vgField(a)}])}function qG(e,t){var n=e.op,a=e.field,r=e.order;return Object.assign(Object.assign({op:null!=n?n:t?"sum":"min"},a?{field:bU(a)}:{}),r?{order:r}:{})}function GG(e,t){var n,a=e.component.scales[t],r=e.specifiedScales[t].domain,i=null===(n=e.fieldDef(t))||void 0===n?void 0:n.bin,o=MQ(r)&&r,s=uz(i)&&dz(i.extent)&&i.extent;(o||s)&&a.set("selectionExtent",null!=o?o:s,!0)}function XG(e,t){var n=e.aggregate,a=e.type;return n?Object(he.H)(n)&&!eP[n]?{valid:!1,reason:CI.unaggregateDomainWithNonSharedDomainOp(n)}:"quantitative"===a&&"log"===t?{valid:!1,reason:CI.unaggregatedDomainWithLogScale(e)}:{valid:!0}:{valid:!1,reason:CI.unaggregateDomainHasNoEffectForRawField(e)}}function YG(e,t,n,a){return e.explicit&&t.explicit&&jI(CI.mergeConflictingDomainProperty(n,a,e.value,t.value)),{explicit:e.explicit,value:[].concat(Object(Bh.a)(e.value),Object(Bh.a)(t.value))}}function JG(e){if(XP(e)&&Object(he.H)(e.field))return e.field;if(function(e){return!Object(he.A)(e)&&"fields"in e&&!("data"in e)}(e)){var t,n,a=sr(e.fields);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(XP(r)&&Object(he.H)(r.field))if(t){if(t!==r.field)return jI("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=r.field}}catch(e){a.e(e)}finally{a.f()}return jI("Detected faceted independent scales that union domain of identical fields from different source detected. We will assume that this is the same field from a different fork of the same data source. However, if this is not case, the result view size maybe incorrect."),t}if(function(e){return!Object(he.A)(e)&&"fields"in e&&"data"in e}(e)){jI("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");var i=e.fields[0];return Object(he.H)(i)?i:void 0}}function $G(e,t){return function(e){var t=sU(e.map((function(e){return XP(e)?(e.sort,T(e,["sort"])):e})),tU),n=sU(e.map((function(e){if(XP(e)){var t=e.sort;return void 0===t||gU(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((function(e){return void 0!==e})),tU);if(0!==t.length){if(1===t.length){var a=e[0];if(XP(a)&&n.length>0){var r=n[0];if(n.length>1)jI(CI.MORE_THAN_ONE_SORT),r=!0;else if(Object(he.F)(r)&&"field"in r){var i=r.field;a.field===i&&(r=!r.order||{order:r.order})}return Object.assign(Object.assign({},a),{sort:r})}return a}var o,s=sU(n.map((function(e){return gU(e)||!("op"in e)||e.op in qU?e:(jI(CI.domainSortDropped(e)),!0)})),tU);1===s.length?o=s[0]:s.length>1&&(jI(CI.MORE_THAN_ONE_SORT),o=!0);var u=sU(e.map((function(e){return XP(e)?e.data:null})),(function(e){return e}));return 1===u.length&&null!==u[0]?Object.assign({data:u[0],fields:t.map((function(e){return e.field}))},o?{sort:o}:{}):Object.assign({fields:t},o?{sort:o}:{})}}(e.component.scales[t].get("domains").map((function(t){return XP(t)&&(t.data=e.lookupDataSource(t.data)),t})))}function ZG(e){return AX(e)||pX(e)?e.children.reduce((function(e,t){return e.concat(ZG(t))}),eX(e)):eX(e)}function eX(e){return lU(e.component.scales).reduce((function(t,n){var a=e.component.scales[n];if(a.merged)return t;var r,i=a.combine(),o=i.name,s=i.type,u=i.selectionExtent,d=(i.domains,i.range,i.reverse),c=T(i,["name","type","selectionExtent","domains","range","reverse"]),l=function(e,t,n){return"x"!==n&&"y"!==n||!GP(e)?e:{step:{signal:t+"_step"}}}(i.range,o,n);u&&(r=function(e,t){var n=t.selection;return{signal:NW(e.getSelectionComponent(n,hU(n)),t)}}(e,u));var f=$G(e,n);return t.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:o,type:s},f?{domain:f}:{}),r?{domainRaw:r}:{}),{range:l}),void 0!==d?{reverse:d}:{}),c)),t}),[])}var tX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,{},{name:e})).merged=!1,r.setWithExplicit("type",a),r}return Object(_.a)(n,[{key:"domainDefinitelyIncludesZero",value:function(){return!1!==this.get("zero")||rU(this.get("domains"),(function(e){return Object(he.A)(e)&&2===e.length&&e[0]<=0&&e[1]>=0}))}}]),n}(wq),nX=["range","scheme"];function aX(e){return"x"===e?"width":"y"===e?"height":void 0}function rX(e,t){var n=e.fieldDef(t);if(n&&n.bin&&oz(n.bin)){var a=aG(e,n.field,n.bin),r=aX(t),i=e.getName(r);return new HG((function(){var t=e.getSignalName(a),n="(".concat(t,".stop - ").concat(t,".start) / ").concat(t,".step");return"".concat(e.getSignalName(i)," / (").concat(n,")")}))}}function iX(e){return function(e){return!Object(he.H)(e)&&!!e.name}(e)?Object.assign({scheme:e.name},ZN(e,["name"])):{scheme:e}}function oX(e,t,n){var a=Jz(e.width)?e.width.step:tK(n,"width"),r=Jz(e.height)?e.height.step:tK(n,"height");return t.x||t.y?new HG((function(){var e=[t.x?t.x.signal:a,t.y?t.y.signal:r];return"min(".concat(e.join(", "),")")})):Math.min(a,r)}function sX(e,t){gX(e)?function(e,t){var n=e.component.scales,a=e.config,r=e.encoding,i=e.markDef,o=e.specifiedScales;lU(n).forEach((function(s){var u=o[s],d=n[s],c=e.getScaleComponent(s),l=GH(r[s]),f=u[t],g=c.get("type"),h=LQ(g,t),p=IQ(s,t);if(void 0!==f&&(h?p&&jI(p):jI(CI.scalePropertyNotWorkWithScaleType(g,t,s))),h&&void 0===p)if(void 0!==f)d.copyKeyFromObject(t,u);else{var A=function(e,t,n,a,r,i,o,s,u,d){var c=d.scale,l=a.type;switch(e){case"bins":return xH(a)?function(e,t){var n=t.bin;if(oz(n)){var a=aG(e,t.field,n);return new HG((function(){return e.getSignalName(a)}))}if(sz(n)&&uz(n)&&void 0!==n.step)return{step:n.step}}(t,a):void 0;case"interpolate":return function(e,t){if(aU([rP,iP,oP],e)&&"nominal"!==t)return"hcl"}(n,l);case"nice":return function(e,t,n){var a;if(!(null===(a=qH(n))||void 0===a?void 0:a.bin)&&!aU([mQ.TIME,mQ.UTC],e))return!!aU([nP,aP],t)||void 0}(r,n,a);case"padding":return function(e,t,n,a,r,i){if(aU([nP,aP],e)){if(DQ(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;var o=r.type,s=r.orient;if("bar"===o&&(!xH(a)||!a.bin&&!a.timeUnit)&&("vertical"===s&&"x"===e||"horizontal"===s&&"y"===e))return i.continuousBandSize}if(t===mQ.POINT)return n.pointPadding}}(n,r,c,a,u,d.bar);case"paddingInner":return function(e,t,n,a){if(void 0===e&&aU([nP,aP],t)){var r=a.bandPaddingInner,i=a.barBandPaddingInner,o=a.rectBandPaddingInner;return EU(r,"bar"===n?i:o)}}(i,n,u.type,c);case"paddingOuter":return function(e,t,n,a,r,i){if(void 0===e)return aU([nP,aP],t)&&n===mQ.BAND?EU(i.bandPaddingOuter,qP(r)?{signal:"".concat(r.signal,"/2")}:r/2):void 0}(i,n,r,u.type,o,c);case"reverse":return function(e,t,n,a){return"x"===n&&void 0!==a.xReverse?jQ(e)&&"descending"===t?qP(a.xReverse)?{signal:"!".concat(a.xReverse.signal)}:!a.xReverse:a.xReverse:!(!jQ(e)||"descending"!==t)||void 0}(r,xH(a)?a.sort:void 0,n,c);case"zero":return function(e,t,n,a,r){if(n&&"unaggregated"!==n&&jQ(r)){if(Object(he.A)(n)){var i=n[0],o=n[n.length-1];if(i<=0&&o>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!TQ(r))return!0;if((!xH(t)||!t.bin)&&aU([nP,aP],e)){var s=a.orient;return!aU(["bar","area","line","trail"],a.type)||!("horizontal"===s&&"y"===e||"vertical"===s&&"x"===e)}return!1}(n,a,s,u,r)}return c[e]}(t,e,s,l,c.get("type"),c.get("padding"),c.get("paddingInner"),u.domain,i,a);void 0!==A&&d.set(t,A,!1)}}))}(e,t):dX(e,t)}function uX(e){gX(e)?function(e){var t=e.component.scales;IP.forEach((function(n){var a=t[n];if(a){var r=function(e,t){var n,a=t.specifiedScales[e],r=t.size,i=t.getScaleComponent(e).get("type"),o=sr(nX);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(void 0!==a[s]){var u=LQ(i,s),d=IQ(e,s);if(u)if(d)jI(d);else switch(s){case"range":return!Object(he.A)(a.range)||"x"!==e&&"y"!==e?xq(a.range):xq(a.range.map((function(e){if("width"===e||"height"===e){var n=t.getName(e),a=t.getSignalName.bind(t);return HG.fromName(a,n)}return e})));case"scheme":return xq(iX(a[s]))}else jI(CI.scalePropertyNotWorkWithScaleType(i,s,e))}}}catch(e){o.e(e)}finally{o.f()}if(e===nP||e===aP){var c=e===nP?"width":"height",l=r[c];if(Jz(l)){if(FQ(i))return xq({step:l.step});jI(CI.stepDropped(c))}}return _q(function(e,t){var n=t.size,a=t.config,r=t.mark,i=t.encoding,o=t.getSignalName.bind(t),s=GH(i[e]).type,u=t.getScaleComponent(e).get("type"),d=t.specifiedScales[e],c=d.domain,l=d.domainMid;switch(e){case nP:case aP:if(aU(["point","band"],u))if(e!==nP||n.width){if(e===aP&&!n.height){var f=nK(a.view,"height");if(Jz(f))return f}}else{var g=nK(a.view,"width");if(Jz(g))return g}var h=aX(e),p=t.getName(h);return e===aP&&jQ(u)?[HG.fromName(o,p),0]:[0,HG.fromName(o,p)];case uP:var A=function e(t,n,a){if(n)return qP(n)?{signal:"".concat(n.signal," ? 0 : ").concat(e(t,!1,a))}:0;switch(t){case"bar":case"tick":return a.scale.minBandSize;case"line":case"trail":case"rule":return a.scale.minStrokeWidth;case"text":return a.scale.minFontSize;case"point":case"square":case"circle":return a.scale.minSize}throw new Error(CI.incompatibleChannel("size",t))}(r,t.component.scales[e].get("zero"),a),v=function(e,t,n,a){var r={x:rX(n,"x"),y:rX(n,"y")};switch(e){case"bar":case"tick":if(void 0!==a.scale.maxBandSize)return a.scale.maxBandSize;var i=oX(t,r,a.view);return Object(he.E)(i)?i-1:new HG((function(){return"".concat(i.signal," - 1")}));case"line":case"trail":case"rule":return a.scale.maxStrokeWidth;case"text":return a.scale.maxFontSize;case"point":case"square":case"circle":if(a.scale.maxSize)return a.scale.maxSize;var o=oX(t,r,a.view);return Object(he.E)(o)?Math.pow(.95*o,2):new HG((function(){return"pow(".concat(.95," * ").concat(o.signal,", 2)")}))}throw new Error(CI.incompatibleChannel("size",e))}(r,n,t,a);return TQ(u)?function(e,t,n){var a=function(){var a=qP(t)?t.signal:t,r=qP(e)?e.signal:e,i="(".concat(a," - ").concat(r,") / (").concat(n," - 1)");return"sequence(".concat(r,", ").concat(a," + ").concat(i,", ").concat(i,")")};return qP(t)?new HG(a):{signal:a()}}(A,v,function(e,t,n,a){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&Object(he.A)(n)?n.length+1:(jI(CI.domainRequiredForThresholdScale(a)),3)}}(u,a,c,e)):[A,v];case"theta":return[0,2*Math.PI];case"angle":return[0,360];case"radius":return[0,new HG((function(){var e=t.getSignalName("width"),n=t.getSignalName("height");return"min(".concat(e,",").concat(n,")/2")}))];case fP:return[a.scale.minStrokeWidth,a.scale.maxStrokeWidth];case gP:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case sP:return"symbol";case rP:case iP:case oP:return"ordinal"===u?"nominal"===s?"category":"ordinal":void 0!==l?"diverging":"rect"===r||"geoshape"===r?"heatmap":"ramp";case dP:case cP:case lP:return[a.scale.minOpacity,a.scale.maxOpacity]}throw new Error("Scale range undefined for channel ".concat(e))}(e,t))}(n,e);a.setWithExplicit("range",r)}}))}(e):dX(e,"range")}function dX(e,t){var n,a=e.component.scales,r=sr(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;"range"===t?uX(i):sX(i,t)}}catch(e){r.e(e)}finally{r.f()}lU(a).forEach((function(n){var r,i,o=sr(e.children);try{for(o.s();!(i=o.n()).done;){var s=i.value.component.scales[n];s&&(r=Cq(r,s.getWithExplicit(t),t,"scale",Eq((function(e,n){switch(t){case"range":return e.step&&n.step?e.step-n.step:0}return 0}))))}}catch(e){o.e(e)}finally{o.f()}a[n].setWithExplicit(t,r)}))}function cX(e){gX(e)?e.component.scales=function(e){var t=e.encoding,n=e.mark;return IP.reduce((function(a,r){var i=GH(t[r]);if(i&&"geoshape"===n&&r===sP&&"geojson"===i.type)return a;var o=i&&i.scale;if(i&&null!==o&&!1!==o){var s=function(e,t,n,a){var r=function(e,t,n){switch(t.type){case"nominal":case"ordinal":return mP(e)||"discrete"===KP(e)?("shape"===e&&"ordinal"===t.type&&jI(CI.discreteChannelCannotEncode(e,"ordinal")),"ordinal"):aU(["x","y"],e)&&aU(["rect","bar","image","rule"],n)?"band":"point";case"temporal":return mP(e)?"time":"discrete"===KP(e)?(jI(CI.discreteChannelCannotEncode(e,"temporal")),"ordinal"):xH(t)&&t.timeUnit&&tQ(t.timeUnit).utc?"utc":"time";case"quantitative":return mP(e)?xH(t)&&oz(t.bin)?"bin-ordinal":"linear":"discrete"===KP(e)?(jI(CI.discreteChannelCannotEncode(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(CI.invalidFieldType(t.type))}(t,n,a),i=e.type;return QP(t)?void 0!==i?HQ(t,i)?xH(n)&&!QQ(i,n.type)?(jI(CI.scaleTypeNotWorkWithFieldDef(i,r)),r):i:(jI(CI.scaleTypeNotWorkWithChannel(t,i,r)),r):r:null}(o=null!=o?o:{},r,i,n);a[r]=new tX(e.scaleName(r+"",!0),{value:s,explicit:o.type===s})}return a}),{})}(e):e.component.scales=function(e){var t,n=e.component.scales={},a={},r=e.component.resolve,i=sr(e.children);try{var o=function(){var n=t.value;cX(n),lU(n.component.scales).forEach((function(t){var i;if(r.scale[t]=null!==(i=r.scale[t])&&void 0!==i?i:function(e,t){if(AX(t)||hX(t))return"shared";if(pX(t))return aU(DP,e)?"independent":"shared";throw new Error("invalid model type for resolve")}(t,e),"shared"===r.scale[t]){var o=a[t],s=n.component.scales[t].getWithExplicit("type");o?function(e,t){var n=RQ[e],a=RQ[t];return n===a||"ordinal-position"===n&&"time"===a||"ordinal-position"===a&&"time"===n}(o.value,s.value)?a[t]=Cq(o,s,"type","scale",lX):(r.scale[t]="independent",delete a[t]):a[t]=s}}))};for(i.s();!(t=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}var s,u=sr(lU(a));try{for(u.s();!(s=u.n()).done;){var d=s.value,c=e.scaleName(d,!0),l=a[d];n[d]=new tX(c,l);var f,g=sr(e.children);try{for(g.s();!(f=g.n()).done;){var h=f.value,p=h.component.scales[d];p&&(h.renameScale(p.get("name"),c),p.merged=!0)}}catch(e){g.e(e)}finally{g.f()}}}catch(e){u.e(e)}finally{u.f()}return n}(e)}var lX=Eq((function(e,t){return xQ(e)-xQ(t)})),fX=function(){function e(){Object(x.a)(this,e),this.nameMap={}}return Object(_.a)(e,[{key:"rename",value:function(e,t){this.nameMap[e]=t}},{key:"has",value:function(e){return void 0!==this.nameMap[e]}},{key:"get",value:function(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}]),e}();function gX(e){return"unit"===(null==e?void 0:e.type)}function hX(e){return"facet"===(null==e?void 0:e.type)}function pX(e){return"concat"===(null==e?void 0:e.type)}function AX(e){return"layer"===(null==e?void 0:e.type)}var vX=function(){function e(t,n,a,r,i,o,s){var u,d,c=this;Object(x.a)(this,e),this.type=n,this.parent=a,this.config=i,this.view=s,this.children=[],this.correctDataNames=function(e){return e.from&&e.from.data&&(e.from.data=c.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=c.lookupDataSource(e.from.facet.data)),e},this.parent=a,this.config=i,this.name=null!==(u=t.name)&&void 0!==u?u:r,this.title=WP(t.title)?{text:t.title}:t.title,this.scaleNameMap=a?a.scaleNameMap:new fX,this.projectionNameMap=a?a.projectionNameMap:new fX,this.signalNameMap=a?a.signalNameMap:new fX,this.data=t.data,this.description=t.description,this.transforms=function(e){return e.map((function(e){return aV(e)?{filter:XN(e.filter,vQ)}:e}))}(null!==(d=t.transform)&&void 0!==d?d:[]),this.layout="layer"===n||"unit"===n?{}:function(e,t,n){var a,r,i=n[t],o={},s=i.spacing,u=i.columns;void 0!==s&&(o.spacing=s),void 0!==u&&(pH(e)&&!gH(e.facet)||Gz(e))&&(o.columns=u),Xz(e)&&(o.columns=1);var d,c=sr(Zz);try{for(c.s();!(d=c.n()).done;){var l=d.value;if(void 0!==e[l])if("spacing"===l){var f=e[l];o[l]=Object(he.E)(f)?f:{row:null!==(a=f.row)&&void 0!==a?a:s,column:null!==(r=f.column)&&void 0!==r?r:s}}else o[l]=e[l]}}catch(e){c.e(e)}finally{c.f()}return o}(t,n,i),this.component={data:{sources:a?a.component.data.sources:[],outputNodes:a?a.component.data.outputNodes:{},outputNodeRefCounts:a?a.component.data.outputNodeRefCounts:{},isFaceted:pH(t)||a&&a.component.data.isFaceted&&void 0===t.data},layoutSize:new wq,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?JN(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}return Object(_.a)(e,[{key:"parse",value:function(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}},{key:"parseScale",value:function(){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ignoreRange;cX(e),zG(e);var a,r=sr(PQ);try{for(r.s();!(a=r.n()).done;){var i=a.value;sX(e,i)}}catch(e){r.e(e)}finally{r.f()}n||uX(e)}(this)}},{key:"parseProjection",value:function(){!function e(t){t.component.projection=gX(t)?function(e){var t;if(e.hasProjection){var n=e.specifiedProjection,a=!(n&&(null!=n.scale||null!=n.translate)),r=a?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,i=a?function(e){for(var t=[],n=e.encoding,a=0,r=[["longitude","latitude"],["longitude2","latitude2"]];a0&&(n[a]=Object.assign(Object.assign(Object.assign({},(null==l?void 0:l.length)&&xH(s)?{name:"".concat(hU(s.field),"_legend_").concat(a)}:{}),(null==l?void 0:l.length)?{interactive:!!l}:{}),{update:u})),n}),{});return lU(f).length>0&&r.set("encode",f,!!(null==a?void 0:a.encoding)),r}(e,a)),n}),{})}(t):t.component.legends=function(t){var n,a=t.component,r=a.legends,i=a.resolve,o=sr(t.children);try{var s=function(){var a=n.value;e(a),lU(a.component.legends).forEach((function(e){i.legend[e]=bq(t.component.resolve,e),"shared"===i.legend[e]&&(r[e]=Wq(r[e],a.component.legends[e]),r[e]||(i.legend[e]="independent",delete r[e]))}))};for(o.s();!(n=o.n()).done;)s()}catch(t){o.e(t)}finally{o.f()}return lU(r).forEach((function(e){var n,a=sr(t.children);try{for(a.s();!(n=a.n()).done;){var r=n.value;r.component.legends[e]&&"shared"===i.legend[e]&&delete r.component.legends[e]}}catch(t){a.e(t)}finally{a.f()}})),r}(t)}(this)}},{key:"assembleGroupStyle",value:function(){var e,t;if("unit"===this.type||"layer"===this.type)return null!==(t=null===(e=this.view)||void 0===e?void 0:e.style)&&void 0!==t?t:"cell"}},{key:"assembleEncodeFromView",value:function(e){e.style;var t,n=T(e,["style"]),a={},r=sr(lU(n));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=n[i];void 0!==o&&(a[i]=$P(o))}}catch(e){r.e(e)}finally{r.f()}return a}},{key:"assembleGroupEncodeEntry",value:function(e){var t=void 0;return this.view&&(t=this.assembleEncodeFromView(this.view)),e||"unit"!==this.type&&"layer"!==this.type?t:Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},null!=t?t:{})}},{key:"assembleLayout",value:function(){if(this.layout){var e=this.layout,t=e.spacing,n=T(e,["spacing"]),a=this.component,r=this.config,i=function(e,t){var n,a={},r=sr(RP);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e[i];if(null==o?void 0:o.facetFieldDef){var s=nq(["titleAnchor","titleOrient"],o.facetFieldDef,t,i),u=s.titleAnchor,d=eq(i,s.titleOrient),c=gq(u,d);void 0!==c&&(a[d]=c)}}}catch(e){r.e(e)}finally{r.f()}return lU(a).length>0?a:void 0}(a.layoutHeaders,r);return Object.assign(Object.assign(Object.assign({padding:t},this.assembleDefaultLayout()),n),i?{titleBand:i}:{})}}},{key:"assembleDefaultLayout",value:function(){return{}}},{key:"assembleHeaderMarks",value:function(){var e,t=this.component.layoutHeaders,n=[],a=sr(RP);try{for(a.s();!(e=a.n()).done;){var r=e.value;t[r].title&&n.push(iq(this,r))}}catch(e){a.e(e)}finally{a.f()}var i,o=sr(aq);try{for(o.s();!(i=o.n()).done;){var s=i.value;n=n.concat(uq(this,s))}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"assembleAxes",value:function(){return function(e,t){var n=e.x,a=void 0===n?[]:n,r=e.y,i=void 0===r?[]:r;return[].concat(Object(Bh.a)(a.map((function(e){return QW(e,"grid",t)}))),Object(Bh.a)(i.map((function(e){return QW(e,"grid",t)}))),Object(Bh.a)(a.map((function(e){return QW(e,"main",t)}))),Object(Bh.a)(i.map((function(e){return QW(e,"main",t)})))).filter((function(e){return e}))}(this.component.axes,this.config)}},{key:"assembleLegends",value:function(){return Gq(this)}},{key:"assembleProjections",value:function(){return function(e){return AX(e)||pX(e)?function(e){return e.children.reduce((function(e,t){return e.concat(t.assembleProjections())}),Yq(e))}(e):Yq(e)}(this)}},{key:"assembleTitle",value:function(){var e,t,n,a=null!==(e=this.title)&&void 0!==e?e:{},r=a.encoding,i=T(a,["encoding"]),o=Object.assign(Object.assign(Object.assign({},VP(this.config.title).nonMark),i),r?{encode:{update:r}}:{});if(o.text)return aU(["unit","layer"],this.type)?aU(["middle",void 0],o.anchor)&&(o.frame=null!==(t=o.frame)&&void 0!==t?t:"group"):o.anchor=null!==(n=o.anchor)&&void 0!==n?n:"start",lU(o).length>0?o:void 0}},{key:"assembleGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);var n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());var a=!this.parent||hX(this.parent)?ZG(this):[];a.length>0&&(t.scales=a);var r=this.assembleAxes();r.length>0&&(t.axes=r);var i=this.assembleLegends();return i.length>0&&(t.legends=i),t}},{key:"getName",value:function(e){return hU((this.name?this.name+"_":"")+e)}},{key:"requestDataName",value:function(e){var t,n=this.getName(e),a=this.component.data.outputNodeRefCounts;return a[n]=(null!==(t=a[n])&&void 0!==t?t:0)+1,n}},{key:"getSizeSignalRef",value:function(e){if(hX(this.parent)){var t=NP(yq(e)),n=this.component.scales[t];if(n&&!n.merged){var a=n.get("type"),r=n.get("range");if(FQ(a)&&GP(r)){var i=n.get("name"),o=JG($G(this,t));return o?{signal:mq(i,n,MH({aggregate:"distinct",field:o},{expr:"datum"}))}:(jI("Unknown field for ".concat(t,". Cannot calculate view size.")),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}},{key:"lookupDataSource",value:function(e){var t=this.component.data.outputNodes[e];return t?t.getSource():e}},{key:"getSignalName",value:function(e){return this.signalNameMap.get(e)}},{key:"renameSignal",value:function(e,t){this.signalNameMap.rename(e,t)}},{key:"renameScale",value:function(e,t){this.scaleNameMap.rename(e,t)}},{key:"renameProjection",value:function(e,t){this.projectionNameMap.rename(e,t)}},{key:"scaleName",value:function(e,t){return t?this.getName(e):EP(e)&&QP(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}},{key:"projectionName",value:function(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}},{key:"getScaleComponent",value:function(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");var t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}},{key:"getSelectionComponent",value:function(e,t){var n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(CI.selectionNotFound(t));return n}},{key:"width",get:function(){return this.getSizeSignalRef("width")}},{key:"height",get:function(){return this.getSizeSignalRef("height")}}]),e}(),mX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"vgField",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.fieldDef(e);if(n)return MH(n,t)}},{key:"reduceFieldDef",value:function(e,t){return vz(this.getMapping(),(function(t,n,a){var r=qH(n);return r?e(t,r,a):t}),t)}},{key:"forEachFieldDef",value:function(e,t){Az(this.getMapping(),(function(t,n){var a=qH(t);a&&e(a,n)}),t)}}]),n}(vX),yX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r,i,o,s;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var u=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=u[0])&&void 0!==o?o:"value",null!==(s=u[1])&&void 0!==s?s:"density"],r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.density].concat(Object(Bh.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"DensityTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.density,n=T(e,["density"]);return Object.assign({type:"kde",field:t},n)}}]),n}($V),RX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).filter=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,Object.assign({},this.filter))}},{key:"dependentFields",value:function(){return new Set(lU(this.filter))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"FilterInvalid ".concat(tU(this.filter))}},{key:"assemble",value:function(){var e=this,t=lU(this.filter).reduce((function(t,n){var a=e.filter[n],r=MH(a,{expr:"datum"});return null!==a&&("temporal"===a.type?t.push("(isDate(".concat(r,") || (isValid(").concat(r,") && isFinite(+").concat(r,")))")):"quantitative"===a.type&&(t.push("isValid(".concat(r,")")),t.push("isFinite(+".concat(r,")")))),t}),[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}],[{key:"make",value:function(e,t){var a=t.config,r=t.mark;if("filter"!==eL("invalid",t.markDef,a))return null;var i=t.reduceFieldDef((function(e,n,a){var i=QP(a)&&t.getScaleComponent(a);return i&&jQ(i.get("type"))&&"count"!==n.aggregate&&!UU(r)&&(e[n.field]=n),e}),{});return lU(i).length?new n(e,i):null}}]),n}($V),bX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var i=r.transform,o=i.flatten,s=i.as,u=void 0===s?[]:s;return r.transform.as=o.map((function(e,t){var n;return null!==(n=u[t])&&void 0!==n?n:e})),r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(this.parent,JN(this.transform))}},{key:"dependentFields",value:function(){return new Set(this.transform.flatten)}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"FlattenTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform;return{type:"flatten",fields:e.flatten,as:e.as}}}]),n}($V),wX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r,i,o,s;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var u=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=u[0])&&void 0!==o?o:"key",null!==(s=u[1])&&void 0!==s?s:"value"],r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){return new Set(this.transform.fold)}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"FoldTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform;return{type:"fold",fields:e.fold,as:e.as}}}]),n}($V),xX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r,i){var o;return Object(x.a)(this,n),(o=t.call(this,e)).fields=a,o.geojson=r,o.signal=i,o}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.fields),this.geojson,this.signal)}},{key:"dependentFields",value:function(){var e,t=(null!==(e=this.fields)&&void 0!==e?e:[]).filter(he.H);return new Set([].concat(Object(Bh.a)(this.geojson?[this.geojson]:[]),Object(Bh.a)(t)))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"GeoJSON ".concat(this.geojson," ").concat(this.signal," ").concat(tU(this.fields))}},{key:"assemble",value:function(){return Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})}}],[{key:"parseAll",value:function(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;for(var a=0,r=0,i=[["longitude","latitude"],["longitude2","latitude2"]];r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(x.a)(this,n),(e=t.call(this,a,r)).explicit=a,e.implicit=r,e.parseNothing=i,e}return Object(_.a)(n,[{key:"clone",value:function(){var e=Object(yK.a)(Object(mK.a)(n.prototype),"clone",this).call(this);return e.parseNothing=this.parseNothing,e}}]),n}(wq),CX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r,i,o,s;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var u=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=u[0])&&void 0!==o?o:a.on,null!==(s=u[1])&&void 0!==s?s:a.loess],r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.loess,this.transform.on].concat(Object(Bh.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"LoessTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.loess,n=e.on,a=T(e,["loess","on"]);return Object.assign({type:"loess",x:n,y:t},a)}}]),n}($V),OX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r){var i;return Object(x.a)(this,n),(i=t.call(this,e)).transform=a,i.secondary=r,i}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform),this.secondary)}},{key:"dependentFields",value:function(){return new Set([this.transform.lookup])}},{key:"producedFields",value:function(){return new Set(this.transform.as?Object(he.i)(this.transform.as):this.transform.from.fields)}},{key:"hash",value:function(){return"Lookup ".concat(tU({transform:this.transform,secondary:this.secondary}))}},{key:"assemble",value:function(){var e;if(this.transform.from.fields)e=Object.assign({values:this.transform.from.fields},this.transform.as?{as:Object(he.i)(this.transform.as)}:{});else{var t=this.transform.as;Object(he.H)(t)||(jI(CI.NO_FIELDS_NEEDS_AS),t="_lookup"),e={as:[t]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e),this.transform.default?{default:this.transform.default}:{})}}],[{key:"make",value:function(e,t,a,r){var i=t.component.data.sources,o=a.from,s=null;if(function(e){return void 0!==e.data}(o)){var u=zX(o.data,i);u||(u=new oG(o.data),i.push(u));var d=t.getName("lookup_".concat(r));s=new ZV(u,d,"lookup",t.component.data.outputNodeRefCounts),t.component.data.outputNodes[d]=s}else if(function(e){return void 0!==e.selection}(o)){var c=o.selection;if(a=Object.assign({as:c},a),!(s=t.getSelectionComponent(hU(c),c).materialized))throw new Error(CI.noSameUnitLookup(c))}return new n(e,a,s.getSource())}}]),n}($V),BX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r,i,o,s;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var u=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=u[0])&&void 0!==o?o:"prob",null!==(s=u[1])&&void 0!==s?s:"value"],r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.quantile].concat(Object(Bh.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"QuantileTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.quantile,n=T(e,["quantile"]);return Object.assign({type:"quantile",field:t},n)}}]),n}($V),SX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r,i,o,s;Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r.transform=JN(a);var u=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=u[0])&&void 0!==o?o:a.on,null!==(s=u[1])&&void 0!==s?s:a.regression],r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.regression,this.transform.on].concat(Object(Bh.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"RegressionTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.regression,n=e.on,a=T(e,["regression","on"]);return Object.assign({type:"regression",x:n,y:t},a)}}]),n}($V),FX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"addDimensions",value:function(e){var t;this.transform.groupby=sU((null!==(t=this.transform.groupby)&&void 0!==t?t:[]).concat(e),(function(e){return e}))}},{key:"producedFields",value:function(){}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.pivot,this.transform.value].concat(Object(Bh.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"hash",value:function(){return"PivotTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.pivot,n=e.value,a=e.groupby,r=e.limit,i=e.op;return Object.assign(Object.assign(Object.assign({type:"pivot",field:t,value:n},void 0!==r?{limit:r}:{}),void 0!==i?{op:i}:{}),void 0!==a?{groupby:a}:{})}}]),n}($V),jX=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a){var r;return Object(x.a)(this,n),(r=t.call(this,e)).transform=a,r}return Object(_.a)(n,[{key:"clone",value:function(){return new n(null,JN(this.transform))}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"SampleTransform ".concat(tU(this.transform))}},{key:"assemble",value:function(){return{type:"sample",size:this.transform.sample}}}]),n}($V);function DX(e){var t=0;return function n(a,r){var i,o,s,u;if(a instanceof oG&&(a.isGenerator||XK(a.data)||(e.push(r),r={name:null,source:r.name,transform:[]})),a instanceof yG&&(a.parent instanceof oG&&!r.source?(r.format=Object.assign(Object.assign({},null!==(i=r.format)&&void 0!==i?i:{}),{parse:a.assembleFormatParse()}),(o=r.transform).push.apply(o,Object(Bh.a)(a.assembleTransforms(!0)))):(s=r.transform).push.apply(s,Object(Bh.a)(a.assembleTransforms()))),a instanceof pG)return r.name||(r.name="data_".concat(t++)),!r.source||r.transform.length>0?(e.push(r),a.data=r.name):a.data=r.source,void a.assemble().forEach((function(t){return e.push(t)}));switch((a instanceof uG||a instanceof dG||a instanceof RX||a instanceof TW||a instanceof $W||a instanceof _X||a instanceof xX||a instanceof hG||a instanceof OX||a instanceof wG||a instanceof RG||a instanceof wX||a instanceof bX||a instanceof yX||a instanceof CX||a instanceof BX||a instanceof SX||a instanceof xG||a instanceof jX||a instanceof FX)&&r.transform.push(a.assemble()),(a instanceof iG||a instanceof eW||a instanceof EX||a instanceof bG)&&(u=r.transform).push.apply(u,Object(Bh.a)(a.assemble())),a instanceof ZV&&(r.source&&0===r.transform.length?a.setSource(r.source):a.parent instanceof ZV?a.setSource(r.name):(r.name||(r.name="data_".concat(t++)),a.setSource(r.name),1===a.numChildren()&&(e.push(r),r={name:null,source:r.name,transform:[]}))),a.numChildren()){case 0:a instanceof ZV&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(a.children[0],r);break;default:r.name||(r.name="data_".concat(t++));var d=r.name;!r.source||r.transform.length>0?e.push(r):d=r.source,a.children.forEach((function(e){n(e,{name:null,source:d,transform:[]})}))}}}function TX(e,t){var n,a,r=[],i=DX(r),o=0;e.sources.forEach((function(e){e.hasName()||(e.dataName="source_".concat(o++));var t=e.assemble();i(e,t)})),r.forEach((function(e){0===e.transform.length&&delete e.transform}));var s,u=0,d=sr(r.entries());try{for(d.s();!(s=d.n()).done;){var c=Object(ei.a)(s.value,2),l=c[0],f=c[1];0!==(null!==(n=f.transform)&&void 0!==n?n:[]).length||f.source||r.splice(u++,0,r.splice(l,1)[0])}}catch(e){d.e(e)}finally{d.f()}for(var g=0,h=r;g0?{aggregate:Object.assign(Object.assign({},w?{cross:w}:{}),u.length?{fields:u,ops:d,as:c}:{})}:{})}},{key:"facetSortFields",value:function(e){var t=this.facet[e];return t?lH(t.sort)?[QX(t,t.sort,{expr:"datum"})]:Object(he.A)(t.sort)?[ZW(t,e,{expr:"datum"})]:[MH(t,{expr:"datum"})]:[]}},{key:"facetSortOrder",value:function(e){var t=this.facet[e];if(t){var n=t.sort;return[(lH(n)?n.order:!Object(he.A)(n)&&n)||"ascending"]}return[]}},{key:"assembleLabelTitle",value:function(){var e=this.facet,t=this.config;if(e.facet)return cq(e.facet,"facet",t);var n,a={row:["top","bottom"],column:["left","right"]},r=sr(aq);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e[i]){var o=tq("labelOrient",e[i],t,i);if(aU(a[i],o))return cq(e[i],i,t)}}}catch(e){r.e(e)}finally{r.f()}}},{key:"assembleMarks",value:function(){var e=this,t=this.child,n=function(e){var t=[],n=DX(t);return e.children.forEach((function(t){return n(t,{source:e.name,name:null,transform:[]})})),t}(this.component.data.facetRoot),a=t.assembleGroupEncodeEntry(!1),r=this.assembleLabelTitle()||t.assembleTitle(),i=t.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},r?{title:r}:{}),i?{style:i}:{}),{from:{facet:this.assembleFacet()},sort:{field:RP.map((function(t){return e.facetSortFields(t)})).flat(),order:RP.map((function(t){return e.facetSortOrder(t)})).flat()}}),n.length>0?{data:n}:{}),a?{encode:{update:a}}:{}),t.assembleGroup(function(e,t){if(e.component.selection&&lU(e.component.selection).length){var n=Object(he.Z)(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:gT("mousemove","scope"),update:"isTuple(facet) ? facet : group(".concat(n,").datum")}]})}return mW(t)}(this,[])))]}},{key:"getMapping",value:function(){return this.facet}}]),n}(mX);function zX(e,t){var n,a,r,i,o,s,u,d,c,l,f,g=sr(t);try{for(g.s();!(f=g.n()).done;){var h=f.value,p=h.data;if((!e.name||!h.hasName()||e.name===h.dataName)&&!((null===(n=e.format)||void 0===n?void 0:n.mesh)&&(null===(a=p.format)||void 0===a?void 0:a.feature)||((null===(r=e.format)||void 0===r?void 0:r.feature)||(null===(i=p.format)||void 0===i?void 0:i.feature))&&(null===(o=e.format)||void 0===o?void 0:o.feature)!==(null===(s=p.format)||void 0===s?void 0:s.feature)||((null===(u=e.format)||void 0===u?void 0:u.mesh)||(null===(d=p.format)||void 0===d?void 0:d.mesh))&&(null===(c=e.format)||void 0===c?void 0:c.mesh)!==(null===(l=p.format)||void 0===l?void 0:l.mesh)))if(YK(e)&&YK(p)){if(YN(e.values,p.values))return h}else if(XK(e)&&XK(p)){if(e.url===p.url)return h}else if(JK(e)&&e.name===h.dataName)return h}}catch(e){g.e(e)}finally{g.f()}return null}function KX(e){var t,n,a,r,i,o,s,u,d,c,l=function(e,t){if(e.data||!e.parent){if(null===e.data){var n=new oG([]);return t.push(n),n}var a=zX(e.data,t);if(a)return $K(e.data)||(a.data.format=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&(l=function(e,t,n){var a,r,i,o=0,s=sr(t.transforms);try{for(s.s();!(i=s.n()).done;){var u=i.value,d=void 0,c=void 0;if(hV(u))c=e=new $W(e,u),d="derived";else if(aV(u)){var l=mG(u);c=e=null!==(a=yG.makeWithAncestors(e,{},l,n))&&void 0!==a?a:e,e=new TW(e,t,u.filter)}else if(pV(u))c=e=iG.makeFromTransform(e,u,t),d="number";else if(vV(u))d="date",void 0===n.getWithExplicit(u.field).value&&(e=new yG(e,Object(To.a)({},u.field,d)),n.set(u.field,d,!1)),c=e=eW.makeFromTransform(e,u);else if(mV(u))c=e=hG.makeFromTransform(e,u),d="number",jW(t)&&(e=new xG(e));else if(rV(u))c=e=OX.make(e,t,u,o++),d="derived";else if(lV(u))c=e=new wG(e,u),d="number";else if(fV(u))c=e=new RG(e,u),d="number";else if(yV(u))c=e=bG.makeFromTransform(e,u),d="derived";else if(RV(u))c=e=new wX(e,u),d="derived";else if(gV(u))c=e=new bX(e,u),d="derived";else if(iV(u))c=e=new FX(e,u),d="derived";else if(cV(u))e=new jX(e,u);else if(AV(u))c=e=EX.makeFromTransform(e,u),d="derived";else if(oV(u))c=e=new yX(e,u),d="derived";else if(sV(u))c=e=new BX(e,u),d="derived";else if(uV(u))c=e=new SX(e,u),d="derived";else{if(!dV(u)){jI(CI.invalidTransformIgnored(u));continue}c=e=new CX(e,u),d="derived"}if(c&&void 0!==d){var f,g=sr(null!==(r=c.producedFields())&&void 0!==r?r:[]);try{for(g.s();!(f=g.n()).done;){var h=f.value;n.set(h,d,!1)}}catch(e){g.e(e)}finally{g.f()}}}}catch(e){s.e(e)}finally{s.f()}return e}(l,e,p));var m=function(e){var t={};if(gX(e)&&e.component.selection){var n,a=sr(lU(e.component.selection));try{for(a.s();!(n=a.n()).done;){var r,i=n.value,o=sr(e.component.selection[i].project.items);try{for(o.s();!(r=o.n()).done;){var s=r.value;!s.channel&&_U(s.field)>1&&(t[s.field]="flatten")}}catch(e){o.e(e)}finally{o.f()}}}catch(e){a.e(e)}finally{a.f()}}return t}(e),y=function(e){var t={};function n(e){ez(e)?t[e.field]="date":"quantitative"===e.type&&function(e){return Object(he.H)(e)&&aU(["min","max"],e)}(e.aggregate)?t[e.field]="number":_U(e.field)>1?e.field in t||(t[e.field]="flatten"):FH(e)&&lH(e.sort)&&_U(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((gX(e)||hX(e))&&e.forEachFieldDef((function(t,a){if(BH(t))n(t);else{var r=OP(a),i=e.fieldDef(r);n(Object.assign(Object.assign({},t),{type:i.type}))}})),gX(e)){var a=e.mark,r=e.markDef,i=e.encoding;if(UU(a)&&!e.encoding.order){var o=i["horizontal"===r.orient?"y":"x"];xH(o)&&"quantitative"===o.type&&!(o.field in t)&&(t[o.field]="number")}}return t}(e);l=null!==(r=yG.makeWithAncestors(l,{},Object.assign(Object.assign({},m),y),p))&&void 0!==r?r:l,gX(e)&&(l=xX.parseAll(l,e),l=_X.parseAll(l,e)),(gX(e)||hX(e))&&(v||(l=null!==(i=iG.makeFromEncoding(l,e))&&void 0!==i?i:l),l=null!==(o=eW.makeFromEncoding(l,e))&&void 0!==o?o:l,l=$W.parseAllForSortIndex(l,e));var R=e.getName("raw"),b=new ZV(l,R,"raw",h);if(g[R]=b,l=b,gX(e)){var w=hG.makeFromEncoding(l,e);w&&(l=w,jW(e)&&(l=new xG(l))),l=null!==(s=EX.makeFromEncoding(l,e))&&void 0!==s?s:l,l=null!==(u=bG.makeFromEncoding(l,e))&&void 0!==u?u:l}gX(e)&&(l=null!==(d=RX.make(l,e))&&void 0!==d?d:l);var x=e.getName(nV),_=new ZV(l,x,nV,h);g[x]=_,l=_,gX(e)&&function(e,t){BW(e,(function(n){var a=n.name,r=e.getName("lookup_".concat(a));e.component.data.outputNodes[r]=n.materialized=new ZV(new TW(t,e,{selection:a}),r,"lookup",e.component.data.outputNodeRefCounts)}))}(e,_);var E=null;if(hX(e)){var k=e.getName("facet");l=null!==(c=function(e,t){var n=t.row,a=t.column;if(n&&a){for(var r=null,i=0,o=[n,a];i0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(x.a)(this,n),(e=t.call(this)).explicit=a,e.implicit=r,e.mainExtracted=i,e}return Object(_.a)(n,[{key:"clone",value:function(){return new n(JN(this.explicit),JN(this.implicit),this.mainExtracted)}},{key:"hasAxisPart",value:function(e){return"axis"===e||("grid"===e||"title"===e?!!this.get(e):!function(e){return!1===e||null===e}(this.get(e)))}}]),n}(wq),XX={bottom:"top",top:"bottom",left:"right",right:"left"};function YX(e,t){if(!e)return t.map((function(e){return e.clone()}));if(e.length===t.length){for(var n=e.length,a=0;a0&&(n[a]={update:s}),n}),{});return lU(m).length>0&&i.set("encode",m,!!(null==r?void 0:r.encoding)||void 0!==(null==r?void 0:r.labelAngle)),i}function nY(e,t,n,a,r,i){var o;if("disable"===t)return void 0!==n&&!n;n=n||{};var s=r.mark,u=r.config;switch(t){case"scale":return r.scaleName(a);case"gridScale":return function(e,t){var n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}(r,a);case"format":if(ez(e)||tz(e))return;return rH(e.type,n.format,u);case"formatType":if(ez(e)||tz(e))return;return n.formatType;case"grid":if(sz(null===(o=r.fieldDef(a))||void 0===o?void 0:o.bin))return!1;var d=r.getScaleComponent(a).get("type");return EU(n.grid,function(e,t){return!FQ(e)&&!oz(null==t?void 0:t.bin)}(d,r.typedFieldDef(a)));case"labelAlign":var c=EU(n.orient,JW(a)),l=GW(r,n,a,e,i);return EU(n.labelAlign,YW(l,c));case"labelAngle":return GW(r,n,a,e,i);case"labelBaseline":var f=EU(n.orient,JW(a)),g=GW(r,n,a,e,i);return EU(n.labelBaseline,XW(g,f));case"labelFlush":return EU(n.labelFlush,function(e,t){if("x"===t&&aU(["quantitative","temporal"],e))return!0}(e.type,a));case"labelOverlap":var h=r.getScaleComponent(a).get("type");return EU(n.labelOverlap,function(e,t){if("nominal"!==e)return"log"!==t||"greedy"}(e.type,h));case"orient":return EU(n.orient,JW(a));case"tickCount":var p=r.getScaleComponent(a).get("type"),A="x"===a?"width":"y"===a?"height":void 0,v=A?r.getSizeSignalRef(A):void 0;return EU(n.tickCount,function(e){var t,n=e.fieldOrDatumDef,a=e.scaleType,r=e.size;if(!e.values&&!FQ(a)&&"log"!==a){if(xH(n)){if(oz(n.bin))return{signal:"ceil(".concat(r.signal,"/10)")};if(n.timeUnit&&aU(["month","hours","day","quarter"],null===(t=tQ(n.timeUnit))||void 0===t?void 0:t.unit))return}return{signal:"ceil(".concat(r.signal,"/40)")}}}({fieldOrDatumDef:e,scaleType:p,size:v,values:n.values}));case"title":var m=r.typedFieldDef(a),y="x"===a?"x2":"y2",R=r.fieldDef(y);return EU(n.title,$X(r,a),iL(m?[AH(m)]:[],xH(R)?[AH(R)]:[]));case"values":return function(e,t){var n=e.values;return Object(he.A)(n)?az(t,n):qP(n)?n:void 0}(n,e);case"zindex":return EU(n.zindex,function(e,t){return"rect"===e&&NH(t)?1:0}(s,e))}return NU(t)?n[t]:void 0}function aY(e){var t,n=e.encoding,a=e.size,r=sr(DP);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=MP(i);Jz(a[o])&&kH(n[i])&&(delete a[o],jI(CI.stepDropped(o)))}}catch(e){r.e(e)}finally{r.f()}return a}function rY(e,t,n,a){var r,i,o,s=a.graticule,u=IU(e)?Object.assign({},e):{type:e},d=null!==(r=u.orient)&&void 0!==r?r:tL("orient",u,n);if(u.orient=function(e,t,n){switch(e){case"point":case"circle":case"square":case"text":case"rect":case"image":return}var a=t.x,r=t.y,i=t.x2,o=t.y2;switch(e){case"bar":if(xH(a)&&(sz(a.bin)||xH(r)&&r.aggregate&&!a.aggregate))return"vertical";if(xH(r)&&(sz(r.bin)||xH(a)&&a.aggregate&&!r.aggregate))return"horizontal";if(o||i){if(n)return n;if(!i&&(xH(a)&&"quantitative"===a.type&&!oz(a.bin)||CH(a)))return"horizontal";if(!o&&(xH(r)&&"quantitative"===r.type&&!oz(r.bin)||CH(r)))return"vertical"}case"rule":if(i&&(!xH(a)||!sz(a.bin))&&o&&(!xH(r)||!sz(r.bin)))return;case"area":if(o)return xH(r)&&sz(r.bin)?"horizontal":"vertical";if(i)return xH(a)&&sz(a.bin)?"vertical":"horizontal";if("rule"===e){if(a&&!r)return"vertical";if(r&&!a)return"horizontal"}case"line":case"tick":var s=kH(a),u=kH(r);if(s&&!u)return"tick"!==e?"horizontal":"vertical";if(!s&&u)return"tick"!==e?"vertical":"horizontal";if(s&&u){var d=a,c=r,l="temporal"===d.type,f="temporal"===c.type;return l&&!f?"tick"!==e?"vertical":"horizontal":!l&&f?"tick"!==e?"horizontal":"vertical":!d.aggregate&&c.aggregate?"tick"!==e?"vertical":"horizontal":d.aggregate&&!c.aggregate?"tick"!==e?"horizontal":"vertical":n||"vertical"}return n||void 0}return"vertical"}(u.type,t,d),void 0!==d&&d!==u.orient&&jI(CI.orientOverridden(u.orient,d)),"bar"===u.type&&u.orient){var c=null!==(i=u.cornerRadiusEnd)&&void 0!==i?i:tL("cornerRadiusEnd",u,n);if(void 0!==c){var l,f=sr("horizontal"===u.orient&&t.x2||"vertical"===u.orient&&t.y2?["cornerRadius"]:zU[u.orient]);try{for(f.s();!(l=f.n()).done;)u[l.value]=c}catch(e){f.e(e)}finally{f.f()}void 0!==u.cornerRadiusEnd&&delete u.cornerRadiusEnd}}return void 0===EU(u.opacity,tL("opacity",u,n))&&(u.opacity=function(e,t){if(aU(["point","tick","circle","square"],e)&&!fz(t))return.7}(u.type,t)),void 0===u.filled&&(u.filled=!s&&function(e,t){var n=tL("filled",e,t),a=e.type;return EU(n,"point"!==a&&"line"!==a&&"rule"!==a)}(u,n)),void 0===(null!==(o=u.cursor)&&void 0!==o?o:tL("cursor",u,n))&&(u.cursor=function(e,t,n){return t.href||e.href||tL("href",e,n)?"pointer":e.cursor}(u,t,n)),u}function iY(e){return{signal:"min(".concat(e.width.signal,",").concat(e.height.signal,")/2")}}function oY(e,t){return e.config,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore"})),BV("x",e,{defaultPos:"mid"})),BV("y",e,{defaultPos:"mid"})),wV("size",e)),wV("angle",e)),function(e,t,n){return n?{shape:{value:n}}:wV("shape",e)}(e,0,t))}function sY(e){var t=e.config,n=e.markDef,a=n.orient,r="horizontal"===a?"width":"height",i=e.getScaleComponent("horizontal"===a?"x":"y"),o=EU(n[r],n.size,tL("size",n,t,{vgChannel:r}),t.tick.bandSize);if(void 0!==o)return o;var s=i?i.get("range"):void 0;return s&&GP(s)&&Object(he.E)(s.step)?3*s.step/4:3*tK(t.view,r)/4}var uY={arc:{vgMark:"arc",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore"})),BV("x",e,{defaultPos:"mid"})),BV("y",e,{defaultPos:"mid"})),XV(e,{channel:"radius",vgChannel:"outerRadius",vgChannel2:"innerRadius",defaultRef:iY(e)})),XV(e,{channel:"theta",vgChannel:"startAngle",vgChannel2:"endAngle",defaultRef:{signal:"PI * 2"}}))}},area:{vgMark:"area",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore"})),MV("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient})),MV("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient})),qV(e))}},bar:{vgMark:"rect",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore"})),LV(e,"x","bar")),LV(e,"y","bar"))}},circle:{vgMark:"symbol",encodeEntry:function(e){return oY(e,"circle")}},geoshape:{vgMark:"shape",encodeEntry:function(e){return Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore"}))},postEncodingTransform:function(e){var t=e.encoding.shape;return[Object.assign({type:"geoshape",projection:e.projectionName()},t&&xH(t)&&"geojson"===t.type?{field:MH(t,{expr:"datum"})}:{})]}},image:{vgMark:"image",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore"})),LV(e,"x","image")),LV(e,"y","image")),_V(e,"url"))}},line:{vgMark:"line",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore"})),BV("x",e,{defaultPos:"mid"})),BV("y",e,{defaultPos:"mid"})),wV("size",e,{vgChannel:"strokeWidth"})),qV(e))}},point:{vgMark:"symbol",encodeEntry:function(e){return oY(e)}},rect:{vgMark:"rect",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore"})),LV(e,"x","rect")),LV(e,"y","rect"))}},rule:{vgMark:"rule",encodeEntry:function(e){var t=e.markDef.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore"})),MV("x",e,{defaultPos:"horizontal"===t?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==t})),MV("y",e,{defaultPos:"vertical"===t?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==t})),wV("size",e,{vgChannel:"strokeWidth"})):{}}},square:{vgMark:"symbol",encodeEntry:function(e){return oY(e,"square")}},text:{vgMark:"text",encodeEntry:function(e){var t=e.config;return e.encoding,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore"})),BV("x",e,{defaultPos:"mid"})),BV("y",e,{defaultPos:"mid"})),_V(e)),wV("size",e,{vgChannel:"fontSize"})),wV("angle",e)),GV("align",function(e,t,n){var a;if(void 0===(null!==(a=e.align)&&void 0!==a?a:tL("align",e,n)))return"center"}(e.markDef,0,t))),GV("baseline",function(e,t,n){var a;if(void 0===(null!==(a=e.baseline)&&void 0!==a?a:tL("baseline",e,n)))return"middle"}(e.markDef,0,t))),YV("radius",e)),YV("theta",e))}},tick:{vgMark:"rect",encodeEntry:function(e){var t=e.config,n=e.markDef,a=n.orient,r="horizontal"===a?"width":"height",i="horizontal"===a?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore"})),BV("x",e,{defaultPos:"mid",vgChannel:"xc"})),BV("y",e,{defaultPos:"mid",vgChannel:"yc"})),wV("size",e,{defaultValue:sY(e),vgChannel:r})),Object(To.a)({},i,{value:EU(n.thickness,t.tick.thickness)}))}},trail:{vgMark:"trail",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VV(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore"})),BV("x",e,{defaultPos:"mid"})),BV("y",e,{defaultPos:"mid"})),wV("size",e)),qV(e))}}};function dY(e){var t=e.encoding,n=e.stack,a=e.mark,r=e.markDef,i=e.config,o=t.order;if(!(!Object(he.A)(o)&&SH(o)&&nU(o.value)||!o&&nU(r.order)||nU(tL("order",r,i)))){if((Object(he.A)(o)||xH(o))&&!n)return rL(o,{expr:"datum"});if(UU(a)){var s="horizontal"===r.orient?"y":"x",u=t[s];if(xH(u)){var d=u.sort;return Object(he.A)(d)?{field:MH(u,{prefix:s,suffix:"sort_index",expr:"datum"})}:lH(d)?{field:MH({aggregate:fz(e.encoding)?d.op:void 0,field:d.field},{expr:"datum"})}:cH(d)?{field:MH(e.fieldDef(d.encoding),{expr:"datum"}),order:d.order}:{field:MH(u,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"})}}}}}function cY(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""},n=e.mark,a=EU(e.markDef.clip,lY(e),fY(e)),r=ZP(e.markDef),i=e.encoding.key,o=dY(e),s=gY(e),u=uY[n].postEncodingTransform?uY[n].postEncodingTransform(e):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("marks"),type:uY[n].vgMark},a?{clip:!0}:{}),r?{style:r}:{}),i?{key:i.field}:{}),o?{sort:o}:{}),s||{}),{from:{data:t.fromPrefix+e.requestDataName(nV)},encode:{update:uY[n].encodeEntry(e)}}),u?{transform:u}:{})]}function lY(e){var t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!!(t&&t.get("selectionExtent")||n&&n.get("selectionExtent"))||void 0}function fY(e){var t=e.component.projection;return!(!t||t.isFit)||void 0}function gY(e){if(!e.component.selection)return null;for(var t=lU(e.component.selection).length,n=t,a=e.parent;a&&0===n;)n=lU(a.component.selection).length,a=a.parent;return n?{interactive:t>0}:null}var hY=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r){var i,o,s,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},d=arguments.length>4?arguments[4]:void 0;Object(x.a)(this,n),(i=t.call(this,e,"unit",a,r,d,void 0,$z(e)?e.view:void 0)).specifiedScales={},i.specifiedAxes={},i.specifiedLegends={},i.specifiedProjection={},i.selection={},i.children=[];var c=IU(e.mark)?e.mark.type:e.mark;i.markDef=rY(e.mark,null!==(o=e.encoding)&&void 0!==o?o:{},d,{graticule:e.data&&tV(e.data)});var l=i.encoding=hz(null!==(s=e.encoding)&&void 0!==s?s:{},i.markDef);return i.size=aY({encoding:l,size:$z(e)?Object.assign(Object.assign(Object.assign({},u),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):u}),i.stack=CK(c,l),i.specifiedScales=i.initScales(c,l),i.specifiedAxes=i.initAxes(l),i.specifiedLegends=i.initLegend(l),i.specifiedProjection=e.projection,i.selection=e.selection,i}return Object(_.a)(n,[{key:"scaleDomain",value:function(e){var t=this.specifiedScales[e];return t?t.domain:void 0}},{key:"axis",value:function(e){return this.specifiedAxes[e]}},{key:"legend",value:function(e){return this.specifiedLegends[e]}},{key:"initScales",value:function(e,t){return IP.reduce((function(e,n){var a,r=GH(t[n]);return r&&(e[n]=null!==(a=r.scale)&&void 0!==a?a:{}),e}),{})}},{key:"initAxes",value:function(e){return[nP,aP].reduce((function(t,n){var a=e[n];if(OH(a)||n===nP&&OH(e.x2)||n===aP&&OH(e.y2)){var r=OH(a)?a.axis:void 0;t[n]=r?Object.assign({},r):r}return t}),{})}},{key:"initLegend",value:function(e){return PP.reduce((function(t,n){var a=GH(e[n]);if(a&&function(e){switch(e){case rP:case iP:case oP:case uP:case sP:case dP:case fP:case gP:return!0;case cP:case lP:case"angle":return!1}}(n)){var r=a.legend;t[n]=r?Object.assign({},r):r}return t}),{})}},{key:"parseData",value:function(){this.component.data=KX(this)}},{key:"parseLayoutSize",value:function(){!function(e){var t,n=e.size,a=e.component,r=sr(DP);try{for(r.s();!(t=r.n()).done;){var i=MP(t.value);if(n[i]){var o=n[i];a.layoutSize.set(i,Jz(o)?"step":o,!0)}else{var s=IX(e,i);a.layoutSize.set(i,s,!1)}}}catch(e){r.e(e)}finally{r.f()}}(this)}},{key:"parseSelections",value:function(){this.component.selection=function(e,t){var n,a,r={},i=e.config.selection,o=sr(lU(null!=t?t:{}));try{var s=function(){var o=a.value,s=JN(t[o]),u=i[s.type],d=(u.fields,u.encodings,T(u,["fields","encodings"]));for(var c in d)"encodings"===c&&s.fields||"fields"===c&&s.encodings||("mark"===c&&(s[c]=Object.assign(Object.assign({},d[c]),s[c])),void 0!==s[c]&&!0!==s[c]||(s[c]=null!==(n=d[c])&&void 0!==n?n:s[c]));var l=hU(o),f=r[l]=Object.assign(Object.assign({},s),{name:l,events:Object(he.H)(s.on)?gT(s.on,"scope"):JN(s.on)});pW(f,(function(n){n.has(f)&&n.parse&&n.parse(e,f,s,t[o])}))};for(o.s();!(a=o.n()).done;)s()}catch(e){o.e(e)}finally{o.f()}return r}(this,this.selection)}},{key:"parseMarkGroup",value:function(){this.component.mark=function(e){return aU(["line","area","trail"],e.mark)?function(e){var t=mz(e.mark,e.encoding),n=cY(e,{fromPrefix:t.length>0?"faceted_path_":""});return t.length>0?[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:"faceted_path_"+e.requestDataName(nV),data:e.requestDataName(nV),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:n}]:n}(e):aU(["bar"],e.mark)?function(e){var t=JP.some((function(t){return e.markDef[t]||tL(t,e.markDef,e.config)}));if(e.stack&&!e.fieldDef("size")&&t){var n,a,r=cY(e,{fromPrefix:"stack_group_"}),i=Object(ei.a)(r,1)[0],o=e.scaleName(e.stack.fieldChannel),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.vgField(e.stack.fieldChannel,t)},u=function(e,t){var n=[s({prefix:"min",suffix:"start",expr:t}),s({prefix:"max",suffix:"start",expr:t}),s({prefix:"min",suffix:"end",expr:t}),s({prefix:"max",suffix:"end",expr:t})];return"".concat(e,"(").concat(n.map((function(e){return"scale('".concat(o,"',").concat(e,")")})).join(","),")")};"x"===e.stack.fieldChannel?(n=Object.assign(Object.assign({},$N(i.encode.update,["y","yc","y2","height"].concat(Object(Bh.a)(JP)))),{x:{signal:u("min","datum")},x2:{signal:u("max","datum")},clip:{value:!0}}),a={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},i.encode.update=Object.assign(Object.assign({},ZN(i.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(n=Object.assign(Object.assign({},$N(i.encode.update,["x","xc","x2","width"])),{y:{signal:u("min","datum")},y2:{signal:u("max","datum")},clip:{value:!0}}),a={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},i.encode.update=Object.assign(Object.assign({},ZN(i.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));var d,c=sr(JP);try{for(c.s();!(d=c.n()).done;){var l=d.value,f=tL(l,e.markDef,e.config);i.encode.update[l]?(n[l]=i.encode.update[l],delete i.encode.update[l]):f&&(n[l]={value:f}),f&&(i.encode.update[l]={value:0})}}catch(e){c.e(e)}finally{c.f()}var g=e.fieldDef(e.stack.groupbyChannel),h=MH(g)?[MH(g)]:[];return((null==g?void 0:g.bin)||(null==g?void 0:g.timeUnit))&&h.push(MH(g,{binSuffix:"end"})),(n=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((function(t,n){if(i.encode.update[n])return Object.assign(Object.assign({},t),Object(To.a)({},n,i.encode.update[n]));var a=tL(n,e.markDef,e.config);return void 0!==a?Object.assign(Object.assign({},t),Object(To.a)({},n,{value:a})):t}),n)).stroke&&(n.strokeForeground={value:!0},n.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(nV),name:"stack_group_"+e.requestDataName(nV),groupby:h,aggregate:{fields:[s({suffix:"start"}),s({suffix:"start"}),s({suffix:"end"}),s({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:n},marks:[{type:"group",encode:{update:a},marks:[i]}]}]}return cY(e)}(e):cY(e)}(this)}},{key:"parseAxesAndHeaders",value:function(){this.component.axes=function(e){return DP.reduce((function(t,n){return e.component.scales[n]&&(t[n]=[tY(n,e)]),t}),{})}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(e){return function(e,t){var n=!1;return BW(e,(function(a,r){var i=a.name,o=Object(he.Z)(i+EW);if(0===t.filter((function(e){return e.name===i})).length){var s="global"===a.resolve?"union":a.resolve,u="multi"===a.type?", true)":")";t.push({name:a.name,update:"".concat(CW,"(").concat(o,", ").concat(Object(he.Z)(s)).concat(u)})}n=!0,r.topLevelSignals&&(t=r.topLevelSignals(e,a,t)),pW(a,(function(n){n.topLevelSignals&&(t=n.topLevelSignals(e,a,t))}))})),n&&0===t.filter((function(e){return"unit"===e.name})).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),mW(t)}(this,e)}},{key:"assembleSignals",value:function(){return[].concat(Object(Bh.a)(HW(this)),Object(Bh.a)(function(e,t){return BW(e,(function(n,a){var r,i=n.name,o=a.modifyExpr(e,n);(r=t).push.apply(r,Object(Bh.a)(a.signals(e,n))),pW(n,(function(a){a.signals&&(t=a.signals(e,n,t)),a.modifyExpr&&(o=a.modifyExpr(e,n,o))})),t.push({name:i+"_modify",on:[{events:{signal:n.name+kW},update:"modify(".concat(Object(he.Z)(n.name+EW),", ").concat(o,")")}]})})),mW(t)}(this,[])))}},{key:"assembleSelectionData",value:function(e){return function(e,t){var n=Object(Bh.a)(t);return BW(e,(function(t){var a={name:t.name+EW};if(t.init){var r=t.project.items.map((function(e){return e.signals,T(e,["signals"])})),i=t.init.map((function(e){return AW(e,!1)}));a.values="interval"===t.type?[{unit:FW(e,{escape:!1}),fields:r,values:i}]:i.map((function(t){return{unit:FW(e,{escape:!1}),fields:r,values:t}}))}n.filter((function(e){return e.name===t.name+EW})).length||n.push(a)})),n}(this,e)}},{key:"assembleLayout",value:function(){return null}},{key:"assembleLayoutSignals",value:function(){return pq(this)}},{key:"assembleMarks",value:function(){var e,t=null!==(e=this.component.mark)&&void 0!==e?e:[];return this.parent&&AX(this.parent)||(t=vW(this,t)),t.map(this.correctDataNames)}},{key:"getMapping",value:function(){return this.encoding}},{key:"channelHasField",value:function(e){return lz(this.encoding,e)}},{key:"fieldDef",value:function(e){return qH(this.encoding[e])}},{key:"typedFieldDef",value:function(e){var t=this.fieldDef(e);return BH(t)?t:null}},{key:"hasProjection",get:function(){var e=this.encoding,t="geoshape"===this.mark,n=e&&AP.some((function(t){return OH(e[t])}));return t||n}},{key:"mark",get:function(){return this.markDef.type}}]),n}(mX),pY=function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(e,a,r,i,o){var s;Object(x.a)(this,n),s=t.call(this,e,"layer",a,r,o,e.resolve,e.view);var u=Object.assign(Object.assign(Object.assign({},i),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});return s.children=e.layer.map((function(e,t){if(vK(e))return new n(e,Object(E.a)(s),s.getName("layer_"+t),u,o);if(KU(e))return new hY(e,Object(E.a)(s),s.getName("layer_"+t),u,o);throw new Error(CI.invalidSpec(e))})),s}return Object(_.a)(n,[{key:"parseData",value:function(){this.component.data=KX(this);var e,t=sr(this.children);try{for(t.s();!(e=t.n()).done;)e.value.parseData()}catch(e){t.e(e)}finally{t.f()}}},{key:"parseLayoutSize",value:function(){!function(e){PX(e),LX(e,"width"),LX(e,"height")}(this)}},{key:"parseSelections",value:function(){var e=this;this.component.selection={};var t,n=sr(this.children);try{var a=function(){var n=t.value;n.parseSelections(),lU(n.component.selection).forEach((function(t){e.component.selection[t]=n.component.selection[t]}))};for(n.s();!(t=n.n()).done;)a()}catch(e){n.e(e)}finally{n.f()}}},{key:"parseMarkGroup",value:function(){var e,t=sr(this.children);try{for(t.s();!(e=t.n()).done;)e.value.parseMarkGroup()}catch(e){t.e(e)}finally{t.f()}}},{key:"parseAxesAndHeaders",value:function(){!function(e){var t,n,a=e.component,r=a.axes,i=a.resolve,o={top:0,bottom:0,right:0,left:0},s=sr(e.children);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.parseAxesAndHeaders();var d,c=sr(lU(u.component.axes));try{for(c.s();!(d=c.n()).done;){var l=d.value;i.axis[l]=bq(e.component.resolve,l),"shared"===i.axis[l]&&(r[l]=YX(r[l],u.component.axes[l]),r[l]||(i.axis[l]="independent",delete r[l]))}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}for(var f=0,g=[nP,aP];f0&&!x){var _=XX[w];o[w]>o[_]&&R.set("orient",_,!1)}o[w]++}}catch(e){y.e(e)}finally{y.f()}}delete v.component.axes[p]}}}catch(e){A.e(e)}finally{A.f()}if("independent"===i.axis[p]&&r[p]&&r[p].length>1){var E,k=sr(r[p]);try{for(k.s();!(E=k.n()).done;){var C=E.value;C.get("grid")&&!C.explicit.grid&&(C.implicit.grid=!1)}}catch(e){k.e(e)}finally{k.f()}}}}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionTopLevelSignals(e)}),e)}},{key:"assembleSignals",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleSignals())}),HW(this))}},{key:"assembleLayoutSignals",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleLayoutSignals())}),pq(this))}},{key:"assembleSelectionData",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionData(e)}),e)}},{key:"assembleTitle",value:function(){var e=Object(yK.a)(Object(mK.a)(n.prototype),"assembleTitle",this).call(this);if(e)return e;var t,a=sr(this.children);try{for(a.s();!(t=a.n()).done;)if(e=t.value.assembleTitle())return e}catch(e){a.e(e)}finally{a.f()}}},{key:"assembleLayout",value:function(){return null}},{key:"assembleMarks",value:function(){return function(e,t){var n,a=sr(e.children);try{for(a.s();!(n=a.n()).done;){var r=n.value;gX(r)&&(t=vW(r,t))}}catch(e){a.e(e)}finally{a.f()}return t}(this,this.children.flatMap((function(e){return e.assembleMarks()})))}},{key:"assembleLegends",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleLegends())}),Gq(this))}}]),n}(vX);function AY(e,t,n,a,r){if(pH(e))return new HX(e,t,n,r);if(vK(e))return new pY(e,t,n,a,r);if(KU(e))return new hY(e,t,n,a,r);if(function(e){return Xz(e)||Yz(e)||Gz(e)}(e))return new VX(e,t,n,r);throw new Error(CI.invalidSpec(e))}function vY(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.logger&&SI(t.logger),t.fieldTitle&&QH(t.fieldTitle),t.formatTypes&&eH(t.formatTypes);try{var n=lK(Object(he.N)(t.config,e.config)),a=KK(e,n),r=AY(a,null,"",void 0,n);r.parse(),QG(r.component.data,r);var i=yY(r,mY(e,a.autosize,n,r),e.datasets,e.usermeta);return{spec:i,normalized:a}}finally{t.logger&&FI(),t.fieldTitle&&HH()}}function mY(e,t,n,a){var r=a.component.layoutSize.get("width"),i=a.component.layoutSize.get("height");if(void 0===t?t={type:"pad"}:Object(he.H)(t)&&(t={type:t}),r&&i&&function(e){return"fit"===e||"fit-x"===e||"fit-y"===e}(t.type))if("step"===r&&"step"===i)jI(CI.droppingFit()),t.type="pad";else if("step"===r||"step"===i){var o="step"===r?"width":"height";jI(CI.droppingFit(NP(o)));var s="width"===o?"height":"width";t.type=function(e){return e?"fit-".concat(NP(e)):"fit"}(s)}return Object.assign(Object.assign(Object.assign({},1===lU(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t}),GK(n)),GK(e))}function yY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,r=e.config?pK(e.config):void 0,i=[].concat(e.assembleSelectionData([]),TX(e.component.data,n)),o=e.assembleProjections(),s=e.assembleTitle(),u=e.assembleGroupStyle(),d=e.assembleGroupEncodeEntry(!0),c=e.assembleLayoutSignals();return c=c.filter((function(e){return"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)})),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},e.description?{description:e.description}:{}),t),s?{title:s}:{}),u?{style:u}:{}),d?{encode:{update:d}}:{}),{data:i}),o.length>0?{projections:o}:{}),e.assembleGroup([].concat(Object(Bh.a)(c),Object(Bh.a)(e.assembleSelectionTopLevelSignals([]))))),r?{config:r}:{}),a?{usermeta:a}:{})}var RY=new(function(e){Object(C.a)(n,e);var t=Object(k.a)(n);function n(){return Object(x.a)(this,n),t.apply(this,arguments)}return Object(_.a)(n,[{key:"mapUnit",value:function(e,t){var n=t.config;if(e.encoding){var a=e.encoding,r=e.transform,i=gz(a,n),o=i.bins,s=i.timeUnits,u=i.aggregate,d=i.groupby,c=i.encoding,l=[].concat(Object(Bh.a)(r||[]),Object(Bh.a)(o),Object(Bh.a)(s),Object(Bh.a)(0===u.length?[]:[{aggregate:u,groupby:d}]));return Object.assign(Object.assign(Object.assign({},e),l.length>0?{transform:l}:{}),{encoding:c})}return e}}]),n}(RK));function bY(e,t){return RY.map(e,{config:t})}var wY=LN.version,xY=n(385),_Y=n.n(xY),EY=n(588),kY={background:"#333",title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},CY={background:"#fff",arc:{fill:"#4572a7"},area:{fill:"#4572a7"},line:{stroke:"#4572a7",strokeWidth:2},path:{stroke:"#4572a7"},rect:{fill:"#4572a7"},shape:{stroke:"#4572a7"},symbol:{fill:"#4572a7",strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},OY={arc:{fill:"#30a2da"},area:{fill:"#30a2da"},axis:{domainColor:"#cbcbcb",grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:"#cbcbcb",tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:"#f0f0f0",group:{fill:"#f0f0f0"},legend:{labelColor:"#333",labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:"#333",titleFontSize:14,titlePadding:10},line:{stroke:"#30a2da",strokeWidth:2},path:{stroke:"#30a2da",strokeWidth:.5},rect:{fill:"#30a2da"},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:"#30a2da"},bar:{binSpacing:2,fill:"#30a2da",stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},BY={group:{fill:"#e5e5e5"},arc:{fill:"#000"},area:{fill:"#000"},line:{stroke:"#000"},path:{stroke:"#000"},rect:{fill:"#000"},shape:{stroke:"#000"},symbol:{fill:"#000",size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},SY="Benton Gothic Bold, sans-serif",FY={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},jY={background:"#ffffff",title:{anchor:"start",color:"#000000",font:SY,fontSize:22,fontWeight:"normal"},arc:{fill:"#82c6df"},area:{fill:"#82c6df"},line:{stroke:"#82c6df",strokeWidth:2},path:{stroke:"#82c6df"},rect:{fill:"#82c6df"},shape:{stroke:"#82c6df"},symbol:{fill:"#82c6df",size:30},axis:{labelFont:"Benton Gothic, sans-serif",labelFontSize:11.5,labelFontWeight:"normal",titleFont:SY,titleFontSize:13,titleFontWeight:"normal"},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:"Benton Gothic, sans-serif",labelFontSize:11.5,symbolType:"square",titleFont:SY,titleFontSize:13,titleFontWeight:"normal"},range:{category:FY["category-6"],diverging:FY["fireandice-6"],heatmap:FY["fire-7"],ordinal:FY["fire-7"],ramp:FY["fire-7"]}},DY={background:"#f9f9f9",arc:{fill:"#ab5787"},area:{fill:"#ab5787"},line:{stroke:"#ab5787"},path:{stroke:"#ab5787"},rect:{fill:"#ab5787"},shape:{stroke:"#ab5787"},symbol:{fill:"#ab5787",size:30},axis:{domainColor:"#979797",domainWidth:.5,gridWidth:.2,labelColor:"#979797",tickColor:"#979797",tickWidth:.2,titleColor:"#979797"},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},TY={background:"#fff",arc:{fill:"#3e5c69"},area:{fill:"#3e5c69"},line:{stroke:"#3e5c69"},path:{stroke:"#3e5c69"},rect:{fill:"#3e5c69"},shape:{stroke:"#3e5c69"},symbol:{fill:"#3e5c69"},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},MY={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},NY={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:"Lato"},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:"Lato",labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:"Lato"},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:"Lato",labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:"Lato",titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:"Lato",symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:"Lato",orient:"right",offset:10},view:{stroke:"transparent"},range:{category:MY["six-groups-cat-1"],diverging:MY["diverging-colors"],heatmap:MY["diverging-colors"],ordinal:MY["six-groups-seq"],ramp:MY["shades-blue"]},area:{fill:"#1696d2"},rect:{fill:"#1696d2"},line:{color:"#1696d2",stroke:"#1696d2",strokeWidth:5},trail:{color:"#1696d2",stroke:"#1696d2",strokeWidth:0,size:1},path:{stroke:"#1696d2",strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:"#1696d2",fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:"#1696d2",stroke:null}},arc:{fill:"#1696d2"},shape:{stroke:"#1696d2"},symbol:{fill:"#1696d2",size:30}},UY={arc:{fill:"#3366CC"},area:{fill:"#3366CC"},path:{stroke:"#3366CC"},rect:{fill:"#3366CC"},shape:{stroke:"#3366CC"},symbol:{stroke:"#3366CC"},circle:{fill:"#3366CC"},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:"Arial, sans-serif",fontSize:12},"guide-title":{font:"Arial, sans-serif",fontSize:12},"group-title":{font:"Arial, sans-serif",fontSize:12}},title:{font:"Arial, sans-serif",fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:"#ccc",tickColor:"#ccc",domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},PY=EY.version,LY=n(589),IY="vg-tooltip-element",QY={offsetX:10,offsetY:10,id:IY,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&").replace(/t&&d(),o=t=n+1):"]"===a&&(o||WY("Access path missing open bracket: "+e),o>0&&d(),o=0,t=n+1):n>t?d():t=n+1}return o&&WY("Access path missing closing bracket: "+e),i&&WY("Access path missing closing quote: "+e),n>t&&(n++,d()),r}(e);e=1===a.length?a[0]:e,HY((n&&n.get||zY)(a),[e],t||e)})("id"),HY((function(e){return e}),qY,"identity"),HY((function(){return 0}),qY,"zero"),HY((function(){return 1}),qY,"one"),HY((function(){return!0}),qY,"true"),HY((function(){return!1}),qY,"false");var GY=Array.isArray,XY=function(e){return e===Object(e)},YY=function(e){return"__proto__"!==e};function JY(){for(var e=arguments.length,t=new Array(e),n=0;ne?"[Object]":t.indexOf(a)>=0?"[Circular]":(t.push(a),a)}}(t))}var aJ,rJ=function(){function e(t){Object(x.a)(this,e),this.options=Object.assign(Object.assign({},QY),t);var n=this.options.id;if(this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var a=document.createElement("style");a.setAttribute("id",this.options.styleId),a.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n".toString().replace(IY,e)}(n);var r=document.head;r.childNodes.length>0?r.insertBefore(a,r.childNodes[0]):r.appendChild(a)}this.el=document.getElementById(n),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",n),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el))}return Object(_.a)(e,[{key:"tooltipHandler",value:function(e,t,n,a){if(null!=a&&""!==a){this.el.innerHTML=function(e,t,n){if(GY(e))return"[".concat(e.map((function(e){return t(tJ(e)?e:nJ(e,n))})).join(", "),"]");if(XY(e)){var a="",r=e,i=r.title,o=r.image,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r")),o&&(a+=''));var u=Object.keys(s);if(u.length>0){a+="";var d,c=sr(u);try{for(c.s();!(d=c.n()).done;){var l=d.value,f=s[l];void 0!==f&&(XY(f)&&(f=nJ(f,n)),a+='"))}}catch(e){c.e(e)}finally{c.f()}a+="
'.concat(t(l),':').concat(t(f),"
"}return a||"{}"}return t(e)}(a,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible","".concat(this.options.theme,"-theme"));var r=function(e,t,n,a){var r=e.clientX+n;r+t.width>window.innerWidth&&(r=+e.clientX-n-t.width);var i=e.clientY+a;return i+t.height>window.innerHeight&&(i=+e.clientY-a-t.height),{x:r,y:i}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),i=r.x,o=r.y;this.el.setAttribute("style","top: ".concat(o,"px; left: ").concat(i,"px"))}else this.el.classList.remove("visible","".concat(this.options.theme,"-theme"))}}]),e}(),iJ=(LY.version,function(e,t,n){var a=e.open(t),r=new URL(t).origin,i=40;e.addEventListener("message",(function t(n){n.source===a&&(i=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){i<=0||(a.postMessage(n,r),setTimeout(e,250),i-=1)}),250)}),oJ='.vega-embed {\n position: relative;\n display: inline-block; }\n .vega-embed.has-actions {\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer;\n line-height: 0px; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset; }\n .vega-embed summary svg {\n width: 14px;\n height: 14px; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left; }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: scroll;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n';function sJ(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a
'),i="
".concat(n,""),o=window.open("");o.document.write(r+e+i),o.document.title="".concat(hJ[a]," JSON Source")}function RJ(e,t){var n;if(e.$schema){var a=_Y()(e.$schema);t&&t!==a.library&&console.warn("The given visualization spec is written in ".concat(hJ[a.library],", but mode argument sets ").concat(null!==(n=hJ[t])&&void 0!==n?n:t,"."));var r=a.library;return Object(ge.satisfies)(pJ[r],"^".concat(a.version.slice(1)))||console.warn("The input spec uses ".concat(hJ[r]," ").concat(a.version,", but the current version of ").concat(hJ[r]," is v").concat(pJ[r],".")),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!=t?t:"vega"}function bJ(e){return!(!e||!("load"in e))}function wJ(e,t){var n;return M(this,void 0,void 0,D.a.mark((function a(){var r,i;return D.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!tJ(e.config)){a.next=8;break}return a.t1=JSON,a.next=4,t.load(e.config);case 4:a.t2=a.sent,a.t0=a.t1.parse.call(a.t1,a.t2),a.next=9;break;case 8:a.t0=null!==(n=e.config)&&void 0!==n?n:{};case 9:if(r=a.t0,!tJ(e.patch)){a.next=18;break}return a.t4=JSON,a.next=14,t.load(e.patch);case 14:a.t5=a.sent,a.t3=a.t4.parse.call(a.t4,a.t5),a.next=19;break;case 18:a.t3=e.patch;case 19:return i=a.t3,a.abrupt("return",Object.assign(Object.assign(Object.assign({},e),i?{patch:i}:{}),r?{config:r}:{}));case 21:case"end":return a.stop()}}),a)})))}function xJ(e,t){var n,a,r,i,o,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=arguments.length>3?arguments[3]:void 0;return M(this,void 0,void 0,D.a.mark((function c(){var l,f,g,h,p,A,v,m,y,b,w,x,_,E,k,C,O,B,S,F,j,T,N,U,P,L,I,Q,H,z,K,V,W;return D.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(W=function(){j&&document.removeEventListener("click",j),k.finalize()},l=u.theme?JY(R[u.theme],null!==(n=u.config)&&void 0!==n?n:{}):u.config,f=eJ(u.actions)?u.actions:sJ({},fJ,null!==(a=u.actions)&&void 0!==a?a:{}),g=Object.assign(Object.assign({},gJ),u.i18n),h=null!==(r=u.renderer)&&void 0!==r?r:"canvas",p=null!==(i=u.logLevel)&&void 0!==i?i:dJ.Warn,A=null!==(o=u.downloadFileName)&&void 0!==o?o:"visualization",!1!==u.defaultStyle&&(v="vega-embed-style",document.getElementById(v)||((m=document.createElement("style")).id=v,m.innerText=void 0===u.defaultStyle||!0===u.defaultStyle?oJ.toString():u.defaultStyle,document.head.appendChild(m))),y=RJ(t,u.mode),b=AJ[y](t,l),"vega-lite"===y&&b.$schema&&(w=_Y()(b.$schema),Object(ge.satisfies)(pJ.vega,"^".concat(w.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(w.version,", but current version is v").concat(pJ.vega,"."))),x="string"==typeof e?document.querySelector(e):e){c.next=14;break}throw Error("".concat(e," does not exist"));case 14:return x.classList.add("vega-embed"),f&&x.classList.add("has-actions"),x.innerHTML="",(_=u.patch)&&(b=_ instanceof Function?_(b):$(b,_,!0,!1).newDocument),u.formatLocale&&dJ.formatLocale(u.formatLocale),u.timeFormatLocale&&dJ.timeFormatLocale(u.timeFormatLocale),E=dJ.parse(b,"vega-lite"===y?{}:l),k=new dJ.View(E,{loader:d,logLevel:p,renderer:h}),!1!==u.tooltip&&(C=mJ(u.tooltip)?u.tooltip:new rJ(!0===u.tooltip?{}:u.tooltip).call,k.tooltip(C)),void 0===(O=u.hover)&&(O="vega"===y),O&&(S=(B="boolean"==typeof O?{}:O).hoverSet,F=B.updateSet,k.hover(S,F)),u&&(null!=u.width&&k.width(u.width),null!=u.height&&k.height(u.height),null!=u.padding&&k.padding(u.padding)),c.next=30,k.initialize(e).runAsync();case 30:if(!1!==f){if(T=x,!1!==u.defaultStyle&&((N=document.createElement("details")).title=g.CLICK_TO_VIEW_ACTIONS,x.append(N),T=N,(U=document.createElement("summary")).innerHTML=vJ,N.append(U),j=function(e){N.contains(e.target)||N.removeAttribute("open")},document.addEventListener("click",j)),P=document.createElement("div"),T.append(P),P.classList.add("vega-actions"),!0===f||!1!==f.export)for(L=function(){var e=Q[I];if(!0===f||!0===f.export||f.export[e]){var t=g["".concat(e.toUpperCase(),"_ACTION")],n=document.createElement("a");n.text=t,n.href="#",n.target="_blank",n.download="".concat(A,".").concat(e),n.addEventListener("mousedown",(function(t){return M(this,void 0,void 0,D.a.mark((function n(){var a;return D.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.preventDefault(),n.next=3,k.toImageURL(e,u.scaleFactor);case 3:a=n.sent,this.href=a;case 5:case"end":return n.stop()}}),n,this)})))})),P.append(n)}},I=0,Q=["svg","png"];I0}function CJ(e,t){var n=Object.keys(t);return n.forEach((function(n){try{e.removeSignalListener(n,t[n])}catch(e){console.warn("Cannot remove invalid signal listener.",e)}})),n.length>0}function OJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BJ(){return(BJ=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["spec","onNewView","signalListeners"]);if(this.containerRef.current){var i=SJ(this.props);this.viewPromise=function(e,t){var n,a,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return M(this,void 0,void 0,D.a.mark((function o(){var s,u,d,c,l;return D.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(s=bJ(i.loader)?i.loader:dJ.loader(i.loader),!tJ(t)){o.next=9;break}return o.t1=JSON,o.next=5,s.load(t);case 5:o.t2=o.sent,o.t0=o.t1.parse.call(o.t1,o.t2),o.next=10;break;case 9:o.t0=t;case 10:return u=o.t0,o.next=13,wJ(null!==(n=u.usermeta&&u.usermeta.embedOptions)&&void 0!==n?n:{},s);case 13:return d=o.sent,o.next=16,wJ(i,s);case 16:return c=o.sent,l=Object.assign(Object.assign({},sJ(c,d)),{config:JY(null!==(a=c.config)&&void 0!==a?a:{},null!==(r=d.config)&&void 0!==r?r:{})}),o.next=20,xJ(e,u,l,s);case 20:return o.abrupt("return",o.sent);case 21:case"end":return o.stop()}}),o)})))}(this.containerRef.current,i,r).then((function(e){var t=e.view;return kJ(t,a)&&t.run(),t})).catch(this.handleError),t&&this.modifyView(t)}}},{key:"clearView",value:function(){return this.modifyView((function(e){e.finalize()})),this.viewPromise=void 0,this}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.style;return w.a.createElement("div",{ref:this.containerRef,className:t,style:n})}}]),n}(w.a.PureComponent);function jJ(){return(jJ=Object.assign||function(e){for(var t=1;t0&&this.vegaEmbed.current.modifyView((function(t){(function(e,t){Object.keys(t).forEach((function(n){!function(e,t,n){n&&(function(e){return!!e&&"[object Function]"==={}.toString.call(e)}(n)?n(e.data(t)):e.change(t,dJ.changeset().remove((function(){return!0})).insert(n)))}(e,n,t[n])}))})(t,e),t.resize().run()}))}},{key:"render",value:function(){var e=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a=0||(r[n]=e[n]);return r}(this.props,["data"]);return w.a.createElement(FJ,jJ({ref:this.vegaEmbed},e,{onNewView:this.handleNewView}))}}]),n}(w.a.PureComponent);function MJ(){return(MJ=Object.assign||function(e){for(var t=1;tc;)for(var g,h=d(arguments[c++]),p=l?i(h).concat(l(h)):i(h),A=p.length,v=0;A>v;)g=p[v++],a&&!f.call(h,g)||(n[g]=h[g]);return n}:c},function(e,t,n){"use strict";var a=n(1),r=n(398),i=n(607);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n